useblocks 1.1.29 → 1.1.31
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/iframe/js/amp.A5wCvj7V.js +1 -1
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.B4dVzZIU.js +1 -1
- package/package.json +1 -1
- package/singlepage_headless_plugin.html +1 -1
- package/static/core/{802a32d8.js → 1f9e8a57.js} +1 -1
- package/static/core/{1424c612.js → 2c61f14b.js} +2 -2
- package/static/core/{367190c0.js → 3cec0f58.js} +1 -1
- package/static/core/{f9ea3b0b.js → 4235932f.js} +11 -11
- package/static/core/{68603c0b.js → 4730e885.js} +2 -2
- package/static/core/{ffd774bd.js → 594882f0.js} +3 -3
- package/static/core/{43190ba4.js → 7f689997.js} +1 -1
- package/static/core/{a89f1a4f2.js → 843bb3422.js} +1 -1
- package/static/core/{735bfb0b.js → 928d808b.js} +2 -2
- package/static/core/{65add2fe.js → a90628e5.js} +4 -4
- package/static/core/{84430610.js → adfe3cf3.js} +2 -2
- package/static/core/{70acf01b.js → b2b58546.js} +2 -2
- package/static/core/{649a2d69.js → b77ec308.js} +1 -1
- package/static/core/bd80f6b9.js +1 -0
- package/static/core/{4142b650.js → beb4d9d1.js} +1 -1
- package/static/core/{e5e840f6.js → f069f304.js} +6 -6
- package/static/core/{acb25c27.js → f6dff18b.js} +1 -1
- package/static/core/{69518486.js → fe5c643b.js} +2 -2
- package/two_step_headless_plugin.html +1 -1
- package/{useblocks-core.d9b7bd78.js → useblocks-core.c327bc79.js} +1 -1
- package/useblocks-esm.js +4 -4
- package/useblocks.js +4 -4
- package/static/core/648ff204.js +0 -1
- /package/iframe/{iframe-eblock.d9b7bd78.html → iframe-eblock.c327bc79.html} +0 -0
- /package/iframe/{iframe.d9b7bd78.html → iframe.c327bc79.html} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
__useblocks__.define(`static/core/
|
|
1
|
+
__useblocks__.define(`static/core/b2b58546.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/a90628e5.js`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./a90628e5.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.Vo();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.go);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.Ga,{execute:async n=>{if(t){let t=await e.getInstanceAsync(u);t&&n.headers.append(`authorization`,`Bearer ${t}`)}}}),{setOptions(a){let o=!i.Ua(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))}}});function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!==`__proto__`&&(e[r]=n[r])}return e}var m={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function h(e,t){function n(n,r,i){if(!(typeof document>`u`)){i=p({},t,i),typeof i.expires==`number`&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&=i.expires.toUTCString(),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a=``;for(var o in i)i[o]&&(a+=`; `+o,i[o]!==!0&&(a+=`=`+i[o].split(`;`)[0]));return document.cookie=n+`=`+e.write(r,n)+a}}function r(t){if(!(typeof document>`u`||arguments.length&&!t)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(s in r||(r[s]=e.read(o,s)),t===s)break}catch{}}return t?r[t]:r}}return Object.create({set:n,get:r,remove:function(e,t){n(e,``,p({},t,{expires:-1}))},withAttributes:function(e){return h(this.converter,p({},this.attributes,e))},withConverter:function(e){return h(p({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var g=h(m,{path:`/`}),_=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
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,J(this,e,t)}function ee(){return a!=null&&`withCredentials`in a.prototype||o==null?new a:new o}var q=d!=null&&f!=null&&`body`in f.prototype;function J(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=q&&m==null?void 0:new y(m==null?ee():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),X();var a=new k(`error`,{status:t,statusText:n,headers:i});e.dispatchEvent(a),G(e,e.onerror,a)}},J=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(){Z()},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)}}},Y=function(t){if(b===N||b===M){b=j,v!==0&&(i(v),v=0),v=r(function(){Z()},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)}},X=function(){b=P,_!=null&&(_.abort(),_=void 0),v!==0&&(i(v),v=0),e.readyState=P},Z=function(){if(v=0,b!==j){if(!d&&_!=null)Y(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(){Z()},n)}return}d=!1,f=0,v=r(function(){Z()},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,J,Y,i,s,u)}catch(e){throw X(),e}};e.url=t,e.readyState=M,e.withCredentials=a,e.headers=p,e._close=X,Z()}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 Y=c;a!=null&&(c==null||!(`withCredentials`in c.prototype))&&(Y=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=Y})})(typeof globalThis>`u`?typeof window<`u`?window:typeof self<`u`?self:e:globalThis)})),v=_();function y({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 b=`https://api.unsplash.com`,x=`https://api.giphy.com/v1/gifs`;function S(e){return{error:e instanceof Error?e:Error(String(e))}}async function C(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 w(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 T=i.Si({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.useblocks.io/imageinfo`;return{data:await C(await fetch(`${n}?url=${encodeURIComponent(e)}`))}}catch(e){return S(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.vi.getInstance(n,i.po)!==void 0,s=new URL(`${b}/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:w(await C(await i.Ya(s.toString(),{config:a,standalone:o,resourceType:`stockImages`,intent:`metadata`})))}}catch(e){return S(e)}}}),getUnsplashImage:e.query({queryFn:async function(e,t){try{let n=t.getState().configSlice?.config,r=i.vi.getInstance(t,i.po)!==void 0,a=new URL(e);return a.searchParams.set(`client_id`,`S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`),{data:await C(await i.Ya(a.toString(),{config:n,standalone:r,resourceType:`stockImages`,intent:`metadata`}))}}catch(e){return S(e)}}}),sendAiImageRequest:e.query({queryFn:async function({body:e},t){try{return await i.hi(t).aiGenerator.ai_create(e)}catch(e){throw Error(e)}}}),getAiImage:e.query({queryFn:async function(e,t){try{return await i.hi(t).aiGenerator.ai_status_list(e)}catch(e){return S(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.hi(r).baseUrl||i.Ka(`https://app.useblocks.io/api`),c=r.getState().configSlice?.config,l=i.vi.getInstance(r,i.po)!==void 0,d=i.ya.isPlugin?await i.vi.getInstance(r,u):g.get(i.Li.em_token),f=d?{Authorization:`Bearer ${d}`}:{},p=`${s}/ai-generator/v1/ai-status?entity_id=${t}&stream=1&task_id=${e}`,m=i.Qa(p,{config:c,method:`GET`,requestType:`ai`,standalone:l}),h=y({candidates:m.length>0?m:[p],headers:f,createEventSource:(e,t)=>new v.EventSourcePolyfill(e,t),onMessage:e=>{let t=JSON.parse(e.data);a(e=>{e.push(t)}),t.progress===100&&h.close()},onError:()=>{h.close()}});await o,h.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.vi.getInstance(n,i.po)!==void 0;return{data:await C(await i.Ya(`${x}/search?api_key=Nh77eBlPeMn1ed9MBAvL542NUGeNO26F&q=${encodeURIComponent(r)}&limit=25&offset=${t}&lang=en`,{config:e,standalone:a,resourceType:`generic`,intent:`metadata`}))}}catch(e){return S(e)}}})})}),{useLazyGetImageInfoQuery:E,useGetImageInfoQuery:D,useGetSearchImageQuery:O,useLazyGetSearchImageQuery:k,useSendAiImageRequestQuery:A,useLazySendAiImageRequestQuery:j,useGetAiImageQuery:M,useLazyGetAiImageQuery:N,useGetUnsplashImageQuery:P,useLazyGetUnsplashImageQuery:F,useGetSearchGifQuery:I,useLazyGetSearchGifQuery:L,useGetAiImageSSEQuery:R,useLazyGetAiImageSSEQuery:z}=T,B=`https://app.useblocks.io/api`.replaceAll(/[\\/]$/g,``),V=`wp-json/limits/v1`,H=`wp-json/subscription/v2`,U=i.Si({reducerPath:`limitsApi`,baseQuery:i.pi({baseUrl:B}),tagTypes:[`LimitsStats`,`LimitsWarnings`,`SubscriptionMe`],endpoints:e=>({getLimitsStats:e.query({query:()=>({url:`${V}/stats`,method:`GET`}),providesTags:[`LimitsStats`]}),getLimitsStatsByType:e.query({query:e=>({url:`${V}/stats/${e}`,method:`GET`}),providesTags:(e,t,n)=>[{type:`LimitsStats`,id:n}]}),getLimitsWarnings:e.query({query:()=>({url:`${V}/warnings`,method:`GET`}),providesTags:[`LimitsWarnings`]}),getSubscriptionMeV2:e.query({query:()=>({url:`${H}/me`,method:`GET`}),providesTags:[`SubscriptionMe`]})})}),{useGetLimitsStatsQuery:W,useLazyGetLimitsStatsQuery:G,useGetLimitsStatsByTypeQuery:K,useLazyGetLimitsStatsByTypeQuery:ee,useGetLimitsWarningsQuery:q,useLazyGetLimitsWarningsQuery:J,useGetSubscriptionMeV2Query:Y,useLazyGetSubscriptionMeV2Query:X}=U,Z=new URLSearchParams(window.location.search),Q=Z.get(`tag`),te=Z.get(`folder`),ne=i.oi({activeModal:``,switchToPlanRequestTitle:``,secondModal:``,projectsTotal:``,projectsTotalPages:``,folders:[],activeTagId:Q||null,activeFolderId:te||(Q?null:`all`),activeTab:null,activeIntegration:null,addNewProjectInitialTitle:null}),$=`projectsPageSlice`,re=i.Mi({name:$,initialState:ne,reducers:{openModal(e,t){e.activeModal=t.payload},openAddNewProjectModal(e,t){e.activeModal=i.ma.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.Gr.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.Rr.endpoints.getFolders.matchFulfilled,(e,{payload:t})=>{e.folders=t})}}),{openModal:ie,openAddNewProjectModal:ae,setSwitchToPlanRequestTitle:oe,setActiveTab:se,closeModal:ce,openSecondModal:le,closeSecondModal:ue,setFolders:de,setActiveTagId:fe,setActiveIntegration:pe}=re.actions,me=e=>e[$].activeTab,he=e=>e[$].activeModal,ge=e=>e[$].secondModal,_e=e=>e[$].projectsTotal,ve=e=>e[$].activeIntegration;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"C",{enumerable:!0,get:function(){return j}}),Object.defineProperty(t,"D",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"E",{enumerable:!0,get:function(){return f}}),Object.defineProperty(t,"O",{enumerable:!0,get:function(){return l}}),Object.defineProperty(t,"S",{enumerable:!0,get:function(){return F}}),Object.defineProperty(t,"T",{enumerable:!0,get:function(){return g}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"a",{enumerable:!0,get:function(){return re}}),Object.defineProperty(t,"b",{enumerable:!0,get:function(){return L}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return me}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return se}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return q}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return le}}),Object.defineProperty(t,"k",{enumerable:!0,get:function(){return o}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return W}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return U}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return he}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(t,"v",{enumerable:!0,get:function(){return z}}),Object.defineProperty(t,"w",{enumerable:!0,get:function(){return _}}),Object.defineProperty(t,"x",{enumerable:!0,get:function(){return k}}),Object.defineProperty(t,"y",{enumerable:!0,get:function(){return E}})});
|
|
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(){Z()},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)}}},Y=function(t){if(b===N||b===M){b=j,v!==0&&(i(v),v=0),v=r(function(){Z()},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)}},X=function(){b=P,_!=null&&(_.abort(),_=void 0),v!==0&&(i(v),v=0),e.readyState=P},Z=function(){if(v=0,b!==j){if(!d&&_!=null)Y(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(){Z()},n)}return}d=!1,f=0,v=r(function(){Z()},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,J,Y,i,s,u)}catch(e){throw X(),e}};e.url=t,e.readyState=M,e.withCredentials=a,e.headers=p,e._close=X,Z()}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 Y=c;a!=null&&(c==null||!(`withCredentials`in c.prototype))&&(Y=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=Y})})(typeof globalThis>`u`?typeof window<`u`?window:typeof self<`u`?self:e:globalThis)})),v=_();function y({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 b=`https://api.unsplash.com`,x=`https://api.giphy.com/v1/gifs`;function S(e){return{error:e instanceof Error?e:Error(String(e))}}async function C(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 w(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 T=i.wi({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.useblocks.io/imageinfo`;return{data:await C(await fetch(`${n}?url=${encodeURIComponent(e)}`))}}catch(e){return S(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.bi.getInstance(n,i.ho)!==void 0,s=new URL(`${b}/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:w(await C(await i.Za(s.toString(),{config:a,standalone:o,resourceType:`stockImages`,intent:`metadata`})))}}catch(e){return S(e)}}}),getUnsplashImage:e.query({queryFn:async function(e,t){try{let n=t.getState().configSlice?.config,r=i.bi.getInstance(t,i.ho)!==void 0,a=new URL(e);return a.searchParams.set(`client_id`,`S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`),{data:await C(await i.Za(a.toString(),{config:n,standalone:r,resourceType:`stockImages`,intent:`metadata`}))}}catch(e){return S(e)}}}),sendAiImageRequest:e.query({queryFn:async function({body:e},t){try{return await i._i(t).aiGenerator.ai_create(e)}catch(e){throw Error(e)}}}),getAiImage:e.query({queryFn:async function(e,t){try{return await i._i(t).aiGenerator.ai_status_list(e)}catch(e){return S(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._i(r).baseUrl||i.Ja(`https://app.useblocks.io/api`),c=r.getState().configSlice?.config,l=i.bi.getInstance(r,i.ho)!==void 0,d=i.xa.isPlugin?await i.bi.getInstance(r,u):g.get(i.zi.em_token),f=d?{Authorization:`Bearer ${d}`}:{},p=`${s}/ai-generator/v1/ai-status?entity_id=${t}&stream=1&task_id=${e}`,m=i.eo(p,{config:c,method:`GET`,requestType:`ai`,standalone:l}),h=y({candidates:m.length>0?m:[p],headers:f,createEventSource:(e,t)=>new v.EventSourcePolyfill(e,t),onMessage:e=>{let t=JSON.parse(e.data);a(e=>{e.push(t)}),t.progress===100&&h.close()},onError:()=>{h.close()}});await o,h.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.bi.getInstance(n,i.ho)!==void 0;return{data:await C(await i.Za(`${x}/search?api_key=Nh77eBlPeMn1ed9MBAvL542NUGeNO26F&q=${encodeURIComponent(r)}&limit=25&offset=${t}&lang=en`,{config:e,standalone:a,resourceType:`generic`,intent:`metadata`}))}}catch(e){return S(e)}}})})}),{useLazyGetImageInfoQuery:E,useGetImageInfoQuery:D,useGetSearchImageQuery:O,useLazyGetSearchImageQuery:k,useSendAiImageRequestQuery:A,useLazySendAiImageRequestQuery:j,useGetAiImageQuery:M,useLazyGetAiImageQuery:N,useGetUnsplashImageQuery:P,useLazyGetUnsplashImageQuery:F,useGetSearchGifQuery:I,useLazyGetSearchGifQuery:L,useGetAiImageSSEQuery:R,useLazyGetAiImageSSEQuery:z}=T,B=`https://app.useblocks.io/api`.replaceAll(/[\\/]$/g,``),V=`wp-json/limits/v1`,H=`wp-json/subscription/v2`,U=i.wi({reducerPath:`limitsApi`,baseQuery:i.hi({baseUrl:B}),tagTypes:[`LimitsStats`,`LimitsWarnings`,`SubscriptionMe`],endpoints:e=>({getLimitsStats:e.query({query:()=>({url:`${V}/stats`,method:`GET`}),providesTags:[`LimitsStats`]}),getLimitsStatsByType:e.query({query:e=>({url:`${V}/stats/${e}`,method:`GET`}),providesTags:(e,t,n)=>[{type:`LimitsStats`,id:n}]}),getLimitsWarnings:e.query({query:()=>({url:`${V}/warnings`,method:`GET`}),providesTags:[`LimitsWarnings`]}),getSubscriptionMeV2:e.query({query:()=>({url:`${H}/me`,method:`GET`}),providesTags:[`SubscriptionMe`]})})}),{useGetLimitsStatsQuery:W,useLazyGetLimitsStatsQuery:G,useGetLimitsStatsByTypeQuery:K,useLazyGetLimitsStatsByTypeQuery:ee,useGetLimitsWarningsQuery:q,useLazyGetLimitsWarningsQuery:J,useGetSubscriptionMeV2Query:Y,useLazyGetSubscriptionMeV2Query:X}=U,Z=new URLSearchParams(window.location.search),Q=Z.get(`tag`),te=Z.get(`folder`),ne=i.ci({activeModal:``,switchToPlanRequestTitle:``,secondModal:``,projectsTotal:``,projectsTotalPages:``,folders:[],activeTagId:Q||null,activeFolderId:te||(Q?null:`all`),activeTab:null,activeIntegration:null,addNewProjectInitialTitle:null}),$=`projectsPageSlice`,re=i.Pi({name:$,initialState:ne,reducers:{openModal(e,t){e.activeModal=t.payload},openAddNewProjectModal(e,t){e.activeModal=i.ga.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.qr.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.Br.endpoints.getFolders.matchFulfilled,(e,{payload:t})=>{e.folders=t})}}),{openModal:ie,openAddNewProjectModal:ae,setSwitchToPlanRequestTitle:oe,setActiveTab:se,closeModal:ce,openSecondModal:le,closeSecondModal:ue,setFolders:de,setActiveTagId:fe,setActiveIntegration:pe}=re.actions,me=e=>e[$].activeTab,he=e=>e[$].activeModal,ge=e=>e[$].secondModal,_e=e=>e[$].projectsTotal,ve=e=>e[$].activeIntegration;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"C",{enumerable:!0,get:function(){return j}}),Object.defineProperty(t,"D",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"E",{enumerable:!0,get:function(){return f}}),Object.defineProperty(t,"O",{enumerable:!0,get:function(){return l}}),Object.defineProperty(t,"S",{enumerable:!0,get:function(){return F}}),Object.defineProperty(t,"T",{enumerable:!0,get:function(){return g}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"a",{enumerable:!0,get:function(){return re}}),Object.defineProperty(t,"b",{enumerable:!0,get:function(){return L}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return me}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return se}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return q}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return le}}),Object.defineProperty(t,"k",{enumerable:!0,get:function(){return o}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return W}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return U}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return he}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(t,"v",{enumerable:!0,get:function(){return z}}),Object.defineProperty(t,"w",{enumerable:!0,get:function(){return _}}),Object.defineProperty(t,"x",{enumerable:!0,get:function(){return k}}),Object.defineProperty(t,"y",{enumerable:!0,get:function(){return E}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define(`static/core/649a2d69.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/735bfb0b.js`],function(e,t,n){e("./4dc58c63.js");let r=e("./735bfb0b.js");var i,a,o={},s={},c={};function l(){return i?c:(i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.default=function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.data=t,this.text=n.text||t,this.options=n},c)}function u(){if(a)return s;a=1,Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return r[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=c(e[n]);return t%=43}(e))),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=o(`*`),t=0;t<this.data.length;t++)e+=o(this.data[t])+`0`;return{data:e+=o(`*`),text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function o(e){return function(e){return i[e].toString(2)}(c(e))}function c(e){return r.indexOf(e)}return s.CODE39=n,s}var d,ee,f={},p={},m={},h={};function g(){if(d)return h;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d=1,Object.defineProperty(h,"__esModule",{value:!0});var n=h.SET_A=0,r=h.SET_B=1,i=h.SET_C=2;h.SHIFT=98;var a=h.START_A=103,o=h.START_B=104,s=h.START_C=105;return h.MODULO=103,h.STOP=106,h.FNC1=207,h.SET_BY_CODE=(t(e={},a,n),t(e,o,r),t(e,s,i),e),h.SWAP={101:n,100:r,99:i},h.A_START_CHAR=`Ð`,h.B_START_CHAR=`Ñ`,h.C_START_CHAR=`Ò`,h.A_CHARS=`[\0-_È-Ï]`,h.B_CHARS=`[ -È-Ï]`,h.C_CHARS=`(Ï*[0-9]{2}Ï*)`,h.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],h}function _(){if(ee)return m;ee=1,Object.defineProperty(m,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=l())&&e.__esModule?e:{default:e},r=g();return m.default=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);!0===this.shouldEncodeAsEan128()&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?(i!==r.SET_A&&i!==r.SET_B||o!==r.SHIFT||(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=o*t;return{result:n.getBar(o)+a.result,checksum:c+a.checksum}}}]),n}(n.default),m}var te,ne,v={};function re(){if(ne)return p;ne=1,Object.defineProperty(p,"__esModule",{value:!0});var e=n(_()),t=n(function(){if(te)return v;te=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g(),t=function(t){return t.match(RegExp(`^`+e.A_CHARS+`*`))[0].length},n=function(t){return t.match(RegExp(`^`+e.B_CHARS+`*`))[0].length},r=function(t){return t.match(RegExp(`^`+e.C_CHARS+`*`))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(o)return o[1]+`Ì`+a(t.substring(o[1].length));var s=t.match(RegExp(`^`+r+`+`))[0];return s.length===t.length?t:s+String.fromCharCode(n?205:206)+i(t.substring(s.length),!n)}function a(e){var a=r(e),o=a.length;if(o===e.length)return e;e=e.substring(o);var s=t(e)>=n(e);return a+String.fromCharCode(s?206:205)+i(e,s)}return v.default=function(o){var s=void 0;if(r(o).length>=2)s=e.C_START_CHAR+a(o);else{var c=t(o)>n(o);s=(c?e.A_START_CHAR:e.B_START_CHAR)+i(o,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})},v}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}return p.default=function(e){function n(e,i){if(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),i));else a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,i));return r(a)}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default),p}var ie,y={};function ae(){if(ie)return y;ie=1,Object.defineProperty(y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default),y}var oe,b={};function se(){if(oe)return b;oe=1,Object.defineProperty(b,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return b.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default),b}var ce,le,ue={};function de(){if(ce)return ue;ce=1,Object.defineProperty(ue,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return ue.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default),ue}var fe,x={},pe={},S={};function C(){return fe||(fe=1,Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN=`101`,S.MIDDLE_BIN=`01010`,S.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},S.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],S.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],S.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]),S}var me,he,ge,w={},T={};function E(){if(me)return T;me=1,Object.defineProperty(T,"__esModule",{value:!0});var e=C();return T.default=function(t,n,r){var i=t.split(``).map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:``});if(r){var a=t.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)},T}function _e(){if(he)return w;he=1,Object.defineProperty(w,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return w.default=function(r){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i);var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:`encodeFlat`,value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(``),text:this.text}}}]),i}(r(l()).default),w}function ve(){if(ge)return pe;ge=1,Object.defineProperty(pe,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=C(),i=(e=_e())&&e.__esModule?e:{default:e},a=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0)%10)%10};return pe.default=function(e){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=a(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default),pe}var ye,D={};function be(){if(ye)return D;ye=1,Object.defineProperty(D,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=(e=_e())&&e.__esModule?e:{default:e},i=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0)%10)%10};return D.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=i(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===i(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default),D}var xe,O={};function Se(){if(xe)return O;xe=1,Object.defineProperty(O,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=i(E()),r=i(l());function i(e){return e&&e.__esModule?e:{default:e}}return O.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e,r=t.EAN5_STRUCTURE[e=this.data,e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0)%10];return{data:`1011`+(0,n.default)(this.data,r,`01`),text:this.text}}}]),i}(r.default),O}var Ce,k={};function we(){if(Ce)return k;Ce=1,Object.defineProperty(k,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return k.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,n.default)(this.data,e,`01`),text:this.text}}}]),i}(r(l()).default),k}var Te,A={};function Ee(){if(Te)return A;Te=1,Object.defineProperty(A,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();A.checksum=i;var t=n(E());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=i(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,t.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,t.default)(this.data.substr(6,6),`RRRRRR`),{data:e+=`101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,t.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(n(l()).default);function i(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return A.default=r,A}var De,Oe,j={};function ke(){if(De)return j;De=1,Object.defineProperty(j,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=i(E()),n=i(l()),r=Ee();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}var o=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],s=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],c=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=u(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(e.search(/^[01][0-9]{7}$/)===-1||(n.middleDigits=e.substring(1,e.length-1),n.upcA=u(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1]))return a(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),{data:e+=`010101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=s[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function u(e,t){for(var n=o[parseInt(e[e.length-1])],i=``,a=0,s=0;s<n.length;s++){var c=n[s];i+=c===`X`?e[a++]:c}return(i=``+t+i)+(0,r.checksum)(i)}return j.default=c,j}var Ae,je,M={},N={},P={};function Me(){if(je)return N;je=1,Object.defineProperty(N,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ae||(Ae=1,Object.defineProperty(P,"__esModule",{value:!0}),P.START_BIN=`1010`,P.END_BIN=`11101`,P.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]),P);return N.default=function(e){function r(){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),N}var Ne,Pe,F={};function Fe(){if(Ne)return F;Ne=1,Object.defineProperty(F,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=Me())&&e.__esModule?e:{default:e},r=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t};return F.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=r(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===r(this.data)}}]),n}(n.default),F}var Ie,I={},L={};function R(){if(Ie)return L;Ie=1,Object.defineProperty(L,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=r(n,4-n.length);for(var i=0;i<n.length;i++)e+=n[i]==`0`?`100`:`110`}return{data:e+=`1001`,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default);function r(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}return L.default=n,L}var Le,Re,z={},B={};function V(){return Le?B:(Le=1,Object.defineProperty(B,"__esModule",{value:!0}),B.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},B.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11},B)}function ze(){if(Re)return z;Re=1,Object.defineProperty(z,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return z.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),z}var Be,H={};function Ve(){if(Be)return H;Be=1,Object.defineProperty(H,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return H.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),H}var He,U={};function Ue(){if(He)return U;He=1,Object.defineProperty(U,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return U.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),U}var We,Ge,Ke={};function qe(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return Ke.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),Ke}var Je,W={};function Ye(){if(Je)return W;Je=1,Object.defineProperty(W,"__esModule",{value:!0}),W.pharmacode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return W.pharmacode=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),W}var Xe,G={};function Ze(){if(Xe)return G;Xe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.codabar=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return G.codabar=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),G}var Qe,$e,K={},q={},J={};function et(){if($e)return q;$e=1,Object.defineProperty(q,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Qe||(Qe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),J.BINARIES=`100010100.101001000.101000100.101000010.100101000.100100100.100100010.101010000.100010010.100001010.110101000.110100100.110100010.110010100.110010010.110001010.101101000.101100100.101100010.100110100.100011010.101011000.101001100.101000110.100101100.100010110.110110100.110110010.110101100.110100110.110010110.110011010.101101100.101100110.100110110.100111010.100101110.111010100.111010010.111001010.101101110.101110110.110101110.100100110.111011010.111010110.100110010.101011110`.split(`.`),J.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}),J);return q.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),q}var tt,nt,Y={};function rt(){if(tt)return Y;tt=1,Object.defineProperty(Y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=et())&&e.__esModule?e:{default:e}).default),Y}var it,at,X={};function ot(){if(it)return X;it=1,Object.defineProperty(X,"__esModule",{value:!0}),X.GenericBarcode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return X.GenericBarcode=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),X}function st(){if(at)return o;at=1,Object.defineProperty(o,"__esModule",{value:!0});var e=u(),t=function(){if(le)return f;le=1,Object.defineProperty(f,"__esModule",{value:!0}),f.CODE128C=f.CODE128B=f.CODE128A=f.CODE128=void 0;var e=i(re()),t=i(ae()),n=i(se()),r=i(de());function i(e){return e&&e.__esModule?e:{default:e}}return f.CODE128=e.default,f.CODE128A=t.default,f.CODE128B=n.default,f.CODE128C=r.default,f}(),n=function(){if(Oe)return x;Oe=1,Object.defineProperty(x,"__esModule",{value:!0}),x.UPCE=x.UPC=x.EAN2=x.EAN5=x.EAN8=x.EAN13=void 0;var e=o(ve()),t=o(be()),n=o(Se()),r=o(we()),i=o(Ee()),a=o(ke());function o(e){return e&&e.__esModule?e:{default:e}}return x.EAN13=e.default,x.EAN8=t.default,x.EAN5=n.default,x.EAN2=r.default,x.UPC=i.default,x.UPCE=a.default,x}(),r=function(){if(Pe)return M;Pe=1,Object.defineProperty(M,"__esModule",{value:!0}),M.ITF14=M.ITF=void 0;var e=n(Me()),t=n(Fe());function n(e){return e&&e.__esModule?e:{default:e}}return M.ITF=e.default,M.ITF14=t.default,M}(),i=function(){if(Ge)return I;Ge=1,Object.defineProperty(I,"__esModule",{value:!0}),I.MSI1110=I.MSI1010=I.MSI11=I.MSI10=I.MSI=void 0;var e=a(R()),t=a(ze()),n=a(Ve()),r=a(Ue()),i=a(qe());function a(e){return e&&e.__esModule?e:{default:e}}return I.MSI=e.default,I.MSI10=t.default,I.MSI11=n.default,I.MSI1010=r.default,I.MSI1110=i.default,I}(),a=Ye(),s=Ze(),c=function(){if(nt)return K;nt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.CODE93FullASCII=K.CODE93=void 0;var e=n(et()),t=n(rt());function n(e){return e&&e.__esModule?e:{default:e}}return K.CODE93=e.default,K.CODE93FullASCII=t.default,K}(),l=ot();return o.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode},o}var ct,lt={};function ut(){if(ct)return lt;ct=1,Object.defineProperty(lt,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return lt.default=function(t,n){return e({},t,n)},lt}var dt,ft={},pt,mt={},ht,gt={},_t={},vt={};function yt(){return ht?vt:(ht=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.default=function(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&typeof e[n=t[n]]==`string`&&(e[n]=parseInt(e[n],10));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e},vt)}var bt,xt,St={};function Ct(){return bt?St:(bt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}},St)}var wt,Tt,Et={},Dt={},Z={};function Ot(){if(wt)return Z;wt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.getTotalWidthOfEncodings=Z.calculateEncodingAttributes=Z.getBarcodePadding=Z.getEncodingHeight=Z.getMaximumHeightOfEncodings=void 0;var e,t=(e=ut())&&e.__esModule?e:{default:e};function n(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function r(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if(typeof document>`u`)return 0;r=document.createElement(`canvas`).getContext(`2d`)}r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}return Z.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},Z.getEncodingHeight=n,Z.getBarcodePadding=r,Z.calculateEncodingAttributes=function(e,a,o){for(var s=0;s<e.length;s++){var c,l=e[s],u=(0,t.default)(a,l.options);c=u.displayValue?i(l.text,u,o):0;var d=l.data.length*u.width;l.width=Math.ceil(Math.max(c,d)),l.height=n(l,u),l.barcodePadding=r(c,d,u)}},Z.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},Z}function kt(){if(Tt)return Dt;Tt=1,Object.defineProperty(Dt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot();return Dt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n,r=this.canvas.getContext(`2d`),i=t.data;n=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var a=0;a<i.length;a++){var o=a*e.width+t.barcodePadding;i[a]===`1`?r.fillRect(o,n,e.width,e.height):i[a]&&r.fillRect(o,n,e.width,e.height*i[a])}}},{key:`drawCanvasText`,value:function(e,t){var n,r,i=this.canvas.getContext(`2d`),a=e.fontOptions+` `+e.fontSize+`px `+e.font;e.displayValue&&(r=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=a,e.textAlign==`left`||t.barcodePadding>0?(n=0,i.textAlign=`left`):e.textAlign==`right`?(n=t.width-1,i.textAlign=`right`):(n=t.width/2,i.textAlign=`center`),i.fillText(t.text,n,r))}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}(),Dt}var At,jt={};function Mt(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot(),i=`http://www.w3.org/2000/svg`;return jt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){var r,i=n.data;r=t.textPosition==`top`?t.fontSize+t.textMargin:0;for(var a=0,o=0,s=0;s<i.length;s++)o=s*t.width+n.barcodePadding,i[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,r,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),r,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r,a,o=this.document.createElementNS(i,`text`);t.displayValue&&(o.setAttribute(`font-family`,t.font),o.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&o.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&o.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(r=0,o.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(r=n.width-1,o.setAttribute(`text-anchor`,`end`)):(r=n.width/2,o.setAttribute(`text-anchor`,`middle`)),o.setAttribute(`x`,r),o.setAttribute(`y`,a),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,i),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(i,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,a){var o=this.document.createElementNS(i,`rect`);return o.setAttribute(`x`,e),o.setAttribute(`y`,t),o.setAttribute(`width`,n),o.setAttribute(`height`,r),a.appendChild(o),o}}]),e}(),jt}var Nt,Pt,Q={};function Ft(){if(Nt)return Q;Nt=1,Object.defineProperty(Q,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Q.default=function(){function t(e,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),t}(),Q}var It,Lt,$={};function Rt(){if(It)return $;function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}It=1,Object.defineProperty($,"__esModule",{value:!0});var r=function(){function r(n,i){e(this,r);var a=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.name=`InvalidInputException`,a.symbology=n,a.input=i,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`InvalidElementException`,n.message=`Not supported type to render on`,n}return n(r,Error),r}(),a=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`NoElementException`,n.message=`No element to render on.`,n}return n(r,Error),r}();return $.InvalidInputException=r,$.InvalidElementException=i,$.NoElementException=a,$}function zt(){if(Lt)return gt;Lt=1,Object.defineProperty(gt,"__esModule",{value:!0});var e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t=i(function(){if(xt)return _t;xt=1,Object.defineProperty(_t,"__esModule",{value:!0});var e=n(yt()),t=n(Ct());function n(e){return e&&e.__esModule?e:{default:e}}return _t.default=function(n){var r={};for(var i in t.default)t.default.hasOwnProperty(i)&&(n.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=n.getAttribute(`jsbarcode-`+i.toLowerCase())),n.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=n.getAttribute(`data-`+i.toLowerCase())));return r.value=n.getAttribute(`jsbarcode-value`)||n.getAttribute(`data-value`),(0,e.default)(r)},_t}()),n=i(function(){if(Pt)return Et;Pt=1,Object.defineProperty(Et,"__esModule",{value:!0});var e=r(kt()),t=r(Mt()),n=r(Ft());function r(e){return e&&e.__esModule?e:{default:e}}return Et.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},Et}()),r=Rt();function i(e){return e&&e.__esModule?e:{default:e}}function a(i){if(typeof i==`string`)return function(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(a(t[r]));return n}}(i);if(Array.isArray(i)){for(var o=[],s=0;s<i.length;s++)o.push(a(i[s]));return o}if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLImageElement)return function(e){var r=document.createElement(`canvas`);return{element:r,options:(0,t.default)(e),renderer:n.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,r.toDataURL())}}}(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&i instanceof SVGElement)return{element:i,options:(0,t.default)(i),renderer:n.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLCanvasElement)return{element:i,options:(0,t.default)(i),renderer:n.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:n.default.CanvasRenderer};if(i&&(i===void 0?`undefined`:e(i))===`object`&&!i.nodeName)return{element:i,renderer:n.default.ObjectRenderer};throw new r.InvalidElementException}return gt.default=a,gt}var Bt,Vt,Ht,Ut={};function Wt(){if(Bt)return Ut;Bt=1,Object.defineProperty(Ut,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Ut.default=function(){function t(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.api=e}return e(t,[{key:`handleCatch`,value:function(e){if(e.name!==`InvalidInputException`)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}(),Ut}var Gt=r.i(function(){if(Ht)return Vt;Ht=1;var e=l(st()),t=l(ut()),n=l((dt||(dt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||``,n.data=n.data||``,t.push(n)}(e),t}),ft)),r=l((pt||(pt=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),mt)),i=l(zt()),a=l(yt()),o=l(Wt()),s=Rt(),c=l(Ct());function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){},d=function(e,t,n){var r=new u;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=c.default,r._errorHandler=new o.default(r),t!==void 0&&((n||={}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var ee in d.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(ee)&&f(e.default,ee);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var s=(0,t.default)(o._options,i);s=(0,a.default)(s);var c=e[n],l=p(r,c,s);return o._encodings.push(l),o})}}function p(e,r,i){var a=new r(e=``+e,i);if(!a.valid())throw new s.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,n.default)(o);for(var c=0;c<o.length;c++)o[c].options=(0,t.default)(i,o[c].options);return o}function m(){return e.default.CODE128?`CODE128`:Object.keys(e.default)[0]}function h(e,i,a){i=(0,n.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,t.default)(a,i[o].options),(0,r.default)(i[o].options);(0,r.default)(a),new e.renderer(e.element,i,a).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var i=(0,t.default)(this._options,n.options);i.format==`auto`&&(i.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=p(i.value,e.default[i.format.toUpperCase()],i);h(n,t,i)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)h(this._renderProperties[e],this._encodings,this._options);else h(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=c.default,typeof window<`u`&&(window.JsBarcode=d),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,e,t)}),Vt=d}());t.J=Object.freeze({__proto__:null,default:Gt})});
|
|
1
|
+
__useblocks__.define(`static/core/b77ec308.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/928d808b.js`],function(e,t,n){e("./4dc58c63.js");let r=e("./928d808b.js");var i,a,o={},s={},c={};function l(){return i?c:(i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.default=function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.data=t,this.text=n.text||t,this.options=n},c)}function u(){if(a)return s;a=1,Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return r[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=c(e[n]);return t%=43}(e))),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=o(`*`),t=0;t<this.data.length;t++)e+=o(this.data[t])+`0`;return{data:e+=o(`*`),text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function o(e){return function(e){return i[e].toString(2)}(c(e))}function c(e){return r.indexOf(e)}return s.CODE39=n,s}var d,ee,f={},p={},m={},h={};function g(){if(d)return h;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d=1,Object.defineProperty(h,"__esModule",{value:!0});var n=h.SET_A=0,r=h.SET_B=1,i=h.SET_C=2;h.SHIFT=98;var a=h.START_A=103,o=h.START_B=104,s=h.START_C=105;return h.MODULO=103,h.STOP=106,h.FNC1=207,h.SET_BY_CODE=(t(e={},a,n),t(e,o,r),t(e,s,i),e),h.SWAP={101:n,100:r,99:i},h.A_START_CHAR=`Ð`,h.B_START_CHAR=`Ñ`,h.C_START_CHAR=`Ò`,h.A_CHARS=`[\0-_È-Ï]`,h.B_CHARS=`[ -È-Ï]`,h.C_CHARS=`(Ï*[0-9]{2}Ï*)`,h.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],h}function _(){if(ee)return m;ee=1,Object.defineProperty(m,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=l())&&e.__esModule?e:{default:e},r=g();return m.default=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);!0===this.shouldEncodeAsEan128()&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?(i!==r.SET_A&&i!==r.SET_B||o!==r.SHIFT||(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=o*t;return{result:n.getBar(o)+a.result,checksum:c+a.checksum}}}]),n}(n.default),m}var te,ne,v={};function re(){if(ne)return p;ne=1,Object.defineProperty(p,"__esModule",{value:!0});var e=n(_()),t=n(function(){if(te)return v;te=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g(),t=function(t){return t.match(RegExp(`^`+e.A_CHARS+`*`))[0].length},n=function(t){return t.match(RegExp(`^`+e.B_CHARS+`*`))[0].length},r=function(t){return t.match(RegExp(`^`+e.C_CHARS+`*`))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(o)return o[1]+`Ì`+a(t.substring(o[1].length));var s=t.match(RegExp(`^`+r+`+`))[0];return s.length===t.length?t:s+String.fromCharCode(n?205:206)+i(t.substring(s.length),!n)}function a(e){var a=r(e),o=a.length;if(o===e.length)return e;e=e.substring(o);var s=t(e)>=n(e);return a+String.fromCharCode(s?206:205)+i(e,s)}return v.default=function(o){var s=void 0;if(r(o).length>=2)s=e.C_START_CHAR+a(o);else{var c=t(o)>n(o);s=(c?e.A_START_CHAR:e.B_START_CHAR)+i(o,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})},v}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}return p.default=function(e){function n(e,i){if(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),i));else a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,i));return r(a)}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default),p}var ie,y={};function ae(){if(ie)return y;ie=1,Object.defineProperty(y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default),y}var oe,b={};function se(){if(oe)return b;oe=1,Object.defineProperty(b,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return b.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default),b}var ce,le,ue={};function de(){if(ce)return ue;ce=1,Object.defineProperty(ue,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return ue.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default),ue}var fe,x={},pe={},S={};function C(){return fe||(fe=1,Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN=`101`,S.MIDDLE_BIN=`01010`,S.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},S.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],S.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],S.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]),S}var me,he,ge,w={},T={};function E(){if(me)return T;me=1,Object.defineProperty(T,"__esModule",{value:!0});var e=C();return T.default=function(t,n,r){var i=t.split(``).map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:``});if(r){var a=t.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)},T}function _e(){if(he)return w;he=1,Object.defineProperty(w,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return w.default=function(r){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i);var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:`encodeFlat`,value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(``),text:this.text}}}]),i}(r(l()).default),w}function ve(){if(ge)return pe;ge=1,Object.defineProperty(pe,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=C(),i=(e=_e())&&e.__esModule?e:{default:e},a=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0)%10)%10};return pe.default=function(e){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=a(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default),pe}var ye,D={};function be(){if(ye)return D;ye=1,Object.defineProperty(D,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=(e=_e())&&e.__esModule?e:{default:e},i=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0)%10)%10};return D.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=i(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===i(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default),D}var xe,O={};function Se(){if(xe)return O;xe=1,Object.defineProperty(O,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=i(E()),r=i(l());function i(e){return e&&e.__esModule?e:{default:e}}return O.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e,r=t.EAN5_STRUCTURE[e=this.data,e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0)%10];return{data:`1011`+(0,n.default)(this.data,r,`01`),text:this.text}}}]),i}(r.default),O}var Ce,k={};function we(){if(Ce)return k;Ce=1,Object.defineProperty(k,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return k.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,n.default)(this.data,e,`01`),text:this.text}}}]),i}(r(l()).default),k}var Te,A={};function Ee(){if(Te)return A;Te=1,Object.defineProperty(A,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();A.checksum=i;var t=n(E());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=i(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,t.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,t.default)(this.data.substr(6,6),`RRRRRR`),{data:e+=`101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,t.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(n(l()).default);function i(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return A.default=r,A}var De,Oe,j={};function ke(){if(De)return j;De=1,Object.defineProperty(j,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=i(E()),n=i(l()),r=Ee();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}var o=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],s=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],c=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=u(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(e.search(/^[01][0-9]{7}$/)===-1||(n.middleDigits=e.substring(1,e.length-1),n.upcA=u(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1]))return a(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),{data:e+=`010101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=s[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function u(e,t){for(var n=o[parseInt(e[e.length-1])],i=``,a=0,s=0;s<n.length;s++){var c=n[s];i+=c===`X`?e[a++]:c}return(i=``+t+i)+(0,r.checksum)(i)}return j.default=c,j}var Ae,je,M={},N={},P={};function Me(){if(je)return N;je=1,Object.defineProperty(N,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ae||(Ae=1,Object.defineProperty(P,"__esModule",{value:!0}),P.START_BIN=`1010`,P.END_BIN=`11101`,P.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]),P);return N.default=function(e){function r(){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),N}var Ne,Pe,F={};function Fe(){if(Ne)return F;Ne=1,Object.defineProperty(F,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=Me())&&e.__esModule?e:{default:e},r=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t};return F.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=r(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===r(this.data)}}]),n}(n.default),F}var Ie,I={},L={};function R(){if(Ie)return L;Ie=1,Object.defineProperty(L,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=r(n,4-n.length);for(var i=0;i<n.length;i++)e+=n[i]==`0`?`100`:`110`}return{data:e+=`1001`,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default);function r(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}return L.default=n,L}var Le,Re,z={},B={};function V(){return Le?B:(Le=1,Object.defineProperty(B,"__esModule",{value:!0}),B.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},B.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11},B)}function ze(){if(Re)return z;Re=1,Object.defineProperty(z,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return z.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),z}var Be,H={};function Ve(){if(Be)return H;Be=1,Object.defineProperty(H,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return H.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),H}var He,U={};function Ue(){if(He)return U;He=1,Object.defineProperty(U,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return U.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),U}var We,Ge,Ke={};function qe(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return Ke.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),Ke}var Je,W={};function Ye(){if(Je)return W;Je=1,Object.defineProperty(W,"__esModule",{value:!0}),W.pharmacode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return W.pharmacode=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),W}var Xe,G={};function Ze(){if(Xe)return G;Xe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.codabar=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return G.codabar=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),G}var Qe,$e,K={},q={},J={};function et(){if($e)return q;$e=1,Object.defineProperty(q,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Qe||(Qe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),J.BINARIES=`100010100.101001000.101000100.101000010.100101000.100100100.100100010.101010000.100010010.100001010.110101000.110100100.110100010.110010100.110010010.110001010.101101000.101100100.101100010.100110100.100011010.101011000.101001100.101000110.100101100.100010110.110110100.110110010.110101100.110100110.110010110.110011010.101101100.101100110.100110110.100111010.100101110.111010100.111010010.111001010.101101110.101110110.110101110.100100110.111011010.111010110.100110010.101011110`.split(`.`),J.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}),J);return q.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),q}var tt,nt,Y={};function rt(){if(tt)return Y;tt=1,Object.defineProperty(Y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=et())&&e.__esModule?e:{default:e}).default),Y}var it,at,X={};function ot(){if(it)return X;it=1,Object.defineProperty(X,"__esModule",{value:!0}),X.GenericBarcode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return X.GenericBarcode=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),X}function st(){if(at)return o;at=1,Object.defineProperty(o,"__esModule",{value:!0});var e=u(),t=function(){if(le)return f;le=1,Object.defineProperty(f,"__esModule",{value:!0}),f.CODE128C=f.CODE128B=f.CODE128A=f.CODE128=void 0;var e=i(re()),t=i(ae()),n=i(se()),r=i(de());function i(e){return e&&e.__esModule?e:{default:e}}return f.CODE128=e.default,f.CODE128A=t.default,f.CODE128B=n.default,f.CODE128C=r.default,f}(),n=function(){if(Oe)return x;Oe=1,Object.defineProperty(x,"__esModule",{value:!0}),x.UPCE=x.UPC=x.EAN2=x.EAN5=x.EAN8=x.EAN13=void 0;var e=o(ve()),t=o(be()),n=o(Se()),r=o(we()),i=o(Ee()),a=o(ke());function o(e){return e&&e.__esModule?e:{default:e}}return x.EAN13=e.default,x.EAN8=t.default,x.EAN5=n.default,x.EAN2=r.default,x.UPC=i.default,x.UPCE=a.default,x}(),r=function(){if(Pe)return M;Pe=1,Object.defineProperty(M,"__esModule",{value:!0}),M.ITF14=M.ITF=void 0;var e=n(Me()),t=n(Fe());function n(e){return e&&e.__esModule?e:{default:e}}return M.ITF=e.default,M.ITF14=t.default,M}(),i=function(){if(Ge)return I;Ge=1,Object.defineProperty(I,"__esModule",{value:!0}),I.MSI1110=I.MSI1010=I.MSI11=I.MSI10=I.MSI=void 0;var e=a(R()),t=a(ze()),n=a(Ve()),r=a(Ue()),i=a(qe());function a(e){return e&&e.__esModule?e:{default:e}}return I.MSI=e.default,I.MSI10=t.default,I.MSI11=n.default,I.MSI1010=r.default,I.MSI1110=i.default,I}(),a=Ye(),s=Ze(),c=function(){if(nt)return K;nt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.CODE93FullASCII=K.CODE93=void 0;var e=n(et()),t=n(rt());function n(e){return e&&e.__esModule?e:{default:e}}return K.CODE93=e.default,K.CODE93FullASCII=t.default,K}(),l=ot();return o.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode},o}var ct,lt={};function ut(){if(ct)return lt;ct=1,Object.defineProperty(lt,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return lt.default=function(t,n){return e({},t,n)},lt}var dt,ft={},pt,mt={},ht,gt={},_t={},vt={};function yt(){return ht?vt:(ht=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.default=function(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&typeof e[n=t[n]]==`string`&&(e[n]=parseInt(e[n],10));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e},vt)}var bt,xt,St={};function Ct(){return bt?St:(bt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}},St)}var wt,Tt,Et={},Dt={},Z={};function Ot(){if(wt)return Z;wt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.getTotalWidthOfEncodings=Z.calculateEncodingAttributes=Z.getBarcodePadding=Z.getEncodingHeight=Z.getMaximumHeightOfEncodings=void 0;var e,t=(e=ut())&&e.__esModule?e:{default:e};function n(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function r(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if(typeof document>`u`)return 0;r=document.createElement(`canvas`).getContext(`2d`)}r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}return Z.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},Z.getEncodingHeight=n,Z.getBarcodePadding=r,Z.calculateEncodingAttributes=function(e,a,o){for(var s=0;s<e.length;s++){var c,l=e[s],u=(0,t.default)(a,l.options);c=u.displayValue?i(l.text,u,o):0;var d=l.data.length*u.width;l.width=Math.ceil(Math.max(c,d)),l.height=n(l,u),l.barcodePadding=r(c,d,u)}},Z.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},Z}function kt(){if(Tt)return Dt;Tt=1,Object.defineProperty(Dt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot();return Dt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n,r=this.canvas.getContext(`2d`),i=t.data;n=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var a=0;a<i.length;a++){var o=a*e.width+t.barcodePadding;i[a]===`1`?r.fillRect(o,n,e.width,e.height):i[a]&&r.fillRect(o,n,e.width,e.height*i[a])}}},{key:`drawCanvasText`,value:function(e,t){var n,r,i=this.canvas.getContext(`2d`),a=e.fontOptions+` `+e.fontSize+`px `+e.font;e.displayValue&&(r=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=a,e.textAlign==`left`||t.barcodePadding>0?(n=0,i.textAlign=`left`):e.textAlign==`right`?(n=t.width-1,i.textAlign=`right`):(n=t.width/2,i.textAlign=`center`),i.fillText(t.text,n,r))}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}(),Dt}var At,jt={};function Mt(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot(),i=`http://www.w3.org/2000/svg`;return jt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){var r,i=n.data;r=t.textPosition==`top`?t.fontSize+t.textMargin:0;for(var a=0,o=0,s=0;s<i.length;s++)o=s*t.width+n.barcodePadding,i[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,r,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),r,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r,a,o=this.document.createElementNS(i,`text`);t.displayValue&&(o.setAttribute(`font-family`,t.font),o.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&o.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&o.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(r=0,o.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(r=n.width-1,o.setAttribute(`text-anchor`,`end`)):(r=n.width/2,o.setAttribute(`text-anchor`,`middle`)),o.setAttribute(`x`,r),o.setAttribute(`y`,a),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,i),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(i,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,a){var o=this.document.createElementNS(i,`rect`);return o.setAttribute(`x`,e),o.setAttribute(`y`,t),o.setAttribute(`width`,n),o.setAttribute(`height`,r),a.appendChild(o),o}}]),e}(),jt}var Nt,Pt,Q={};function Ft(){if(Nt)return Q;Nt=1,Object.defineProperty(Q,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Q.default=function(){function t(e,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),t}(),Q}var It,Lt,$={};function Rt(){if(It)return $;function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}It=1,Object.defineProperty($,"__esModule",{value:!0});var r=function(){function r(n,i){e(this,r);var a=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.name=`InvalidInputException`,a.symbology=n,a.input=i,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`InvalidElementException`,n.message=`Not supported type to render on`,n}return n(r,Error),r}(),a=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`NoElementException`,n.message=`No element to render on.`,n}return n(r,Error),r}();return $.InvalidInputException=r,$.InvalidElementException=i,$.NoElementException=a,$}function zt(){if(Lt)return gt;Lt=1,Object.defineProperty(gt,"__esModule",{value:!0});var e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t=i(function(){if(xt)return _t;xt=1,Object.defineProperty(_t,"__esModule",{value:!0});var e=n(yt()),t=n(Ct());function n(e){return e&&e.__esModule?e:{default:e}}return _t.default=function(n){var r={};for(var i in t.default)t.default.hasOwnProperty(i)&&(n.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=n.getAttribute(`jsbarcode-`+i.toLowerCase())),n.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=n.getAttribute(`data-`+i.toLowerCase())));return r.value=n.getAttribute(`jsbarcode-value`)||n.getAttribute(`data-value`),(0,e.default)(r)},_t}()),n=i(function(){if(Pt)return Et;Pt=1,Object.defineProperty(Et,"__esModule",{value:!0});var e=r(kt()),t=r(Mt()),n=r(Ft());function r(e){return e&&e.__esModule?e:{default:e}}return Et.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},Et}()),r=Rt();function i(e){return e&&e.__esModule?e:{default:e}}function a(i){if(typeof i==`string`)return function(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(a(t[r]));return n}}(i);if(Array.isArray(i)){for(var o=[],s=0;s<i.length;s++)o.push(a(i[s]));return o}if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLImageElement)return function(e){var r=document.createElement(`canvas`);return{element:r,options:(0,t.default)(e),renderer:n.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,r.toDataURL())}}}(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&i instanceof SVGElement)return{element:i,options:(0,t.default)(i),renderer:n.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLCanvasElement)return{element:i,options:(0,t.default)(i),renderer:n.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:n.default.CanvasRenderer};if(i&&(i===void 0?`undefined`:e(i))===`object`&&!i.nodeName)return{element:i,renderer:n.default.ObjectRenderer};throw new r.InvalidElementException}return gt.default=a,gt}var Bt,Vt,Ht,Ut={};function Wt(){if(Bt)return Ut;Bt=1,Object.defineProperty(Ut,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Ut.default=function(){function t(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.api=e}return e(t,[{key:`handleCatch`,value:function(e){if(e.name!==`InvalidInputException`)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}(),Ut}var Gt=r.i(function(){if(Ht)return Vt;Ht=1;var e=l(st()),t=l(ut()),n=l((dt||(dt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||``,n.data=n.data||``,t.push(n)}(e),t}),ft)),r=l((pt||(pt=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),mt)),i=l(zt()),a=l(yt()),o=l(Wt()),s=Rt(),c=l(Ct());function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){},d=function(e,t,n){var r=new u;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=c.default,r._errorHandler=new o.default(r),t!==void 0&&((n||={}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var ee in d.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(ee)&&f(e.default,ee);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var s=(0,t.default)(o._options,i);s=(0,a.default)(s);var c=e[n],l=p(r,c,s);return o._encodings.push(l),o})}}function p(e,r,i){var a=new r(e=``+e,i);if(!a.valid())throw new s.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,n.default)(o);for(var c=0;c<o.length;c++)o[c].options=(0,t.default)(i,o[c].options);return o}function m(){return e.default.CODE128?`CODE128`:Object.keys(e.default)[0]}function h(e,i,a){i=(0,n.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,t.default)(a,i[o].options),(0,r.default)(i[o].options);(0,r.default)(a),new e.renderer(e.element,i,a).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var i=(0,t.default)(this._options,n.options);i.format==`auto`&&(i.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=p(i.value,e.default[i.format.toUpperCase()],i);h(n,t,i)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)h(this._renderProperties[e],this._encodings,this._options);else h(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=c.default,typeof window<`u`&&(window.JsBarcode=d),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,e,t)}),Vt=d}());t.J=Object.freeze({__proto__:null,default:Gt})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__useblocks__.define(`static/core/bd80f6b9.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/4235932f.js`],function(e,t,n){e("./4dc58c63.js"),t.default=e("./4235932f.js").t});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__useblocks__.define(`static/core/
|
|
1
|
+
__useblocks__.define(`static/core/beb4d9d1.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/928d808b.js`],function(e,t,n){e("./4dc58c63.js");let r=e("./928d808b.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(`
|