@emailmaker/filemanager 0.10.84 → 0.10.86
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/{file-manager-IconsTab-DPTSVmmr.js → file-manager-IconsTab-CtsLkcy2.js} +2 -2
- package/{file-manager-ImageCodeGenerator-SEVYRvuj.js → file-manager-ImageCodeGenerator-b6--9FnA.js} +2 -2
- package/{file-manager-JsBarcode-m6wv66J1.js → file-manager-JsBarcode-Bs9SDyWX.js} +2 -2
- package/{file-manager-browser-Dv-PgxuJ.js → file-manager-browser-DC8fkuqa.js} +2 -2
- package/{file-manager-index-WsZVOL3e.js → file-manager-index-B4pgaHpG.js} +3 -3
- package/file-manager.css +142 -142
- package/file-manager.esm.js +1 -1
- package/file-manager.js +15 -12
- package/package.json +1 -1
package/{file-manager-ImageCodeGenerator-SEVYRvuj.js → file-manager-ImageCodeGenerator-b6--9FnA.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as r from"react";import{useRef as t,useCallback as o,useState as n,useMemo as i,useEffect as s}from"react";import{Segmented as l,Alert as c,Input as d,Typography as h,InputNumber as m,ColorPicker as u,Checkbox as g,Button as p}from"antd";import{u as w,a as f,q as b}from"./file-manager-index-
|
|
2
|
-
//# sourceMappingURL=file-manager-ImageCodeGenerator-
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as r from"react";import{useRef as t,useCallback as o,useState as n,useMemo as i,useEffect as s}from"react";import{Segmented as l,Alert as c,Input as d,Typography as h,InputNumber as m,ColorPicker as u,Checkbox as g,Button as p}from"antd";import{u as w,a as f,q as b}from"./file-manager-index-B4pgaHpG.js";import"@ant-design/icons";import"react-dom/client";import"antd/es/alert/ErrorBoundary";import"react-dom";const v=({size:e=24,color:a="currentColor",...t})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},r.createElement("path",{d:"m14 10 7-7m0 0h-6m6 0v6m-11 5-7 7m0 0h6m-6 0v-6"}));v.displayName="Expand01";var x={root:"root",controls:"controls",segmentedControl:"segmentedControl",sizeRow:"sizeRow",sizeRowLabel:"sizeRowLabel",sizeInputNumber:"sizeInputNumber",sizeSuffix:"sizeSuffix",colorGrid:"colorGrid",colorCell:"colorCell",colorCellLabel:"colorCellLabel",colorPickerFull:"colorPickerFull",bgExtras:"bgExtras",bgWarning:"bgWarning",previewSection:"previewSection",previewTitle:"previewTitle",previewWrap:"previewWrap",scanLine:"scanLine",scanLineBarcode:"scanLineBarcode",previewWrapBarcode:"previewWrapBarcode",previewCanvas:"previewCanvas",previewCanvasBarcode:"previewCanvasBarcode",actions:"actions"};const C=({customRequest:r,state:C,setState:N})=>{var M,y;const{t:k}=w(),{options:B}=f(),j=null!==(y=null===(M=null==B?void 0:B.config)||void 0===M?void 0:M.iconStrokeWidth)&&void 0!==y?y:1.75,z=t(null),{mode:S,rawText:E,foregroundHex:L,backgroundHex:P,transparentBackground:R,qrSidePx:O,barcodeBarHeightPx:T}=C,W=o(e=>N(a=>Object.assign(Object.assign({},a),{mode:e})),[N]),q=o(e=>N(a=>Object.assign(Object.assign({},a),{rawText:e})),[N]),H=o(e=>N(a=>Object.assign(Object.assign({},a),{foregroundHex:e})),[N]),I=o(e=>N(a=>Object.assign(Object.assign({},a),{backgroundHex:e})),[N]),F=o(e=>N(a=>Object.assign(Object.assign({},a),{transparentBackground:e})),[N]),G=o(e=>N(a=>Object.assign(Object.assign({},a),{qrSidePx:e})),[N]),A=o(e=>N(a=>Object.assign(Object.assign({},a),{barcodeBarHeightPx:e})),[N]),[D,J]=n(E),[Q,V]=n(null),[U,$]=n(!1),K=i(()=>b.debounce(e=>J(e),300),[]);s(()=>(K(E),()=>{K.cancel()}),[E,K]);const X=R?"#00000000":P,Y=o(async(e,a)=>{const r=(await import("./file-manager-browser-DC8fkuqa.js").then(function(e){return e.b})).default,t=a.trim(),o=Math.min(280,Math.max(80,O));if(!t){e.width=o,e.height=o;const a=e.getContext("2d");return void(a&&a.clearRect(0,0,e.width,e.height))}e.width=o,e.height=o,await r.toCanvas(e,t,{width:o,margin:2,color:{dark:L,light:X}})},[L,X,O]),Z=o(async(e,a)=>{const r=(await import("./file-manager-JsBarcode-Bs9SDyWX.js").then(function(e){return e.J})).default,t=a.trim(),o=R?"rgba(0,0,0,0)":P,n=Math.min(72,Math.max(24,T)),i=Math.max(1,Math.round(n/42)),s=Math.max(4,Math.round(.07*n)),l=Math.max(10,Math.round(.15*n));if(!t){e.width=Math.round(4*n),e.height=Math.round(1.65*n);const a=e.getContext("2d");return void(a&&a.clearRect(0,0,e.width,e.height))}e.width=Math.round(4.2*n),e.height=Math.round(1.65*n),r(e,t,{format:"CODE128",displayValue:!0,background:o,lineColor:L,margin:s,width:i,height:n,fontSize:l})},[L,P,R,T]);s(()=>{const e=z.current;if(!e)return;let a=!1;return(async()=>{try{"qr"===S?await Y(e,D):await Z(e,D),a||V(null)}catch(r){const t=r instanceof Error?r.message:String(r);if(!a){V("barcode"===S?k("Barcode generation failed"):t);const a=e.getContext("2d");a&&a.clearRect(0,0,e.width,e.height)}}})(),()=>{a=!0}},[S,D,Z,Y,k]);const _=o(async()=>{K.flush();const e=E.trim();if(!e)throw new Error(k("Enter text or URL to preview"));const a="undefined"==typeof window?2:Math.min(3,Math.max(2,window.devicePixelRatio||2));if("qr"===S){const r=Math.min(600,Math.max(80,O)),t=Math.round(r*a),o=document.createElement("canvas");o.width=t,o.height=t;const n=(await import("./file-manager-browser-DC8fkuqa.js").then(function(e){return e.b})).default;await n.toCanvas(o,e,{width:t,margin:2,color:{dark:L,light:X}});const i=await new Promise(e=>o.toBlob(e,"image/png"));if(!i)throw new Error("PNG export failed");return i}const r=(await import("./file-manager-JsBarcode-Bs9SDyWX.js").then(function(e){return e.J})).default,t=document.createElement("canvas"),o=R?"rgba(0,0,0,0)":P,n=Math.min(130,Math.max(24,T)),i=Math.max(6,Math.round(.1*n)),s=Math.max(2,Math.round(n/36)),l=Math.max(12,Math.round(.16*n));r(t,e,{format:"CODE128",displayValue:!0,background:o,lineColor:L,margin:Math.round(i*a),width:Math.round(s*a),height:Math.round(n*a),fontSize:Math.round(l*a)});const c=await new Promise(e=>t.toBlob(e,"image/png"));if(!c)throw new Error("PNG export failed");return c},[S,E,L,X,P,R,O,T,K,k]),ee=o(async()=>{if(U)return;if(E.trim()){$(!0);try{let e;try{e=await _()}catch(e){const a=e instanceof Error?e.message:String(e);return void V(a)}const a=new File([e],`${"qr"===S?"qr-code":"barcode"}-${Date.now()}.png`,{type:"image/png",lastModified:Date.now()});await Promise.resolve(r({file:a}))}finally{$(!1)}}},[r,_,S,E,U]),ae=Boolean(E.trim())&&!Q;return e("div",{className:x.root,children:a("div",{className:x.controls,children:[e(l,{block:!0,className:x.segmentedControl,value:S,onChange:e=>{W(e),V(null)},options:[{label:k("QR code"),value:"qr"},{label:k("Barcode"),value:"barcode"}]}),Q&&e(c,{type:"error",message:k("Validation error"),description:Q,showIcon:!0,closable:!0,onClose:()=>V(null)}),e(d.TextArea,{value:E,onChange:e=>{q(e.target.value),V(null)},placeholder:k("Text or URL"),rows:3,spellCheck:!1,autoComplete:"off"}),a("div",{className:x.sizeRow,children:[e(h.Text,{type:"secondary",className:x.sizeRowLabel,children:k("qr"===S?"QR image size px":"Barcode bar height px")}),e(m,"qr"===S?{className:x.sizeInputNumber,min:80,max:600,step:8,value:O,onChange:e=>G("number"!=typeof e||Number.isNaN(e)?200:e),prefix:e(v,{size:18,strokeWidth:j}),suffix:e("span",{className:x.sizeSuffix,children:"px"}),"aria-label":k("QR image size px")}:{className:x.sizeInputNumber,min:24,max:130,step:4,value:T,onChange:e=>A("number"!=typeof e||Number.isNaN(e)?60:e),prefix:e(v,{size:18,strokeWidth:j}),suffix:e("span",{className:x.sizeSuffix,children:"px"}),"aria-label":k("Barcode bar height px")})]}),a("div",{className:x.colorGrid,children:[a("div",{className:x.colorCell,children:[e(h.Text,{type:"secondary",className:x.colorCellLabel,children:k("Code color","Code color")}),e(u,{className:x.colorPickerFull,value:L,format:"hex",disabledAlpha:!0,showText:!0,onChange:(e,a)=>{const r="string"==typeof e?e:(null==e?void 0:e.toHexString)?e.toHexString():a;H(r)}})]}),a("div",{className:x.colorCell,children:[e(h.Text,{type:"secondary",className:x.colorCellLabel,children:k("Background color","Background color")}),e(u,{className:x.colorPickerFull,value:P,format:"hex",disabledAlpha:!0,showText:!0,disabled:R,onChange:(e,a)=>{const r="string"==typeof e?e:(null==e?void 0:e.toHexString)?e.toHexString():a;I(r)}})]}),a("div",{className:x.bgExtras,children:[e(g,{checked:R,onChange:e=>F(e.target.checked),children:k("Transparent background","Transparent background")}),R&&e(c,{type:"warning",showIcon:!0,message:k("QR transparent background hint"),className:x.bgWarning})]})]}),a("div",{className:x.previewSection,children:[e(h.Text,{className:x.previewTitle,children:k("Preview","Preview")}),a("div",{className:[x.previewWrap,"barcode"===S&&x.previewWrapBarcode].filter(Boolean).join(" "),children:[e("div",{className:[x.scanLine,"barcode"===S&&x.scanLineBarcode].filter(Boolean).join(" ")}),e("canvas",{ref:z,className:[x.previewCanvas,"barcode"===S&&x.previewCanvasBarcode].filter(Boolean).join(" "),"aria-label":k("Preview")})]})]}),e("div",{className:x.actions,children:e(p,{type:"primary",onClick:()=>{ee()},loading:U,disabled:!ae,children:k("Add to My files")})})]})})};export{C as default};
|
|
2
|
+
//# sourceMappingURL=file-manager-ImageCodeGenerator-b6--9FnA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./file-manager-index-WsZVOL3e.js";var e,n,r={},o={},i={};function a(){if(e)return i;e=1,Object.defineProperty(i,"__esModule",{value:!0});return i.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n},i}function u(){if(n)return o;n=1,Object.defineProperty(o,"__esModule",{value:!0}),o.CODE39=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=a();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),t=t.toUpperCase(),e.mod43&&(t+=function(t){return u[t]}(function(t){for(var e=0,n=0;n<t.length;n++)e+=l(t[n]);return e%=43}(t))),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){for(var t=c("*"),e=0;e<this.data.length;e++)t+=c(this.data[e])+"0";return{data:t+=c("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),n}(((t=r)&&t.__esModule?t:{default:t}).default),u=["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","-","."," ","$","/","+","%","*"],f=[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 c(t){return function(t){return f[t].toString(2)}(l(t))}function l(t){return u.indexOf(t)}return o.CODE39=i,o}var f,c,l={},s={},p={},d={};function h(){if(f)return d;var t;function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}f=1,Object.defineProperty(d,"__esModule",{value:!0});var n=d.SET_A=0,r=d.SET_B=1,o=d.SET_C=2;d.SHIFT=98;var i=d.START_A=103,a=d.START_B=104,u=d.START_C=105;return d.MODULO=103,d.STOP=106,d.FNC1=207,d.SET_BY_CODE=(e(t={},i,n),e(t,a,r),e(t,u,o),t),d.SWAP={101:n,100:r,99:o},d.A_START_CHAR=String.fromCharCode(208),d.B_START_CHAR=String.fromCharCode(209),d.C_START_CHAR=String.fromCharCode(210),d.A_CHARS="[\0-_È-Ï]",d.B_CHARS="[ -È-Ï]",d.C_CHARS="(Ï*[0-9]{2}Ï*)",d.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],d}function y(){if(c)return p;c=1,Object.defineProperty(p,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t.substring(1),e));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,e=t.shift()-105,r=o.SET_BY_CODE[e];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(o.FNC1);var i=n.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(e)+i.result+n.getBar((i.checksum+e)%o.MODULO)+n.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return o.BARS[t]?o.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===o.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===o.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,e,r){if(!t.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(t[0]>=200){a=t.shift()-105;var u=o.SWAP[a];void 0!==u?i=n.next(t,e+1,u):(r!==o.SET_A&&r!==o.SET_B||a!==o.SHIFT||(t[0]=r===o.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),i=n.next(t,e+1,r))}else a=n.correctIndex(t,r),i=n.next(t,e+1,r);var f=a*e;return{result:n.getBar(a)+i.result,checksum:f+i.checksum}}}]),n}(r.default);return p.default=i,p}var v,b,_={};function g(){if(b)return s;b=1,Object.defineProperty(s,"__esModule",{value:!0});var t=n(y()),e=n(function(){if(v)return _;v=1,Object.defineProperty(_,"__esModule",{value:!0});var t=h(),e=function(e){return e.match(new RegExp("^"+t.A_CHARS+"*"))[0].length},n=function(e){return e.match(new RegExp("^"+t.B_CHARS+"*"))[0].length},r=function(e){return e.match(new RegExp("^"+t.C_CHARS+"*"))[0]};function o(e,n){var r=n?t.A_CHARS:t.B_CHARS,a=e.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(a)return a[1]+String.fromCharCode(204)+i(e.substring(a[1].length));var u=e.match(new RegExp("^"+r+"+"))[0];return u.length===e.length?e:u+String.fromCharCode(n?205:206)+o(e.substring(u.length),!n)}function i(t){var i=r(t),a=i.length;if(a===t.length)return t;t=t.substring(a);var u=e(t)>=n(t);return i+String.fromCharCode(u?206:205)+o(t,u)}return _.default=function(a){var u=void 0;if(r(a).length>=2)u=t.C_START_CHAR+i(a);else{var f=e(a)>n(a);u=(f?t.A_START_CHAR:t.B_START_CHAR)+o(a,f)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})},_}());function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var o=function(t){function n(t,o){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,e.default)(t),o));else i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,o));return r(i)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n}(t.default);return s.default=o,s}var O,E={};function w(){if(O)return E;O=1,Object.defineProperty(E,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.A_START_CHAR+t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return new RegExp("^"+o.A_CHARS+"+$").test(this.data)}}]),n}(r.default);return E.default=i,E}var m,j={};function x(){if(m)return j;m=1,Object.defineProperty(j,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.B_START_CHAR+t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return new RegExp("^"+o.B_CHARS+"+$").test(this.data)}}]),n}(r.default);return j.default=i,j}var P,S,C={};function A(){if(P)return C;P=1,Object.defineProperty(C,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.C_START_CHAR+t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return new RegExp("^"+o.C_CHARS+"+$").test(this.data)}}]),n}(r.default);return C.default=i,C}var T,M={},R={},L={};function k(){return T||(T=1,Object.defineProperty(L,"__esModule",{value:!0}),L.SIDE_BIN="101",L.MIDDLE_BIN="01010",L.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"]},L.EAN2_STRUCTURE=["LL","LG","GL","GG"],L.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],L.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),L}var I,G,B,D={},N={};function $(){if(I)return N;I=1,Object.defineProperty(N,"__esModule",{value:!0});var t=k();return N.default=function(e,n,r){var o=e.split("").map(function(e,r){return t.BINARIES[n[r]]}).map(function(t,n){return t?t[e[n]]:""});if(r){var i=e.length-1;o=o.map(function(t,e){return e<i?t+r:t})}return o.join("")},N}function X(){if(G)return D;G=1,Object.defineProperty(D,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=k(),n=r($());function r(t){return t&&t.__esModule?t:{default:t}}var o=function(r){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e));return n.fontSize=!e.flat&&e.fontSize>10*e.width?10*e.width:e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,r),t(o,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,n.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,n.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:e.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:t},{data:e.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:t},{data:e.SIDE_BIN,options:n}]}},{key:"encodeFlat",value:function(){return{data:[e.SIDE_BIN,this.leftEncode(),e.MIDDLE_BIN,this.rightEncode(),e.SIDE_BIN].join(""),text:this.text}}}]),o}(r(a()).default);return D.default=o,D}function H(){if(B)return R;B=1,Object.defineProperty(R,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=k(),o=X(),i=(t=o)&&t.__esModule?t:{default:t};var a=function(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+3*e:t+e},0)%10)%10},u=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),-1!==t.search(/^[0-9]{12}$/)&&(t+=a(t));var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e));return n.lastChar=e.lastChar,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),e=r.EAN13_STRUCTURE[this.data[0]];return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftEncode",this).call(this,t,e)}},{key:"rightText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),o}(i.default);return R.default=u,R}var z,V={};function U(){if(z)return V;z=1,Object.defineProperty(V,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=X(),o=(t=r)&&t.__esModule?t:{default:t};var i=function(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+e:t+3*e},0)%10)%10},a=function(t){function r(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==t.search(/^[0-9]{7}$/)&&(t+=i(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+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 t=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftEncode",this).call(this,t,"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 t=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),r}(o.default);return V.default=a,V}var F,W={};function Y(){if(F)return W;F=1,Object.defineProperty(W,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=k(),n=o($()),r=o(a());function o(t){return t&&t.__esModule?t:{default:t}}var i=function(r){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,r),t(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,r=e.EAN5_STRUCTURE[(t=this.data,t.split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+9*e:t+3*e},0)%10)];return{data:"1011"+(0,n.default)(this.data,r,"01"),text:this.text}}}]),o}(r.default);return W.default=i,W}var J,Q={};function Z(){if(J)return Q;J=1,Object.defineProperty(Q,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=k(),n=r($());function r(t){return t&&t.__esModule?t:{default:t}}var o=function(r){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,r),t(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=e.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,n.default)(this.data,t,"01"),text:this.text}}}]),o}(r(a()).default);return Q.default=o,Q}var K,q={};function tt(){if(K)return q;K=1,Object.defineProperty(q,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();q.checksum=o;var e=n($());function n(t){return t&&t.__esModule?t:{default:t}}var r=function(n){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==t.search(/^[0-9]{11}$/)&&(t+=o(t));var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,n),t(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==o(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,e.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,e.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,e.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,e.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,e.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,e.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),r}(n(a()).default);function o(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}return q.default=r,q}var et,nt,rt={};function ot(){if(et)return rt;et=1,Object.defineProperty(rt,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=o($()),n=o(a()),r=tt();function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["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(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));if(n.isValid=!1,-1!==t.search(/^[0-9]{6}$/))n.middleDigits=t,n.upcA=l(t,"0"),n.text=e.text||""+n.upcA[0]+t+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return i(n);if(n.middleDigits=t.substring(1,t.length-1),n.upcA=l(n.middleDigits,t[0]),n.upcA[n.upcA.length-1]!==t[t.length-1])return i(n);n.isValid=!0}return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,n),t(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 t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],n=this.upcA[this.upcA.length-1],r=f[parseInt(n)][parseInt(t)];return(0,e.default)(this.middleDigits,r)}}]),r}(n.default);function l(t,e){for(var n=parseInt(t[t.length-1]),o=u[n],i="",a=0,f=0;f<o.length;f++){var c=o[f];i+="X"===c?t[a++]:c}return""+(i=""+e+i)+(0,r.checksum)(i)}return rt.default=c,rt}var it,at,ut={},ft={},ct={};function lt(){if(at)return ft;at=1,Object.defineProperty(ft,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=(it||(it=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.START_BIN="1010",ct.END_BIN="11101",ct.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),ct),r=a();var o=function(t){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:n.START_BIN+e+n.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=n.BINARIES[t[1]];return n.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),r}(((t=r)&&t.__esModule?t:{default:t}).default);return ft.default=o,ft}var st,pt,dt={};function ht(){if(st)return dt;st=1,Object.defineProperty(dt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=lt(),r=(t=n)&&t.__esModule?t:{default:t};var o=function(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,n){return t+e*(3-n%2*2)},0);return 10*Math.ceil(e/10)-e},i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),-1!==t.search(/^[0-9]{13}$/)&&(t+=o(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),n}(r.default);return dt.default=i,dt}var yt,vt={},bt={};function _t(){if(yt)return bt;yt=1,Object.defineProperty(bt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=o(n,4-n.length);for(var r=0;r<n.length;r++)t+="0"==n[r]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);function o(t,e){for(var n=0;n<e;n++)t="0"+t;return t}return bt.default=r,bt}var gt,Ot,Et={},wt={};function mt(){if(gt)return wt;return gt=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},wt.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11},wt}function jt(){if(Ot)return Et;Ot=1,Object.defineProperty(Et,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod10)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return Et.default=o,Et}var xt,Pt={};function St(){if(xt)return Pt;xt=1,Object.defineProperty(Pt,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod11)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return Pt.default=o,Pt}var Ct,At={};function Tt(){if(Ct)return At;Ct=1,Object.defineProperty(At,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod10)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return At.default=o,At}var Mt,Rt,Lt={};function kt(){if(Mt)return Lt;Mt=1,Object.defineProperty(Lt,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod11)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return Lt.default=o,Lt}var It,Gt={};function Bt(){if(It)return Gt;It=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.pharmacode=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);return Gt.pharmacode=r,Gt}var Dt,Nt={};function $t(){if(Dt)return Nt;Dt=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.codabar=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t.toUpperCase(),e));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.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}(((t=n)&&t.__esModule?t:{default:t}).default);return Nt.codabar=r,Nt}var Xt,Ht,zt={},Vt={},Ut={};function Ft(){if(Ht)return Vt;Ht=1,Object.defineProperty(Vt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=(Xt||(Xt=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Ut.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"],Ut.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","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"]}),Ut),r=a();var o=function(t){function r(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return n.MULTI_SYMBOLS[t]||t}),e=t.map(function(t){return r.getEncoding(t)}).join(""),o=r.checksum(t,20),i=r.checksum(t.concat(o),15);return{text:this.text,data:r.getEncoding("ÿ")+e+r.getEncoding(o)+r.getEncoding(i)+r.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return n.BINARIES[r.symbolValue(t)]}},{key:"getSymbol",value:function(t){return n.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return n.SYMBOLS.indexOf(t)}},{key:"checksum",value:function(t,e){var n=t.slice().reverse().reduce(function(t,n,o){var i=o%e+1;return t+r.symbolValue(n)*i},0);return r.getSymbol(n%47)}}]),r}(((t=r)&&t.__esModule?t:{default:t}).default);return Vt.default=o,Vt}var Wt,Yt,Jt={};function Qt(){if(Wt)return Jt;Wt=1,Object.defineProperty(Jt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=Ft();var r=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);return Jt.default=r,Jt}var Zt,Kt,qt={};function te(){if(Zt)return qt;Zt=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.GenericBarcode=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);return qt.GenericBarcode=r,qt}function ee(){if(Kt)return r;Kt=1,Object.defineProperty(r,"__esModule",{value:!0});var t=u(),e=function(){if(S)return l;S=1,Object.defineProperty(l,"__esModule",{value:!0}),l.CODE128C=l.CODE128B=l.CODE128A=l.CODE128=void 0;var t=o(g()),e=o(w()),n=o(x()),r=o(A());function o(t){return t&&t.__esModule?t:{default:t}}return l.CODE128=t.default,l.CODE128A=e.default,l.CODE128B=n.default,l.CODE128C=r.default,l}(),n=function(){if(nt)return M;nt=1,Object.defineProperty(M,"__esModule",{value:!0}),M.UPCE=M.UPC=M.EAN2=M.EAN5=M.EAN8=M.EAN13=void 0;var t=a(H()),e=a(U()),n=a(Y()),r=a(Z()),o=a(tt()),i=a(ot());function a(t){return t&&t.__esModule?t:{default:t}}return M.EAN13=t.default,M.EAN8=e.default,M.EAN5=n.default,M.EAN2=r.default,M.UPC=o.default,M.UPCE=i.default,M}(),o=function(){if(pt)return ut;pt=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.ITF14=ut.ITF=void 0;var t=n(lt()),e=n(ht());function n(t){return t&&t.__esModule?t:{default:t}}return ut.ITF=t.default,ut.ITF14=e.default,ut}(),i=function(){if(Rt)return vt;Rt=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.MSI1110=vt.MSI1010=vt.MSI11=vt.MSI10=vt.MSI=void 0;var t=i(_t()),e=i(jt()),n=i(St()),r=i(Tt()),o=i(kt());function i(t){return t&&t.__esModule?t:{default:t}}return vt.MSI=t.default,vt.MSI10=e.default,vt.MSI11=n.default,vt.MSI1010=r.default,vt.MSI1110=o.default,vt}(),a=Bt(),f=$t(),c=function(){if(Yt)return zt;Yt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.CODE93FullASCII=zt.CODE93=void 0;var t=n(Ft()),e=n(Qt());function n(t){return t&&t.__esModule?t:{default:t}}return zt.CODE93=t.default,zt.CODE93FullASCII=e.default,zt}(),s=te();return r.default={CODE39:t.CODE39,CODE128:e.CODE128,CODE128A:e.CODE128A,CODE128B:e.CODE128B,CODE128C:e.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:o.ITF14,ITF:o.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:f.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:s.GenericBarcode},r}var ne,re={};function oe(){if(ne)return re;ne=1,Object.defineProperty(re,"__esModule",{value:!0});var t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};return re.default=function(e,n){return t({},e,n)},re}var ie,ae={};var ue,fe={};var ce,le={},se={},pe={};function de(){if(ce)return pe;return ce=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&"string"==typeof t[n=e[n]]&&(t[n]=parseInt(t[n],10));"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue);return t},pe}var he,ye,ve={};function be(){if(he)return ve;he=1,Object.defineProperty(ve,"__esModule",{value:!0});var t={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(){}};return ve.default=t,ve}var _e,ge,Oe={},Ee={},we={};function me(){if(_e)return we;_e=1,Object.defineProperty(we,"__esModule",{value:!0}),we.getTotalWidthOfEncodings=we.calculateEncodingAttributes=we.getBarcodePadding=we.getEncodingHeight=we.getMaximumHeightOfEncodings=void 0;var t,e=oe(),n=(t=e)&&t.__esModule?t:{default:t};function r(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function i(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}return we.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},we.getEncodingHeight=r,we.getBarcodePadding=o,we.calculateEncodingAttributes=function(t,e,a){for(var u=0;u<t.length;u++){var f,c=t[u],l=(0,n.default)(e,c.options);f=l.displayValue?i(c.text,l,a):0;var s=c.data.length*l.width;c.width=Math.ceil(Math.max(f,s)),c.height=r(c,l),c.barcodePadding=o(f,s,l)}},we.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e},we}function je(){if(ge)return Ee;ge=1,Object.defineProperty(Ee,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=oe(),r=(t=n)&&t.__esModule?t:{default:t},o=me();var i=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return e(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,r.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,o.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),n=(0,o.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();return Ee.default=i,Ee}var xe,Pe={};function Se(){if(xe)return Pe;xe=1,Object.defineProperty(Pe,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=oe(),r=(t=n)&&t.__esModule?t:{default:t},o=me();var i="http://www.w3.org/2000/svg",a=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return e(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],o=(0,r.default)(this.options,n.options),i=this.createGroup(t,o.marginTop,this.svg);this.setGroupOptions(i,o),this.drawSvgBarcode(i,o,n),this.drawSVGText(i,o,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,o.getTotalWidthOfEncodings)(this.encodings),e=(0,o.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,a=this.document.createElementNS(i,"text");e.displayValue&&(a.setAttribute("font-family",e.font),a.setAttribute("font-size",e.fontSize),e.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),e.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,a.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,a.setAttribute("text-anchor","end")):(r=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",r),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),t.appendChild(a))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",i),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(i,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("fill",e.lineColor)}},{key:"drawRect",value:function(t,e,n,r,o){var a=this.document.createElementNS(i,"rect");return a.setAttribute("x",t),a.setAttribute("y",e),a.setAttribute("width",n),a.setAttribute("height",r),o.appendChild(a),a}}]),t}();return Pe.default=a,Pe}var Ce,Ae,Te={};function Me(){if(Ce)return Te;Ce=1,Object.defineProperty(Te,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var e=function(){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.object=t,this.encodings=n,this.options=r}return t(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}();return Te.default=e,Te}var Re,Le,ke={};function Ie(){if(Re)return ke;function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Re=1,Object.defineProperty(ke,"__esModule",{value:!0});var r=function(){function r(n,o){t(this,r);var i=e(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return i.name="InvalidInputException",i.symbology=n,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return n(r,Error),r}(),o=function(){function r(){t(this,r);var n=e(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}(),i=function(){function r(){t(this,r);var n=e(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 ke.InvalidInputException=r,ke.InvalidElementException=o,ke.NoElementException=i,ke}function Ge(){if(Le)return le;Le=1,Object.defineProperty(le,"__esModule",{value:!0});var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(){if(ye)return se;ye=1,Object.defineProperty(se,"__esModule",{value:!0});var t=n(de()),e=n(be());function n(t){return t&&t.__esModule?t:{default:t}}return se.default=function(n){var r={};for(var o in e.default)e.default.hasOwnProperty(o)&&(n.hasAttribute("jsbarcode-"+o.toLowerCase())&&(r[o]=n.getAttribute("jsbarcode-"+o.toLowerCase())),n.hasAttribute("data-"+o.toLowerCase())&&(r[o]=n.getAttribute("data-"+o.toLowerCase())));return r.value=n.getAttribute("jsbarcode-value")||n.getAttribute("data-value"),(0,t.default)(r)},se}(),n=a(e),r=function(){if(Ae)return Oe;Ae=1,Object.defineProperty(Oe,"__esModule",{value:!0});var t=r(je()),e=r(Se()),n=r(Me());function r(t){return t&&t.__esModule?t:{default:t}}return Oe.default={CanvasRenderer:t.default,SVGRenderer:e.default,ObjectRenderer:n.default},Oe}(),o=a(r),i=Ie();function a(t){return t&&t.__esModule?t:{default:t}}function u(e){if("string"==typeof e)return function(t){var e=document.querySelectorAll(t);if(0===e.length)return;for(var n=[],r=0;r<e.length;r++)n.push(u(e[r]));return n}(e);if(Array.isArray(e)){for(var r=[],a=0;a<e.length;a++)r.push(u(e[a]));return r}if("undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLImageElement)return function(t){var e=document.createElement("canvas");return{element:e,options:(0,n.default)(t),renderer:o.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}(e);if(e&&e.nodeName&&"svg"===e.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&e instanceof SVGElement)return{element:e,options:(0,n.default)(e),renderer:o.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement)return{element:e,options:(0,n.default)(e),renderer:o.default.CanvasRenderer};if(e&&e.getContext)return{element:e,renderer:o.default.CanvasRenderer};if(e&&"object"===(void 0===e?"undefined":t(e))&&!e.nodeName)return{element:e,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}return le.default=u,le}var Be,De,Ne,$e={};function Xe(){if(Be)return $e;Be=1,Object.defineProperty($e,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var e=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.api=t}return t(e,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),e}();return $e.default=e,$e}var He=function(){if(Ne)return De;Ne=1;var t=c(ee()),e=c(oe()),n=c((ie||(ie=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}),ae)),r=c((ue||(ue=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}),fe)),o=c(Ge()),i=c(de()),a=c(Xe()),u=Ie(),f=c(be());function c(t){return t&&t.__esModule?t:{default:t}}var l=function(){},s=function(t,e,n){var r=new l;if(void 0===t)throw Error("No element to render on was provided.");return r._renderProperties=(0,o.default)(t),r._encodings=[],r._options=f.default,r._errorHandler=new a.default(r),void 0!==e&&((n=n||{}).format||(n.format=y()),r.options(n)[n.format](e,n).render()),r};for(var p in s.getModule=function(e){return t.default[e]},t.default)t.default.hasOwnProperty(p)&&d(t.default,p);function d(t,n){l.prototype[n]=l.prototype[n.toUpperCase()]=l.prototype[n.toLowerCase()]=function(r,o){var a=this;return a._errorHandler.wrapBarcodeCall(function(){o.text=void 0===o.text?void 0:""+o.text;var u=(0,e.default)(a._options,o);u=(0,i.default)(u);var f=t[n],c=h(r,f,u);return a._encodings.push(c),a})}}function h(t,r,o){var i=new r(t=""+t,o);if(!i.valid())throw new u.InvalidInputException(i.constructor.name,t);var a=i.encode();a=(0,n.default)(a);for(var f=0;f<a.length;f++)a[f].options=(0,e.default)(o,a[f].options);return a}function y(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}function v(t,o,i){o=(0,n.default)(o);for(var a=0;a<o.length;a++)o[a].options=(0,e.default)(i,o[a].options),(0,r.default)(o[a].options);(0,r.default)(i),new(0,t.renderer)(t.element,o,i).render(),t.afterRender&&t.afterRender()}return l.prototype.options=function(t){return this._options=(0,e.default)(this._options,t),this},l.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},l.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 o=(0,e.default)(this._options,n.options);"auto"==o.format&&(o.format=y()),this._errorHandler.wrapBarcodeCall(function(){var e=h(o.value,t.default[o.format.toUpperCase()],o);v(n,e,o)})}},l.prototype.render=function(){if(!this._renderProperties)throw new u.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)v(this._renderProperties[t],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},l.prototype._defaults=f.default,"undefined"!=typeof window&&(window.JsBarcode=s),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),s(n,t,e)}),De=s}(),ze=t(He),Ve=Object.freeze({__proto__:null,default:ze});export{Ve as J};
|
|
2
|
-
//# sourceMappingURL=file-manager-JsBarcode-
|
|
1
|
+
import{t}from"./file-manager-index-B4pgaHpG.js";var e,n,r={},o={},i={};function a(){if(e)return i;e=1,Object.defineProperty(i,"__esModule",{value:!0});return i.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n},i}function u(){if(n)return o;n=1,Object.defineProperty(o,"__esModule",{value:!0}),o.CODE39=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=a();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),t=t.toUpperCase(),e.mod43&&(t+=function(t){return u[t]}(function(t){for(var e=0,n=0;n<t.length;n++)e+=l(t[n]);return e%=43}(t))),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){for(var t=c("*"),e=0;e<this.data.length;e++)t+=c(this.data[e])+"0";return{data:t+=c("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),n}(((t=r)&&t.__esModule?t:{default:t}).default),u=["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","-","."," ","$","/","+","%","*"],f=[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 c(t){return function(t){return f[t].toString(2)}(l(t))}function l(t){return u.indexOf(t)}return o.CODE39=i,o}var f,c,l={},s={},p={},d={};function h(){if(f)return d;var t;function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}f=1,Object.defineProperty(d,"__esModule",{value:!0});var n=d.SET_A=0,r=d.SET_B=1,o=d.SET_C=2;d.SHIFT=98;var i=d.START_A=103,a=d.START_B=104,u=d.START_C=105;return d.MODULO=103,d.STOP=106,d.FNC1=207,d.SET_BY_CODE=(e(t={},i,n),e(t,a,r),e(t,u,o),t),d.SWAP={101:n,100:r,99:o},d.A_START_CHAR=String.fromCharCode(208),d.B_START_CHAR=String.fromCharCode(209),d.C_START_CHAR=String.fromCharCode(210),d.A_CHARS="[\0-_È-Ï]",d.B_CHARS="[ -È-Ï]",d.C_CHARS="(Ï*[0-9]{2}Ï*)",d.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],d}function y(){if(c)return p;c=1,Object.defineProperty(p,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t.substring(1),e));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,e=t.shift()-105,r=o.SET_BY_CODE[e];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(o.FNC1);var i=n.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(e)+i.result+n.getBar((i.checksum+e)%o.MODULO)+n.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return o.BARS[t]?o.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===o.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===o.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,e,r){if(!t.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(t[0]>=200){a=t.shift()-105;var u=o.SWAP[a];void 0!==u?i=n.next(t,e+1,u):(r!==o.SET_A&&r!==o.SET_B||a!==o.SHIFT||(t[0]=r===o.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),i=n.next(t,e+1,r))}else a=n.correctIndex(t,r),i=n.next(t,e+1,r);var f=a*e;return{result:n.getBar(a)+i.result,checksum:f+i.checksum}}}]),n}(r.default);return p.default=i,p}var v,b,_={};function g(){if(b)return s;b=1,Object.defineProperty(s,"__esModule",{value:!0});var t=n(y()),e=n(function(){if(v)return _;v=1,Object.defineProperty(_,"__esModule",{value:!0});var t=h(),e=function(e){return e.match(new RegExp("^"+t.A_CHARS+"*"))[0].length},n=function(e){return e.match(new RegExp("^"+t.B_CHARS+"*"))[0].length},r=function(e){return e.match(new RegExp("^"+t.C_CHARS+"*"))[0]};function o(e,n){var r=n?t.A_CHARS:t.B_CHARS,a=e.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(a)return a[1]+String.fromCharCode(204)+i(e.substring(a[1].length));var u=e.match(new RegExp("^"+r+"+"))[0];return u.length===e.length?e:u+String.fromCharCode(n?205:206)+o(e.substring(u.length),!n)}function i(t){var i=r(t),a=i.length;if(a===t.length)return t;t=t.substring(a);var u=e(t)>=n(t);return i+String.fromCharCode(u?206:205)+o(t,u)}return _.default=function(a){var u=void 0;if(r(a).length>=2)u=t.C_START_CHAR+i(a);else{var f=e(a)>n(a);u=(f?t.A_START_CHAR:t.B_START_CHAR)+o(a,f)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})},_}());function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var o=function(t){function n(t,o){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,e.default)(t),o));else i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,o));return r(i)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n}(t.default);return s.default=o,s}var O,E={};function w(){if(O)return E;O=1,Object.defineProperty(E,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.A_START_CHAR+t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return new RegExp("^"+o.A_CHARS+"+$").test(this.data)}}]),n}(r.default);return E.default=i,E}var m,j={};function x(){if(m)return j;m=1,Object.defineProperty(j,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.B_START_CHAR+t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return new RegExp("^"+o.B_CHARS+"+$").test(this.data)}}]),n}(r.default);return j.default=i,j}var P,S,C={};function A(){if(P)return C;P=1,Object.defineProperty(C,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=(t=n)&&t.__esModule?t:{default:t},o=h();var i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.C_START_CHAR+t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return new RegExp("^"+o.C_CHARS+"+$").test(this.data)}}]),n}(r.default);return C.default=i,C}var T,M={},R={},L={};function k(){return T||(T=1,Object.defineProperty(L,"__esModule",{value:!0}),L.SIDE_BIN="101",L.MIDDLE_BIN="01010",L.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"]},L.EAN2_STRUCTURE=["LL","LG","GL","GG"],L.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],L.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),L}var I,G,B,D={},N={};function $(){if(I)return N;I=1,Object.defineProperty(N,"__esModule",{value:!0});var t=k();return N.default=function(e,n,r){var o=e.split("").map(function(e,r){return t.BINARIES[n[r]]}).map(function(t,n){return t?t[e[n]]:""});if(r){var i=e.length-1;o=o.map(function(t,e){return e<i?t+r:t})}return o.join("")},N}function X(){if(G)return D;G=1,Object.defineProperty(D,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=k(),n=r($());function r(t){return t&&t.__esModule?t:{default:t}}var o=function(r){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e));return n.fontSize=!e.flat&&e.fontSize>10*e.width?10*e.width:e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,r),t(o,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,n.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,n.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:e.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:t},{data:e.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:t},{data:e.SIDE_BIN,options:n}]}},{key:"encodeFlat",value:function(){return{data:[e.SIDE_BIN,this.leftEncode(),e.MIDDLE_BIN,this.rightEncode(),e.SIDE_BIN].join(""),text:this.text}}}]),o}(r(a()).default);return D.default=o,D}function H(){if(B)return R;B=1,Object.defineProperty(R,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=k(),o=X(),i=(t=o)&&t.__esModule?t:{default:t};var a=function(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+3*e:t+e},0)%10)%10},u=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),-1!==t.search(/^[0-9]{12}$/)&&(t+=a(t));var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e));return n.lastChar=e.lastChar,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),e=r.EAN13_STRUCTURE[this.data[0]];return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftEncode",this).call(this,t,e)}},{key:"rightText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),o}(i.default);return R.default=u,R}var z,V={};function U(){if(z)return V;z=1,Object.defineProperty(V,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=X(),o=(t=r)&&t.__esModule?t:{default:t};var i=function(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+e:t+3*e},0)%10)%10},a=function(t){function r(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==t.search(/^[0-9]{7}$/)&&(t+=i(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+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 t=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftEncode",this).call(this,t,"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 t=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),r}(o.default);return V.default=a,V}var F,W={};function Y(){if(F)return W;F=1,Object.defineProperty(W,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=k(),n=o($()),r=o(a());function o(t){return t&&t.__esModule?t:{default:t}}var i=function(r){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,r),t(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,r=e.EAN5_STRUCTURE[(t=this.data,t.split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+9*e:t+3*e},0)%10)];return{data:"1011"+(0,n.default)(this.data,r,"01"),text:this.text}}}]),o}(r.default);return W.default=i,W}var J,Q={};function Z(){if(J)return Q;J=1,Object.defineProperty(Q,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=k(),n=r($());function r(t){return t&&t.__esModule?t:{default:t}}var o=function(r){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,r),t(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=e.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,n.default)(this.data,t,"01"),text:this.text}}}]),o}(r(a()).default);return Q.default=o,Q}var K,q={};function tt(){if(K)return q;K=1,Object.defineProperty(q,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();q.checksum=o;var e=n($());function n(t){return t&&t.__esModule?t:{default:t}}var r=function(n){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==t.search(/^[0-9]{11}$/)&&(t+=o(t));var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,n),t(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==o(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,e.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,e.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,e.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,e.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,e.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,e.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),r}(n(a()).default);function o(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}return q.default=r,q}var et,nt,rt={};function ot(){if(et)return rt;et=1,Object.defineProperty(rt,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),e=o($()),n=o(a()),r=tt();function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["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(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));if(n.isValid=!1,-1!==t.search(/^[0-9]{6}$/))n.middleDigits=t,n.upcA=l(t,"0"),n.text=e.text||""+n.upcA[0]+t+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return i(n);if(n.middleDigits=t.substring(1,t.length-1),n.upcA=l(n.middleDigits,t[0]),n.upcA[n.upcA.length-1]!==t[t.length-1])return i(n);n.isValid=!0}return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,n),t(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 t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],n=this.upcA[this.upcA.length-1],r=f[parseInt(n)][parseInt(t)];return(0,e.default)(this.middleDigits,r)}}]),r}(n.default);function l(t,e){for(var n=parseInt(t[t.length-1]),o=u[n],i="",a=0,f=0;f<o.length;f++){var c=o[f];i+="X"===c?t[a++]:c}return""+(i=""+e+i)+(0,r.checksum)(i)}return rt.default=c,rt}var it,at,ut={},ft={},ct={};function lt(){if(at)return ft;at=1,Object.defineProperty(ft,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=(it||(it=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.START_BIN="1010",ct.END_BIN="11101",ct.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),ct),r=a();var o=function(t){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:n.START_BIN+e+n.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=n.BINARIES[t[1]];return n.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),r}(((t=r)&&t.__esModule?t:{default:t}).default);return ft.default=o,ft}var st,pt,dt={};function ht(){if(st)return dt;st=1,Object.defineProperty(dt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=lt(),r=(t=n)&&t.__esModule?t:{default:t};var o=function(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,n){return t+e*(3-n%2*2)},0);return 10*Math.ceil(e/10)-e},i=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),-1!==t.search(/^[0-9]{13}$/)&&(t+=o(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),n}(r.default);return dt.default=i,dt}var yt,vt={},bt={};function _t(){if(yt)return bt;yt=1,Object.defineProperty(bt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=o(n,4-n.length);for(var r=0;r<n.length;r++)t+="0"==n[r]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);function o(t,e){for(var n=0;n<e;n++)t="0"+t;return t}return bt.default=r,bt}var gt,Ot,Et={},wt={};function mt(){if(gt)return wt;return gt=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},wt.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11},wt}function jt(){if(Ot)return Et;Ot=1,Object.defineProperty(Et,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod10)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return Et.default=o,Et}var xt,Pt={};function St(){if(xt)return Pt;xt=1,Object.defineProperty(Pt,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod11)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return Pt.default=o,Pt}var Ct,At={};function Tt(){if(Ct)return At;Ct=1,Object.defineProperty(At,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod10)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return At.default=o,At}var Mt,Rt,Lt={};function kt(){if(Mt)return Lt;Mt=1,Object.defineProperty(Lt,"__esModule",{value:!0});var t,e=_t(),n=(t=e)&&t.__esModule?t:{default:t},r=mt();var o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod11)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);return Lt.default=o,Lt}var It,Gt={};function Bt(){if(It)return Gt;It=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.pharmacode=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);return Gt.pharmacode=r,Gt}var Dt,Nt={};function $t(){if(Dt)return Nt;Dt=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.codabar=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t.toUpperCase(),e));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.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}(((t=n)&&t.__esModule?t:{default:t}).default);return Nt.codabar=r,Nt}var Xt,Ht,zt={},Vt={},Ut={};function Ft(){if(Ht)return Vt;Ht=1,Object.defineProperty(Vt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=(Xt||(Xt=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Ut.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"],Ut.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","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"]}),Ut),r=a();var o=function(t){function r(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return n.MULTI_SYMBOLS[t]||t}),e=t.map(function(t){return r.getEncoding(t)}).join(""),o=r.checksum(t,20),i=r.checksum(t.concat(o),15);return{text:this.text,data:r.getEncoding("ÿ")+e+r.getEncoding(o)+r.getEncoding(i)+r.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return n.BINARIES[r.symbolValue(t)]}},{key:"getSymbol",value:function(t){return n.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return n.SYMBOLS.indexOf(t)}},{key:"checksum",value:function(t,e){var n=t.slice().reverse().reduce(function(t,n,o){var i=o%e+1;return t+r.symbolValue(n)*i},0);return r.getSymbol(n%47)}}]),r}(((t=r)&&t.__esModule?t:{default:t}).default);return Vt.default=o,Vt}var Wt,Yt,Jt={};function Qt(){if(Wt)return Jt;Wt=1,Object.defineProperty(Jt,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=Ft();var r=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);return Jt.default=r,Jt}var Zt,Kt,qt={};function te(){if(Zt)return qt;Zt=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.GenericBarcode=void 0;var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a();var r=function(t){function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),e(n,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),n}(((t=n)&&t.__esModule?t:{default:t}).default);return qt.GenericBarcode=r,qt}function ee(){if(Kt)return r;Kt=1,Object.defineProperty(r,"__esModule",{value:!0});var t=u(),e=function(){if(S)return l;S=1,Object.defineProperty(l,"__esModule",{value:!0}),l.CODE128C=l.CODE128B=l.CODE128A=l.CODE128=void 0;var t=o(g()),e=o(w()),n=o(x()),r=o(A());function o(t){return t&&t.__esModule?t:{default:t}}return l.CODE128=t.default,l.CODE128A=e.default,l.CODE128B=n.default,l.CODE128C=r.default,l}(),n=function(){if(nt)return M;nt=1,Object.defineProperty(M,"__esModule",{value:!0}),M.UPCE=M.UPC=M.EAN2=M.EAN5=M.EAN8=M.EAN13=void 0;var t=a(H()),e=a(U()),n=a(Y()),r=a(Z()),o=a(tt()),i=a(ot());function a(t){return t&&t.__esModule?t:{default:t}}return M.EAN13=t.default,M.EAN8=e.default,M.EAN5=n.default,M.EAN2=r.default,M.UPC=o.default,M.UPCE=i.default,M}(),o=function(){if(pt)return ut;pt=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.ITF14=ut.ITF=void 0;var t=n(lt()),e=n(ht());function n(t){return t&&t.__esModule?t:{default:t}}return ut.ITF=t.default,ut.ITF14=e.default,ut}(),i=function(){if(Rt)return vt;Rt=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.MSI1110=vt.MSI1010=vt.MSI11=vt.MSI10=vt.MSI=void 0;var t=i(_t()),e=i(jt()),n=i(St()),r=i(Tt()),o=i(kt());function i(t){return t&&t.__esModule?t:{default:t}}return vt.MSI=t.default,vt.MSI10=e.default,vt.MSI11=n.default,vt.MSI1010=r.default,vt.MSI1110=o.default,vt}(),a=Bt(),f=$t(),c=function(){if(Yt)return zt;Yt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.CODE93FullASCII=zt.CODE93=void 0;var t=n(Ft()),e=n(Qt());function n(t){return t&&t.__esModule?t:{default:t}}return zt.CODE93=t.default,zt.CODE93FullASCII=e.default,zt}(),s=te();return r.default={CODE39:t.CODE39,CODE128:e.CODE128,CODE128A:e.CODE128A,CODE128B:e.CODE128B,CODE128C:e.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:o.ITF14,ITF:o.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:f.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:s.GenericBarcode},r}var ne,re={};function oe(){if(ne)return re;ne=1,Object.defineProperty(re,"__esModule",{value:!0});var t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};return re.default=function(e,n){return t({},e,n)},re}var ie,ae={};var ue,fe={};var ce,le={},se={},pe={};function de(){if(ce)return pe;return ce=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&"string"==typeof t[n=e[n]]&&(t[n]=parseInt(t[n],10));"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue);return t},pe}var he,ye,ve={};function be(){if(he)return ve;he=1,Object.defineProperty(ve,"__esModule",{value:!0});var t={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(){}};return ve.default=t,ve}var _e,ge,Oe={},Ee={},we={};function me(){if(_e)return we;_e=1,Object.defineProperty(we,"__esModule",{value:!0}),we.getTotalWidthOfEncodings=we.calculateEncodingAttributes=we.getBarcodePadding=we.getEncodingHeight=we.getMaximumHeightOfEncodings=void 0;var t,e=oe(),n=(t=e)&&t.__esModule?t:{default:t};function r(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function i(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}return we.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},we.getEncodingHeight=r,we.getBarcodePadding=o,we.calculateEncodingAttributes=function(t,e,a){for(var u=0;u<t.length;u++){var f,c=t[u],l=(0,n.default)(e,c.options);f=l.displayValue?i(c.text,l,a):0;var s=c.data.length*l.width;c.width=Math.ceil(Math.max(f,s)),c.height=r(c,l),c.barcodePadding=o(f,s,l)}},we.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e},we}function je(){if(ge)return Ee;ge=1,Object.defineProperty(Ee,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=oe(),r=(t=n)&&t.__esModule?t:{default:t},o=me();var i=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return e(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,r.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,o.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),n=(0,o.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();return Ee.default=i,Ee}var xe,Pe={};function Se(){if(xe)return Pe;xe=1,Object.defineProperty(Pe,"__esModule",{value:!0});var t,e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=oe(),r=(t=n)&&t.__esModule?t:{default:t},o=me();var i="http://www.w3.org/2000/svg",a=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return e(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],o=(0,r.default)(this.options,n.options),i=this.createGroup(t,o.marginTop,this.svg);this.setGroupOptions(i,o),this.drawSvgBarcode(i,o,n),this.drawSVGText(i,o,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,o.getTotalWidthOfEncodings)(this.encodings),e=(0,o.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,a=this.document.createElementNS(i,"text");e.displayValue&&(a.setAttribute("font-family",e.font),a.setAttribute("font-size",e.fontSize),e.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),e.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,a.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,a.setAttribute("text-anchor","end")):(r=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",r),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),t.appendChild(a))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",i),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(i,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("fill",e.lineColor)}},{key:"drawRect",value:function(t,e,n,r,o){var a=this.document.createElementNS(i,"rect");return a.setAttribute("x",t),a.setAttribute("y",e),a.setAttribute("width",n),a.setAttribute("height",r),o.appendChild(a),a}}]),t}();return Pe.default=a,Pe}var Ce,Ae,Te={};function Me(){if(Ce)return Te;Ce=1,Object.defineProperty(Te,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var e=function(){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.object=t,this.encodings=n,this.options=r}return t(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}();return Te.default=e,Te}var Re,Le,ke={};function Ie(){if(Re)return ke;function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Re=1,Object.defineProperty(ke,"__esModule",{value:!0});var r=function(){function r(n,o){t(this,r);var i=e(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return i.name="InvalidInputException",i.symbology=n,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return n(r,Error),r}(),o=function(){function r(){t(this,r);var n=e(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}(),i=function(){function r(){t(this,r);var n=e(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 ke.InvalidInputException=r,ke.InvalidElementException=o,ke.NoElementException=i,ke}function Ge(){if(Le)return le;Le=1,Object.defineProperty(le,"__esModule",{value:!0});var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(){if(ye)return se;ye=1,Object.defineProperty(se,"__esModule",{value:!0});var t=n(de()),e=n(be());function n(t){return t&&t.__esModule?t:{default:t}}return se.default=function(n){var r={};for(var o in e.default)e.default.hasOwnProperty(o)&&(n.hasAttribute("jsbarcode-"+o.toLowerCase())&&(r[o]=n.getAttribute("jsbarcode-"+o.toLowerCase())),n.hasAttribute("data-"+o.toLowerCase())&&(r[o]=n.getAttribute("data-"+o.toLowerCase())));return r.value=n.getAttribute("jsbarcode-value")||n.getAttribute("data-value"),(0,t.default)(r)},se}(),n=a(e),r=function(){if(Ae)return Oe;Ae=1,Object.defineProperty(Oe,"__esModule",{value:!0});var t=r(je()),e=r(Se()),n=r(Me());function r(t){return t&&t.__esModule?t:{default:t}}return Oe.default={CanvasRenderer:t.default,SVGRenderer:e.default,ObjectRenderer:n.default},Oe}(),o=a(r),i=Ie();function a(t){return t&&t.__esModule?t:{default:t}}function u(e){if("string"==typeof e)return function(t){var e=document.querySelectorAll(t);if(0===e.length)return;for(var n=[],r=0;r<e.length;r++)n.push(u(e[r]));return n}(e);if(Array.isArray(e)){for(var r=[],a=0;a<e.length;a++)r.push(u(e[a]));return r}if("undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLImageElement)return function(t){var e=document.createElement("canvas");return{element:e,options:(0,n.default)(t),renderer:o.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}(e);if(e&&e.nodeName&&"svg"===e.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&e instanceof SVGElement)return{element:e,options:(0,n.default)(e),renderer:o.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement)return{element:e,options:(0,n.default)(e),renderer:o.default.CanvasRenderer};if(e&&e.getContext)return{element:e,renderer:o.default.CanvasRenderer};if(e&&"object"===(void 0===e?"undefined":t(e))&&!e.nodeName)return{element:e,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}return le.default=u,le}var Be,De,Ne,$e={};function Xe(){if(Be)return $e;Be=1,Object.defineProperty($e,"__esModule",{value:!0});var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var e=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.api=t}return t(e,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),e}();return $e.default=e,$e}var He=function(){if(Ne)return De;Ne=1;var t=c(ee()),e=c(oe()),n=c((ie||(ie=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}),ae)),r=c((ue||(ue=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}),fe)),o=c(Ge()),i=c(de()),a=c(Xe()),u=Ie(),f=c(be());function c(t){return t&&t.__esModule?t:{default:t}}var l=function(){},s=function(t,e,n){var r=new l;if(void 0===t)throw Error("No element to render on was provided.");return r._renderProperties=(0,o.default)(t),r._encodings=[],r._options=f.default,r._errorHandler=new a.default(r),void 0!==e&&((n=n||{}).format||(n.format=y()),r.options(n)[n.format](e,n).render()),r};for(var p in s.getModule=function(e){return t.default[e]},t.default)t.default.hasOwnProperty(p)&&d(t.default,p);function d(t,n){l.prototype[n]=l.prototype[n.toUpperCase()]=l.prototype[n.toLowerCase()]=function(r,o){var a=this;return a._errorHandler.wrapBarcodeCall(function(){o.text=void 0===o.text?void 0:""+o.text;var u=(0,e.default)(a._options,o);u=(0,i.default)(u);var f=t[n],c=h(r,f,u);return a._encodings.push(c),a})}}function h(t,r,o){var i=new r(t=""+t,o);if(!i.valid())throw new u.InvalidInputException(i.constructor.name,t);var a=i.encode();a=(0,n.default)(a);for(var f=0;f<a.length;f++)a[f].options=(0,e.default)(o,a[f].options);return a}function y(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}function v(t,o,i){o=(0,n.default)(o);for(var a=0;a<o.length;a++)o[a].options=(0,e.default)(i,o[a].options),(0,r.default)(o[a].options);(0,r.default)(i),new(0,t.renderer)(t.element,o,i).render(),t.afterRender&&t.afterRender()}return l.prototype.options=function(t){return this._options=(0,e.default)(this._options,t),this},l.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},l.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 o=(0,e.default)(this._options,n.options);"auto"==o.format&&(o.format=y()),this._errorHandler.wrapBarcodeCall(function(){var e=h(o.value,t.default[o.format.toUpperCase()],o);v(n,e,o)})}},l.prototype.render=function(){if(!this._renderProperties)throw new u.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)v(this._renderProperties[t],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},l.prototype._defaults=f.default,"undefined"!=typeof window&&(window.JsBarcode=s),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),s(n,t,e)}),De=s}(),ze=t(He),Ve=Object.freeze({__proto__:null,default:ze});export{Ve as J};
|
|
2
|
+
//# sourceMappingURL=file-manager-JsBarcode-Bs9SDyWX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./file-manager-index-WsZVOL3e.js";var e,n,r={};function o(){return n?e:(n=1,e=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var i,u={},s={};function a(){if(i)return s;let t;i=1;const e=[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 s.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},s.getSymbolTotalCodewords=function(t){return e[t]},s.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},s.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},s.isKanjiModeEnabled=function(){return void 0!==t},s.toSJIS=function(e){return t(e)},s}var c,f,l,h,g,d={};function p(){return c||(c=1,(t=d).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(t){return n}}),d;var t}var w,m={};var E,y={};var A,v={};var C,B={};function I(){if(C)return B;C=1;const t=p(),e=[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 B.getBlocksCount=function(n,r){switch(r){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},B.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},B}var M,T,N,P,b={},R={};function L(){return T||(T=1,function(t){const e=function(){if(M)return R;M=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)t[r]=n,e[n]=r,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),R.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},R.exp=function(e){return t[e]},R.mul=function(n,r){return 0===n||0===r?0:t[e[n]+e[r]]},R}();t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=e.mul(t[o],n[i]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let o=0;o<n.length;o++)r[o]^=e.mul(n[o],t);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(b)),b}var x,U={},S={},k={};function z(){return x||(x=1,k.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),k}var F,D,_,H={};function J(){if(F)return H;F=1;const t="[0-9]+";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");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";H.KANJI=new RegExp(e,"g"),H.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),H.BYTE=new RegExp(n,"g"),H.NUMERIC=new RegExp(t,"g"),H.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+e+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return H.testKanji=function(t){return r.test(t)},H.testNumeric=function(t){return o.test(t)},H.testAlphanumeric=function(t){return i.test(t)},H}function K(){return D||(D=1,function(t){const e=z(),n=J();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(t){return n}}}(S)),S}function Y(){return _||(_=1,function(t){const e=a(),n=I(),r=p(),o=K(),i=z(),u=e.getBCHDigit(7973);function s(t,e){return o.getCharCountIndicator(t,e)+4}function c(t,e){let n=0;return t.forEach(function(t){const r=s(t.mode,e);n+=r+t.getBitsLength()}),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,r,u){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===u&&(u=o.BYTE);const a=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,r));if(u===o.MIXED)return a;const c=a-s(u,t);switch(u){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const u=r.from(n,r.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(c(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,u);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(i.mode,i.getLength(),u)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-u>=0;)n^=7973<<e.getBCHDigit(n)-u;return t<<12|n}}(U)),U}var j,V={};var O,q,Q,$,Z,X,W,G,tt={};var et,nt,rt,ot={exports:{}};function it(){return et||(et=1,function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var u,s,a,c,f,l,h,g=e.PriorityQueue.make();for(g.push(n,0);!g.empty();)for(a in s=(u=g.pop()).value,c=u.cost,f=t[s]||{})f.hasOwnProperty(a)&&(l=c+f[a],h=i[a],(void 0===i[a]||h>l)&&(i[a]=l,g.push(a,l),o[a]=s));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(ot)),ot.exports}function ut(){return nt||(nt=1,function(t){const e=K(),n=function(){if(q)return O;q=1;const t=K();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},O=e}(),r=function(){if($)return Q;$=1;const t=K(),e=["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"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*e.indexOf(this.data[n]);r+=e.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},Q=n}(),o=function(){if(X)return Z;X=1;const t=K();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},Z=e}(),i=function(){if(G)return W;G=1;const t=K(),e=a();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let r=e.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},W=n}(),u=J(),s=a(),c=it();function f(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function h(t){const n=l(u.NUMERIC,e.NUMERIC,t),r=l(u.ALPHANUMERIC,e.ALPHANUMERIC,t);let o,i;s.isKanjiModeEnabled()?(o=l(u.BYTE,e.BYTE,t),i=l(u.KANJI,e.KANJI,t)):(o=l(u.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(r,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function g(t,u){switch(u){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return r.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return o.getBitsLength(t)}}function d(t,u){let a;const c=e.getBestModeForData(t);if(a=e.from(u,c),a!==e.BYTE&&a.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(a)+".\n Suggested mode is: "+e.toString(c));switch(a!==e.KANJI||s.isKanjiModeEnabled()||(a=e.BYTE),a){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new r(t);case e.KANJI:return new i(t);case e.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(d(e,null)):e.data&&t.push(d(e.data,e.mode)),t},[])},t.fromString=function(n,r){const o=function(t){const n=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case e.NUMERIC:n.push([o,{data:o.data,mode:e.ALPHANUMERIC,length:o.length},{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.ALPHANUMERIC:n.push([o,{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.KANJI:n.push([o,{data:o.data,mode:e.BYTE,length:f(o.data)}]);break;case e.BYTE:n.push([{data:o.data,mode:e.BYTE,length:f(o.data)}])}}return n}(h(n,s.isKanjiModeEnabled())),i=function(t,n){const r={},o={start:{}};let i=["start"];for(let u=0;u<t.length;u++){const s=t[u],a=[];for(let t=0;t<s.length;t++){const c=s[t],f=""+u+t;a.push(f),r[f]={node:c,lastCount:0},o[f]={};for(let t=0;t<i.length;t++){const u=i[t];r[u]&&r[u].node.mode===c.mode?(o[u][f]=g(r[u].lastCount+c.length,c.mode)-g(r[u].lastCount,c.mode),r[u].lastCount+=c.length):(r[u]&&(r[u].lastCount=c.length),o[u][f]=g(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=a}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:r}}(o,r),u=c.find_path(i.map,"start","end"),a=[];for(let t=1;t<u.length-1;t++)a.push(i.table[u[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(a))},t.rawSplit=function(e){return t.fromArray(h(e,s.isKanjiModeEnabled()))}}(tt)),tt}function st(){if(rt)return u;rt=1;const t=a(),e=p(),n=function(){if(l)return f;function t(){this.buffer=[],this.length=0}return l=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},f=t}(),r=function(){if(g)return h;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return g=1,t.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},h=t}(),o=(w||(w=1,function(t){const e=a().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let t=1;t<n-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(m)),m),i=function(){if(E)return y;E=1;const t=a().getSymbolSize;return y.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},y}(),s=(A||(A=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,o=0,i=0,u=null,s=null;for(let a=0;a<n;a++){o=i=0,u=s=null;for(let c=0;c<n;c++){let n=t.get(a,c);n===u?o++:(o>=5&&(r+=e+(o-5)),u=n,o=1),n=t.get(c,a),n===s?i++:(i>=5&&(r+=e+(i-5)),s=n,i=1)}o>=5&&(r+=e+(o-5)),i>=5&&(r+=e+(i-5))}return r},t.getPenaltyN2=function(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++)for(let o=0;o<e-1;o++){const e=t.get(n,o)+t.get(n,o+1)+t.get(n+1,o)+t.get(n+1,o+1);4!==e&&0!==e||r++}return r*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,o=0,i=0;for(let r=0;r<e;r++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(r,u),u>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|t.get(u,r),u>=10&&(1488===i||93===i)&&n++}return n*r},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*o},t.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,i(t,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let u=0;u<r;u++){n(u),t.applyMask(u,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(u,e),r<i&&(i=r,o=u)}return o}}(v)),v),c=I(),d=function(){if(P)return N;P=1;const t=L();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=t.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(r,o),t}return r},N=e}(),C=Y(),B=function(){if(j)return V;j=1;const t=a(),e=t.getBCHDigit(1335);return V.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(o<<10|i)},V}(),M=K(),T=ut();function b(t,e,n){const r=t.size,o=B.getEncodedBits(e,n);let i,u;for(i=0;i<15;i++)u=1==(o>>i&1),i<6?t.set(i,8,u,!0):i<8?t.set(i+1,8,u,!0):t.set(r-15+i,8,u,!0),i<8?t.set(8,r-i-1,u,!0):i<9?t.set(8,15-i-1+1,u,!0):t.set(8,15-i-1,u,!0);t.set(r-8,8,1,!0)}function R(e,r,o){const i=new n;o.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),M.getCharCountIndicator(t.mode,e)),t.write(i)});const u=8*(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,r));for(i.getLengthInBits()+4<=u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(u-i.getLengthInBits())/8;for(let t=0;t<s;t++)i.put(t%2?17:236,8);return function(e,n,r){const o=t.getSymbolTotalCodewords(n),i=c.getTotalCodewordsCount(n,r),u=o-i,s=c.getBlocksCount(n,r),a=o%s,f=s-a,l=Math.floor(o/s),h=Math.floor(u/s),g=h+1,p=l-h,w=new d(p);let m=0;const E=new Array(s),y=new Array(s);let A=0;const v=new Uint8Array(e.buffer);for(let t=0;t<s;t++){const e=t<f?h:g;E[t]=v.slice(m,m+e),y[t]=w.encode(E[t]),m+=e,A=Math.max(A,e)}const C=new Uint8Array(o);let B,I,M=0;for(B=0;B<A;B++)for(I=0;I<s;I++)B<E[I].length&&(C[M++]=E[I][B]);for(B=0;B<p;B++)for(I=0;I<s;I++)C[M++]=y[I][B];return C}(i,e,r)}function x(e,n,u,a){let c;if(Array.isArray(e))c=T.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=T.rawSplit(e);t=C.getBestVersionForData(n,u)}c=T.fromString(e,t||40)}}const f=C.getBestVersionForData(c,u);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else n=f;const l=R(n,u,c),h=t.getSymbolSize(n),g=new r(h);return function(t,e){const n=t.size,r=i.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(g,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(g),function(t,e){const n=o.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(g,n),b(g,u,0),n>=7&&function(t,e){const n=t.size,r=C.getEncodedBits(e);let o,i,u;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,u=1==(r>>e&1),t.set(o,i,u,!0),t.set(i,o,u,!0)}(g,n),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,u=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,s-n)){let r=!1;u<e.length&&(r=1==(e[u]>>>i&1)),t.set(o,s-n,r),i--,-1===i&&(u++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(g,l),isNaN(a)&&(a=s.getBestMask(g,b.bind(null,g,u))),s.applyMask(a,g),b(g,u,a),{modules:g,version:n,errorCorrectionLevel:u,maskPattern:a,segments:c}}return u.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,u=e.M;return void 0!==r&&(u=e.from(r.errorCorrectionLevel,e.M),o=C.from(r.version),i=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(n,o,u,i)},u}var at,ct,ft={},lt={};function ht(){return at||(at=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,u=t.getScale(o,r),s=Math.floor((o+2*r.margin)*u),a=r.margin*u,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let f=4*(t*s+n),l=r.color.light;if(t>=a&&n>=a&&t<s-a&&n<s-a){l=c[i[Math.floor((t-a)/u)*o+Math.floor((n-a)/u)]?1:0]}e[f++]=l.r,e[f++]=l.g,e[f++]=l.b,e[f]=l.a}}}(lt)),lt}function gt(){return ct||(ct=1,function(t){const e=ht();t.render=function(t,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const u=e.getImageWidth(t.modules.size,o),s=i.getContext("2d"),a=s.createImageData(u,u);return e.qrToImageData(a.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,i,u),s.putImageData(a,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),u=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(u,s.quality)}}(ft)),ft}var dt,pt,wt={};function mt(){if(dt)return wt;dt=1;const t=ht();function e(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}return wt.render=function(r,o,i){const u=t.getOptions(o),s=r.modules.size,a=r.modules.data,c=s+2*u.margin,f=u.color.light.a?"<path "+e(u.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",l="<path "+e(u.color.dark,"stroke")+' d="'+function(t,e,r){let o="",i=0,u=!1,s=0;for(let a=0;a<t.length;a++){const c=Math.floor(a%e),f=Math.floor(a/e);c||u||(u=!0),t[a]?(s++,a>0&&c>0&&t[a-1]||(o+=u?n("M",c+r,.5+f+r):n("m",i,0),i=0,u=!1),c+1<e&&t[a+1]||(o+=n("h",s),s=0)):i++}return o}(a,s,u.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+h+' shape-rendering="crispEdges">'+f+l+"</svg>\n";return"function"==typeof i&&i(null,g),g},wt}var Et=function(){if(pt)return r;pt=1;const t=o(),e=st(),n=gt(),i=mt();function u(n,r,o,i,u){const s=[].slice.call(arguments,1),a=s.length,c="function"==typeof s[a-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(a<1)throw new Error("Too few arguments provided");return 1===a?(o=r,r=i=void 0):2!==a||r.getContext||(i=o,o=r,r=void 0),new Promise(function(t,u){try{const u=e.create(o,i);t(n(u,r,i))}catch(t){u(t)}})}if(a<2)throw new Error("Too few arguments provided");2===a?(u=o,o=r,r=i=void 0):3===a&&(r.getContext&&void 0===u?(u=i,i=void 0):(u=i,i=o,o=r,r=void 0));try{const t=e.create(o,i);u(null,n(t,r,i))}catch(t){u(t)}}return r.create=e.create,r.toCanvas=u.bind(null,n.render),r.toDataURL=u.bind(null,n.renderToDataURL),r.toString=u.bind(null,function(t,e,n){return i.render(t,n)}),r}(),yt=t(Et),At=Object.freeze({__proto__:null,default:yt});export{At as b};
|
|
2
|
-
//# sourceMappingURL=file-manager-browser-
|
|
1
|
+
import{t}from"./file-manager-index-B4pgaHpG.js";var e,n,r={};function o(){return n?e:(n=1,e=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var i,u={},s={};function a(){if(i)return s;let t;i=1;const e=[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 s.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},s.getSymbolTotalCodewords=function(t){return e[t]},s.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},s.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},s.isKanjiModeEnabled=function(){return void 0!==t},s.toSJIS=function(e){return t(e)},s}var c,f,l,h,g,d={};function p(){return c||(c=1,(t=d).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(t){return n}}),d;var t}var w,m={};var E,y={};var A,v={};var C,B={};function I(){if(C)return B;C=1;const t=p(),e=[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 B.getBlocksCount=function(n,r){switch(r){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},B.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},B}var M,T,N,P,b={},R={};function L(){return T||(T=1,function(t){const e=function(){if(M)return R;M=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)t[r]=n,e[n]=r,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),R.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},R.exp=function(e){return t[e]},R.mul=function(n,r){return 0===n||0===r?0:t[e[n]+e[r]]},R}();t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=e.mul(t[o],n[i]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let o=0;o<n.length;o++)r[o]^=e.mul(n[o],t);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(b)),b}var x,U={},S={},k={};function z(){return x||(x=1,k.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),k}var F,D,_,H={};function J(){if(F)return H;F=1;const t="[0-9]+";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");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";H.KANJI=new RegExp(e,"g"),H.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),H.BYTE=new RegExp(n,"g"),H.NUMERIC=new RegExp(t,"g"),H.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+e+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return H.testKanji=function(t){return r.test(t)},H.testNumeric=function(t){return o.test(t)},H.testAlphanumeric=function(t){return i.test(t)},H}function K(){return D||(D=1,function(t){const e=z(),n=J();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(t){return n}}}(S)),S}function Y(){return _||(_=1,function(t){const e=a(),n=I(),r=p(),o=K(),i=z(),u=e.getBCHDigit(7973);function s(t,e){return o.getCharCountIndicator(t,e)+4}function c(t,e){let n=0;return t.forEach(function(t){const r=s(t.mode,e);n+=r+t.getBitsLength()}),n}t.from=function(t,e){return i.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,r,u){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===u&&(u=o.BYTE);const a=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,r));if(u===o.MIXED)return a;const c=a-s(u,t);switch(u){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let i;const u=r.from(n,r.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(c(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,u);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(i.mode,i.getLength(),u)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-u>=0;)n^=7973<<e.getBCHDigit(n)-u;return t<<12|n}}(U)),U}var j,V={};var O,q,Q,$,Z,X,W,G,tt={};var et,nt,rt,ot={exports:{}};function it(){return et||(et=1,function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var u,s,a,c,f,l,h,g=e.PriorityQueue.make();for(g.push(n,0);!g.empty();)for(a in s=(u=g.pop()).value,c=u.cost,f=t[s]||{})f.hasOwnProperty(a)&&(l=c+f[a],h=i[a],(void 0===i[a]||h>l)&&(i[a]=l,g.push(a,l),o[a]=s));if(void 0!==r&&void 0===i[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e}(ot)),ot.exports}function ut(){return nt||(nt=1,function(t){const e=K(),n=function(){if(q)return O;q=1;const t=K();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},O=e}(),r=function(){if($)return Q;$=1;const t=K(),e=["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"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*e.indexOf(this.data[n]);r+=e.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},Q=n}(),o=function(){if(X)return Z;X=1;const t=K();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},Z=e}(),i=function(){if(G)return W;G=1;const t=K(),e=a();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let r=e.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},W=n}(),u=J(),s=a(),c=it();function f(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function h(t){const n=l(u.NUMERIC,e.NUMERIC,t),r=l(u.ALPHANUMERIC,e.ALPHANUMERIC,t);let o,i;s.isKanjiModeEnabled()?(o=l(u.BYTE,e.BYTE,t),i=l(u.KANJI,e.KANJI,t)):(o=l(u.BYTE_KANJI,e.BYTE,t),i=[]);return n.concat(r,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function g(t,u){switch(u){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return r.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return o.getBitsLength(t)}}function d(t,u){let a;const c=e.getBestModeForData(t);if(a=e.from(u,c),a!==e.BYTE&&a.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(a)+".\n Suggested mode is: "+e.toString(c));switch(a!==e.KANJI||s.isKanjiModeEnabled()||(a=e.BYTE),a){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new r(t);case e.KANJI:return new i(t);case e.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(d(e,null)):e.data&&t.push(d(e.data,e.mode)),t},[])},t.fromString=function(n,r){const o=function(t){const n=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case e.NUMERIC:n.push([o,{data:o.data,mode:e.ALPHANUMERIC,length:o.length},{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.ALPHANUMERIC:n.push([o,{data:o.data,mode:e.BYTE,length:o.length}]);break;case e.KANJI:n.push([o,{data:o.data,mode:e.BYTE,length:f(o.data)}]);break;case e.BYTE:n.push([{data:o.data,mode:e.BYTE,length:f(o.data)}])}}return n}(h(n,s.isKanjiModeEnabled())),i=function(t,n){const r={},o={start:{}};let i=["start"];for(let u=0;u<t.length;u++){const s=t[u],a=[];for(let t=0;t<s.length;t++){const c=s[t],f=""+u+t;a.push(f),r[f]={node:c,lastCount:0},o[f]={};for(let t=0;t<i.length;t++){const u=i[t];r[u]&&r[u].node.mode===c.mode?(o[u][f]=g(r[u].lastCount+c.length,c.mode)-g(r[u].lastCount,c.mode),r[u].lastCount+=c.length):(r[u]&&(r[u].lastCount=c.length),o[u][f]=g(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}i=a}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:r}}(o,r),u=c.find_path(i.map,"start","end"),a=[];for(let t=1;t<u.length-1;t++)a.push(i.table[u[t]].node);return t.fromArray(function(t){return t.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(a))},t.rawSplit=function(e){return t.fromArray(h(e,s.isKanjiModeEnabled()))}}(tt)),tt}function st(){if(rt)return u;rt=1;const t=a(),e=p(),n=function(){if(l)return f;function t(){this.buffer=[],this.length=0}return l=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},f=t}(),r=function(){if(g)return h;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return g=1,t.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},h=t}(),o=(w||(w=1,function(t){const e=a().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let t=1;t<n-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(m)),m),i=function(){if(E)return y;E=1;const t=a().getSymbolSize;return y.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},y}(),s=(A||(A=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,r=40,o=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,o=0,i=0,u=null,s=null;for(let a=0;a<n;a++){o=i=0,u=s=null;for(let c=0;c<n;c++){let n=t.get(a,c);n===u?o++:(o>=5&&(r+=e+(o-5)),u=n,o=1),n=t.get(c,a),n===s?i++:(i>=5&&(r+=e+(i-5)),s=n,i=1)}o>=5&&(r+=e+(o-5)),i>=5&&(r+=e+(i-5))}return r},t.getPenaltyN2=function(t){const e=t.size;let r=0;for(let n=0;n<e-1;n++)for(let o=0;o<e-1;o++){const e=t.get(n,o)+t.get(n,o+1)+t.get(n+1,o)+t.get(n+1,o+1);4!==e&&0!==e||r++}return r*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,o=0,i=0;for(let r=0;r<e;r++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(r,u),u>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|t.get(u,r),u>=10&&(1488===i||93===i)&&n++}return n*r},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*o},t.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,i(t,o,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let u=0;u<r;u++){n(u),t.applyMask(u,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(u,e),r<i&&(i=r,o=u)}return o}}(v)),v),c=I(),d=function(){if(P)return N;P=1;const t=L();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=t.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(r,o),t}return r},N=e}(),C=Y(),B=function(){if(j)return V;j=1;const t=a(),e=t.getBCHDigit(1335);return V.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;t.getBCHDigit(i)-e>=0;)i^=1335<<t.getBCHDigit(i)-e;return 21522^(o<<10|i)},V}(),M=K(),T=ut();function b(t,e,n){const r=t.size,o=B.getEncodedBits(e,n);let i,u;for(i=0;i<15;i++)u=1==(o>>i&1),i<6?t.set(i,8,u,!0):i<8?t.set(i+1,8,u,!0):t.set(r-15+i,8,u,!0),i<8?t.set(8,r-i-1,u,!0):i<9?t.set(8,15-i-1+1,u,!0):t.set(8,15-i-1,u,!0);t.set(r-8,8,1,!0)}function R(e,r,o){const i=new n;o.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),M.getCharCountIndicator(t.mode,e)),t.write(i)});const u=8*(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,r));for(i.getLengthInBits()+4<=u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(u-i.getLengthInBits())/8;for(let t=0;t<s;t++)i.put(t%2?17:236,8);return function(e,n,r){const o=t.getSymbolTotalCodewords(n),i=c.getTotalCodewordsCount(n,r),u=o-i,s=c.getBlocksCount(n,r),a=o%s,f=s-a,l=Math.floor(o/s),h=Math.floor(u/s),g=h+1,p=l-h,w=new d(p);let m=0;const E=new Array(s),y=new Array(s);let A=0;const v=new Uint8Array(e.buffer);for(let t=0;t<s;t++){const e=t<f?h:g;E[t]=v.slice(m,m+e),y[t]=w.encode(E[t]),m+=e,A=Math.max(A,e)}const C=new Uint8Array(o);let B,I,M=0;for(B=0;B<A;B++)for(I=0;I<s;I++)B<E[I].length&&(C[M++]=E[I][B]);for(B=0;B<p;B++)for(I=0;I<s;I++)C[M++]=y[I][B];return C}(i,e,r)}function x(e,n,u,a){let c;if(Array.isArray(e))c=T.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=T.rawSplit(e);t=C.getBestVersionForData(n,u)}c=T.fromString(e,t||40)}}const f=C.getBestVersionForData(c,u);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else n=f;const l=R(n,u,c),h=t.getSymbolSize(n),g=new r(h);return function(t,e){const n=t.size,r=i.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(g,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(g),function(t,e){const n=o.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(g,n),b(g,u,0),n>=7&&function(t,e){const n=t.size,r=C.getEncodedBits(e);let o,i,u;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,u=1==(r>>e&1),t.set(o,i,u,!0),t.set(i,o,u,!0)}(g,n),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,u=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,s-n)){let r=!1;u<e.length&&(r=1==(e[u]>>>i&1)),t.set(o,s-n,r),i--,-1===i&&(u++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(g,l),isNaN(a)&&(a=s.getBestMask(g,b.bind(null,g,u))),s.applyMask(a,g),b(g,u,a),{modules:g,version:n,errorCorrectionLevel:u,maskPattern:a,segments:c}}return u.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,u=e.M;return void 0!==r&&(u=e.from(r.errorCorrectionLevel,e.M),o=C.from(r.version),i=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(n,o,u,i)},u}var at,ct,ft={},lt={};function ht(){return at||(at=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,u=t.getScale(o,r),s=Math.floor((o+2*r.margin)*u),a=r.margin*u,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let f=4*(t*s+n),l=r.color.light;if(t>=a&&n>=a&&t<s-a&&n<s-a){l=c[i[Math.floor((t-a)/u)*o+Math.floor((n-a)/u)]?1:0]}e[f++]=l.r,e[f++]=l.g,e[f++]=l.b,e[f]=l.a}}}(lt)),lt}function gt(){return ct||(ct=1,function(t){const e=ht();t.render=function(t,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const u=e.getImageWidth(t.modules.size,o),s=i.getContext("2d"),a=s.createImageData(u,u);return e.qrToImageData(a.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,i,u),s.putImageData(a,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),u=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(u,s.quality)}}(ft)),ft}var dt,pt,wt={};function mt(){if(dt)return wt;dt=1;const t=ht();function e(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}return wt.render=function(r,o,i){const u=t.getOptions(o),s=r.modules.size,a=r.modules.data,c=s+2*u.margin,f=u.color.light.a?"<path "+e(u.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",l="<path "+e(u.color.dark,"stroke")+' d="'+function(t,e,r){let o="",i=0,u=!1,s=0;for(let a=0;a<t.length;a++){const c=Math.floor(a%e),f=Math.floor(a/e);c||u||(u=!0),t[a]?(s++,a>0&&c>0&&t[a-1]||(o+=u?n("M",c+r,.5+f+r):n("m",i,0),i=0,u=!1),c+1<e&&t[a+1]||(o+=n("h",s),s=0)):i++}return o}(a,s,u.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+h+' shape-rendering="crispEdges">'+f+l+"</svg>\n";return"function"==typeof i&&i(null,g),g},wt}var Et=function(){if(pt)return r;pt=1;const t=o(),e=st(),n=gt(),i=mt();function u(n,r,o,i,u){const s=[].slice.call(arguments,1),a=s.length,c="function"==typeof s[a-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(a<1)throw new Error("Too few arguments provided");return 1===a?(o=r,r=i=void 0):2!==a||r.getContext||(i=o,o=r,r=void 0),new Promise(function(t,u){try{const u=e.create(o,i);t(n(u,r,i))}catch(t){u(t)}})}if(a<2)throw new Error("Too few arguments provided");2===a?(u=o,o=r,r=i=void 0):3===a&&(r.getContext&&void 0===u?(u=i,i=void 0):(u=i,i=o,o=r,r=void 0));try{const t=e.create(o,i);u(null,n(t,r,i))}catch(t){u(t)}}return r.create=e.create,r.toCanvas=u.bind(null,n.render),r.toDataURL=u.bind(null,n.renderToDataURL),r.toString=u.bind(null,function(t,e,n){return i.render(t,n)}),r}(),yt=t(Et),At=Object.freeze({__proto__:null,default:yt});export{At as b};
|
|
2
|
+
//# sourceMappingURL=file-manager-browser-DC8fkuqa.js.map
|