From 2fb60ae9d9af1ab39133fdf775c27fa82c21b866 Mon Sep 17 00:00:00 2001 From: Farid Saud Date: Wed, 5 Sep 2018 18:52:50 -0500 Subject: [PATCH] EVENTZ-197: Customize plugin --- dist/grapesjs-preset-webpage.min.js | 6 +- package-lock.json | 907 +--------------------------- package.json | 2 +- src/blocks/index.js | 9 + src/commands/index.js | 9 +- src/consts.js | 3 +- src/panels/index.js | 8 +- 7 files changed, 31 insertions(+), 913 deletions(-) diff --git a/dist/grapesjs-preset-webpage.min.js b/dist/grapesjs-preset-webpage.min.js index 6c2cfb8..4dd7e66 100644 --- a/dist/grapesjs-preset-webpage.min.js +++ b/dist/grapesjs-preset-webpage.min.js @@ -1,5 +1,5 @@ -/*! grapesjs-preset-webpage - 0.1.10 */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],t):"object"==typeof exports?exports["grapesjs-preset-webpage"]=t(require("grapesjs")):e["grapesjs-preset-webpage"]=t(e.grapesjs)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(10),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.cmdImport="gjs-open-import-webpage",t.cmdDeviceDesktop="set-device-desktop",t.cmdDeviceTablet="set-device-tablet",t.cmdDeviceMobile="set-device-mobile",t.cmdClear="canvas-clear"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=r(i),o=n(5),s=r(o),l=n(6),u=r(l),c=n(7),f=r(c),h=n(8),d=r(h),p=n(9),m=r(p),g=n(12),v=r(g),b=n(13),y=r(b),w=n(14),_=r(w),k=n(16),x=r(k),S=n(17),E=r(S),T=n(18),C=r(T),A=n(19),O=r(A);t.default=a.default.plugins.add("gjs-preset-webpage",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:["link-block","quote","text-basic"],modalImportTitle:"Import",modalImportButton:"Import",modalImportLabel:"",modalImportContent:"",importViewerOptions:{},textCleanCanvas:"Are you sure to clean the canvas?",showStylesOnChange:1,textGeneral:"General",textLayout:"Layout",textTypography:"Typography",textDecorations:"Decorations",textExtra:"Extra",customStyleManager:[],blocksBasicOpts:{},navbarOpts:{},countdownOpts:{},formsOpts:{},exportOpts:{},aviaryOpts:0,filestackOpts:0};for(var i in r)i in n||(n[i]=r[i]);var a=n.blocksBasicOpts,o=n.navbarOpts,l=n.countdownOpts,c=n.formsOpts,h=n.exportOpts,p=n.aviaryOpts,g=n.filestackOpts;a&&(0,s.default)(e,a),o&&(0,u.default)(e,o),l&&(0,f.default)(e,l),c&&(0,d.default)(e,c),h&&(0,m.default)(e,h),p&&(0,v.default)(e,p),g&&(0,y.default)(e,g),(0,E.default)(e,n),(0,x.default)(e,n),(0,_.default)(e,n),(0,C.default)(e,n),(0,O.default)(e,n)})},function(e,t,n){/*! grapesjs-blocks-basic - 0.1.7 */ +/*! grapesjs-preset-webpage - 0.1.25 */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],t):"object"==typeof exports?exports["grapesjs-preset-webpage"]=t(require("grapesjs")):e["grapesjs-preset-webpage"]=t(e.grapesjs)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(10),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.cmdImport="gjs-open-import-webpage",t.cmdDeviceDesktop="set-device-desktop",t.cmdDeviceTablet="set-device-tablet",t.cmdDeviceMobile="set-device-mobile",t.cmdClear="canvas-clear",t.cmdSave="save-template"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=r(i),o=n(5),s=r(o),l=n(6),u=r(l),c=n(7),f=r(c),h=n(8),d=r(h),p=n(9),m=r(p),g=n(12),v=r(g),b=n(13),y=r(b),w=n(14),_=r(w),k=n(16),x=r(k),S=n(17),E=r(S),T=n(18),C=r(T),A=n(19),O=r(A);t.default=a.default.plugins.add("gjs-preset-webpage",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:["link-block","quote","text-basic"],modalImportTitle:"Import",modalImportButton:"Import",modalImportLabel:"",modalImportContent:"",importViewerOptions:{},textCleanCanvas:"Are you sure to clean the canvas?",showStylesOnChange:1,textGeneral:"General",textLayout:"Layout",textTypography:"Typography",textDecorations:"Decorations",textExtra:"Extra",customStyleManager:[],blocksBasicOpts:{},navbarOpts:{},countdownOpts:{},formsOpts:{},exportOpts:{},aviaryOpts:0,filestackOpts:0};for(var i in r)i in n||(n[i]=r[i]);var a=n.blocksBasicOpts,o=n.navbarOpts,l=n.countdownOpts,c=n.formsOpts,h=n.exportOpts,p=n.aviaryOpts,g=n.filestackOpts;a&&(0,s.default)(e,a),o&&(0,u.default)(e,o),l&&(0,f.default)(e,l),c&&(0,d.default)(e,c),h&&(0,m.default)(e,h),p&&(0,v.default)(e,p),g&&(0,y.default)(e,g),(0,E.default)(e,n),(0,x.default)(e,n),(0,_.default)(e,n),(0,C.default)(e,n),(0,O.default)(e,n)})},function(e,t,n){/*! grapesjs-blocks-basic - 0.1.7 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},i=r({blocks:["column1","column2","column3","column3-7","text","link","image","video","map"],flexGrid:0,stylePrefix:"",addBasicStyle:!0,category:"Basic",labelColumn1:"1 Column",labelColumn2:"2 Columns",labelColumn3:"3 Columns",labelColumn37:"2 Columns 3/7",labelText:"Text",labelLink:"Link",labelImage:"Image",labelVideo:"Video",labelMap:"Map"},t);n(2).default(e,i)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.blocks,o=n.stylePrefix,s=n.flexGrid,l=n.addBasicStyle,u=o+"row",c=o+"cell",f=s?"\n ."+u+" {\n display: flex;\n justify-content: flex-start;\n align-items: stretch;\n flex-wrap: nowrap;\n padding: 10px;\n }\n @media (max-width: 768px) {\n ."+u+" {\n flex-wrap: wrap;\n }\n }":"\n ."+u+" {\n display: table;\n padding: 10px;\n width: 100%;\n }\n @media (max-width: 768px) {\n ."+o+"cell, ."+o+"cell30, ."+o+"cell70 {\n width: 100%;\n display: block;\n }\n }",h=s?"\n ."+c+" {\n min-height: 75px;\n flex-grow: 1;\n flex-basis: 100%;\n }":"\n ."+c+" {\n width: 8%;\n display: table-cell;\n height: 75px;\n }",d="\n ."+o+"cell30 {\n width: 30%;\n }",p="\n ."+o+"cell70 {\n width: 70%;\n }",m={tl:0,tc:0,tr:0,cl:0,cr:0,bl:0,br:0,minDim:1},g=r({},m,{cr:1,bc:0,currentUnit:1,minDim:1,step:.2});s&&(g.keyWidth="flex-basis");var v={class:u,"data-gjs-droppable":"."+c,"data-gjs-resizable":m,"data-gjs-name":"Row"},b={class:c,"data-gjs-draggable":"."+u,"data-gjs-resizable":g,"data-gjs-name":"Cell"};s&&(b["data-gjs-unstylable"]=["width"],b["data-gjs-stylable-require"]=["flex-basis"]);var y=["."+u,"."+c];e.on("selector:add",function(e){return y.indexOf(e.getFullName())>=0&&e.set("private",1)});var w=function(e){var t=[];for(var n in e){var r=e[n],i=r instanceof Array||r instanceof Object;r=i?JSON.stringify(r):r,t.push(n+"="+(i?"'"+r+"'":'"'+r+'"'))}return t.length?" "+t.join(" "):""},_=function(e){return a.indexOf(e)>=0},k=w(v),x=w(b);_("column1")&&i.add("column1",{label:n.labelColumn1,category:n.category,attributes:{class:"gjs-fonts gjs-f-b1"},content:"
\n
\n
\n "+(l?"":"")}),_("column2")&&i.add("column2",{label:n.labelColumn2,attributes:{class:"gjs-fonts gjs-f-b2"},category:n.category,content:"
\n
\n
\n
\n "+(l?"":"")}),_("column3")&&i.add("column3",{label:n.labelColumn3,category:n.category,attributes:{class:"gjs-fonts gjs-f-b3"},content:"
\n
\n
\n
\n
\n "+(l?"":"")}),_("column3-7")&&i.add("column3-7",{label:n.labelColumn37,category:n.category,attributes:{class:"gjs-fonts gjs-f-b37"},content:"
\n
\n
\n
\n '+(l?"":"")}),_("text")&&i.add("text",{label:n.labelText,category:n.category,attributes:{class:"gjs-fonts gjs-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}}),_("link")&&i.add("link",{label:n.labelLink,category:n.category,attributes:{class:"fa fa-link"},content:{type:"link",content:"Link",style:{color:"#d983a6"}}}),_("image")&&i.add("image",{label:n.labelImage,category:n.category,attributes:{class:"gjs-fonts gjs-f-image"},content:{style:{color:"black"},type:"image",activeOnRender:1}}),_("video")&&i.add("video",{label:n.labelVideo,category:n.category,attributes:{class:"fa fa-youtube-play"},content:{type:"video",src:"img/video2.webm",style:{height:"350px",width:"615px"}}}),_("map")&&i.add("map",{label:n.labelMap,category:n.category,attributes:{class:"fa fa-map-o"},content:{type:"map",style:{height:"350px"}}})}}])})},function(e,t,n){/*! grapesjs-navbar - 0.1.5 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hNavbarRef="h-navbar",t.navbarRef="navbar",t.navbarItemsRef="navbar-items",t.menuRef="navbar-menu"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=r(l),c=n(0);t.default=a.default.plugins.add("gjs-navbar",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[c.hNavbarRef],defaultStyle:1,navbarClsPfx:"navbar",labelNavbar:"Navbar",labelNavbarContainer:"Navbar Container",labelMenu:"Navbar Menu",labelMenuLink:"Menu link",labelBurger:"Burger",labelBurgerLine:"Burger Line",labelNavbarBlock:"Navbar",labelNavbarCategory:"Extra",labelHome:"Home",labelAbout:"About",labelContact:"Contact"};for(var i in r)i in n||(n[i]=r[i]);(0,s.default)(e,n),(0,u.default)(e,n)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.navbarClsPfx||"navbar",o=n.defaultStyle?"\n \n ":"";n.blocks.indexOf(r.hNavbarRef)>=0&&i.add(r.hNavbarRef,{label:'\n \n \n \n \n \n \n
'+n.labelNavbarBlock+"
",category:n.labelNavbarCategory,content:'\n
\n
\n\n \n\n
\n
\n
\n
\n
\n\n \n\n
\n
\n "+o+"\n "})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType("default"),o=a.model;i.addType("burger-menu",{model:o.extend({defaults:r({},o.prototype.defaults,{"custom-name":n.labelBurger,draggable:!1,droppable:!1,copyable:!1,removable:!1,script:function(){var e,t=0,n=function(){var e,t=document.createElement("void"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}(),r=function(e){var t=window.getComputedStyle(e),n=t.display,r=(t.position,t.visibility,t.height,parseInt(t["max-height"]));if("none"!==n&&"0"!==r)return e.offsetHeight;e.style.height="auto",e.style.display="block",e.style.position="absolute",e.style.visibility="hidden";var i=e.offsetHeight;return e.style.height="",e.style.display="",e.style.position="",e.style.visibility="",i},i=function(e){t=1;var n=r(e),i=e.style;i.display="block",i.transition="max-height 0.25s ease-in-out",i.overflowY="hidden",""==i["max-height"]&&(i["max-height"]=0),0==parseInt(i["max-height"])?(i["max-height"]="0",setTimeout(function(){i["max-height"]=n+"px"},10)):i["max-height"]="0"},a=function(r){if(r.preventDefault(),!t){var a=this.closest("[data-gjs=navbar]"),o=a.querySelector("[data-gjs=navbar-items]");i(o),e||(o.addEventListener(n,function(){t=0;var e=o.style;0==parseInt(e["max-height"])&&(e.display="",e["max-height"]="")}),e=1)}};"gjs-collapse"in this||this.addEventListener("click",a),this["gjs-collapse"]=1}})},{isComponent:function(e){if(e.getAttribute&&"burger-menu"==e.getAttribute("data-gjs-type"))return{type:"burger-menu"}}}),view:a.view})}}])})},function(e,t,n){/*! grapesjs-component-countdown - 0.1.2 */ !function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.countdownRef="countdown"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=r(l),c=n(0);t.default=a.default.plugins.add("gjs-component-countdown",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r={blocks:[c.countdownRef],defaultStyle:!0,startTime:"",endText:"EXPIRED",dateInputType:"date",countdownClsPfx:"countdown",labelCountdown:"Countdown",labelCountdownCategory:"Extra",labelDays:"days",labelHours:"hours",labelMinutes:"minutes",labelSeconds:"seconds"};for(var i in r)i in n||(n[i]=r[i]);(0,s.default)(e,n),(0,u.default)(e,n)})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.DomComponents,a=i.getType("default"),o=i.getType("text"),s=a.model,l=a.view,u=(o.model,o.view,n.countdownClsPfx);i.addType("countdown",{model:s.extend({defaults:r({},s.prototype.defaults,{startfrom:n.startTime,endText:n.endText,droppable:!1,traits:[{label:"Start",name:"startfrom",changeProp:1,type:n.dateInputType},{label:"End text",name:"endText",changeProp:1}],script:function(){var e=new Date("{[ startfrom ]}").getTime(),t=this.querySelector("[data-js=countdown]"),n=this.querySelector("[data-js=countdown-endtext]"),r=this.querySelector("[data-js=countdown-day]"),i=this.querySelector("[data-js=countdown-hour]"),a=this.querySelector("[data-js=countdown-minute]"),o=this.querySelector("[data-js=countdown-second]"),s=this.gjs_countdown_interval;s&&s&&clearInterval(s);var l=function(e,t,n,s){r.innerHTML=e<10?"0"+e:e,i.innerHTML=t<10?"0"+t:t,a.innerHTML=n<10?"0"+n:n,o.innerHTML=s<10?"0"+s:s},u=function(){var r=(new Date).getTime(),i=e-r,a=Math.floor(i/864e5),o=Math.floor(i%864e5/36e5),s=Math.floor(i%36e4/6e4),u=Math.floor(i%6e4/1e3);l(a,o,s,u),i<0&&(clearInterval(c),n.innerHTML="{[ endText ]}",t.style.display="none",n.style.display="")};if(e){var c=setInterval(u,1e3);this.gjs_countdown_interval=c,n.style.display="none",t.style.display="",u()}else l(0,0,0,0)}})},{isComponent:function(e){if(e.getAttribute&&"countdown"==e.getAttribute("data-gjs-type"))return{type:"countdown"}}}),view:l.extend({init:function(){this.listenTo(this.model,"change:startfrom change:endText",this.updateScript);var e=this.model.get("components");e.length||(e.reset(),e.add('\n \n
\n
\n
'+n.labelDays+'
\n
\n
\n
\n
'+n.labelHours+'
\n
\n
\n
\n
'+n.labelMinutes+'
\n
\n
\n
\n
'+n.labelSeconds+'
\n
\n
\n \n '))}})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,i=e.BlockManager,a=n.countdownClsPfx,o=n.defaultStyle?"":"";n.blocks.indexOf(r.countdownRef)>=0&&i.add(r.countdownRef,{label:n.labelCountdown,category:n.labelCountdownCategory,attributes:{class:"fa fa-clock-o"},content:'\n
\n '+o+"\n "})};var r=n(0)}])})},function(e,t,n){/*! grapesjs-plugin-forms - 0.3.5 */ @@ -12,4 +12,4 @@ */ var G=n(54),J=n(55),$=n(24);t.Buffer=a,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return l(null,e,t,n)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),J.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),J.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),J.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),J.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;u[254]=u[254]=1;var f=function(e){var t,n,r,i,a,s=e.length,l=0;for(i=0;i>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},h=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+u[e[n]]>t?n:t},d=function(e){var t,n,r,i,o=e.length,s=new Array(2*o);for(n=0,t=0;t4)s[n++]=65533,t+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&t1?s[n++]=65533:r<65536?s[n++]=r:(r-=65536,s[n++]=55296|r>>10&1023,s[n++]=56320|1023&r)}return s.length!==n&&(s.subarray?s=s.subarray(0,n):s.length=n),a.applyFromCharCode(s)};t.utf8encode=function(e){return o.nodebuffer?s.newBufferFrom(e,"utf-8"):f(e)},t.utf8decode=function(e){return o.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):(e=a.transformTo(o.uint8array?"uint8array":"array",e),d(e))},a.inherits(r,l),r.prototype.processChunk=function(e){var n=a.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var i=h(n),s=n;i!==n.length&&(o.uint8array?(s=n.subarray(0,i),this.leftOver=n.subarray(i,n.length)):(s=n.slice(0,i),this.leftOver=n.slice(i,n.length))),this.push({data:t.utf8decode(s),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,a.inherits(i,l),i.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=i},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function l(e){return"symbol"==typeof e}function u(e){return void 0===e}function c(e){return"[object RegExp]"===g(e)}function f(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===g(e)}function d(e){return"[object Error]"===g(e)||e instanceof Error}function p(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function g(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=a,t.isNumber=o,t.isString=s,t.isSymbol=l,t.isUndefined=u,t.isRegExp=c,t.isObject=f,t.isDate=h,t.isError=d,t.isFunction=p,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(t,n(2).Buffer)},function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:n(80),e.exports={Promise:r}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(12).EventEmitter;n(7)(r,i),r.Readable=n(56),r.Writable=n(62),r.Duplex=n(63),r.Transform=n(64),r.PassThrough=n(65),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",a),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",l),u.removeListener("close",l),e.removeListener("close",l)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(u.on("end",a),u.on("close",o));var c=!1;return u.on("error",s),e.on("error",s),u.on("end",l),u.on("close",l),e.on("close",l),e.emit("pipe",u),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){m&&d&&(m=!1,d.length?p=d.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=i(o);m=!0;for(var t=p.length;t;){for(d=p,p=[];++g1)for(var n=1;n-1?r:S,T=n(2).Buffer;s.WritableState=o;var C=n(8);C.inherits=n(7);var A,O={deprecate:n(60)};!function(){try{A=n(11)}catch(e){}finally{A||(A=n(12).EventEmitter)}}();var T=n(2).Buffer;C.inherits(s,A);var I;o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var I;s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},s.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),T.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?l(this,n):u(this,r,e,n)&&(r.pendingcb++,a=f(this,r,e,t,n)),a},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},s.prototype._write=function(e,t,n){n(new Error("not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||k(this,r,n)}}).call(t,n(13),n(58).setImmediate)},function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length>>8^i[255&(e^t[s])];return-1^e}function i(e,t,n,r){var i=o,a=r+n;e^=-1;for(var s=r;s>>8^i[255&(e^t.charCodeAt(s))];return-1^e}var a=n(0),o=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==a.getTypeOf(e)?r(0|t,e,e.length,0):i(0|t,e,e.length,0):0}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(11)},function(e,t,n){"use strict";(function(t){function r(e,t){B=B||n(5),e=e||{},this.objectMode=!!e.objectMode,t instanceof B&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(27).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function i(e){if(B=B||n(5),!(this instanceof i))return new i(e);this._readableState=new r(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),A.call(this)}function a(e,t,n,r,i){var a=u(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,c(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var l;!t.decoder||i||r||(n=t.decoder.write(n),l=!t.objectMode&&0===n.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return C.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?E(h,e):h(e))}function h(e){L("emit readable"),e.emit("readable"),y(e)}function d(e,t){t.readingMore||(t.readingMore=!0,E(p,e,t))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)n=a?r.join(""):1===r.length?r[0]:C.concat(r,i),r.length=0;else if(e0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,E(k,t,e))}function k(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function x(e,t){for(var n=0,r=e.length;n0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_(this):f(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&_(this),null;var r=t.needReadable;L("need readable",r),(0===t.length||t.length-e0?w(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&_(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,n){function r(e){L("onunpipe"),e===f&&a()}function i(){L("onend"),e.end()}function a(){L("cleanup"),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("drain",g),e.removeListener("error",s),e.removeListener("unpipe",r),f.removeListener("end",i),f.removeListener("end",a),f.removeListener("data",o),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function o(t){L("ondata"),!1===e.write(t)&&(1!==h.pipesCount||h.pipes[0]!==e||1!==f.listenerCount("data")||v||(L("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++),f.pause())}function s(t){L("onerror",t),c(),e.removeListener("error",s),0===O(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",u),c()}function u(){L("onfinish"),e.removeListener("close",l),c()}function c(){L("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,L("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||!1!==n.end)&&e!==t.stdout&&e!==t.stderr,p=d?i:a;h.endEmitted?E(p):f.once("end",p),e.on("unpipe",r);var g=m(f);e.on("drain",g);var v=!1;return f.on("data",o),e._events&&e._events.error?T(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",l),e.once("finish",u),e.emit("pipe",f),h.flowing||(L("pipe resume"),f.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0)}function l(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function u(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function h(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var b=n(61).Buffer,y=b.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n>2,s=(3&t)<<4|n>>4,l=d>1?(15&n)<<2|i>>6:64,u=d>2?63&i:64,c.push(a.charAt(o)+a.charAt(s)+a.charAt(l)+a.charAt(u));return c.join("")},t.decode=function(e){var t,n,r,o,s,l,u,c=0,f=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");var h=3*e.length/4;if(e.charAt(e.length-1)===a.charAt(64)&&h--,e.charAt(e.length-2)===a.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");var d;for(d=i.uint8array?new Uint8Array(0|h):new Array(0|h);c>4,n=(15&s)<<4|l>>2,r=(3&l)<<6|u,d[f++]=t,64!==l&&(d[f++]=n),64!==u&&(d[f++]=r);return d}},function(e,t){var n=e.exports={version:"2.3.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(69);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(19),i=n(15).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";(function(t){function r(e,t,n){switch(e){case"blob":return s.newBlob(s.transformTo("arraybuffer",t),n);case"base64":return c.encode(t);default:return s.transformTo(e,t)}}function i(e,n){var r,i=0,a=null,o=0;for(r=0;r=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},function(e,t,n){"use strict";function r(e){a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}var i=n(0),a=n(1);i.inherits(r,a),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}a.prototype.processChunk.call(this,e)},e.exports=r},function(e,t,n){"use strict";function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var i=n(1),a=n(22);n(0).inherits(r,i),r.prototype.processChunk=function(e){this.streamInfo.crc32=a(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},function(e,t,n){"use strict";var r=n(1);t.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=n(86)},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){o=n>2e3?2e3:n,n-=o;do{i=i+t[r++]|0,a=a+i|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=r},function(e,t,n){"use strict";function r(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",r=0;r=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;s[254]=s[254]=1,t.string2buf=function(e){var t,n,r,a,o,s=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},t.buf2binstring=function(e){return r(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n4)u[i++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?u[i++]=65533:a<65536?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return r(u,i)},t.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t}},function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,n){"use strict";var r=n(0),i=n(3),a=n(47),o=n(100),s=n(101),l=n(49);e.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new l(r.transformTo("uint8array",e)):new a(r.transformTo("array",e)):new o(e)}},function(e,t,n){"use strict";function r(e){i.call(this,e);for(var t=0;t=0;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var i=n(0);r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,e)}var i=n(47);n(0).inherits(r,i),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(51),a=r(i),o=n(52),s=r(o),l=n(103),u=r(l);t.default=a.default.plugins.add("gjs-plugin-export",function(e,t){var n=t||{},r=e.getConfig(),i=r.stylePrefix,a=document.createElement("BUTTON"),o={addExportBtn:1,btnLabel:"Export to ZIP",preHtml:'',postHtml:"",preCss:"",postCss:""};for(var l in o)l in n||(n[l]=o[l]);a.innerHTML=n.btnLabel,a.className=i+"btn-prim",e.Commands.add("gjs-export-zip",{run:function(){var t=new s.default,r=t.folder("css"),i="grapesjs_template_"+Date.now()+".zip";t.file("index.html",n.preHtml+e.getHtml()+n.postHtml),r.file("style.css",n.preCss+e.getCss()+n.postCss),t.generateAsync({type:"blob"}).then(function(e){u.default.saveAs(e,i)})}}),n.addExportBtn&&e.on("run:export-template",function(){e.Modal.getContentEl().appendChild(a),a.onclick=function(){e.runCommand("gjs-export-zip")}})})},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n(53),r.prototype.loadAsync=n(98),r.support=n(3),r.defaults=n(35),r.version="3.1.5",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=n(9),e.exports=r},function(e,t,n){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var i=n(6),a=n(0),o=n(1),s=n(34),l=n(35),u=n(21),c=n(84),f=n(85),h=n(14),d=n(97),p=function(e,t,n){var r,i=a.getTypeOf(t),s=a.extend(n||{},l);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(r=m(e))&&v.call(this,r,!0);var f="string"===i&&!1===s.binary&&!1===s.base64;n&&void 0!==n.binary||(s.binary=!f),(t instanceof u&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var p=null;p=t instanceof u||t instanceof o?t:h.isNode&&h.isStream(t)?new d(e,t):a.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var b=new c(e,p,s);this.files[e]=b},m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},v=function(e,t){return t=void 0!==t?t:l.createFolders,e=g(e),this.files[e]||p.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(r(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,p.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=v.call(this,t),i=this.clone();return i.root=n.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function a(e){var t,n,i,a,o,s=e.length;a=r(e),o=new f(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0;t>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===a?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===a&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],a=t;al?l:o+16383));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=l;for(var u=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+f>=1?h/l:h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[n+d]=255&o,d+=p,o/=256,u-=8);e[n+d-p]|=128*m}},function(e,t,n){var r=function(){try{return n(11)}catch(e){}}();t=e.exports=n(26),t.Stream=r||t,t.Readable=t,t.Writable=n(17),t.Duplex=n(5),t.Transform=n(18),t.PassThrough=n(28)},function(e,t){},function(e,n,i){function a(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;n.setTimeout=function(){return new a(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new a(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(59),n.setImmediate=t,n.clearImmediate=r},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nn;)t.push(arguments[n++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete g[e]},"process"==n(79)(f)?r=function(e){f.nextTick(o(v,e,1))}:p?(i=new p,a=i.port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(o(v,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(15).document&&document.documentElement},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function r(){}function i(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,e!==r&&l(this,e)}function a(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function o(e,t,n){p(function(){var r;try{r=t(n)}catch(t){return m.reject(e,t)}r===e?m.reject(e,new TypeError("Cannot resolve promise with itself")):m.resolve(e,r)})}function s(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function l(e,t){function n(t){a||(a=!0,m.reject(e,t))}function r(t){a||(a=!0,m.resolve(e,t))}function i(){t(r,n)}var a=!1,o=u(i);"error"===o.status&&n(o.value)}function u(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}function c(e){return e instanceof this?e:m.resolve(new this(r),e)}function f(e){var t=new this(r);return m.reject(t,e)}function h(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var a=new Array(n),o=0,s=-1,l=new this(r);++s0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var n=s.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(c[n]);if(t.header&&s.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?u.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=s.deflateSetDictionary(this.strm,i))!==d)throw new Error(c[n]);this._dict_set=!0}}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}function o(e,t){return t=t||{},t.gzip=!0,i(e,t)}var s=n(89),l=n(4),u=n(42),c=n(23),f=n(43),h=Object.prototype.toString,d=0,p=-1,m=0,g=8;r.prototype.push=function(e,t){var n,r,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=u.string2buf(e):"[object ArrayBuffer]"===h.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new l.Buf8(a),i.next_out=0,i.avail_out=a),1!==(n=s.deflate(i,r))&&n!==d)return this.onEnd(n),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(u.buf2binstring(l.shrinkBuf(i.output,i.next_out))):this.onData(l.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==n);return 4===r?(n=s.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==r||(this.onEnd(d),i.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=r,t.deflate=i,t.deflateRaw=a,t.gzip=o},function(e,t,n){"use strict";function r(e,t){return e.msg=B[t],t}function i(e){return(e<<1)-(e>4?9:0)}function a(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(I.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function s(e,t){R._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function u(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function c(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,I.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=L(e.adler,t,i,n):2===e.state.wrap&&(e.adler=j(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function f(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ue?e.strstart-(e.w_size-ue):0,u=e.window,c=e.w_mask,f=e.prev,h=e.strstart+le,d=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+o]===p&&u[n+o-1]===d&&u[n]===u[a]&&u[++n]===u[a+1]){a+=2,n++;do{}while(u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&ao){if(e.match_start=t,o=r,r>=s)break;d=u[a+o-1],p=u[a+o]}}}while((t=f[t&c])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function h(e){var t,n,r,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-ue)){I.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,n=e.hash_size,t=n;do{r=e.head[--t],e.head[t]=r>=o?r-o:0}while(--n);n=o,t=n;do{r=e.prev[--t],e.prev[t]=r>=o?r-o:0}while(--n);i+=o}if(0===e.strm.avail_in)break;if(n=c(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=se)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(h(e),0===e.lookahead&&t===M)return be;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,s(e,!1),0===e.strm.avail_out))return be;if(e.strstart-e.block_start>=e.w_size-ue&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):(e.strstart>e.block_start&&(s(e,!1),e.strm.avail_out),be)}function p(e,t){for(var n,r;;){if(e.lookahead=se&&(e.ins_h=(e.ins_h<=se)if(r=R._tr_tally(e,e.strstart-e.match_start,e.match_length-se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=se){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=se&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=se-1)),e.prev_length>=se&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-se,r=R._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<=se&&e.strstart>0&&(i=e.strstart-1,(r=o[i])===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+le;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=se?(n=R._tr_tally(e,1,e.match_length-se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function v(e,t){for(var n;;){if(0===e.lookahead&&(h(e),0===e.lookahead)){if(t===M)return be;break}if(e.match_length=0,n=R._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===z?(s(e,!0),0===e.strm.avail_out?we:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function b(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function y(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=O[e.level].max_lazy,e.good_match=O[e.level].good_length,e.nice_match=O[e.level].nice_length,e.max_chain_length=O[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=se-1,e.match_available=0,e.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(2*ae),this.dyn_dtree=new I.Buf16(2*(2*re+1)),this.bl_tree=new I.Buf16(2*(2*ie+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(oe+1),this.heap=new I.Buf16(2*ne+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*ne+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function _(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=J,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?fe:ge,e.adler=2===t.wrap?0:1,t.last_flush=M,R._tr_init(t),F):r(e,Z)}function k(e){var t=_(e);return t===F&&y(e.state),t}function x(e,t){return e&&e.state?2!==e.state.wrap?Z:(e.state.gzhead=t,F):Z}function S(e,t,n,i,a,o){if(!e)return Z;var s=1;if(t===q&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>Q||n!==$||i<8||i>15||t<0||t>9||o<0||o>X)return r(e,Z);8===i&&(i=9);var l=new w;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<D||t<0)return e?r(e,Z):Z;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===ve&&t!==z)return r(e,0===e.avail_out?Y:Z);if(s.strm=e,n=s.last_flush,s.last_flush=t,s.status===fe)if(2===s.wrap)e.adler=0,l(s,31),l(s,139),l(s,8),s.gzhead?(l(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),l(s,255&s.gzhead.time),l(s,s.gzhead.time>>8&255),l(s,s.gzhead.time>>16&255),l(s,s.gzhead.time>>24&255),l(s,9===s.level?2:s.strategy>=V||s.level<2?4:0),l(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(l(s,255&s.gzhead.extra.length),l(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=j(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=he):(l(s,0),l(s,0),l(s,0),l(s,0),l(s,0),l(s,9===s.level?2:s.strategy>=V||s.level<2?4:0),l(s,ke),s.status=ge);else{var h=$+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=V||s.level<2?0:s.level<6?1:6===s.level?2:3,h|=d<<6,0!==s.strstart&&(h|=ce),h+=31-h%31,s.status=ge,u(s,h),0!==s.strstart&&(u(s,e.adler>>>16),u(s,65535&e.adler)),e.adler=1}if(s.status===he)if(s.gzhead.extra){for(c=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending!==s.pending_buf_size));)l(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=de)}else s.status=de;if(s.status===de)if(s.gzhead.name){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexc&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.gzindex=0,s.status=pe)}else s.status=pe;if(s.status===pe)if(s.gzhead.comment){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexc&&(e.adler=j(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.status=me)}else s.status=me;if(s.status===me&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(l(s,255&e.adler),l(s,e.adler>>8&255),e.adler=0,s.status=ge)):s.status=ge),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,F}else if(0===e.avail_in&&i(t)<=i(n)&&t!==z)return r(e,Y);if(s.status===ve&&0!==e.avail_in)return r(e,Y);if(0!==e.avail_in||0!==s.lookahead||t!==M&&s.status!==ve){var p=s.strategy===V?v(s,t):s.strategy===K?g(s,t):O[s.level].func(s,t);if(p!==we&&p!==_e||(s.status=ve),p===be||p===we)return 0===e.avail_out&&(s.last_flush=-1),F;if(p===ye&&(t===P?R._tr_align(s):t!==D&&(R._tr_stored_block(s,0,0,!1),t===N&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,F}return t!==z?F:s.wrap<=0?U:(2===s.wrap?(l(s,255&e.adler),l(s,e.adler>>8&255),l(s,e.adler>>16&255),l(s,e.adler>>24&255),l(s,255&e.total_in),l(s,e.total_in>>8&255),l(s,e.total_in>>16&255),l(s,e.total_in>>24&255)):(u(s,e.adler>>>16),u(s,65535&e.adler)),o(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?F:U)}function C(e){var t;return e&&e.state?(t=e.state.status)!==fe&&t!==he&&t!==de&&t!==pe&&t!==me&&t!==ge&&t!==ve?r(e,Z):(e.state=null,t===ge?r(e,W):F):Z}function A(e,t){var n,r,i,o,s,l,u,c,f=t.length;if(!e||!e.state)return Z;if(n=e.state,2===(o=n.wrap)||1===o&&n.status!==fe||n.lookahead)return Z;for(1===o&&(e.adler=L(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===o&&(a(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new I.Buf8(n.w_size),I.arraySet(c,t,f-n.w_size,n.w_size,0),t=c,f=n.w_size),s=e.avail_in,l=e.next_in,u=e.input,e.avail_in=f,e.next_in=0,e.input=t,h(n);n.lookahead>=se;){r=n.strstart,i=n.lookahead-(se-1);do{n.ins_h=(n.ins_h<=0;)e[t]=0}function i(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?ae[e]:ae[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function l(e,t,n){e.bi_valid>V-n?(e.bi_buf|=t<>V-e.bi_valid,e.bi_valid+=n-V):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function f(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function h(e,t){var n,r,i,a,o,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=H;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;np&&(a=p,m++),l[2*r+1]=a,r>u||(e.bl_count[a]++,o=0,r>=d&&(o=h[r-d]),s=l[2*r],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>u||(l[2*i+1]!==a&&(e.opt_len+=(a-l[2*i+1])*l[2*i],l[2*i+1]=a),r--)}}function d(e,t,n){var r,i,a=new Array(H+1),o=0;for(r=1;r<=H;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=c(a[s]++,s))}}function p(){var e,t,n,r,a,o=new Array(H+1);for(n=0,r=0;r>=7;r8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function v(e,t,n,r){g(e),r&&(s(e,n),s(e,~n)),L.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function b(e,t,n,r){var i=2*t,a=2*n;return e[i]>1;n>=1;n--)y(e,a,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,y(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],h(e,t),d(a,u,e.bl_count)}function k(e,t,n){var r,i,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s=3&&0===e.bl_tree[2*ne[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function E(e,t,n,r){var i;for(l(e,t-257,5),l(e,n-1,5),l(e,r-4,4),i=0;i>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return B;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return M;for(t=32;t0?(e.strm.data_type===P&&(e.strm.data_type=T(e)),_(e,e.l_desc),_(e,e.d_desc),o=S(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?A(e,t,n,r):e.strategy===j||a===i?(l(e,(z<<1)+(r?1:0),3),w(e,re,ie)):(l(e,(D<<1)+(r?1:0),3),E(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),w(e,e.dyn_ltree,e.dyn_dtree)),m(e),r&&g(e)}function R(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(oe[n]+U+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var L=n(4),j=4,B=0,M=1,P=2,N=0,z=1,D=2,F=29,U=256,Z=U+1+F,W=30,Y=19,q=2*Z+1,H=15,V=16,K=7,X=256,G=16,J=17,$=18,Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ee=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],te=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=new Array(2*(Z+2));r(re);var ie=new Array(2*W);r(ie);var ae=new Array(512);r(ae);var oe=new Array(256);r(oe);var se=new Array(F);r(se);var le=new Array(W);r(le);var ue,ce,fe,he=!1;t._tr_init=C,t._tr_stored_block=A,t._tr_flush_block=I,t._tr_tally=R,t._tr_align=O},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var n=o.inflateInit2(this.strm,t.windowBits);if(n!==u.Z_OK)throw new Error(c[n]);this.header=new h,o.inflateGetHeader(this.strm,this.header)}function i(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}function a(e,t){return t=t||{},t.raw=!0,i(e,t)}var o=n(92),s=n(4),l=n(42),u=n(44),c=n(23),f=n(43),h=n(95),d=Object.prototype.toString;r.prototype.push=function(e,t){var n,r,i,a,c,f,h=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?u.Z_FINISH:u.Z_NO_FLUSH,"string"==typeof e?h.input=l.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new s.Buf8(p),h.next_out=0,h.avail_out=p),n=o.inflate(h,u.Z_NO_FLUSH),n===u.Z_NEED_DICT&&m&&(f="string"==typeof m?l.string2buf(m):"[object ArrayBuffer]"===d.call(m)?new Uint8Array(m):m,n=o.inflateSetDictionary(this.strm,f)),n===u.Z_BUF_ERROR&&!0===g&&(n=u.Z_OK,g=!1),n!==u.Z_STREAM_END&&n!==u.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==u.Z_STREAM_END&&(0!==h.avail_in||r!==u.Z_FINISH&&r!==u.Z_SYNC_FLUSH)||("string"===this.options.to?(i=l.utf8border(h.output,h.next_out),a=h.next_out-i,c=l.buf2string(h.output,i),h.next_out=a,h.avail_out=p-a,a&&s.arraySet(h.output,h.output,i,a,0),this.onData(c)):this.onData(s.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==u.Z_STREAM_END);return n===u.Z_STREAM_END&&(r=u.Z_FINISH),r===u.Z_FINISH?(n=o.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u.Z_OK):r!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),h.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===u.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=r,t.inflate=i,t.inflateRaw=a,t.ungzip=i},function(e,t,n){"use strict";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=N,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new b.Buf32(me),t.distcode=t.distdyn=new b.Buf32(ge),t.sane=1,t.back=-1,O):L}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):L}function s(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?L:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):L}function l(e,t){var n,r;return e?(r=new i,e.state=r,r.window=null,n=s(e,t),n!==O&&(e.state=null),n):L}function u(e){return l(e,ve)}function c(e){if(be){var t;for(g=new b.Buf32(512),v=new b.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(S,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(E,e.lens,0,32,v,0,e.work,{bits:5}),be=!1}e.lencode=g,e.lenbits=9,e.distcode=v,e.distbits=5}function f(e,t,n,r){var i,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(b.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),b.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(b.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=w(n.check,Ce,2,0),h=0,d=0,n.mode=z;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=he;break}if((15&h)!==P){e.msg="unknown compression method",n.mode=he;break}if(h>>>=4,d-=4,ke=8+(15&h),0===n.wbits)n.wbits=ke;else if(ke>n.wbits){e.msg="invalid window size",n.mode=he;break}n.dmax=1<>8&1),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0,n.mode=D;case D:for(;d<32;){if(0===l)break e;l--,h+=i[o++]<>>8&255,Ce[2]=h>>>16&255,Ce[3]=h>>>24&255,n.check=w(n.check,Ce,4,0)),h=0,d=0,n.mode=F;case F:for(;d<16;){if(0===l)break e;l--,h+=i[o++]<>8),512&n.flags&&(Ce[0]=255&h,Ce[1]=h>>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0,n.mode=U;case U:if(1024&n.flags){for(;d<16;){if(0===l)break e;l--,h+=i[o++]<>>8&255,n.check=w(n.check,Ce,2,0)),h=0,d=0}else n.head&&(n.head.extra=null);n.mode=Z;case Z:if(1024&n.flags&&(g=n.length,g>l&&(g=l),g&&(n.head&&(ke=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),b.arraySet(n.head.extra,i,o,g,ke)),512&n.flags&&(n.check=w(n.check,i,g,o)),l-=g,o+=g,n.length-=g),n.length))break e;n.length=0,n.mode=W;case W:if(2048&n.flags){if(0===l)break e;g=0;do{ke=i[o+g++],n.head&&ke&&n.length<65536&&(n.head.name+=String.fromCharCode(ke))}while(ke&&g>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=K;break;case H:for(;d<32;){if(0===l)break e;l--,h+=i[o++]<>>=7&d,d-=7&d,n.mode=ue;break}for(;d<3;){if(0===l)break e;l--,h+=i[o++]<>>=1,d-=1,3&h){case 0:n.mode=G;break;case 1:if(c(n),n.mode=ne,t===A){h>>>=2,d-=2;break e}break;case 2:n.mode=Q;break;case 3:e.msg="invalid block type",n.mode=he}h>>>=2,d-=2;break;case G:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break e;l--,h+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=he;break}if(n.length=65535&h,h=0,d=0,n.mode=J,t===A)break e;case J:n.mode=$;case $:if(g=n.length){if(g>l&&(g=l),g>u&&(g=u),0===g)break e;b.arraySet(a,i,o,g,s),l-=g,o+=g,u-=g,s+=g,n.length-=g;break}n.mode=K;break;case Q:for(;d<14;){if(0===l)break e;l--,h+=i[o++]<>>=5,d-=5,n.ndist=1+(31&h),h>>>=5,d-=5,n.ncode=4+(15&h),h>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=he;break}n.have=0,n.mode=ee;case ee:for(;n.have>>=3,d-=3}for(;n.have<19;)n.lens[Ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},xe=k(x,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,xe){e.msg="invalid code lengths set",n.mode=he;break}n.have=0,n.mode=te;case te:for(;n.have>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<>>=ge,d-=ge,n.lens[n.have++]=be;else{if(16===be){for(Ee=ge+2;d>>=ge,d-=ge,0===n.have){e.msg="invalid bit length repeat",n.mode=he;break}ke=n.lens[n.have-1],g=3+(3&h),h>>>=2,d-=2}else if(17===be){for(Ee=ge+3;d>>=ge,d-=ge,ke=0,g=3+(7&h),h>>>=3,d-=3}else{for(Ee=ge+7;d>>=ge,d-=ge,ke=0,g=11+(127&h),h>>>=7,d-=7}if(n.have+g>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=he;break}for(;g--;)n.lens[n.have++]=ke}}if(n.mode===he)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=he;break}if(n.lenbits=9,Se={bits:n.lenbits},xe=k(S,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,xe){e.msg="invalid literal/lengths set",n.mode=he;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},xe=k(E,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,xe){e.msg="invalid distances set",n.mode=he;break}if(n.mode=ne,t===A)break e;case ne:n.mode=re;case re:if(l>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=h,n.bits=d,_(e,m),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,h=n.hold,d=n.bits,n.mode===K&&(n.back=-1);break}for(n.back=0;Te=n.lencode[h&(1<>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<>ye)],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ye+ge<=d);){if(0===l)break e;l--,h+=i[o++]<>>=ye,d-=ye,n.back+=ye}if(h>>>=ge,d-=ge,n.back+=ge,n.length=be,0===ve){n.mode=le;break}if(32&ve){n.back=-1,n.mode=K;break}if(64&ve){e.msg="invalid literal/length code",n.mode=he;break}n.extra=15&ve,n.mode=ie;case ie:if(n.extra){for(Ee=n.extra;d>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ae;case ae:for(;Te=n.distcode[h&(1<>>24,ve=Te>>>16&255,be=65535&Te,!(ge<=d);){if(0===l)break e;l--,h+=i[o++]<>ye)],ge=Te>>>24,ve=Te>>>16&255,be=65535&Te,!(ye+ge<=d);){if(0===l)break e;l--,h+=i[o++]<>>=ye,d-=ye,n.back+=ye}if(h>>>=ge,d-=ge,n.back+=ge,64&ve){e.msg="invalid distance code",n.mode=he;break}n.offset=be,n.extra=15&ve,n.mode=oe;case oe:if(n.extra){for(Ee=n.extra;d>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=he;break}n.mode=se;case se:if(0===u)break e;if(g=m-u,n.offset>g){if((g=n.offset-g)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=he;break}g>n.wnext?(g-=n.wnext,v=n.wsize-g):v=n.wnext-g,g>n.length&&(g=n.length),me=n.window}else me=a,v=s-n.offset,g=n.length;g>u&&(g=u),u-=g,n.length-=g;do{a[s++]=me[v++]}while(--g);0===n.length&&(n.mode=re);break;case le:if(0===u)break e;a[s++]=n.length,u--,n.mode=re;break;case ue:if(n.wrap){for(;d<32;){if(0===l)break e;l--,h|=i[o++]<>>24,d>>>=w,p-=w,0==(w=y>>>16&255))T[a++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(d&(1<>>=w,p-=w),p<15&&(d+=E[r++]<>>24,d>>>=w,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<l){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,w=a-o,k>w){if((w=k-w)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,S=h,0===f){if(x+=u-w,w<_){_-=w;do{T[a++]=h[x++]}while(--w);x=a-k,S=T}}else if(f2;)T[a++]=S[x++],T[a++]=S[x++],T[a++]=S[x++],_-=3;_&&(T[a++]=S[x++],_>1&&(T[a++]=S[x++]))}else{x=a-k;do{T[a++]=T[x++],T[a++]=T[x++],T[a++]=T[x++],_-=3}while(_>2);_&&(T[a++]=T[x++],_>1&&(T[a++]=T[x++]))}break}}break}}while(r>3,r-=_,p-=_<<3,d&=(1<=1&&0===M[T];T--);if(C>T&&(C=T),0===T)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(E=1;E0&&(0===e||1!==T))return-1;for(P[1]=0,x=1;x<15;x++)P[x+1]=P[x]+M[x];for(S=0;S852||2===e&&R>592)return 1;for(;;){y=x-O,f[S]b?(w=N[z+f[S]],_=j[B+f[S]]):(w=96,_=0),d=1<>O)+p]=y<<24|w<<16|_|0}while(0!==p);for(d=1<>=1;if(0!==d?(L&=d-1,L+=d):L=0,S++,0==--M[x]){if(x===T)break;x=t[n+f[S]]}if(x>C&&(L&g)!==m){for(0===O&&(O=C),v+=E,A=x-O,I=1<852||2===e&&R>592)return 1;m=L&g,u[m]=C<<24|A<<16|v-c|0}}return 0!==L&&(u[v+L]=x-O<<24|64<<16|0),h.bits=C,0}},function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=n(0),a=n(1),o=n(6),s=n(22),l=n(45),u=function(e,t){var n,r="";for(n=0;n>>=8;return r},c=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16},f=function(e,t){return 63&(e||0)},h=function(e,t,n,r,a,h){var d,p,m=e.file,g=e.compression,v=h!==o.utf8encode,b=i.transformTo("string",h(m.name)),y=i.transformTo("string",o.utf8encode(m.name)),w=m.comment,_=i.transformTo("string",h(w)),k=i.transformTo("string",o.utf8encode(w)),x=y.length!==m.name.length,S=k.length!==w.length,E="",T="",C="",A=m.dir,O=m.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),v||!x&&!S||(R|=2048);var L=0,j=0;A&&(L|=16),"UNIX"===a?(j=798,L|=c(m.unixPermissions,A)):(j=20,L|=f(m.dosPermissions)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),x&&(T=u(1,1)+u(s(b),4)+y,E+="up"+u(T.length,2)+T),S&&(C=u(1,1)+u(s(_),4)+k,E+="uc"+u(C.length,2)+C);var B="";return B+="\n\0",B+=u(R,2),B+=g.magic,B+=u(d,2),B+=u(p,2),B+=u(I.crc32,4),B+=u(I.compressedSize,4),B+=u(I.uncompressedSize,4),B+=u(b.length,2),B+=u(E.length,2),{fileRecord:l.LOCAL_FILE_HEADER+B+b+E,dirRecord:l.CENTRAL_FILE_HEADER+u(j,2)+B+u(_.length,2)+"\0\0\0\0"+u(L,4)+u(r,4)+b+E+_}},d=function(e,t,n,r,a){var o=i.transformTo("string",a(r));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(e,2)+u(e,2)+u(t,4)+u(n,4)+u(o.length,2)+o},p=function(e){return l.DATA_DESCRIPTOR+u(e.crc32,4)+u(e.compressedSize,4)+u(e.uncompressedSize,4)};i.inherits(r,a),r.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},r.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=h(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},r.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=h(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:p(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},r.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=i(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,e)}var i=n(48);n(0).inherits(r,i),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,e)}var i=n(49);n(0).inherits(r,i),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";function r(e,t){this.options=e,this.loadOptions=t}var i=n(46),a=n(0),o=n(21),s=n(22),l=n(6),u=n(39),c=n(3),f=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null};r.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=f(this.compressionMethod)))throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getModel(),i=void 0,a={key:"1",onApply:null,getFilename:null,closeOnApply:!0,config:{}};for(var o in a)o in n||(n[o]=a[o]);var s=n.config;s.apiKey=n.key,s.onSave=function(e,t){i.set("src",t);var r="function"==typeof n.getFilename?n.getFilename:c,a=r(i);("function"==typeof n.onApply?n.onApply:f)(t,a,i),n.closeOnApply&&l.close()};var l=new Aviary.Feather(s),u=e.Commands,c=function(e){var t=e.get("src").split("/").pop();return Date.now()+"_"+t.slice(-15)},f=function(t,n){e.AssetManager.add({src:t,name:n})},h=document.createElement("img");u.add("image-editor",{run:function(e,t,n){var a=n||{},o=a.model||e.getSelected();i=o,h.src=o.get("src"),l.launch({image:h}),r.trigger("gjs-aviary:launch",o,l)}})})},function(t,n){t.exports=e}])})},function(e,t,n){/*! grapesjs-plugin-filestack - 0.1.1 */ -!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add("gjs-plugin-filestack",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getConfig(),i=r.stylePrefix||"",a=void 0,o={key:"",btnEl:"",btnText:"Add images",filestackOpts:{accept:"image/*",maxFiles:10},onComplete:function(e,t){}};for(var s in o)s in n||(n[s]=o[s]);if(!filestack)throw new Error("Filestack instance not found");if(!n.key)throw new Error("Filestack's API key not found");var l=filestack.init(n.key);e.on("run:open-assets",function(){var t=e.Modal,r=t.getContentEl(),o=r.querySelector("."+i+"am-file-uploader"),s=r.querySelector("."+i+"am-assets-header"),c=r.querySelector("."+i+"am-assets-cont");o&&(o.style.display="none"),s&&(s.style.display="none"),c.style.width="100%",a||(a=n.btnEl,a||(a=document.createElement("button"),a.className=i+"btn-prim "+i+"btn-filestack",a.innerHTML=n.btnText),a.onclick=function(){l.pick(n.filestackOpts).then(function(e){var t=e.filesUploaded,r=t instanceof Array?t:[t],i=u(r);n.onComplete(r,i)})}),c.insertBefore(a,s)});var u=function(t){var n=t.map(function(e){return e.src=e.url,e});return e.AssetManager.add(n)}})},function(t,n){t.exports=e}])})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(3);t.default=function(e,t){var n=e.Commands,r=t.textCleanCanvas;n.add(a.cmdImport,(0,i.default)(e,t)),n.add(a.cmdDeviceDesktop,function(e){return e.setDevice("Desktop")}),n.add(a.cmdDeviceTablet,function(e){return e.setDevice("Tablet")}),n.add(a.cmdDeviceMobile,function(e){return e.setDevice("Mobile portrait")}),n.add(a.cmdClear,function(e){return confirm(r)&&e.runCommand("core:canvas-clear")})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0};r("link-block")&&n.add("link-block",{category:"Basic",label:"Link Block",attributes:{class:"fa fa-link"},content:{type:"link",editable:!1,droppable:!0,style:{display:"inline-block",padding:"5px","min-height":"50px","min-width":"50px"}}}),r("quote")&&n.add("quote",{label:"Quote",category:"Basic",attributes:{class:"fa fa-quote-right"},content:'
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit\n
'}),r("text-basic")&&n.add("text-basic",{category:"Basic",label:"Text section",attributes:{class:"gjs-fonts gjs-f-h1p"},content:'
\n

Insert title here

\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

\n
'})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],e.DomComponents),n=t.getType("default");n.model,n.view}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.default=function(e,t){var n=e.Panels,i=e.getConfig(),a="sw-visibility",o="export-template",s="open-sm",l="open-layers",u="open-blocks",c="fullscreen",f="preview";i.showDevices=0,n.getPanels().reset([{id:"commands",buttons:[{}]},{id:"options",buttons:[{id:a,command:a,context:a,className:"fa fa-square-o"},{id:f,context:f,command:function(e){return e.runCommand(f)},className:"fa fa-eye"},{id:c,command:c,context:c,className:"fa fa-arrows-alt"},{id:o,className:"fa fa-code",command:function(e){return e.runCommand(o)}},{id:"undo",className:"fa fa-undo",command:function(e){return e.runCommand("core:undo")}},{id:"redo",className:"fa fa-repeat",command:function(e){return e.runCommand("core:redo")}},{id:r.cmdImport,className:"fa fa-download",command:function(e){return e.runCommand(r.cmdImport)}},{id:r.cmdClear,className:"fa fa-trash",command:function(e){return e.runCommand(r.cmdClear)}}]},{id:"views",buttons:[{id:s,command:s,active:!0,className:"fa fa-paint-brush"},{id:"open-tm",command:"open-tm",className:"fa fa-cog"},{id:l,command:l,className:"fa fa-bars"},{id:u,command:u,className:"fa fa-th-large"}]}]),n.addPanel({id:"devices-c"}).get("buttons").add([{id:r.cmdDeviceDesktop,command:r.cmdDeviceDesktop,className:"fa fa-desktop",active:1},{id:r.cmdDeviceTablet,command:r.cmdDeviceTablet,className:"fa fa-tablet"},{id:r.cmdDeviceMobile,command:r.cmdDeviceMobile,className:"fa fa-mobile"}]);var h=n.getButton("views",u);e.on("load",function(){return h&&h.set("active",1)}),t.showStylesOnChange&&e.on("component:selected",function(){var t=n.getButton("views",s),r=n.getButton("views",l);r&&r.get("active")||!e.getSelected()||t&&t.set("active",1)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.StyleManager,r=t.customStyleManager;n.getSectors().reset(r&&r.length?r:[{name:t.textGeneral,open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:t.textLayout,open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:t.textTypography,open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:t.textDecorations,open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:t.textExtra,open:!1,buildProps:["transition","perspective","transform"]}])}}])}); \ No newline at end of file +!function(t,r){e.exports=r(n(0))}(0,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default.plugins.add("gjs-plugin-filestack",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t,r=e.getConfig(),i=r.stylePrefix||"",a=void 0,o={key:"",btnEl:"",btnText:"Add images",filestackOpts:{accept:"image/*",maxFiles:10},onComplete:function(e,t){}};for(var s in o)s in n||(n[s]=o[s]);if(!filestack)throw new Error("Filestack instance not found");if(!n.key)throw new Error("Filestack's API key not found");var l=filestack.init(n.key);e.on("run:open-assets",function(){var t=e.Modal,r=t.getContentEl(),o=r.querySelector("."+i+"am-file-uploader"),s=r.querySelector("."+i+"am-assets-header"),c=r.querySelector("."+i+"am-assets-cont");o&&(o.style.display="none"),s&&(s.style.display="none"),c.style.width="100%",a||(a=n.btnEl,a||(a=document.createElement("button"),a.className=i+"btn-prim "+i+"btn-filestack",a.innerHTML=n.btnText),a.onclick=function(){l.pick(n.filestackOpts).then(function(e){var t=e.filesUploaded,r=t instanceof Array?t:[t],i=u(r);n.onComplete(r,i)})}),c.insertBefore(a,s)});var u=function(t){var n=t.map(function(e){return e.src=e.url,e});return e.AssetManager.add(n)}})},function(t,n){t.exports=e}])})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),i=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(3);t.default=function(e,t){var n=e.Commands,r=t.textCleanCanvas;n.add(a.cmdImport,(0,i.default)(e,t)),n.add(a.cmdDeviceDesktop,function(e){return e.setDevice("Desktop")}),n.add(a.cmdDeviceTablet,function(e){return e.setDevice("Tablet")}),n.add(a.cmdDeviceMobile,function(e){return e.setDevice("Mobile portrait")}),n.add(a.cmdClear,function(e){return confirm(r)&&e.runCommand("core:canvas-clear")}),n.add(a.cmdSave,{run:function(){},stop:function(){}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0};r("link-block")&&n.add("link-block",{category:"Basic",label:"Link Block",attributes:{class:"fa fa-link"},content:{type:"link",editable:!1,droppable:!0,style:{display:"inline-block",padding:"5px","min-height":"50px","min-width":"50px"}}}),r("quote")&&n.add("quote",{label:"Quote",category:"Basic",attributes:{class:"fa fa-quote-right"},content:'
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit\n
'}),r("text-basic")&&n.add("text-basic",{category:"Basic",label:"Text section",attributes:{class:"gjs-fonts gjs-f-h1p"},content:'
\n

Insert title here

\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

\n
'}),n.add("text-basic2",{category:"Custom",label:"Text section",attributes:{class:"gjs-fonts gjs-f-h1p"},content:'
\n

This is a custom component

\n
'})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],e.DomComponents),n=t.getType("default");n.model,n.view}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.default=function(e,t){var n=e.Panels,i=e.getConfig(),a="sw-visibility",o="export-template",s="open-sm",l="open-layers",u="open-blocks",c="fullscreen",f="preview";i.showDevices=0,n.getPanels().reset([{id:"commands",buttons:[{}]},{id:"options",buttons:[{id:r.cmdSave,command:function(e){return e.runCommand(r.cmdSave)},className:"fa fa-save"},{id:a,command:a,context:a,className:"fa fa-square-o"},{id:f,context:f,command:function(e){return e.runCommand(f)},className:"fa fa-eye"},{id:c,command:c,context:c,className:"fa fa-arrows-alt"},{id:o,className:"fa fa-code",command:function(e){return e.runCommand(o)}},{id:"undo",className:"fa fa-undo",command:function(e){return e.runCommand("core:undo")}},{id:"redo",className:"fa fa-repeat",command:function(e){return e.runCommand("core:redo")}},{id:r.cmdImport,className:"fa fa-download",command:function(e){return e.runCommand(r.cmdImport)}},{id:r.cmdClear,className:"fa fa-trash",command:function(e){return e.runCommand(r.cmdClear)}}]},{id:"views",buttons:[{id:s,command:s,active:!0,className:"fa fa-paint-brush"},{id:"open-tm",command:"open-tm",className:"fa fa-cog"},{id:l,command:l,className:"fa fa-bars"},{id:u,command:u,className:"fa fa-th-large"}]}]),n.addPanel({id:"devices-c"}).get("buttons").add([{id:r.cmdDeviceDesktop,command:r.cmdDeviceDesktop,className:"fa fa-desktop",active:1},{id:r.cmdDeviceTablet,command:r.cmdDeviceTablet,className:"fa fa-tablet"},{id:r.cmdDeviceMobile,command:r.cmdDeviceMobile,className:"fa fa-mobile"}]);var h=n.getButton("views",u);e.on("load",function(){return h&&h.set("active",1)}),t.showStylesOnChange&&e.on("component:selected",function(){var t=n.getButton("views",s),r=n.getButton("views",l);r&&r.get("active")||!e.getSelected()||t&&t.set("active",1)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.StyleManager,r=t.customStyleManager;n.getSectors().reset(r&&r.length?r:[{name:t.textGeneral,open:!1,buildProps:["float","display","position","top","right","left","bottom"]},{name:t.textLayout,open:!1,buildProps:["width","height","max-width","min-height","margin","padding"]},{name:t.textTypography,open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"],properties:[{property:"text-align",list:[{value:"left",className:"fa fa-align-left"},{value:"center",className:"fa fa-align-center"},{value:"right",className:"fa fa-align-right"},{value:"justify",className:"fa fa-align-justify"}]}]},{name:t.textDecorations,open:!1,buildProps:["border-radius-c","background-color","border-radius","border","box-shadow","background"]},{name:t.textExtra,open:!1,buildProps:["transition","perspective","transform"]}])}}])}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f051ec8..200c040 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "grapesjs-preset-webpage", - "version": "0.1.10", + "version": "0.1.25", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1407,7 +1407,6 @@ "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.2", - "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -2978,910 +2977,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "dev": true, - "optional": true, - "requires": { - "nan": "2.10.0", - "node-pre-gyp": "0.6.39" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dev": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - } - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", diff --git a/package.json b/package.json index 302e716..2936a50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grapesjs-preset-webpage", - "version": "0.1.10", + "version": "0.1.25", "description": "GrapesJS Plugin Webpage Preset", "main": "dist/grapesjs-preset-webpage.min.js", "scripts": { diff --git a/src/blocks/index.js b/src/blocks/index.js index e4ff67c..c88f2c7 100644 --- a/src/blocks/index.js +++ b/src/blocks/index.js @@ -37,4 +37,13 @@ export default (editor, config) => {

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

` }); + + bm.add('text-basic2', { + category: 'Custom', + label: 'Text section', + attributes: { class: 'gjs-fonts gjs-f-h1p' }, + content: `
+

This is a custom component

+
` + }); } diff --git a/src/commands/index.js b/src/commands/index.js index 1df1d47..baf71bb 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -4,7 +4,8 @@ import { cmdDeviceDesktop, cmdDeviceTablet, cmdDeviceMobile, - cmdClear + cmdClear, + cmdSave, } from './../consts'; export default (editor, config) => { @@ -16,4 +17,10 @@ export default (editor, config) => { cm.add(cmdDeviceTablet, e => e.setDevice('Tablet')); cm.add(cmdDeviceMobile, e => e.setDevice('Mobile portrait')); cm.add(cmdClear, e => confirm(txtConfirm) && e.runCommand('core:canvas-clear')); + cm.add(cmdSave, { + run() { + }, + stop() { + } + }); } diff --git a/src/consts.js b/src/consts.js index 6fdb033..c1ac91d 100644 --- a/src/consts.js +++ b/src/consts.js @@ -3,4 +3,5 @@ export const cmdDeviceDesktop = 'set-device-desktop', cmdDeviceTablet = 'set-device-tablet', cmdDeviceMobile = 'set-device-mobile', - cmdClear = 'canvas-clear'; + cmdClear = 'canvas-clear', + cmdSave = 'save-template'; \ No newline at end of file diff --git a/src/panels/index.js b/src/panels/index.js index 9c2b0e4..9271b28 100644 --- a/src/panels/index.js +++ b/src/panels/index.js @@ -3,7 +3,8 @@ import { cmdDeviceDesktop, cmdDeviceTablet, cmdDeviceMobile, - cmdClear + cmdClear, + cmdSave, } from './../consts'; export default (editor, config) => { @@ -28,6 +29,11 @@ export default (editor, config) => { },{ id: 'options', buttons: [{ + id: cmdSave, + command: e => e.runCommand(cmdSave), + className: 'fa fa-save', + }, + { id: swv, command: swv, context: swv,