@emailmaker/emailmaker 1.1.30 → 1.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{emailmaker-core.2378a16e.js → emailmaker-core.8bdd92fb.js} +1 -1
- package/emailmaker-esm.js +5 -5
- package/emailmaker.d.ts +7 -2
- package/emailmaker.js +11 -11
- package/iframe/js/amp.DieSnBUu.js +1 -0
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.CNqvmp_P.js +1 -1
- package/package.json +1 -1
- package/singlepage_headless_plugin.html +1 -1
- package/static/core/{b7559974.js → 0a752305.js} +1 -1
- package/static/core/{24359c2b2.js → 1369407e2.js} +1 -1
- package/static/core/{50b3488f.js → 2c12aa51.js} +2 -2
- package/static/core/{69be5772.js → 34ed48da.js} +3 -3
- package/static/core/{3c4d8253.js → 3d1e7c2e.js} +2 -2
- package/static/core/4698f05f.js +51 -0
- package/static/core/{6301b88d.js → 7760eab7.js} +2 -2
- package/static/core/{25d26369.js → 7865066d.js} +2 -2
- package/static/core/{3509b8fe.js → 7ae09748.js} +1 -1
- package/static/core/96583da0.js +3 -0
- package/static/core/{ca58f6cf.js → a73f6ffb.js} +1 -1
- package/static/core/b7b90cb5.js +78 -0
- package/static/core/{91634ef3.js → ba40f70e.js} +1 -1
- package/static/core/{4a9d6b60.js → d5670b2e.js} +2 -2
- package/static/core/db185a82.js +895 -0
- package/static/core/e1095f09.js +1 -0
- package/static/core/{558afaa1.js → ef4e808c.js} +1 -1
- package/static/core/{e4ba0190.js → fc5712ae.js} +1 -1
- package/static/esm/533d7587.js +1 -0
- package/two_step_headless_plugin.html +1 -1
- package/iframe/js/amp.BLBsfH3J.js +0 -1
- package/static/core/4685dd44.js +0 -3
- package/static/core/4d7a8040.js +0 -51
- package/static/core/5ef557ea.js +0 -895
- package/static/core/ed6c0f8c.js +0 -78
- package/static/core/f7436c59.js +0 -1
- /package/iframe/{iframe-eblock.2378a16e.html → iframe-eblock.8bdd92fb.html} +0 -0
- /package/iframe/{iframe.2378a16e.html → iframe.8bdd92fb.html} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define(`static/core/
|
|
1
|
+
__emailmaker__.define(`static/core/7ae09748.js`,[`require`,`exports`,`module`,`static/core/4698f05f.js`],function(e,t,n){let r=e("./4698f05f.js");var i=r.li({invalidateBlockId:null,isCodeMode:!1,codeModeDirection:`right`,editorThemeColor:`light`,isSettingsDisabled:!1,settings:{width:``},elementSettings:{},searchFilters:{},block:{id:void 0,isNew:!1,subject:``,description:``,html:``,project:void 0,project_title:``,project_author:void 0,tags:[],type:`Other`,title:null,isAmp:!1},monacoDidMount:!1}),a=`blockSlice`,o=r.Ii({name:a,initialState:i,reducers:{switchCodeMode:e=>{e.isCodeMode=!e.isCodeMode},setEditorThemeColor:(e,t)=>{e.editorThemeColor=t.payload},setBlockSettings:(e,t)=>{Object.assign(e,{...e,settings:t.payload,isSettingsDisabled:!1})},setBlockSettingsDisable:(e,t)=>{e.isSettingsDisabled=t.payload},setElementSettings:(e,t)=>{e.elementSettings=t.payload},setSearchFilters:(e,t)=>{e.searchFilters=t.payload},setBlockHtml:(e,t)=>{e.block.html=t.payload},resetBlockSlice:()=>i,setBlockIsAmp:(e,t)=>{e.block.isAmp=t.payload}},extraReducers:e=>{e.addMatcher(e=>e.type===`blocksApi/queries/queryResultPatched`,(e,t)=>{let n=t.payload.queryCacheKey.match(/\(([0-9]+)\)/),r=t.payload?.patches[0];if(r?.path?.[0]&&(e.block[r?.path[0]]=r.value),n?.[1]&&(e.invalidateBlockId=n[1]),t.payload.queryCacheKey.startsWith(`getBlock`)){let n=t.payload?.patches[0];n?.path?.[0]&&(e.block[n?.path[0]]=n.value)}}),e.addMatcher(e=>e.type===`blocksApi/invalidateTags`,(e,t)=>{if(t.payload[0].id===+e.invalidateBlockId)return{...i,isCodeMode:e?.isCodeMode,codeModeDirection:e.codeModeDirection}}),e.addMatcher(r.Gn.endpoints.editBlock.matchFulfilled,(e,{payload:t})=>{e.invalidateBlockId=null,e.block={...e.block,...t,renderGuid:e.block.renderGuid}}),e.addMatcher(r.Gn.endpoints.autoSaveBlock.matchFulfilled,(e,t)=>{e?.block.id?.toString()===t.payload.id?.toString()&&(e.block.html=t.payload.html)}),e.addMatcher(r.Gn.endpoints.getBlock.matchFulfilled,(e,{payload:t})=>{e.block={...i.block,...t}})}}),{switchCodeMode:s,setEditorThemeColor:c,setBlockSettings:l,setElementSettings:u,setBlockSettingsDisable:d,setSearchFilters:f,setBlockHtml:p,resetBlockSlice:m,setBlockIsAmp:h}=o.actions,g=e=>e[a].block,_=e=>e[a].isCodeMode,v=e=>e[a].settings,y=e=>e[a].searchFilters,b=e=>e[a].elementSettings,x=e=>e[a].editorThemeColor,S=e=>e[a].isSettingsDisabled,C=r.li({isCollapsed:!0,isMonacoFocusing:!1}),w=`defaultModePanesSlice`,T=r.Ii({name:w,initialState:C,reducers:{setMonacoFocusing:(e,t)=>{e.isMonacoFocusing=t.payload},resetPanes:()=>C}}),{resetPanes:E,setMonacoFocusing:D}=T.actions,O=e=>e[w].isMonacoFocusing;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"a",{enumerable:!0,get:function(){return o}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return y}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return b}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return _}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return c}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return d}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return D}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return v}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return l}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return m}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return S}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return O}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return g}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return x}}),Object.defineProperty(t,"v",{enumerable:!0,get:function(){return f}})});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
__emailmaker__.define(`static/core/96583da0.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/4698f05f.js`],function(e,t,n){let r=e("./354bf8a9.js"),i=e("./4698f05f.js");function a(e){return function(t){return{setOptions:()=>{},instance:{},dispose:()=>{},...e(t)||{}}}}function o(e){return t=>{let n={},r=[];for(let n of e)r.push(n(t));for(let e of r)Object.assign(n,e.instance);return{instance:n,setOptions:async e=>{for(let t of r)await t.setOptions(e)},dispose:()=>{for(let e of r)e.dispose()}}}}function s(){let e=new Date;return e.valueOf()-e.getTimezoneOffset()*60*1e3}function c(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return new TextDecoder().decode(r)}function l(e){let[t,n,r]=e.split(`.`),i=JSON.parse(c(n));return{exp:i.exp,createdAt:i.iat,data:i}}var u=i.Go();function d(e,t,n,r){e.inject(u,void 0),e.injectFactory(u,async(a,o)=>{try{let a=o?await o:void 0;if(!a){let t=e.getInstance(i.bo);t&&(a=await t)}return t?!a||(l(a)?.exp??0)*1e3<=s()?await t(n,r,a):a:``}catch{return``}},!0)}var f=a(e=>{let t,n,r;return e.addService(i.Ya,{execute:async n=>{if(t){let t=await e.getInstanceAsync(u);t&&n.headers.append(`authorization`,`Bearer ${t}`)}}}),{setOptions(a){let o=!i.qa(n,a.user),s=r!==a.project;(t!==a.getAuthToken||o||s)&&(t=a.getAuthToken,n=a.user,r=a.project,d(e,t,a.user,a.project))}}}),p=r.a(((e,t)=>{(function(n){"use strict";var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,d=n.fetch,f=n.Response,p=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<`u`&&l!==void 0&&!(`readyState`in l)&&l.body==null&&(l.readyState=`loading`,window.addEventListener(`load`,function(e){l.readyState=`complete`},!1)),a==null&&s!=null&&(a=function(){return new s(`Microsoft.XMLHTTP`)}),Object.create??(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return new Date().getTime()}),h==null){var g=d;d=function(e,t){var n=t.signal;return g(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then(function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(e){function t(e,t,n){if(n===1)return e>=128>>t&&e<<t<=2047;if(n===2)return e>=2048>>t&&e<<t<=55295||e>=57344>>t&&e<<t<=65535;if(n===3)return e>=65536>>t&&e<<t<=1114111;throw Error()}function n(e,t){if(e===6)return t>>6>15?3:t>31?2:1;if(e===12)return t>15?3:2;if(e===18)return 3;throw Error()}for(var r=65533,i=``,a=this.bitsNeeded,o=this.codePoint,s=0;s<e.length;s+=1){var c=e[s];a!==0&&(c<128||c>191||!t(o<<6|c&63,a-6,n(a,o)))&&(a=0,o=r,i+=String.fromCharCode(o)),a===0?(c>=0&&c<=127?(a=0,o=c):c>=192&&c<=223?(a=6,o=c&31):c>=224&&c<=239?(a=12,o=c&15):c>=240&&c<=247?(a=18,o=c&7):(a=0,o=r),a!==0&&!t(o,a,n(a,o))&&(a=0,o=r)):(a-=6,o=o<<6|c&63),a===0&&(o<=65535?i+=String.fromCharCode(o):(i+=String.fromCharCode(55296+(o-65535-1>>10)),i+=String.fromCharCode(56320+(o-65535-1&1023))))}return this.bitsNeeded=a,this.codePoint=o,i},(p==null||m==null||!function(){try{return new p().decode(new m().encode(`test`),{stream:!0})===`test`}catch{}return!1}())&&(p=_);var v=function(){};function y(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText=``,this.responseText=``,this.onprogress=v,this.onload=v,this.onerror=v,this.onreadystatechange=v,this._contentType=``,this._xhr=e,this._sendTimeout=0,this._abort=v}y.prototype.open=function(e,t){this._abort(!0);var n=this,o=this._xhr,s=1,c=0;this._abort=function(e){n._sendTimeout!==0&&(i(n._sendTimeout),n._sendTimeout=0),(s===1||s===2||s===3)&&(s=4,o.onload=v,o.onerror=v,o.onabort=v,o.onprogress=v,o.onreadystatechange=v,o.abort(),c!==0&&(i(c),c=0),e||(n.readyState=4,n.onabort(null),n.onreadystatechange())),s=0};var l=function(){if(s===1){var e=0,t=``,r=void 0;if(`contentType`in o)e=200,t=`OK`,r=o.contentType;else try{e=o.status,t=o.statusText,r=o.getResponseHeader(`Content-Type`)}catch{e=0,t=``,r=void 0}e!==0&&(s=2,n.readyState=2,n.status=e,n.statusText=t,n._contentType=r,n.onreadystatechange())}},u=function(){if(l(),s===2||s===3){s=3;var e=``;try{e=o.responseText}catch{}n.readyState=3,n.responseText=e,n.onprogress()}},d=function(e,t){if((t==null||t.preventDefault==null)&&(t={preventDefault:v}),u(),s===1||s===2||s===3){if(s=4,c!==0&&(i(c),c=0),n.readyState=4,e===`load`)n.onload(t);else if(e===`error`)n.onerror(t);else if(e===`abort`)n.onabort(t);else throw TypeError();n.onreadystatechange()}},f=function(e){o!=null&&(o.readyState===4?(!(`onload`in o)||!(`onerror`in o)||!(`onabort`in o))&&d(o.responseText===``?`error`:`load`,e):o.readyState===3?`onprogress`in o||u():o.readyState===2&&l())},p=function(){c=r(function(){p()},500),o.readyState===3&&u()};`onload`in o&&(o.onload=function(e){d(`load`,e)}),`onerror`in o&&(o.onerror=function(e){d(`error`,e)}),`onabort`in o&&(o.onabort=function(e){d(`abort`,e)}),`onprogress`in o&&(o.onprogress=u),`onreadystatechange`in o&&(o.onreadystatechange=function(e){f(e)}),(`contentType`in o||!(`ontimeout`in a.prototype))&&(t+=(t.indexOf(`?`)===-1?`?`:`&`)+`padding=true`),o.open(e,t,!0),`readyState`in o&&(c=r(function(){p()},0))},y.prototype.abort=function(){this._abort(!1)},y.prototype.getResponseHeader=function(e){return this._contentType},y.prototype.setRequestHeader=function(e,t){var n=this._xhr;`setRequestHeader`in n&&n.setRequestHeader(e,t)},y.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders==null?``:this._xhr.getAllResponseHeaders()||``},y.prototype.send=function(){if((!(`ontimeout`in a.prototype)||!(`sendAsBinary`in a.prototype)&&!(`mozAnon`in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!==`complete`){var e=this;e._sendTimeout=r(function(){e._sendTimeout=0,e.send()},4);return}var t=this._xhr;`withCredentials`in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(e){throw e}};function b(e){return e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+32)})}function x(e){for(var t=Object.create(null),n=e.split(`\r
|
|
2
|
+
`),r=0;r<n.length;r+=1){var i=n[r].split(`: `),a=i.shift(),o=i.join(`: `);t[b(a)]=o}this._map=t}x.prototype.get=function(e){return this._map[b(e)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function S(){}S.prototype.open=function(e,t,n,r,i,o,s){e.open(`GET`,i);var c=0;for(var l in e.onprogress=function(){var t=e.responseText.slice(c);c+=t.length,n(t)},e.onerror=function(e){e.preventDefault(),r(Error(`NetworkError`))},e.onload=function(){r(null)},e.onabort=function(){r(null)},e.onreadystatechange=function(){if(e.readyState===a.HEADERS_RECEIVED){var n=e.status,r=e.statusText;t(n,r,e.getResponseHeader(`Content-Type`),new x(e.getAllResponseHeaders()))}},e.withCredentials=o,s)Object.prototype.hasOwnProperty.call(s,l)&&e.setRequestHeader(l,s[l]);return e.send(),e};function C(e){this._headers=e}C.prototype.get=function(e){return this._headers.get(e)};function w(){}w.prototype.open=function(e,t,n,r,i,a,o){var s=null,c=new h,l=c.signal,f=new p;return d(i,{headers:o,credentials:a?`include`:`same-origin`,signal:l,cache:`no-store`}).then(function(e){return s=e.body.getReader(),t(e.status,e.statusText,e.headers.get(`Content-Type`),new C(e.headers)),new u(function(e,t){var r=function(){s.read().then(function(t){t.done?e(void 0):(n(f.decode(t.value,{stream:!0})),r())}).catch(function(e){t(e)})};r()})}).catch(function(e){if(e.name!==`AbortError`)return e}).then(function(e){r(e)}),{abort:function(){s?.cancel(),c.abort()}}};function T(){this._listeners=Object.create(null)}function E(e){r(function(){throw e},0)}T.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(t!=null)for(var n=t.length,r=0;r<n;r+=1){var i=t[r];try{typeof i.handleEvent==`function`?i.handleEvent(e):i.call(this,e)}catch(e){E(e)}}},T.prototype.addEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];r??(r=[],n[e]=r);for(var i=!1,a=0;a<r.length;a+=1)r[a]===t&&(i=!0);i||r.push(t)},T.prototype.removeEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];if(r!=null){for(var i=[],a=0;a<r.length;a+=1)r[a]!==t&&i.push(r[a]);i.length===0?delete n[e]:n[e]=i}};function D(e){this.type=e,this.target=void 0}function O(e,t){D.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}O.prototype=Object.create(D.prototype);function k(e,t){D.call(this,e),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}k.prototype=Object.create(D.prototype);function A(e,t){D.call(this,e),this.error=t.error}A.prototype=Object.create(D.prototype);var j=-1,M=0,N=1,P=2,F=-1,I=0,L=1,R=2,z=3,B=/^text\/event\-stream(;.*)?$/i,V=1e3,H=18e6,U=function(e,t){var n=e==null?t:parseInt(e,10);return n!==n&&(n=t),W(n)},W=function(e){return Math.min(Math.max(e,V),H)},G=function(e,t,n){try{typeof t==`function`&&t.call(e,n)}catch(e){E(e)}};function K(e,t){T.call(this),t||={},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Y(this,e,t)}function q(){return a!=null&&`withCredentials`in a.prototype||o==null?new a:new o}var J=d!=null&&f!=null&&`body`in f.prototype;function Y(e,t,n){t=String(t);var a=!!n.withCredentials,o=n.lastEventIdQueryParameterName||`lastEventId`,s=W(1e3),c=U(n.heartbeatTimeout,45e3),l=``,u=s,d=!1,f=0,p=n.headers||{},m=n.Transport,h=J&&m==null?void 0:new y(m==null?q():new m),g=m!=null&&typeof m!=`string`?new m:h==null?new w:new S,_=void 0,v=0,b=j,x=``,C=``,T=``,E=``,D=I,V=0,H=0,K=function(t,n,r,i){if(b===M)if(t===200&&r!=null&&B.test(r)){b=N,d=Date.now(),u=s,e.readyState=N;var a=new k(`open`,{status:t,statusText:n,headers:i});e.dispatchEvent(a),G(e,e.onopen,a)}else{t===200?``+(r==null?`-`:r.replace(/\s+/g,` `)):(n&&=n.replace(/\s+/g,` `),``+t+n),Z();var a=new k(`error`,{status:t,statusText:n,headers:i});e.dispatchEvent(a),G(e,e.onerror,a)}},Y=function(t){if(b===N){for(var n=-1,a=0;a<t.length;a+=1){var o=t.charCodeAt(a);(o===10||o===13)&&(n=a)}var p=(n===-1?``:E)+t.slice(0,n+1);E=(n===-1?E:``)+t.slice(n+1),t!==``&&(d=Date.now(),f+=t.length);for(var m=0;m<p.length;m+=1){var o=p.charCodeAt(m);if(D===F&&o===10)D=I;else if(D===F&&(D=I),o===13||o===10){if(D!==I){D===L&&(H=m+1);var h=p.slice(V,H-1),g=p.slice(H+ +(H<m&&p.charCodeAt(H)===32),m);h===`data`?(x+=`
|
|
3
|
+
`,x+=g):h===`id`?C=g:h===`event`?T=g:h===`retry`?(s=U(g,s),u=s):h===`heartbeatTimeout`&&(c=U(g,c),v!==0&&(i(v),v=r(function(){Q()},c)))}if(D===I){if(x!==``){l=C,T===``&&(T=`message`);var _=new O(T,{data:x.slice(1),lastEventId:C});if(e.dispatchEvent(_),T===`open`?G(e,e.onopen,_):T===`message`?G(e,e.onmessage,_):T===`error`&&G(e,e.onerror,_),b===P)return}x=``,T=``}D=o===13?F:I}else D===I&&(V=m,D=L),D===L?o===58&&(H=m+1,D=R):D===R&&(D=z)}}},X=function(t){if(b===N||b===M){b=j,v!==0&&(i(v),v=0),v=r(function(){Q()},u),u=W(Math.min(s*16,u*2)),e.readyState=M;var n=new A(`error`,{error:t});e.dispatchEvent(n),G(e,e.onerror,n)}},Z=function(){b=P,_!=null&&(_.abort(),_=void 0),v!==0&&(i(v),v=0),e.readyState=P},Q=function(){if(v=0,b!==j){if(!d&&_!=null)X(Error(`No activity within `+c+` milliseconds. `+(b===M?`No response received.`:f+` chars received.`)+` Reconnecting.`)),_!=null&&(_.abort(),_=void 0);else{var n=Math.max((d||Date.now())+c-Date.now(),1);d=!1,v=r(function(){Q()},n)}return}d=!1,f=0,v=r(function(){Q()},c),b=M,x=``,T=``,C=l,E=``,V=0,H=0,D=I;var i=t;if(t.slice(0,5)!==`data:`&&t.slice(0,5)!==`blob:`&&l!==``){var a=t.indexOf(`?`);i=a===-1?t:t.slice(0,a+1)+t.slice(a+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(e,t){return t===o?``:e}),i+=(t.indexOf(`?`)===-1?`?`:`&`)+o+`=`+encodeURIComponent(l)}var s=e.withCredentials,u={};u.Accept=`text/event-stream`;var p=e.headers;if(p!=null)for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(u[m]=p[m]);try{_=g.open(h,K,Y,X,i,s,u)}catch(e){throw Z(),e}};e.url=t,e.readyState=M,e.withCredentials=a,e.headers=p,e._close=Z,Q()}K.prototype=Object.create(T.prototype),K.prototype.CONNECTING=M,K.prototype.OPEN=N,K.prototype.CLOSED=P,K.prototype.close=function(){this._close()},K.CONNECTING=M,K.OPEN=N,K.CLOSED=P,K.prototype.withCredentials=void 0;var X=c;a!=null&&(c==null||!(`withCredentials`in c.prototype))&&(X=K),(function(r){if(typeof t==`object`&&typeof t.exports==`object`){var i=r(e);i!==void 0&&(t.exports=i)}else typeof define==`function`&&define.amd?define([`exports`],r):r(n)})(function(e){e.EventSourcePolyfill=K,e.NativeEventSource=c,e.EventSource=X})})(typeof globalThis>`u`?typeof window<`u`?window:typeof self<`u`?self:e:globalThis)})),m=p();function h({candidates:e,headers:t,createEventSource:n,onMessage:r,onError:i}){let a=e.filter(Boolean),o=!1,s=null,c=()=>{s?.close(),s=null},l=e=>{if(o)return;let u=a[e];if(!u){i?.(Error(`Failed to connect to EventSource through proxy chain`));return}c();let d=n(u,{headers:t});s=d,d.onmessage=e=>{o||s!==d||r(e)},d.onerror=t=>{if(!(o||s!==d)){if(c(),e+1<a.length){l(e+1);return}i?.(t)}}};return l(0),{close(){o=!0,c()}}}var g=`https://api.unsplash.com`,_=`https://api.giphy.com/v1/gifs`;function v(e){return{error:e instanceof Error?e:Error(String(e))}}async function y(e){if(!e.ok)throw Error(`Request failed with status ${e.status}`);let t=await e.text();try{return t?JSON.parse(t):null}catch(e){throw e}}function b(e){return e&&Array.isArray(e.results)?e:e?.data&&Array.isArray(e.data.results)?e.data:e?.response&&Array.isArray(e.response.results)?e.response:{...e||{},results:[]}}var x=i.Ei({reducerPath:`imageApi`,baseQuery:void 0,endpoints:e=>({getImageInfo:e.query({queryFn:async function(e,t){try{let n=t.getState().configSlice?.config?.imageInfoToolUrl||`https://scr.emcdn.ru/imageinfo`;return{data:await y(await fetch(`${n}?url=${encodeURIComponent(e)}`))}}catch(e){return v(e)}}}),getSearchImage:e.query({queryFn:async function({query:e,page:t},n){let r=e.keywords.replace(/[^\w\d\sа-яёА-ЯЁ]|_/g,``).replace(/[\s_-]+/g,` `);try{let a=n.getState().configSlice?.config,o=i.Si.getInstance(n,i.yo)!==void 0,s=new URL(`${g}/search/photos`);return s.searchParams.set(`client_id`,`S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`),s.searchParams.set(`lang`,`ru`),s.searchParams.set(`per_page`,`18`),s.searchParams.set(`query`,r),s.searchParams.set(`page`,String(t)),e.color!==``&&s.searchParams.set(`color`,e.color),e.orientation!==``&&s.searchParams.set(`orientation`,e.orientation),{data:b(await y(await i.to(s.toString(),{config:a,standalone:o,resourceType:`stockImages`,intent:`metadata`})))}}catch(e){return v(e)}}}),getUnsplashImage:e.query({queryFn:async function(e,t){try{let n=t.getState().configSlice?.config,r=i.Si.getInstance(t,i.yo)!==void 0,a=new URL(e);return a.searchParams.set(`client_id`,`S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`),{data:await y(await i.to(a.toString(),{config:n,standalone:r,resourceType:`stockImages`,intent:`metadata`}))}}catch(e){return v(e)}}}),sendAiImageRequest:e.query({queryFn:async function({body:e},t){try{return await i.yi(t).aiGenerator.ai_create(e)}catch(e){throw Error(e)}}}),getAiImage:e.query({queryFn:async function(e,t){try{return await i.yi(t).aiGenerator.ai_status_list(e)}catch(e){return v(e)}}}),getAiImageSSE:e.query({queryFn:e=>({data:[]}),async onCacheEntryAdded({task_id:e,entity_id:t,setError:n},r){let{updateCachedData:a,cacheEntryRemoved:o}=r,s=i.yi(r).baseUrl||i.Qa(`https://app.emailmaker.ru/api/`),c=r.getState().configSlice?.config,l=i.Si.getInstance(r,i.yo)!==void 0,d=i.Ta.isPlugin?await i.Si.getInstance(r,u):i.gi.get(i.Vi.em_token),f=d?{Authorization:`Bearer ${d}`}:{},p=`${s}/ai-generator/v1/ai-status?entity_id=${t}&stream=1&task_id=${e}`,g=i.io(p,{config:c,method:`GET`,requestType:`ai`,standalone:l}),_=h({candidates:g.length>0?g:[p],headers:f,createEventSource:(e,t)=>new m.EventSourcePolyfill(e,t),onMessage:e=>{let t=JSON.parse(e.data);a(e=>{e.push(t)}),t.progress===100&&_.close()},onError:()=>{_.close()}});await o,_.close()}}),getSearchGif:e.query({queryFn:async function({query:e,page:t},n){let r=e.keywords.replace(/[^\w\d\sа-яёА-ЯЁ]|_/g,``).replace(/[\s_-]+/g,` `);try{let e=n.getState().configSlice?.config,a=i.Si.getInstance(n,i.yo)!==void 0;return{data:await y(await i.to(`${_}/search?api_key=Nh77eBlPeMn1ed9MBAvL542NUGeNO26F&q=${encodeURIComponent(r)}&limit=25&offset=${t}&lang=en`,{config:e,standalone:a,resourceType:`generic`,intent:`metadata`}))}}catch(e){return v(e)}}})})}),{useLazyGetImageInfoQuery:S,useGetImageInfoQuery:C,useGetSearchImageQuery:w,useLazyGetSearchImageQuery:T,useSendAiImageRequestQuery:E,useLazySendAiImageRequestQuery:D,useGetAiImageQuery:O,useLazyGetAiImageQuery:k,useGetUnsplashImageQuery:A,useLazyGetUnsplashImageQuery:j,useGetSearchGifQuery:M,useLazyGetSearchGifQuery:N,useGetAiImageSSEQuery:P,useLazyGetAiImageSSEQuery:F}=x,I=`https://app.emailmaker.ru/api/`.replaceAll(/[\\/]$/g,``),L=`wp-json/limits/v1`,R=`wp-json/subscription/v2`,z=i.Ei({reducerPath:`limitsApi`,baseQuery:i._i({baseUrl:I}),tagTypes:[`LimitsStats`,`LimitsWarnings`,`SubscriptionMe`],endpoints:e=>({getLimitsStats:e.query({query:()=>({url:`${L}/stats`,method:`GET`}),providesTags:[`LimitsStats`]}),getLimitsStatsByType:e.query({query:e=>({url:`${L}/stats/${e}`,method:`GET`}),providesTags:(e,t,n)=>[{type:`LimitsStats`,id:n}]}),getLimitsWarnings:e.query({query:()=>({url:`${L}/warnings`,method:`GET`}),providesTags:[`LimitsWarnings`]}),getSubscriptionMeV2:e.query({query:()=>({url:`${R}/me`,method:`GET`}),providesTags:[`SubscriptionMe`]})})}),{useGetLimitsStatsQuery:B,useLazyGetLimitsStatsQuery:V,useGetLimitsStatsByTypeQuery:H,useLazyGetLimitsStatsByTypeQuery:U,useGetLimitsWarningsQuery:W,useLazyGetLimitsWarningsQuery:G,useGetSubscriptionMeV2Query:K,useLazyGetSubscriptionMeV2Query:q}=z,J=new URLSearchParams(window.location.search),Y=J.get(`tag`),X=J.get(`folder`),Z=i.li({activeModal:``,switchToPlanRequestTitle:``,secondModal:``,projectsTotal:``,projectsTotalPages:``,folders:[],activeTagId:Y||null,activeFolderId:X||(Y?null:`all`),activeTab:null,activeIntegration:null,addNewProjectInitialTitle:null}),Q=`projectsPageSlice`,$=i.Ii({name:Q,initialState:Z,reducers:{openModal(e,t){e.activeModal=t.payload},openAddNewProjectModal(e,t){e.activeModal=i.ba.ADD_NEW_PROJECT_MODAL,e.addNewProjectInitialTitle=t.payload??null},setSwitchToPlanRequestTitle(e,t){e.switchToPlanRequestTitle=typeof t.payload==`string`?t.payload:``},setActiveTab(e,t){e.activeTab=t.payload},closeModal(e){e.activeModal=``,e.activeIntegration=null,e.addNewProjectInitialTitle=null,e.switchToPlanRequestTitle=``},openSecondModal(e,t){e.secondModal=t.payload},closeSecondModal(e){e.secondModal=``},setFolders(e,{payload:t}){e.folders=t},setActiveTagId(e,{payload:t}){e.activeTagId=t},setActiveIntegration(e,t){e.activeIntegration=t.payload}},extraReducers:e=>{e.addMatcher(i.Jr.endpoints.getProjects.matchFulfilled,(e,t)=>{let n=t.meta,r=n.baseQueryMeta,i=n.projectsListPagination??r?.projectsListPagination;if(i!=null&&typeof i.total==`number`&&Number.isFinite(i.total)&&i.total>=0){e.projectsTotal=String(i.total),e.projectsTotalPages=String(typeof i.totalPages==`number`&&Number.isFinite(i.totalPages)?i.totalPages:``);return}let a=r?.response?.headers?.get?.(`X-WP-Total`),o=r?.response?.headers?.get?.(`X-WP-TotalPages`);e.projectsTotal=a??``,e.projectsTotalPages=o??``}),e.addMatcher(i.Vr.endpoints.getFolders.matchFulfilled,(e,{payload:t})=>{e.folders=t})}}),{openModal:ee,openAddNewProjectModal:te,setSwitchToPlanRequestTitle:ne,setActiveTab:re,closeModal:ie,openSecondModal:ae,closeSecondModal:oe,setFolders:se,setActiveTagId:ce,setActiveIntegration:le}=$.actions,ue=e=>e[Q].activeTab,de=e=>e[Q].activeModal,fe=e=>e[Q].secondModal,pe=e=>e[Q].projectsTotal,me=e=>e[Q].activeIntegration;Object.defineProperty(t,"C",{enumerable:!0,get:function(){return D}}),Object.defineProperty(t,"D",{enumerable:!0,get:function(){return l}}),Object.defineProperty(t,"E",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"O",{enumerable:!0,get:function(){return o}}),Object.defineProperty(t,"S",{enumerable:!0,get:function(){return j}}),Object.defineProperty(t,"T",{enumerable:!0,get:function(){return f}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return x}}),Object.defineProperty(t,"a",{enumerable:!0,get:function(){return $}}),Object.defineProperty(t,"b",{enumerable:!0,get:function(){return N}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return re}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return U}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return W}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(t,"k",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return B}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return me}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return z}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return de}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(t,"v",{enumerable:!0,get:function(){return F}}),Object.defineProperty(t,"w",{enumerable:!0,get:function(){return p}}),Object.defineProperty(t,"x",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"y",{enumerable:!0,get:function(){return S}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__emailmaker__.define(`static/core/
|
|
1
|
+
__emailmaker__.define(`static/core/a73f6ffb.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/7865066d.js`],function(e,t,n){e("./354bf8a9.js");let r=e("./7865066d.js");var i,a,o={};function s(){return a?i:(a=1,i=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then})}var c,l={},u={};function d(){if(c)return u;let e;c=1;let t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return u.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return 4*e+17},u.getSymbolTotalCodewords=function(e){return t[e]},u.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},u.setToSJISFunction=function(t){if(typeof t!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);e=t},u.isKanjiModeEnabled=function(){return e!==void 0},u.toSJIS=function(t){return e(t)},u}var f,p,m,h,g,_={};function v(){return f||(f=1,(e=_).L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}(t)}catch{return n}}),_;var e}var y,b={},x,S={},C,ee={},w,T={};function E(){if(w)return T;w=1;let e=v(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return T.getBlocksCount=function(n,r){switch(r){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},T.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},T}var D,O,k,A,j={},M={};function te(){return O||(O=1,function(e){let t=function(){if(D)return M;D=1;let e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)e[r]=n,t[n]=r,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),M.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return t[e]},M.exp=function(t){return e[t]},M.mul=function(n,r){return n===0||r===0?0:e[t[n]+t[r]]},M}();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}}(j)),j}var N,P={},F={},I={};function L(){return N||(N=1,I.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),I}var R,z,B,V={};function H(){if(R)return V;R=1;let e=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;e=e.replace(/u/g,`\\u`);let t=`(?:(?![A-Z0-9 $%*+\\-./:]|`+e+`)(?:.|[\r
|
|
2
2
|
]))+`;V.KANJI=new RegExp(e,`g`),V.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),V.BYTE=new RegExp(t,`g`),V.NUMERIC=RegExp(`[0-9]+`,`g`),V.ALPHANUMERIC=RegExp(`[A-Z $%*+\\-./:]+`,`g`);let n=RegExp(`^`+e+`$`),r=RegExp(`^[0-9]+$`),i=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);return V.testKanji=function(e){return n.test(e)},V.testNumeric=function(e){return r.test(e)},V.testAlphanumeric=function(e){return i.test(e)},V}function U(){return z||(z=1,function(e){let t=L(),n=H();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}(t)}catch{return n}}}(F)),F}function ne(){return B||(B=1,function(e){let t=d(),n=E(),r=v(),i=U(),a=L(),o=t.getBCHDigit(7973);function s(e,t){return i.getCharCountIndicator(e,t)+4}function c(e,t){let n=0;return e.forEach(function(e){let r=s(e.mode,t);n+=r+e.getBitsLength()}),n}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let c=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r));if(o===i.MIXED)return c;let l=c-s(o,e);switch(o){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){let a,o=r.from(n,r.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(c(t,r)<=e.getCapacity(r,n,i.MIXED))return r}(t,o);if(t.length===0)return 1;a=t[0]}else a=t;return function(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}(a.mode,a.getLength(),o)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(P)),P}var W,G={},K,q,J,Y,X,re,Z,Q,ie={},ae,oe,se,ce={exports:{}};function le(){return ae||(ae=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var i={},a={};a[n]=0;var o,s,c,l,u,d,f,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(c in s=(o=p.pop()).value,l=o.cost,u=e[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],f=a[c],(a[c]===void 0||f>d)&&(a[c]=d,p.push(c,d),i[c]=s));if(r!==void 0&&a[r]===void 0){var m=[`Could not find a path from `,n,` to `,r,`.`].join(``);throw Error(m)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e||={},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(ce)),ce.exports}function ue(){return oe||(oe=1,function(e){let t=U(),n=function(){if(q)return K;q=1;let e=U();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},K=t}(),r=function(){if(Y)return J;Y=1;let e=U(),t=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*t.indexOf(this.data[n]);r+=t.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},J=n}(),i=function(){if(re)return X;re=1;let e=U();function t(t){this.mode=e.BYTE,this.data=typeof t==`string`?new TextEncoder().encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},X=t}(),a=function(){if(Q)return Z;Q=1;let e=U(),t=d();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let r=t.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw Error(`Invalid SJIS character: `+this.data[n]+`
|
|
3
3
|
Make sure your charset is UTF-8`);r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},Z=n}(),o=H(),s=d(),c=le();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function f(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function m(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
|
|
4
4
|
Suggested mode is: `+t.toString(l));switch(c!==t.KANJI||s.isKanjiModeEnabled()||(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},e.fromString=function(n,r){let i=function(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=p(r[o].lastCount+l.length,l.mode)-p(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=p(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}(function(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}(f(n,s.isKanjiModeEnabled())),r),a=c.find_path(i.map,`start`,`end`),o=[];for(let e=1;e<a.length-1;e++)o.push(i.table[a[e]].node);return e.fromArray(function(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(o))},e.rawSplit=function(t){return e.fromArray(f(t,s.isKanjiModeEnabled()))}}(ie)),ie}function de(){if(se)return l;se=1;let e=d(),t=v(),n=function(){if(m)return p;function e(){this.buffer=[],this.length=0}return m=1,e.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},p=e}(),r=function(){if(g)return h;function e(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return g=1,e.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},h=e}(),i=(y||(y=1,function(e){let t=d().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:2*Math.ceil((r-13)/(2*n-2)),a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}}(b)),b),a=function(){if(x)return S;x=1;let e=d().getSymbolSize;return S.getPositions=function(t){let n=e(t);return[[0,0],[n-7,0],[0,n-7]]},S}(),o=(C||(C=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function t(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let t=e.size,n=0,r=0,i=0,a=null,o=null;for(let s=0;s<t;s++){r=i=0,a=o=null;for(let c=0;c<t;c++){let t=e.get(s,c);t===a?r++:(r>=5&&(n+=3+(r-5)),a=t,r=1),t=e.get(c,s),t===o?i++:(i>=5&&(n+=3+(i-5)),o=t,i=1)}r>=5&&(n+=3+(r-5)),i>=5&&(n+=3+(i-5))}return n},e.getPenaltyN2=function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){let t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);t!==4&&t!==0||n++}return n*3},e.getPenaltyN3=function(e){let t=e.size,n=0,r=0,i=0;for(let a=0;a<t;a++){r=i=0;for(let o=0;o<t;o++)r=r<<1&2047|e.get(a,o),o>=10&&(r===1488||r===93)&&n++,i=i<<1&2047|e.get(o,a),o>=10&&(i===1488||i===93)&&n++}return n*40},e.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*10},e.applyMask=function(e,n){let r=n.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)n.isReserved(a,i)||n.xor(a,i,t(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}}(ee)),ee),s=E(),c=function(){if(A)return k;A=1;let e=te();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw Error(`Encoder not initialized`);let n=new Uint8Array(t.length+this.degree);n.set(t);let r=e.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},k=t}(),u=ne(),f=function(){if(W)return G;W=1;let e=d(),t=e.getBCHDigit(1335);return G.getEncodedBits=function(n,r){let i=n.bit<<3|r,a=i<<10;for(;e.getBCHDigit(a)-t>=0;)a^=1335<<e.getBCHDigit(a)-t;return 21522^(i<<10|a)},G}(),_=U(),w=ue();function T(e,t,n){let r=e.size,i=f.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function D(t,r,i){let a=new n;i.forEach(function(e){a.put(e.mode.bit,4),a.put(e.getLength(),_.getCharCountIndicator(e.mode,t)),e.write(a)});let o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,r));for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let l=(o-a.getLengthInBits())/8;for(let e=0;e<l;e++)a.put(e%2?17:236,8);return function(t,n,r){let i=e.getSymbolTotalCodewords(n),a=i-s.getTotalCodewordsCount(n,r),o=s.getBlocksCount(n,r),l=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new c(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(t.buffer);for(let e=0;e<o;e++){let t=e<l?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x,S,C=0;for(x=0;x<v;x++)for(S=0;S<o;S++)x<g[S].length&&(b[C++]=g[S][x]);for(x=0;x<p;x++)for(S=0;S<o;S++)b[C++]=_[S][x];return b}(a,t,r)}function O(t,n,s,c){let l;if(Array.isArray(t))l=w.fromArray(t);else{if(typeof t!=`string`)throw Error(`Invalid data`);{let e=n;if(!e){let n=w.rawSplit(t);e=u.getBestVersionForData(n,s)}l=w.fromString(t,e||40)}}let d=u.getBestVersionForData(l,s);if(!d)throw Error(`The amount of data is too big to be stored in a QR Code`);if(n){if(n<d)throw Error(`
|