jclib-ui 1.0.19 → 1.0.21

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.
@@ -1,13 +1,13 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("jcinfo-utils"),require("framer-motion"),require("styled-components"),require("reactstrap"),require("react-router-dom"),require("js-file-download"),require("axios"),require("react-input-mask"),require("react-number-format")):"function"==typeof define&&define.amd?define(["exports","react","jcinfo-utils","framer-motion","styled-components","reactstrap","react-router-dom","js-file-download","axios","react-input-mask","react-number-format"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).JCLibUI={},t.React,t.JCInfoUtils,t.FramerMotion,t.styled,t.Reactstrap,t.ReactRouterDom,t.jcFileDownload,t.Axios,t.ReactInputMask,t.ReactNumberFormat)}(this,(function(t,e,r,n,o,i,a,s,c,u,l){"use strict";function f(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const r in t)if("default"!==r){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const d=f(e);var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function g(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),r}var m="top",y="bottom",v="right",_="left",w="auto",b=[m,y,v,_],C="start",E="end",A="clippingParents",I="viewport",S="popper",O="reference",T=b.reduce((function(t,e){return t.concat([e+"-"+C,e+"-"+E])}),[]),N=[].concat(b,[w]).reduce((function(t,e){return t.concat([e,e+"-"+C,e+"-"+E])}),[]),x="beforeRead",R="read",D="afterRead",P="beforeMain",M="main",k="afterMain",L="beforeWrite",B="write",j="afterWrite",F=[x,R,D,P,M,k,L,B,j];function V(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function U(t){return t instanceof H(t).Element||t instanceof Element}function W(t){return t instanceof H(t).HTMLElement||t instanceof HTMLElement}function z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof H(t).ShadowRoot||t instanceof ShadowRoot)}const G={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];W(o)&&V(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});W(n)&&V(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function X(t){return t.split("-")[0]}var $=Math.max,Y=Math.min,q=Math.round;function Z(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function K(){return!/^((?!chrome|android).)*safari/i.test(Z())}function Q(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.getBoundingClientRect(),o=1,i=1;e&&W(t)&&(o=t.offsetWidth>0&&q(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&q(n.height)/t.offsetHeight||1);var a=(U(t)?H(t):window).visualViewport,s=!K()&&r,c=(n.left+(s&&a?a.offsetLeft:0))/o,u=(n.top+(s&&a?a.offsetTop:0))/i,l=n.width/o,f=n.height/i;return{width:l,height:f,top:u,right:c+l,bottom:u+f,left:c,x:c,y:u}}function J(t){var e=Q(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function tt(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&z(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function et(t){return H(t).getComputedStyle(t)}function rt(t){return["table","td","th"].indexOf(V(t))>=0}function nt(t){return((U(t)?t.ownerDocument:t.document)||window.document).documentElement}function ot(t){return"html"===V(t)?t:t.assignedSlot||t.parentNode||(z(t)?t.host:null)||nt(t)}function it(t){return W(t)&&"fixed"!==et(t).position?t.offsetParent:null}function at(t){for(var e=H(t),r=it(t);r&&rt(r)&&"static"===et(r).position;)r=it(r);return r&&("html"===V(r)||"body"===V(r)&&"static"===et(r).position)?e:r||function(t){var e=/firefox/i.test(Z());if(/Trident/i.test(Z())&&W(t)&&"fixed"===et(t).position)return null;var r=ot(t);for(z(r)&&(r=r.host);W(r)&&["html","body"].indexOf(V(r))<0;){var n=et(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}function st(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ct(t,e,r){return $(t,Y(e,r))}function ut(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function lt(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}const ft={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,n=t.name,o=t.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=X(r.placement),c=st(s),u=[_,v].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(t,e){return ut("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:lt(t,b))}(o.padding,r),f=J(i),d="y"===c?m:_,h="y"===c?y:v,p=r.rects.reference[u]+r.rects.reference[c]-a[c]-r.rects.popper[u],g=a[c]-r.rects.reference[c],w=at(i),C=w?"y"===c?w.clientHeight||0:w.clientWidth||0:0,E=p/2-g/2,A=l[d],I=C-f[u]-l[h],S=C/2-f[u]/2+E,O=ct(A,S,I),T=c;r.modifiersData[n]=((e={})[T]=O,e.centerOffset=O-S,e)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&tt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dt(t){return t.split("-")[1]}var ht={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pt(t){var e,r=t.popper,n=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,c=t.gpuAcceleration,u=t.adaptive,l=t.roundOffsets,f=t.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,g=void 0===p?0:p,w="function"==typeof l?l({x:h,y:g}):{x:h,y:g};h=w.x,g=w.y;var b=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),A=_,I=m,S=window;if(u){var O=at(r),T="clientHeight",N="clientWidth";if(O===H(r)&&"static"!==et(O=nt(r)).position&&"absolute"===s&&(T="scrollHeight",N="scrollWidth"),o===m||(o===_||o===v)&&i===E)I=y,g-=(f&&O===S&&S.visualViewport?S.visualViewport.height:O[T])-n.height,g*=c?1:-1;if(o===_||(o===m||o===y)&&i===E)A=v,h-=(f&&O===S&&S.visualViewport?S.visualViewport.width:O[N])-n.width,h*=c?1:-1}var x,R=Object.assign({position:s},u&&ht),D=!0===l?function(t,e){var r=t.x,n=t.y,o=e.devicePixelRatio||1;return{x:q(r*o)/o||0,y:q(n*o)/o||0}}({x:h,y:g},H(r)):{x:h,y:g};return h=D.x,g=D.y,c?Object.assign({},R,((x={})[I]=C?"0":"",x[A]=b?"0":"",x.transform=(S.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",x)):Object.assign({},R,((e={})[I]=C?g+"px":"",e[A]=b?h+"px":"",e.transform="",e))}const gt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,c=void 0===s||s,u={placement:X(e.placement),variation:dt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,pt(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,pt(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var mt={passive:!0};const yt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,o=n.scroll,i=void 0===o||o,a=n.resize,s=void 0===a||a,c=H(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach((function(t){t.addEventListener("scroll",r.update,mt)})),s&&c.addEventListener("resize",r.update,mt),function(){i&&u.forEach((function(t){t.removeEventListener("scroll",r.update,mt)})),s&&c.removeEventListener("resize",r.update,mt)}},data:{}};var vt={left:"right",right:"left",bottom:"top",top:"bottom"};function _t(t){return t.replace(/left|right|bottom|top/g,(function(t){return vt[t]}))}var wt={start:"end",end:"start"};function bt(t){return t.replace(/start|end/g,(function(t){return wt[t]}))}function Ct(t){var e=H(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Et(t){return Q(nt(t)).left+Ct(t).scrollLeft}function At(t){var e=et(t),r=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function It(t){return["html","body","#document"].indexOf(V(t))>=0?t.ownerDocument.body:W(t)&&At(t)?t:It(ot(t))}function St(t,e){var r;void 0===e&&(e=[]);var n=It(t),o=n===(null==(r=t.ownerDocument)?void 0:r.body),i=H(n),a=o?[i].concat(i.visualViewport||[],At(n)?n:[]):n,s=e.concat(a);return o?s:s.concat(St(ot(a)))}function Ot(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Tt(t,e,r){return e===I?Ot(function(t,e){var r=H(t),n=nt(t),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var u=K();(u||!u&&"fixed"===e)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+Et(t),y:c}}(t,r)):U(e)?function(t,e){var r=Q(t,!1,"fixed"===e);return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}(e,r):Ot(function(t){var e,r=nt(t),n=Ct(t),o=null==(e=t.ownerDocument)?void 0:e.body,i=$(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=$(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+Et(t),c=-n.scrollTop;return"rtl"===et(o||r).direction&&(s+=$(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(nt(t)))}function Nt(t,e,r,n){var o="clippingParents"===e?function(t){var e=St(ot(t)),r=["absolute","fixed"].indexOf(et(t).position)>=0&&W(t)?at(t):t;return U(r)?e.filter((function(t){return U(t)&&tt(t,r)&&"body"!==V(t)})):[]}(t):[].concat(e),i=[].concat(o,[r]),a=i[0],s=i.reduce((function(e,r){var o=Tt(t,r,n);return e.top=$(o.top,e.top),e.right=Y(o.right,e.right),e.bottom=Y(o.bottom,e.bottom),e.left=$(o.left,e.left),e}),Tt(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function xt(t){var e,r=t.reference,n=t.element,o=t.placement,i=o?X(o):null,a=o?dt(o):null,s=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(i){case m:e={x:s,y:r.y-n.height};break;case y:e={x:s,y:r.y+r.height};break;case v:e={x:r.x+r.width,y:c};break;case _:e={x:r.x-n.width,y:c};break;default:e={x:r.x,y:r.y}}var u=i?st(i):null;if(null!=u){var l="y"===u?"height":"width";switch(a){case C:e[u]=e[u]-(r[l]/2-n[l]/2);break;case E:e[u]=e[u]+(r[l]/2-n[l]/2)}}return e}function Rt(t,e){void 0===e&&(e={});var r=e,n=r.placement,o=void 0===n?t.placement:n,i=r.strategy,a=void 0===i?t.strategy:i,s=r.boundary,c=void 0===s?A:s,u=r.rootBoundary,l=void 0===u?I:u,f=r.elementContext,d=void 0===f?S:f,h=r.altBoundary,p=void 0!==h&&h,g=r.padding,_=void 0===g?0:g,w=ut("number"!=typeof _?_:lt(_,b)),C=d===S?O:S,E=t.rects.popper,T=t.elements[p?C:d],N=Nt(U(T)?T:T.contextElement||nt(t.elements.popper),c,l,a),x=Q(t.elements.reference),R=xt({reference:x,element:E,strategy:"absolute",placement:o}),D=Ot(Object.assign({},E,R)),P=d===S?D:x,M={top:N.top-P.top+w.top,bottom:P.bottom-N.bottom+w.bottom,left:N.left-P.left+w.left,right:P.right-N.right+w.right},k=t.modifiersData.offset;if(d===S&&k){var L=k[o];Object.keys(M).forEach((function(t){var e=[v,y].indexOf(t)>=0?1:-1,r=[m,y].indexOf(t)>=0?"y":"x";M[t]+=L[r]*e}))}return M}const Dt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0===a||a,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,p=void 0===h||h,g=r.allowedAutoPlacements,E=e.options.placement,A=X(E),I=c||(A===E||!p?[_t(E)]:function(t){if(X(t)===w)return[];var e=_t(t);return[bt(t),e,bt(e)]}(E)),S=[E].concat(I).reduce((function(t,r){return t.concat(X(r)===w?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=void 0===c?N:c,l=dt(n),f=l?s?T:T.filter((function(t){return dt(t)===l})):b,d=f.filter((function(t){return u.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(e,r){return e[r]=Rt(t,{placement:r,boundary:o,rootBoundary:i,padding:a})[X(r)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:r,boundary:l,rootBoundary:f,padding:u,flipVariations:p,allowedAutoPlacements:g}):r)}),[]),O=e.rects.reference,x=e.rects.popper,R=new Map,D=!0,P=S[0],M=0;M<S.length;M++){var k=S[M],L=X(k),B=dt(k)===C,j=[m,y].indexOf(L)>=0,F=j?"width":"height",V=Rt(e,{placement:k,boundary:l,rootBoundary:f,altBoundary:d,padding:u}),H=j?B?v:_:B?y:m;O[F]>x[F]&&(H=_t(H));var U=_t(H),W=[];if(i&&W.push(V[L]<=0),s&&W.push(V[H]<=0,V[U]<=0),W.every((function(t){return t}))){P=k,D=!1;break}R.set(k,W)}if(D)for(var z=function(t){var e=S.find((function(e){var r=R.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return P=e,"break"},G=p?3:1;G>0;G--){if("break"===z(G))break}e.placement!==P&&(e.modifiersData[n]._skip=!0,e.placement=P,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Pt(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function Mt(t){return[m,v,y,_].some((function(e){return t[e]>=0}))}const kt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=Rt(e,{elementContext:"reference"}),s=Rt(e,{altBoundary:!0}),c=Pt(a,n),u=Pt(s,o,i),l=Mt(c),f=Mt(u);e.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}};const Lt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,r=t.options,n=t.name,o=r.offset,i=void 0===o?[0,0]:o,a=N.reduce((function(t,r){return t[r]=function(t,e,r){var n=X(t),o=[_,m].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},e,{placement:t})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[_,v].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,e.rects,i),t}),{}),s=a[e.placement],c=s.x,u=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=a}};const Bt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=xt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const jt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name,o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0!==a&&a,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,d=r.tether,h=void 0===d||d,p=r.tetherOffset,g=void 0===p?0:p,w=Rt(e,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),b=X(e.placement),E=dt(e.placement),A=!E,I=st(b),S="x"===I?"y":"x",O=e.modifiersData.popperOffsets,T=e.rects.reference,N=e.rects.popper,x="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,R="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(O){if(i){var M,k="y"===I?m:_,L="y"===I?y:v,B="y"===I?"height":"width",j=O[I],F=j+w[k],V=j-w[L],H=h?-N[B]/2:0,U=E===C?T[B]:N[B],W=E===C?-N[B]:-T[B],z=e.elements.arrow,G=h&&z?J(z):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=q[k],K=q[L],Q=ct(0,T[B],G[B]),tt=A?T[B]/2-H-Q-Z-R.mainAxis:U-Q-Z-R.mainAxis,et=A?-T[B]/2+H+Q+K+R.mainAxis:W+Q+K+R.mainAxis,rt=e.elements.arrow&&at(e.elements.arrow),nt=rt?"y"===I?rt.clientTop||0:rt.clientLeft||0:0,ot=null!=(M=null==D?void 0:D[I])?M:0,it=j+et-ot,ut=ct(h?Y(F,j+tt-ot-nt):F,j,h?$(V,it):V);O[I]=ut,P[I]=ut-j}if(s){var lt,ft="x"===I?m:_,ht="x"===I?y:v,pt=O[S],gt="y"===S?"height":"width",mt=pt+w[ft],yt=pt-w[ht],vt=-1!==[m,_].indexOf(b),_t=null!=(lt=null==D?void 0:D[S])?lt:0,wt=vt?mt:pt-T[gt]-N[gt]-_t+R.altAxis,bt=vt?pt+T[gt]+N[gt]-_t-R.altAxis:yt,Ct=h&&vt?(At=ct(wt,pt,Et=bt))>Et?Et:At:ct(h?wt:mt,pt,h?bt:yt);O[S]=Ct,P[S]=Ct-pt}var Et,At;e.modifiersData[n]=P}},requiresIfExists:["offset"]};function Ft(t,e,r){void 0===r&&(r=!1);var n,o,i=W(e),a=W(e)&&function(t){var e=t.getBoundingClientRect(),r=q(e.width)/t.offsetWidth||1,n=q(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),s=nt(e),c=Q(t,a,r),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!r)&&(("body"!==V(e)||At(s))&&(u=(n=e)!==H(n)&&W(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Ct(n)),W(e)?((l=Q(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=Et(s))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function Vt(t){var e=new Map,r=new Set,n=[];function o(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||o(t)})),n}var Ht={placement:"bottom",modifiers:[],strategy:"absolute"};function Ut(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Wt(t){void 0===t&&(t={});var e=t,r=e.defaultModifiers,n=void 0===r?[]:r,o=e.defaultOptions,i=void 0===o?Ht:o;return function(t,e,r){void 0===r&&(r=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ht,i),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,l={state:s,setOptions:function(r){var o="function"==typeof r?r(s.options):r;f(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:U(t)?St(t):t.contextElement?St(t.contextElement):[],popper:St(e)};var a,u,d=function(t){var e=Vt(t);return F.reduce((function(t,r){return t.concat(e.filter((function(t){return t.phase===r})))}),[])}((a=[].concat(n,s.options.modifiers),u=a.reduce((function(t,e){var r=t[e.name];return t[e.name]=r?Object.assign({},r,e,{options:Object.assign({},r.options,e.options),data:Object.assign({},r.data,e.data)}):e,t}),{}),Object.keys(u).map((function(t){return u[t]}))));return s.orderedModifiers=d.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.name,r=t.options,n=void 0===r?{}:r,o=t.effect;if("function"==typeof o){var i=o({state:s,name:e,instance:l,options:n}),a=function(){};c.push(i||a)}})),l.update()},forceUpdate:function(){if(!u){var t=s.elements,e=t.reference,r=t.popper;if(Ut(e,r)){s.rects={reference:Ft(e,at(r),"fixed"===s.options.strategy),popper:J(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],i=o.fn,a=o.options,c=void 0===a?{}:a,f=o.name;"function"==typeof i&&(s=i({state:s,options:c,name:f,instance:l})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(t){l.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){f(),u=!0}};if(!Ut(t,e))return l;function f(){c.forEach((function(t){return t()})),c=[]}return l.setOptions(r).then((function(t){!u&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l}}var zt=Wt(),Gt=Wt({defaultModifiers:[yt,Bt,gt,G]}),Xt=Wt({defaultModifiers:[yt,Bt,gt,G,Lt,Dt,jt,ft,kt]});const $t=Object.freeze(Object.defineProperty({__proto__:null,afterMain:k,afterRead:D,afterWrite:j,applyStyles:G,arrow:ft,auto:w,basePlacements:b,beforeMain:P,beforeRead:x,beforeWrite:L,bottom:y,clippingParents:A,computeStyles:gt,createPopper:Xt,createPopperBase:zt,createPopperLite:Gt,detectOverflow:Rt,end:E,eventListeners:yt,flip:Dt,hide:kt,left:_,main:M,modifierPhases:F,offset:Lt,placements:N,popper:S,popperGenerator:Wt,popperOffsets:Bt,preventOverflow:jt,read:R,reference:O,right:v,start:C,top:m,variationPlacements:T,viewport:I,write:B},Symbol.toStringTag,{value:"Module"}));(function(t){function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const r in t)if("default"!==r){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const r=e(t),n=new Map,o={set(t,e,r){n.has(t)||n.set(t,new Map);const o=n.get(t);o.has(e)||0===o.size?o.set(e,r):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`)},get:(t,e)=>n.has(t)&&n.get(t).get(e)||null,remove(t,e){if(!n.has(t))return;const r=n.get(t);r.delete(e),0===r.size&&n.delete(t)}},i="transitionend",a=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),s=t=>{t.dispatchEvent(new Event(i))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(a(t)):null,l=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),r=t.closest("details:not([open])");if(!r)return e;if(r!==t){const e=t.closest("summary");if(e&&e.parentNode!==r)return!1;if(null===e)return!1}return e},f=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),d=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d(t.parentNode):null},h=()=>{},p=t=>{t.offsetHeight},g=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,m=[],y=()=>"rtl"===document.documentElement.dir,v=t=>{var e;e=()=>{const e=g();if(e){const r=t.NAME,n=e.fn[r];e.fn[r]=t.jQueryInterface,e.fn[r].Constructor=t,e.fn[r].noConflict=()=>(e.fn[r]=n,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of m)t()})),m.push(e)):e()},_=(t,e=[],r=t)=>"function"==typeof t?t(...e):r,w=(t,e,r=!0)=>{if(!r)return void _(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:r}=window.getComputedStyle(t);const n=Number.parseFloat(e),o=Number.parseFloat(r);return n||o?(e=e.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(r))):0})(e)+5;let o=!1;const a=({target:r})=>{r===e&&(o=!0,e.removeEventListener(i,a),_(t))};e.addEventListener(i,a),setTimeout((()=>{o||s(e)}),n)},b=(t,e,r,n)=>{const o=t.length;let i=t.indexOf(e);return-1===i?!r&&n?t[o-1]:t[0]:(i+=r?1:-1,n&&(i=(i+o)%o),t[Math.max(0,Math.min(i,o-1))])},C=/[^.]*(?=\..*)\.|.*/,E=/\..*/,A=/::\d+$/,I={};let S=1;const O={mouseenter:"mouseover",mouseleave:"mouseout"},T=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(t,e){return e&&`${e}::${S++}`||t.uidEvent||S++}function x(t){const e=N(t);return t.uidEvent=e,I[e]=I[e]||{},I[e]}function R(t,e,r=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===r))}function D(t,e,r){const n="string"==typeof e,o=n?r:e||r;let i=L(t);return T.has(i)||(i=t),[n,o,i]}function P(t,e,r,n,o){if("string"!=typeof e||!t)return;let[i,a,s]=D(e,r,n);var c;e in O&&(c=a,a=function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return c.call(this,t)});const u=x(t),l=u[s]||(u[s]={}),f=R(l,a,i?r:null);if(f)return void(f.oneOff=f.oneOff&&o);const d=N(a,e.replace(C,"")),h=i?(p=t,g=r,m=a,function t(e){const r=p.querySelectorAll(g);for(let{target:n}=e;n&&n!==this;n=n.parentNode)for(const o of r)if(o===n)return j(e,{delegateTarget:n}),t.oneOff&&B.off(p,e.type,g,m),m.apply(n,[e])}):function(t,e){return function r(n){return j(n,{delegateTarget:t}),r.oneOff&&B.off(t,n.type,e),e.apply(t,[n])}}(t,a);var p,g,m;h.delegationSelector=i?r:null,h.callable=a,h.oneOff=o,h.uidEvent=d,l[d]=h,t.addEventListener(s,h,i)}function M(t,e,r,n,o){const i=R(e[r],n,o);i&&(t.removeEventListener(r,i,Boolean(o)),delete e[r][i.uidEvent])}function k(t,e,r,n){const o=e[r]||{};for(const[i,a]of Object.entries(o))i.includes(n)&&M(t,e,r,a.callable,a.delegationSelector)}function L(t){return t=t.replace(E,""),O[t]||t}const B={on(t,e,r,n){P(t,e,r,n,!1)},one(t,e,r,n){P(t,e,r,n,!0)},off(t,e,r,n){if("string"!=typeof e||!t)return;const[o,i,a]=D(e,r,n),s=a!==e,c=x(t),u=c[a]||{},l=e.startsWith(".");if(void 0===i){if(l)for(const r of Object.keys(c))k(t,c,r,e.slice(1));for(const[r,n]of Object.entries(u)){const o=r.replace(A,"");s&&!e.includes(o)||M(t,c,a,n.callable,n.delegationSelector)}}else{if(!Object.keys(u).length)return;M(t,c,a,i,o?r:null)}},trigger(t,e,r){if("string"!=typeof e||!t)return null;const n=g();let o=null,i=!0,a=!0,s=!1;e!==L(e)&&n&&(o=n.Event(e,r),n(t).trigger(o),i=!o.isPropagationStopped(),a=!o.isImmediatePropagationStopped(),s=o.isDefaultPrevented());const c=j(new Event(e,{bubbles:i,cancelable:!0}),r);return s&&c.preventDefault(),a&&t.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function j(t,e={}){for(const[n,o]of Object.entries(e))try{t[n]=o}catch(r){Object.defineProperty(t,n,{configurable:!0,get:()=>o})}return t}function F(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function V(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const H={setDataAttribute(t,e,r){t.setAttribute(`data-bs-${V(e)}`,r)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${V(e)}`)},getDataAttributes(t){if(!t)return{};const e={},r=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of r){let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=F(t.dataset[n])}return e},getDataAttribute:(t,e)=>F(t.getAttribute(`data-bs-${V(e)}`))};class U{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const r=c(e)?H.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof r?r:{},...c(e)?H.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,o]of Object.entries(e)){const e=t[n],i=c(e)?"element":null==(r=e)?`${r}`:Object.prototype.toString.call(r).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}var r}}class W extends U{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),B.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,r=!0){w(t,e,r)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return o.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.1"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const z=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let r=t.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),e=r&&"#"!==r?r.trim():null}return a(e)},G={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const r=[];let n=t.parentNode.closest(e);for(;n;)r.push(n),n=n.parentNode.closest(e);return r},prev(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return[r];r=r.previousElementSibling}return[]},next(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return[r];r=r.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!f(t)&&l(t)))},getSelectorFromElement(t){const e=z(t);return e&&G.findOne(e)?e:null},getElementFromSelector(t){const e=z(t);return e?G.findOne(e):null},getMultipleElementsFromSelector(t){const e=z(t);return e?G.find(e):[]}},X=(t,e="hide")=>{const r=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;B.on(document,r,`[data-bs-dismiss="${n}"]`,(function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),f(this))return;const o=G.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(o)[e]()}))},$=".bs.alert",Y=`close${$}`,q=`closed${$}`;class Z extends W{static get NAME(){return"alert"}close(){if(B.trigger(this._element,Y).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),B.trigger(this._element,q),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Z.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}X(Z,"close"),v(Z);const K='[data-bs-toggle="button"]';class Q extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}B.on(document,"click.bs.button.data-api",K,(t=>{t.preventDefault();const e=t.target.closest(K);Q.getOrCreateInstance(e).toggle()})),v(Q);const J=".bs.swipe",tt=`touchstart${J}`,et=`touchmove${J}`,rt=`touchend${J}`,nt=`pointerdown${J}`,ot=`pointerup${J}`,it={endCallback:null,leftCallback:null,rightCallback:null},at={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class st extends U{constructor(t,e){super(),this._element=t,t&&st.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return it}static get DefaultType(){return at}static get NAME(){return"swipe"}dispose(){B.off(this._element,J)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),_(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&_(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(B.on(this._element,nt,(t=>this._start(t))),B.on(this._element,ot,(t=>this._end(t))),this._element.classList.add("pointer-event")):(B.on(this._element,tt,(t=>this._start(t))),B.on(this._element,et,(t=>this._move(t))),B.on(this._element,rt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ct=".bs.carousel",ut=".data-api",lt="next",ft="prev",dt="left",ht="right",pt=`slide${ct}`,gt=`slid${ct}`,mt=`keydown${ct}`,yt=`mouseenter${ct}`,vt=`mouseleave${ct}`,_t=`dragstart${ct}`,wt=`load${ct}${ut}`,bt=`click${ct}${ut}`,Ct="carousel",Et="active",At=".active",It=".carousel-item",St=At+It,Ot={ArrowLeft:ht,ArrowRight:dt},Tt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Nt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class xt extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=G.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ct&&this.cycle()}static get Default(){return Tt}static get DefaultType(){return Nt}static get NAME(){return"carousel"}next(){this._slide(lt)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(ft)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?B.one(this._element,gt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void B.one(this._element,gt,(()=>this.to(t)));const r=this._getItemIndex(this._getActive());if(r===t)return;const n=t>r?lt:ft;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&B.on(this._element,mt,(t=>this._keydown(t))),"hover"===this._config.pause&&(B.on(this._element,yt,(()=>this.pause())),B.on(this._element,vt,(()=>this._maybeEnableCycle()))),this._config.touch&&st.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of G.find(".carousel-item img",this._element))B.on(e,_t,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(dt)),rightCallback:()=>this._slide(this._directionToOrder(ht)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new st(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ot[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=G.findOne(At,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const r=G.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);r&&(r.classList.add(Et),r.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const r=this._getActive(),n=t===lt,o=e||b(this._getItems(),r,n,this._config.wrap);if(o===r)return;const i=this._getItemIndex(o),a=e=>B.trigger(this._element,e,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(r),to:i});if(a(pt).defaultPrevented)return;if(!r||!o)return;const s=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(i),this._activeElement=o;const c=n?"carousel-item-start":"carousel-item-end",u=n?"carousel-item-next":"carousel-item-prev";o.classList.add(u),p(o),r.classList.add(c),o.classList.add(c),this._queueCallback((()=>{o.classList.remove(c,u),o.classList.add(Et),r.classList.remove(Et,u,c),this._isSliding=!1,a(gt)}),r,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return G.findOne(St,this._element)}_getItems(){return G.find(It,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return y()?t===dt?ft:lt:t===dt?lt:ft}_orderToDirection(t){return y()?t===ft?dt:ht:t===ft?ht:dt}static jQueryInterface(t){return this.each((function(){const e=xt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}B.on(document,bt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=G.getElementFromSelector(this);if(!e||!e.classList.contains(Ct))return;t.preventDefault();const r=xt.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(r.to(n),void r._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(r.next(),void r._maybeEnableCycle()):(r.prev(),void r._maybeEnableCycle())})),B.on(window,wt,(()=>{const t=G.find('[data-bs-ride="carousel"]');for(const e of t)xt.getOrCreateInstance(e)})),v(xt);const Rt=".bs.collapse",Dt=`show${Rt}`,Pt=`shown${Rt}`,Mt=`hide${Rt}`,kt=`hidden${Rt}`,Lt=`click${Rt}.data-api`,Bt="show",jt="collapse",Ft="collapsing",Vt=`:scope .${jt} .${jt}`,Ht='[data-bs-toggle="collapse"]',Ut={parent:null,toggle:!0},Wt={parent:"(null|element)",toggle:"boolean"};class zt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const r=G.find(Ht);for(const n of r){const t=G.getSelectorFromElement(n),e=G.find(t).filter((t=>t===this._element));null!==t&&e.length&&this._triggerArray.push(n)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ut}static get DefaultType(){return Wt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>zt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(B.trigger(this._element,Dt).defaultPrevented)return;for(const n of t)n.hide();const e=this._getDimension();this._element.classList.remove(jt),this._element.classList.add(Ft),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ft),this._element.classList.add(jt,Bt),this._element.style[e]="",B.trigger(this._element,Pt)}),this._element,!0),this._element.style[e]=`${this._element[r]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(B.trigger(this._element,Mt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,p(this._element),this._element.classList.add(Ft),this._element.classList.remove(jt,Bt);for(const e of this._triggerArray){const t=G.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ft),this._element.classList.add(jt),B.trigger(this._element,kt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Bt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Ht);for(const e of t){const t=G.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=G.find(Vt,this._config.parent);return G.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const r of t)r.classList.toggle("collapsed",!e),r.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const r=zt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t]()}}))}}B.on(document,Lt,Ht,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const e of G.getMultipleElementsFromSelector(this))zt.getOrCreateInstance(e,{toggle:!1}).toggle()})),v(zt);const Gt="dropdown",Xt=".bs.dropdown",$t=".data-api",Yt="ArrowUp",qt="ArrowDown",Zt=`hide${Xt}`,Kt=`hidden${Xt}`,Qt=`show${Xt}`,Jt=`shown${Xt}`,te=`click${Xt}${$t}`,ee=`keydown${Xt}${$t}`,re=`keyup${Xt}${$t}`,ne="show",oe='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ie=`${oe}.${ne}`,ae=".dropdown-menu",se=y()?"top-end":"top-start",ce=y()?"top-start":"top-end",ue=y()?"bottom-end":"bottom-start",le=y()?"bottom-start":"bottom-end",fe=y()?"left-start":"right-start",de=y()?"right-start":"left-start",he={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},pe={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class ge extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=G.next(this._element,ae)[0]||G.prev(this._element,ae)[0]||G.findOne(ae,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return he}static get DefaultType(){return pe}static get NAME(){return Gt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(f(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!B.trigger(this._element,Qt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))B.on(t,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ne),this._element.classList.add(ne),B.trigger(this._element,Jt,t)}}hide(){if(f(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!B.trigger(this._element,Zt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(ne),this._element.classList.remove(ne),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),B.trigger(this._element,Kt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!c(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Gt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:c(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=r.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(ne)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return fe;if(t.classList.contains("dropstart"))return de;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ce:se:e?le:ue}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(H.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..._(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const r=G.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>l(t)));r.length&&b(r,e,t===qt,!r.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=ge.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=G.find(ie);for(const r of e){const e=ge.getInstance(r);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),o=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!o||"outside"===e._config.autoClose&&o)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const i={relatedTarget:e._element};"click"===t.type&&(i.clickEvent=t),e._completeHide(i)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),r="Escape"===t.key,n=[Yt,qt].includes(t.key);if(!n&&!r)return;if(e&&!r)return;t.preventDefault();const o=this.matches(oe)?this:G.prev(this,oe)[0]||G.next(this,oe)[0]||G.findOne(oe,t.delegateTarget.parentNode),i=ge.getOrCreateInstance(o);if(n)return t.stopPropagation(),i.show(),void i._selectMenuItem(t);i._isShown()&&(t.stopPropagation(),i.hide(),o.focus())}}B.on(document,ee,oe,ge.dataApiKeydownHandler),B.on(document,ee,ae,ge.dataApiKeydownHandler),B.on(document,te,ge.clearMenus),B.on(document,re,ge.clearMenus),B.on(document,te,oe,(function(t){t.preventDefault(),ge.getOrCreateInstance(this).toggle()})),v(ge);const me="backdrop",ye="show",ve=`mousedown.bs.${me}`,_e={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},we={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class be extends U{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return _e}static get DefaultType(){return we}static get NAME(){return me}show(t){if(!this._config.isVisible)return void _(t);this._append();const e=this._getElement();this._config.isAnimated&&p(e),e.classList.add(ye),this._emulateAnimation((()=>{_(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(ye),this._emulateAnimation((()=>{this.dispose(),_(t)}))):_(t)}dispose(){this._isAppended&&(B.off(this._element,ve),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),B.on(t,ve,(()=>{_(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){w(t,this._getElement(),this._config.isAnimated)}}const Ce=".bs.focustrap",Ee=`focusin${Ce}`,Ae=`keydown.tab${Ce}`,Ie="backward",Se={autofocus:!0,trapElement:null},Oe={autofocus:"boolean",trapElement:"element"};class Te extends U{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Se}static get DefaultType(){return Oe}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),B.off(document,Ce),B.on(document,Ee,(t=>this._handleFocusin(t))),B.on(document,Ae,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,B.off(document,Ce))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const r=G.focusableChildren(e);0===r.length?e.focus():this._lastTabNavDirection===Ie?r[r.length-1].focus():r[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ie:"forward")}}const Ne=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",xe=".sticky-top",Re="padding-right",De="margin-right";class Pe{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Re,(e=>e+t)),this._setElementAttributes(Ne,Re,(e=>e+t)),this._setElementAttributes(xe,De,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Re),this._resetElementAttributes(Ne,Re),this._resetElementAttributes(xe,De)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,r){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${r(Number.parseFloat(o))}px`)}))}_saveInitialAttribute(t,e){const r=t.style.getPropertyValue(e);r&&H.setDataAttribute(t,e,r)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const r=H.getDataAttribute(t,e);null!==r?(H.removeDataAttribute(t,e),t.style.setProperty(e,r)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(c(t))e(t);else for(const r of G.find(t,this._element))e(r)}}const Me=".bs.modal",ke=`hide${Me}`,Le=`hidePrevented${Me}`,Be=`hidden${Me}`,je=`show${Me}`,Fe=`shown${Me}`,Ve=`resize${Me}`,He=`click.dismiss${Me}`,Ue=`mousedown.dismiss${Me}`,We=`keydown.dismiss${Me}`,ze=`click${Me}.data-api`,Ge="modal-open",Xe="show",$e="modal-static",Ye={backdrop:!0,focus:!0,keyboard:!0},qe={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ze extends W{constructor(t,e){super(t,e),this._dialog=G.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Pe,this._addEventListeners()}static get Default(){return Ye}static get DefaultType(){return qe}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||B.trigger(this._element,je,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ge),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(B.trigger(this._element,ke).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Xe),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){B.off(window,Me),B.off(this._dialog,Me),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new be({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Te({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=G.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),p(this._element),this._element.classList.add(Xe),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,B.trigger(this._element,Fe,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){B.on(this._element,We,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),B.on(window,Ve,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),B.on(this._element,Ue,(t=>{B.one(this._element,He,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ge),this._resetAdjustments(),this._scrollBar.reset(),B.trigger(this._element,Be)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(B.trigger(this._element,Le).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains($e)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add($e),this._queueCallback((()=>{this._element.classList.remove($e),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),r=e>0;if(r&&!t){const t=y()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!r&&t){const t=y()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const r=Ze.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t](e)}}))}}B.on(document,ze,'[data-bs-toggle="modal"]',(function(t){const e=G.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),B.one(e,je,(t=>{t.defaultPrevented||B.one(e,Be,(()=>{l(this)&&this.focus()}))}));const r=G.findOne(".modal.show");r&&Ze.getInstance(r).hide(),Ze.getOrCreateInstance(e).toggle(this)})),X(Ze),v(Ze);const Ke=".bs.offcanvas",Qe=".data-api",Je=`load${Ke}${Qe}`,tr="show",er="showing",rr="hiding",nr=".offcanvas.show",or=`show${Ke}`,ir=`shown${Ke}`,ar=`hide${Ke}`,sr=`hidePrevented${Ke}`,cr=`hidden${Ke}`,ur=`resize${Ke}`,lr=`click${Ke}${Qe}`,fr=`keydown.dismiss${Ke}`,dr={backdrop:!0,keyboard:!0,scroll:!1},hr={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pr extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return dr}static get DefaultType(){return hr}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||B.trigger(this._element,or,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Pe).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(er),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(tr),this._element.classList.remove(er),B.trigger(this._element,ir,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(B.trigger(this._element,ar).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(rr),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(tr,rr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Pe).reset(),B.trigger(this._element,cr)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new be({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():B.trigger(this._element,sr)}:null})}_initializeFocusTrap(){return new Te({trapElement:this._element})}_addEventListeners(){B.on(this._element,fr,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():B.trigger(this._element,sr))}))}static jQueryInterface(t){return this.each((function(){const e=pr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}B.on(document,lr,'[data-bs-toggle="offcanvas"]',(function(t){const e=G.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this))return;B.one(e,cr,(()=>{l(this)&&this.focus()}));const r=G.findOne(nr);r&&r!==e&&pr.getInstance(r).hide(),pr.getOrCreateInstance(e).toggle(this)})),B.on(window,Je,(()=>{for(const t of G.find(nr))pr.getOrCreateInstance(t).show()})),B.on(window,ur,(()=>{for(const t of G.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&pr.getOrCreateInstance(t).hide()})),X(pr),v(pr);const gr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},mr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),yr=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,vr=(t,e)=>{const r=t.nodeName.toLowerCase();return e.includes(r)?!mr.has(r)||Boolean(yr.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(r)))},_r={allowList:gr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},wr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},br={entry:"(string|element|function|null)",selector:"(string|element)"};class Cr extends U{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return _r}static get DefaultType(){return wr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[n,o]of Object.entries(this._config.content))this._setContent(t,o,n);const e=t.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&e.classList.add(...r.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,r]of Object.entries(t))super._typeCheckConfig({selector:e,entry:r},br)}_setContent(t,e,r){const n=G.findOne(r,t);n&&((e=this._resolvePossibleFunction(e))?c(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,r){if(!t.length)return t;if(r&&"function"==typeof r)return r(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...n.body.querySelectorAll("*"));for(const i of o){const t=i.nodeName.toLowerCase();if(!Object.keys(e).includes(t)){i.remove();continue}const r=[].concat(...i.attributes),n=[].concat(e["*"]||[],e[t]||[]);for(const e of r)vr(e,n)||i.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return _(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Er=new Set(["sanitize","allowList","sanitizeFn"]),Ar="fade",Ir="show",Sr=".modal",Or="hide.bs.modal",Tr="hover",Nr="focus",xr={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},Rr={allowList:gr,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Dr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Pr extends W{constructor(t,e){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Rr}static get DefaultType(){return Dr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),B.off(this._element.closest(Sr),Or,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=B.trigger(this._element,this.constructor.eventName("show")),e=(d(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(r),B.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(r),r.classList.add(Ir),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))B.on(o,"mouseover",h);this._queueCallback((()=>{B.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!B.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ir),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger[Nr]=!1,this._activeTrigger[Tr]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),B.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ar,Ir),e.classList.add(`bs-${this.constructor.NAME}-auto`);const r=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",r),this._isAnimated()&&e.classList.add(Ar),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Cr({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ar)}_isShown(){return this.tip&&this.tip.classList.contains(Ir)}_createPopper(t){const e=_(this._config.placement,[this,t,this._element]),n=xr[e.toUpperCase()];return r.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return _(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..._(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)B.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Tr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),r=e===Tr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");B.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Nr:Tr]=!0,e._enter()})),B.on(this._element,r,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Nr:Tr]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},B.on(this._element.closest(Sr),Or,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=H.getDataAttributes(this._element);for(const r of Object.keys(e))Er.has(r)&&delete e[r];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,r]of Object.entries(this._config))this.constructor.Default[e]!==r&&(t[e]=r);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Pr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}v(Pr);const Mr={...Pr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},kr={...Pr.DefaultType,content:"(null|string|element|function)"};class Lr extends Pr{static get Default(){return Mr}static get DefaultType(){return kr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Lr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}v(Lr);const Br=".bs.scrollspy",jr=`activate${Br}`,Fr=`click${Br}`,Vr=`load${Br}.data-api`,Hr="active",Ur="[href]",Wr=".nav-link",zr=`${Wr}, .nav-item > ${Wr}, .list-group-item`,Gr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Xr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $r extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Gr}static get DefaultType(){return Xr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(B.off(this._config.target,Fr),B.on(this._config.target,Fr,Ur,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const r=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(r.scrollTo)return void r.scrollTo({top:n,behavior:"smooth"});r.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),r=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,o=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const i of t){if(!i.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(i));continue}const t=i.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&t){if(r(i),!n)return}else o||t||r(i)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=G.find(Ur,this._config.target);for(const e of t){if(!e.hash||f(e))continue;const t=G.findOne(decodeURI(e.hash),this._element);l(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Hr),this._activateParents(t),B.trigger(this._element,jr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))G.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Hr);else for(const e of G.parents(t,".nav, .list-group"))for(const t of G.prev(e,zr))t.classList.add(Hr)}_clearActiveClass(t){t.classList.remove(Hr);const e=G.find(`${Ur}.${Hr}`,t);for(const r of e)r.classList.remove(Hr)}static jQueryInterface(t){return this.each((function(){const e=$r.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(window,Vr,(()=>{for(const t of G.find('[data-bs-spy="scroll"]'))$r.getOrCreateInstance(t)})),v($r);const Yr=".bs.tab",qr=`hide${Yr}`,Zr=`hidden${Yr}`,Kr=`show${Yr}`,Qr=`shown${Yr}`,Jr=`click${Yr}`,tn=`keydown${Yr}`,en=`load${Yr}`,rn="ArrowLeft",nn="ArrowRight",on="ArrowUp",an="ArrowDown",sn="Home",cn="End",un="active",ln="fade",fn="show",dn=":not(.dropdown-toggle)",hn='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',pn=`.nav-link${dn}, .list-group-item${dn}, [role="tab"]${dn}, ${hn}`,gn=`.${un}[data-bs-toggle="tab"], .${un}[data-bs-toggle="pill"], .${un}[data-bs-toggle="list"]`;class mn extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),B.on(this._element,tn,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),r=e?B.trigger(e,qr,{relatedTarget:t}):null;B.trigger(t,Kr,{relatedTarget:e}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(un),this._activate(G.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),B.trigger(t,Qr,{relatedTarget:e})):t.classList.add(fn)}),t,t.classList.contains(ln)))}_deactivate(t,e){t&&(t.classList.remove(un),t.blur(),this._deactivate(G.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),B.trigger(t,Zr,{relatedTarget:e})):t.classList.remove(fn)}),t,t.classList.contains(ln)))}_keydown(t){if(![rn,nn,on,an,sn,cn].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!f(t)));let r;if([sn,cn].includes(t.key))r=e[t.key===sn?0:e.length-1];else{const n=[nn,an].includes(t.key);r=b(e,t.target,n,!0)}r&&(r.focus({preventScroll:!0}),mn.getOrCreateInstance(r).show())}_getChildren(){return G.find(pn,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const r of e)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),r=this._getOuterElement(t);t.setAttribute("aria-selected",e),r!==t&&this._setAttributeIfNotExists(r,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=G.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const r=this._getOuterElement(t);if(!r.classList.contains("dropdown"))return;const n=(t,n)=>{const o=G.findOne(t,r);o&&o.classList.toggle(n,e)};n(".dropdown-toggle",un),n(".dropdown-menu",fn),r.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,r){t.hasAttribute(e)||t.setAttribute(e,r)}_elemIsActive(t){return t.classList.contains(un)}_getInnerElement(t){return t.matches(pn)?t:G.findOne(pn,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=mn.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(document,Jr,hn,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this)||mn.getOrCreateInstance(this).show()})),B.on(window,en,(()=>{for(const t of G.find(gn))mn.getOrCreateInstance(t)})),v(mn);const yn=".bs.toast",vn=`mouseover${yn}`,_n=`mouseout${yn}`,wn=`focusin${yn}`,bn=`focusout${yn}`,Cn=`hide${yn}`,En=`hidden${yn}`,An=`show${yn}`,In=`shown${yn}`,Sn="hide",On="show",Tn="showing",Nn={animation:"boolean",autohide:"boolean",delay:"number"},xn={animation:!0,autohide:!0,delay:5e3};class Rn extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return xn}static get DefaultType(){return Nn}static get NAME(){return"toast"}show(){B.trigger(this._element,An).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Sn),p(this._element),this._element.classList.add(On,Tn),this._queueCallback((()=>{this._element.classList.remove(Tn),B.trigger(this._element,In),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(B.trigger(this._element,Cn).defaultPrevented||(this._element.classList.add(Tn),this._queueCallback((()=>{this._element.classList.add(Sn),this._element.classList.remove(Tn,On),B.trigger(this._element,En)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(On),super.dispose()}isShown(){return this._element.classList.contains(On)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const r=t.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){B.on(this._element,vn,(t=>this._onInteraction(t,!0))),B.on(this._element,_n,(t=>this._onInteraction(t,!1))),B.on(this._element,wn,(t=>this._onInteraction(t,!0))),B.on(this._element,bn,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Rn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}X(Rn),v(Rn)})(g($t));var Yt,qt={exports:{}},Zt={};var Kt,Qt={};
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("jcinfo-utils"),require("framer-motion"),require("styled-components"),require("reactstrap"),require("react-router-dom"),require("js-file-download"),require("axios"),require("react-input-mask"),require("react-number-format")):"function"==typeof define&&define.amd?define(["exports","react","jcinfo-utils","framer-motion","styled-components","reactstrap","react-router-dom","js-file-download","axios","react-input-mask","react-number-format"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).JCLibUI={},t.React,t.JCInfoUtils,t.FramerMotion,t.styled,t.Reactstrap,t.ReactRouterDom,t.jcFileDownload,t.Axios,t.ReactInputMask,t.ReactNumberFormat)}(this,(function(t,e,r,n,o,i,a,s,c,u,l){"use strict";function f(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const r in t)if("default"!==r){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const d=f(e);var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function g(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),r}var m="top",v="bottom",y="right",_="left",w="auto",b=[m,v,y,_],C="start",E="end",A="clippingParents",I="viewport",S="popper",O="reference",T=b.reduce((function(t,e){return t.concat([e+"-"+C,e+"-"+E])}),[]),N=[].concat(b,[w]).reduce((function(t,e){return t.concat([e,e+"-"+C,e+"-"+E])}),[]),x="beforeRead",R="read",D="afterRead",P="beforeMain",M="main",k="afterMain",L="beforeWrite",B="write",j="afterWrite",F=[x,R,D,P,M,k,L,B,j];function V(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function U(t){return t instanceof H(t).Element||t instanceof Element}function W(t){return t instanceof H(t).HTMLElement||t instanceof HTMLElement}function z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof H(t).ShadowRoot||t instanceof ShadowRoot)}const G={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];W(o)&&V(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:r[t]).reduce((function(t,e){return t[e]="",t}),{});W(n)&&V(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function X(t){return t.split("-")[0]}var $=Math.max,Y=Math.min,q=Math.round;function Z(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function K(){return!/^((?!chrome|android).)*safari/i.test(Z())}function Q(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.getBoundingClientRect(),o=1,i=1;e&&W(t)&&(o=t.offsetWidth>0&&q(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&q(n.height)/t.offsetHeight||1);var a=(U(t)?H(t):window).visualViewport,s=!K()&&r,c=(n.left+(s&&a?a.offsetLeft:0))/o,u=(n.top+(s&&a?a.offsetTop:0))/i,l=n.width/o,f=n.height/i;return{width:l,height:f,top:u,right:c+l,bottom:u+f,left:c,x:c,y:u}}function J(t){var e=Q(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function tt(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&z(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function et(t){return H(t).getComputedStyle(t)}function rt(t){return["table","td","th"].indexOf(V(t))>=0}function nt(t){return((U(t)?t.ownerDocument:t.document)||window.document).documentElement}function ot(t){return"html"===V(t)?t:t.assignedSlot||t.parentNode||(z(t)?t.host:null)||nt(t)}function it(t){return W(t)&&"fixed"!==et(t).position?t.offsetParent:null}function at(t){for(var e=H(t),r=it(t);r&&rt(r)&&"static"===et(r).position;)r=it(r);return r&&("html"===V(r)||"body"===V(r)&&"static"===et(r).position)?e:r||function(t){var e=/firefox/i.test(Z());if(/Trident/i.test(Z())&&W(t)&&"fixed"===et(t).position)return null;var r=ot(t);for(z(r)&&(r=r.host);W(r)&&["html","body"].indexOf(V(r))<0;){var n=et(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(t)||e}function st(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ct(t,e,r){return $(t,Y(e,r))}function ut(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function lt(t,e){return e.reduce((function(e,r){return e[r]=t,e}),{})}const ft={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,n=t.name,o=t.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=X(r.placement),c=st(s),u=[_,y].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(t,e){return ut("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:lt(t,b))}(o.padding,r),f=J(i),d="y"===c?m:_,h="y"===c?v:y,p=r.rects.reference[u]+r.rects.reference[c]-a[c]-r.rects.popper[u],g=a[c]-r.rects.reference[c],w=at(i),C=w?"y"===c?w.clientHeight||0:w.clientWidth||0:0,E=p/2-g/2,A=l[d],I=C-f[u]-l[h],S=C/2-f[u]/2+E,O=ct(A,S,I),T=c;r.modifiersData[n]=((e={})[T]=O,e.centerOffset=O-S,e)}},effect:function(t){var e=t.state,r=t.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&tt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dt(t){return t.split("-")[1]}var ht={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pt(t){var e,r=t.popper,n=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,c=t.gpuAcceleration,u=t.adaptive,l=t.roundOffsets,f=t.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,g=void 0===p?0:p,w="function"==typeof l?l({x:h,y:g}):{x:h,y:g};h=w.x,g=w.y;var b=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),A=_,I=m,S=window;if(u){var O=at(r),T="clientHeight",N="clientWidth";if(O===H(r)&&"static"!==et(O=nt(r)).position&&"absolute"===s&&(T="scrollHeight",N="scrollWidth"),o===m||(o===_||o===y)&&i===E)I=v,g-=(f&&O===S&&S.visualViewport?S.visualViewport.height:O[T])-n.height,g*=c?1:-1;if(o===_||(o===m||o===v)&&i===E)A=y,h-=(f&&O===S&&S.visualViewport?S.visualViewport.width:O[N])-n.width,h*=c?1:-1}var x,R=Object.assign({position:s},u&&ht),D=!0===l?function(t,e){var r=t.x,n=t.y,o=e.devicePixelRatio||1;return{x:q(r*o)/o||0,y:q(n*o)/o||0}}({x:h,y:g},H(r)):{x:h,y:g};return h=D.x,g=D.y,c?Object.assign({},R,((x={})[I]=C?"0":"",x[A]=b?"0":"",x.transform=(S.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",x)):Object.assign({},R,((e={})[I]=C?g+"px":"",e[A]=b?h+"px":"",e.transform="",e))}const gt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,r=t.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,c=void 0===s||s,u={placement:X(e.placement),variation:dt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,pt(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,pt(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var mt={passive:!0};const vt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,r=t.instance,n=t.options,o=n.scroll,i=void 0===o||o,a=n.resize,s=void 0===a||a,c=H(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach((function(t){t.addEventListener("scroll",r.update,mt)})),s&&c.addEventListener("resize",r.update,mt),function(){i&&u.forEach((function(t){t.removeEventListener("scroll",r.update,mt)})),s&&c.removeEventListener("resize",r.update,mt)}},data:{}};var yt={left:"right",right:"left",bottom:"top",top:"bottom"};function _t(t){return t.replace(/left|right|bottom|top/g,(function(t){return yt[t]}))}var wt={start:"end",end:"start"};function bt(t){return t.replace(/start|end/g,(function(t){return wt[t]}))}function Ct(t){var e=H(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Et(t){return Q(nt(t)).left+Ct(t).scrollLeft}function At(t){var e=et(t),r=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function It(t){return["html","body","#document"].indexOf(V(t))>=0?t.ownerDocument.body:W(t)&&At(t)?t:It(ot(t))}function St(t,e){var r;void 0===e&&(e=[]);var n=It(t),o=n===(null==(r=t.ownerDocument)?void 0:r.body),i=H(n),a=o?[i].concat(i.visualViewport||[],At(n)?n:[]):n,s=e.concat(a);return o?s:s.concat(St(ot(a)))}function Ot(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Tt(t,e,r){return e===I?Ot(function(t,e){var r=H(t),n=nt(t),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var u=K();(u||!u&&"fixed"===e)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+Et(t),y:c}}(t,r)):U(e)?function(t,e){var r=Q(t,!1,"fixed"===e);return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}(e,r):Ot(function(t){var e,r=nt(t),n=Ct(t),o=null==(e=t.ownerDocument)?void 0:e.body,i=$(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=$(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+Et(t),c=-n.scrollTop;return"rtl"===et(o||r).direction&&(s+=$(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(nt(t)))}function Nt(t,e,r,n){var o="clippingParents"===e?function(t){var e=St(ot(t)),r=["absolute","fixed"].indexOf(et(t).position)>=0&&W(t)?at(t):t;return U(r)?e.filter((function(t){return U(t)&&tt(t,r)&&"body"!==V(t)})):[]}(t):[].concat(e),i=[].concat(o,[r]),a=i[0],s=i.reduce((function(e,r){var o=Tt(t,r,n);return e.top=$(o.top,e.top),e.right=Y(o.right,e.right),e.bottom=Y(o.bottom,e.bottom),e.left=$(o.left,e.left),e}),Tt(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function xt(t){var e,r=t.reference,n=t.element,o=t.placement,i=o?X(o):null,a=o?dt(o):null,s=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2;switch(i){case m:e={x:s,y:r.y-n.height};break;case v:e={x:s,y:r.y+r.height};break;case y:e={x:r.x+r.width,y:c};break;case _:e={x:r.x-n.width,y:c};break;default:e={x:r.x,y:r.y}}var u=i?st(i):null;if(null!=u){var l="y"===u?"height":"width";switch(a){case C:e[u]=e[u]-(r[l]/2-n[l]/2);break;case E:e[u]=e[u]+(r[l]/2-n[l]/2)}}return e}function Rt(t,e){void 0===e&&(e={});var r=e,n=r.placement,o=void 0===n?t.placement:n,i=r.strategy,a=void 0===i?t.strategy:i,s=r.boundary,c=void 0===s?A:s,u=r.rootBoundary,l=void 0===u?I:u,f=r.elementContext,d=void 0===f?S:f,h=r.altBoundary,p=void 0!==h&&h,g=r.padding,_=void 0===g?0:g,w=ut("number"!=typeof _?_:lt(_,b)),C=d===S?O:S,E=t.rects.popper,T=t.elements[p?C:d],N=Nt(U(T)?T:T.contextElement||nt(t.elements.popper),c,l,a),x=Q(t.elements.reference),R=xt({reference:x,element:E,strategy:"absolute",placement:o}),D=Ot(Object.assign({},E,R)),P=d===S?D:x,M={top:N.top-P.top+w.top,bottom:P.bottom-N.bottom+w.bottom,left:N.left-P.left+w.left,right:P.right-N.right+w.right},k=t.modifiersData.offset;if(d===S&&k){var L=k[o];Object.keys(M).forEach((function(t){var e=[y,v].indexOf(t)>=0?1:-1,r=[m,v].indexOf(t)>=0?"y":"x";M[t]+=L[r]*e}))}return M}const Dt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0===a||a,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,p=void 0===h||h,g=r.allowedAutoPlacements,E=e.options.placement,A=X(E),I=c||(A===E||!p?[_t(E)]:function(t){if(X(t)===w)return[];var e=_t(t);return[bt(t),e,bt(e)]}(E)),S=[E].concat(I).reduce((function(t,r){return t.concat(X(r)===w?function(t,e){void 0===e&&(e={});var r=e,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=void 0===c?N:c,l=dt(n),f=l?s?T:T.filter((function(t){return dt(t)===l})):b,d=f.filter((function(t){return u.indexOf(t)>=0}));0===d.length&&(d=f);var h=d.reduce((function(e,r){return e[r]=Rt(t,{placement:r,boundary:o,rootBoundary:i,padding:a})[X(r)],e}),{});return Object.keys(h).sort((function(t,e){return h[t]-h[e]}))}(e,{placement:r,boundary:l,rootBoundary:f,padding:u,flipVariations:p,allowedAutoPlacements:g}):r)}),[]),O=e.rects.reference,x=e.rects.popper,R=new Map,D=!0,P=S[0],M=0;M<S.length;M++){var k=S[M],L=X(k),B=dt(k)===C,j=[m,v].indexOf(L)>=0,F=j?"width":"height",V=Rt(e,{placement:k,boundary:l,rootBoundary:f,altBoundary:d,padding:u}),H=j?B?y:_:B?v:m;O[F]>x[F]&&(H=_t(H));var U=_t(H),W=[];if(i&&W.push(V[L]<=0),s&&W.push(V[H]<=0,V[U]<=0),W.every((function(t){return t}))){P=k,D=!1;break}R.set(k,W)}if(D)for(var z=function(t){var e=S.find((function(e){var r=R.get(e);if(r)return r.slice(0,t).every((function(t){return t}))}));if(e)return P=e,"break"},G=p?3:1;G>0;G--){if("break"===z(G))break}e.placement!==P&&(e.modifiersData[n]._skip=!0,e.placement=P,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Pt(t,e,r){return void 0===r&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function Mt(t){return[m,y,v,_].some((function(e){return t[e]>=0}))}const kt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,r=t.name,n=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=Rt(e,{elementContext:"reference"}),s=Rt(e,{altBoundary:!0}),c=Pt(a,n),u=Pt(s,o,i),l=Mt(c),f=Mt(u);e.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}};const Lt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,r=t.options,n=t.name,o=r.offset,i=void 0===o?[0,0]:o,a=N.reduce((function(t,r){return t[r]=function(t,e,r){var n=X(t),o=[_,m].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},e,{placement:t})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[_,y].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,e.rects,i),t}),{}),s=a[e.placement],c=s.x,u=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=a}};const Bt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,r=t.name;e.modifiersData[r]=xt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const jt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,n=t.name,o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0!==a&&a,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,d=r.tether,h=void 0===d||d,p=r.tetherOffset,g=void 0===p?0:p,w=Rt(e,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),b=X(e.placement),E=dt(e.placement),A=!E,I=st(b),S="x"===I?"y":"x",O=e.modifiersData.popperOffsets,T=e.rects.reference,N=e.rects.popper,x="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,R="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(O){if(i){var M,k="y"===I?m:_,L="y"===I?v:y,B="y"===I?"height":"width",j=O[I],F=j+w[k],V=j-w[L],H=h?-N[B]/2:0,U=E===C?T[B]:N[B],W=E===C?-N[B]:-T[B],z=e.elements.arrow,G=h&&z?J(z):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=q[k],K=q[L],Q=ct(0,T[B],G[B]),tt=A?T[B]/2-H-Q-Z-R.mainAxis:U-Q-Z-R.mainAxis,et=A?-T[B]/2+H+Q+K+R.mainAxis:W+Q+K+R.mainAxis,rt=e.elements.arrow&&at(e.elements.arrow),nt=rt?"y"===I?rt.clientTop||0:rt.clientLeft||0:0,ot=null!=(M=null==D?void 0:D[I])?M:0,it=j+et-ot,ut=ct(h?Y(F,j+tt-ot-nt):F,j,h?$(V,it):V);O[I]=ut,P[I]=ut-j}if(s){var lt,ft="x"===I?m:_,ht="x"===I?v:y,pt=O[S],gt="y"===S?"height":"width",mt=pt+w[ft],vt=pt-w[ht],yt=-1!==[m,_].indexOf(b),_t=null!=(lt=null==D?void 0:D[S])?lt:0,wt=yt?mt:pt-T[gt]-N[gt]-_t+R.altAxis,bt=yt?pt+T[gt]+N[gt]-_t-R.altAxis:vt,Ct=h&&yt?(At=ct(wt,pt,Et=bt))>Et?Et:At:ct(h?wt:mt,pt,h?bt:vt);O[S]=Ct,P[S]=Ct-pt}var Et,At;e.modifiersData[n]=P}},requiresIfExists:["offset"]};function Ft(t,e,r){void 0===r&&(r=!1);var n,o,i=W(e),a=W(e)&&function(t){var e=t.getBoundingClientRect(),r=q(e.width)/t.offsetWidth||1,n=q(e.height)/t.offsetHeight||1;return 1!==r||1!==n}(e),s=nt(e),c=Q(t,a,r),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!r)&&(("body"!==V(e)||At(s))&&(u=(n=e)!==H(n)&&W(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Ct(n)),W(e)?((l=Q(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=Et(s))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function Vt(t){var e=new Map,r=new Set,n=[];function o(t){r.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!r.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){r.has(t.name)||o(t)})),n}var Ht={placement:"bottom",modifiers:[],strategy:"absolute"};function Ut(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Wt(t){void 0===t&&(t={});var e=t,r=e.defaultModifiers,n=void 0===r?[]:r,o=e.defaultOptions,i=void 0===o?Ht:o;return function(t,e,r){void 0===r&&(r=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ht,i),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,l={state:s,setOptions:function(r){var o="function"==typeof r?r(s.options):r;f(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:U(t)?St(t):t.contextElement?St(t.contextElement):[],popper:St(e)};var a,u,d=function(t){var e=Vt(t);return F.reduce((function(t,r){return t.concat(e.filter((function(t){return t.phase===r})))}),[])}((a=[].concat(n,s.options.modifiers),u=a.reduce((function(t,e){var r=t[e.name];return t[e.name]=r?Object.assign({},r,e,{options:Object.assign({},r.options,e.options),data:Object.assign({},r.data,e.data)}):e,t}),{}),Object.keys(u).map((function(t){return u[t]}))));return s.orderedModifiers=d.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.name,r=t.options,n=void 0===r?{}:r,o=t.effect;if("function"==typeof o){var i=o({state:s,name:e,instance:l,options:n}),a=function(){};c.push(i||a)}})),l.update()},forceUpdate:function(){if(!u){var t=s.elements,e=t.reference,r=t.popper;if(Ut(e,r)){s.rects={reference:Ft(e,at(r),"fixed"===s.options.strategy),popper:J(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],i=o.fn,a=o.options,c=void 0===a?{}:a,f=o.name;"function"==typeof i&&(s=i({state:s,options:c,name:f,instance:l})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(t){l.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){f(),u=!0}};if(!Ut(t,e))return l;function f(){c.forEach((function(t){return t()})),c=[]}return l.setOptions(r).then((function(t){!u&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l}}var zt=Wt(),Gt=Wt({defaultModifiers:[vt,Bt,gt,G]}),Xt=Wt({defaultModifiers:[vt,Bt,gt,G,Lt,Dt,jt,ft,kt]});const $t=Object.freeze(Object.defineProperty({__proto__:null,afterMain:k,afterRead:D,afterWrite:j,applyStyles:G,arrow:ft,auto:w,basePlacements:b,beforeMain:P,beforeRead:x,beforeWrite:L,bottom:v,clippingParents:A,computeStyles:gt,createPopper:Xt,createPopperBase:zt,createPopperLite:Gt,detectOverflow:Rt,end:E,eventListeners:vt,flip:Dt,hide:kt,left:_,main:M,modifierPhases:F,offset:Lt,placements:N,popper:S,popperGenerator:Wt,popperOffsets:Bt,preventOverflow:jt,read:R,reference:O,right:y,start:C,top:m,variationPlacements:T,viewport:I,write:B},Symbol.toStringTag,{value:"Module"}));(function(t){function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const r in t)if("default"!==r){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const r=e(t),n=new Map,o={set(t,e,r){n.has(t)||n.set(t,new Map);const o=n.get(t);o.has(e)||0===o.size?o.set(e,r):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`)},get:(t,e)=>n.has(t)&&n.get(t).get(e)||null,remove(t,e){if(!n.has(t))return;const r=n.get(t);r.delete(e),0===r.size&&n.delete(t)}},i="transitionend",a=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),s=t=>{t.dispatchEvent(new Event(i))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(a(t)):null,l=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),r=t.closest("details:not([open])");if(!r)return e;if(r!==t){const e=t.closest("summary");if(e&&e.parentNode!==r)return!1;if(null===e)return!1}return e},f=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),d=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d(t.parentNode):null},h=()=>{},p=t=>{t.offsetHeight},g=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,m=[],v=()=>"rtl"===document.documentElement.dir,y=t=>{var e;e=()=>{const e=g();if(e){const r=t.NAME,n=e.fn[r];e.fn[r]=t.jQueryInterface,e.fn[r].Constructor=t,e.fn[r].noConflict=()=>(e.fn[r]=n,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of m)t()})),m.push(e)):e()},_=(t,e=[],r=t)=>"function"==typeof t?t(...e):r,w=(t,e,r=!0)=>{if(!r)return void _(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:r}=window.getComputedStyle(t);const n=Number.parseFloat(e),o=Number.parseFloat(r);return n||o?(e=e.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(r))):0})(e)+5;let o=!1;const a=({target:r})=>{r===e&&(o=!0,e.removeEventListener(i,a),_(t))};e.addEventListener(i,a),setTimeout((()=>{o||s(e)}),n)},b=(t,e,r,n)=>{const o=t.length;let i=t.indexOf(e);return-1===i?!r&&n?t[o-1]:t[0]:(i+=r?1:-1,n&&(i=(i+o)%o),t[Math.max(0,Math.min(i,o-1))])},C=/[^.]*(?=\..*)\.|.*/,E=/\..*/,A=/::\d+$/,I={};let S=1;const O={mouseenter:"mouseover",mouseleave:"mouseout"},T=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function N(t,e){return e&&`${e}::${S++}`||t.uidEvent||S++}function x(t){const e=N(t);return t.uidEvent=e,I[e]=I[e]||{},I[e]}function R(t,e,r=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===r))}function D(t,e,r){const n="string"==typeof e,o=n?r:e||r;let i=L(t);return T.has(i)||(i=t),[n,o,i]}function P(t,e,r,n,o){if("string"!=typeof e||!t)return;let[i,a,s]=D(e,r,n);var c;e in O&&(c=a,a=function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return c.call(this,t)});const u=x(t),l=u[s]||(u[s]={}),f=R(l,a,i?r:null);if(f)return void(f.oneOff=f.oneOff&&o);const d=N(a,e.replace(C,"")),h=i?function(t,e,r){return function n(o){const i=t.querySelectorAll(e);for(let{target:a}=o;a&&a!==this;a=a.parentNode)for(const s of i)if(s===a)return j(o,{delegateTarget:a}),n.oneOff&&B.off(t,o.type,e,r),r.apply(a,[o])}}(t,r,a):function(t,e){return function r(n){return j(n,{delegateTarget:t}),r.oneOff&&B.off(t,n.type,e),e.apply(t,[n])}}(t,a);h.delegationSelector=i?r:null,h.callable=a,h.oneOff=o,h.uidEvent=d,l[d]=h,t.addEventListener(s,h,i)}function M(t,e,r,n,o){const i=R(e[r],n,o);i&&(t.removeEventListener(r,i,Boolean(o)),delete e[r][i.uidEvent])}function k(t,e,r,n){const o=e[r]||{};for(const[i,a]of Object.entries(o))i.includes(n)&&M(t,e,r,a.callable,a.delegationSelector)}function L(t){return t=t.replace(E,""),O[t]||t}const B={on(t,e,r,n){P(t,e,r,n,!1)},one(t,e,r,n){P(t,e,r,n,!0)},off(t,e,r,n){if("string"!=typeof e||!t)return;const[o,i,a]=D(e,r,n),s=a!==e,c=x(t),u=c[a]||{},l=e.startsWith(".");if(void 0===i){if(l)for(const r of Object.keys(c))k(t,c,r,e.slice(1));for(const[r,n]of Object.entries(u)){const o=r.replace(A,"");s&&!e.includes(o)||M(t,c,a,n.callable,n.delegationSelector)}}else{if(!Object.keys(u).length)return;M(t,c,a,i,o?r:null)}},trigger(t,e,r){if("string"!=typeof e||!t)return null;const n=g();let o=null,i=!0,a=!0,s=!1;e!==L(e)&&n&&(o=n.Event(e,r),n(t).trigger(o),i=!o.isPropagationStopped(),a=!o.isImmediatePropagationStopped(),s=o.isDefaultPrevented());const c=j(new Event(e,{bubbles:i,cancelable:!0}),r);return s&&c.preventDefault(),a&&t.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function j(t,e={}){for(const[n,o]of Object.entries(e))try{t[n]=o}catch(r){Object.defineProperty(t,n,{configurable:!0,get:()=>o})}return t}function F(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function V(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const H={setDataAttribute(t,e,r){t.setAttribute(`data-bs-${V(e)}`,r)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${V(e)}`)},getDataAttributes(t){if(!t)return{};const e={},r=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of r){let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=F(t.dataset[n])}return e},getDataAttribute:(t,e)=>F(t.getAttribute(`data-bs-${V(e)}`))};class U{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const r=c(e)?H.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof r?r:{},...c(e)?H.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,o]of Object.entries(e)){const e=t[n],i=c(e)?"element":null==(r=e)?`${r}`:Object.prototype.toString.call(r).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}var r}}class W extends U{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),B.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,r=!0){w(t,e,r)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return o.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.1"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const z=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let r=t.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),e=r&&"#"!==r?r.trim():null}return a(e)},G={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const r=[];let n=t.parentNode.closest(e);for(;n;)r.push(n),n=n.parentNode.closest(e);return r},prev(t,e){let r=t.previousElementSibling;for(;r;){if(r.matches(e))return[r];r=r.previousElementSibling}return[]},next(t,e){let r=t.nextElementSibling;for(;r;){if(r.matches(e))return[r];r=r.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!f(t)&&l(t)))},getSelectorFromElement(t){const e=z(t);return e&&G.findOne(e)?e:null},getElementFromSelector(t){const e=z(t);return e?G.findOne(e):null},getMultipleElementsFromSelector(t){const e=z(t);return e?G.find(e):[]}},X=(t,e="hide")=>{const r=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;B.on(document,r,`[data-bs-dismiss="${n}"]`,(function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),f(this))return;const o=G.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(o)[e]()}))},$=".bs.alert",Y=`close${$}`,q=`closed${$}`;class Z extends W{static get NAME(){return"alert"}close(){if(B.trigger(this._element,Y).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),B.trigger(this._element,q),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Z.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}X(Z,"close"),y(Z);const K='[data-bs-toggle="button"]';class Q extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}B.on(document,"click.bs.button.data-api",K,(t=>{t.preventDefault();const e=t.target.closest(K);Q.getOrCreateInstance(e).toggle()})),y(Q);const J=".bs.swipe",tt=`touchstart${J}`,et=`touchmove${J}`,rt=`touchend${J}`,nt=`pointerdown${J}`,ot=`pointerup${J}`,it={endCallback:null,leftCallback:null,rightCallback:null},at={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class st extends U{constructor(t,e){super(),this._element=t,t&&st.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return it}static get DefaultType(){return at}static get NAME(){return"swipe"}dispose(){B.off(this._element,J)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),_(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&_(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(B.on(this._element,nt,(t=>this._start(t))),B.on(this._element,ot,(t=>this._end(t))),this._element.classList.add("pointer-event")):(B.on(this._element,tt,(t=>this._start(t))),B.on(this._element,et,(t=>this._move(t))),B.on(this._element,rt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ct=".bs.carousel",ut=".data-api",lt="next",ft="prev",dt="left",ht="right",pt=`slide${ct}`,gt=`slid${ct}`,mt=`keydown${ct}`,vt=`mouseenter${ct}`,yt=`mouseleave${ct}`,_t=`dragstart${ct}`,wt=`load${ct}${ut}`,bt=`click${ct}${ut}`,Ct="carousel",Et="active",At=".active",It=".carousel-item",St=At+It,Ot={ArrowLeft:ht,ArrowRight:dt},Tt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Nt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class xt extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=G.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ct&&this.cycle()}static get Default(){return Tt}static get DefaultType(){return Nt}static get NAME(){return"carousel"}next(){this._slide(lt)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(ft)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?B.one(this._element,gt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void B.one(this._element,gt,(()=>this.to(t)));const r=this._getItemIndex(this._getActive());if(r===t)return;const n=t>r?lt:ft;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&B.on(this._element,mt,(t=>this._keydown(t))),"hover"===this._config.pause&&(B.on(this._element,vt,(()=>this.pause())),B.on(this._element,yt,(()=>this._maybeEnableCycle()))),this._config.touch&&st.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of G.find(".carousel-item img",this._element))B.on(e,_t,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(dt)),rightCallback:()=>this._slide(this._directionToOrder(ht)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new st(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ot[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=G.findOne(At,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const r=G.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);r&&(r.classList.add(Et),r.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const r=this._getActive(),n=t===lt,o=e||b(this._getItems(),r,n,this._config.wrap);if(o===r)return;const i=this._getItemIndex(o),a=e=>B.trigger(this._element,e,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(r),to:i});if(a(pt).defaultPrevented)return;if(!r||!o)return;const s=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(i),this._activeElement=o;const c=n?"carousel-item-start":"carousel-item-end",u=n?"carousel-item-next":"carousel-item-prev";o.classList.add(u),p(o),r.classList.add(c),o.classList.add(c),this._queueCallback((()=>{o.classList.remove(c,u),o.classList.add(Et),r.classList.remove(Et,u,c),this._isSliding=!1,a(gt)}),r,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return G.findOne(St,this._element)}_getItems(){return G.find(It,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return v()?t===dt?ft:lt:t===dt?lt:ft}_orderToDirection(t){return v()?t===ft?dt:ht:t===ft?ht:dt}static jQueryInterface(t){return this.each((function(){const e=xt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}B.on(document,bt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=G.getElementFromSelector(this);if(!e||!e.classList.contains(Ct))return;t.preventDefault();const r=xt.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(r.to(n),void r._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(r.next(),void r._maybeEnableCycle()):(r.prev(),void r._maybeEnableCycle())})),B.on(window,wt,(()=>{const t=G.find('[data-bs-ride="carousel"]');for(const e of t)xt.getOrCreateInstance(e)})),y(xt);const Rt=".bs.collapse",Dt=`show${Rt}`,Pt=`shown${Rt}`,Mt=`hide${Rt}`,kt=`hidden${Rt}`,Lt=`click${Rt}.data-api`,Bt="show",jt="collapse",Ft="collapsing",Vt=`:scope .${jt} .${jt}`,Ht='[data-bs-toggle="collapse"]',Ut={parent:null,toggle:!0},Wt={parent:"(null|element)",toggle:"boolean"};class zt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const r=G.find(Ht);for(const n of r){const t=G.getSelectorFromElement(n),e=G.find(t).filter((t=>t===this._element));null!==t&&e.length&&this._triggerArray.push(n)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ut}static get DefaultType(){return Wt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>zt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(B.trigger(this._element,Dt).defaultPrevented)return;for(const n of t)n.hide();const e=this._getDimension();this._element.classList.remove(jt),this._element.classList.add(Ft),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ft),this._element.classList.add(jt,Bt),this._element.style[e]="",B.trigger(this._element,Pt)}),this._element,!0),this._element.style[e]=`${this._element[r]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(B.trigger(this._element,Mt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,p(this._element),this._element.classList.add(Ft),this._element.classList.remove(jt,Bt);for(const e of this._triggerArray){const t=G.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ft),this._element.classList.add(jt),B.trigger(this._element,kt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Bt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Ht);for(const e of t){const t=G.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=G.find(Vt,this._config.parent);return G.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const r of t)r.classList.toggle("collapsed",!e),r.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const r=zt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t]()}}))}}B.on(document,Lt,Ht,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const e of G.getMultipleElementsFromSelector(this))zt.getOrCreateInstance(e,{toggle:!1}).toggle()})),y(zt);const Gt="dropdown",Xt=".bs.dropdown",$t=".data-api",Yt="ArrowUp",qt="ArrowDown",Zt=`hide${Xt}`,Kt=`hidden${Xt}`,Qt=`show${Xt}`,Jt=`shown${Xt}`,te=`click${Xt}${$t}`,ee=`keydown${Xt}${$t}`,re=`keyup${Xt}${$t}`,ne="show",oe='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ie=`${oe}.${ne}`,ae=".dropdown-menu",se=v()?"top-end":"top-start",ce=v()?"top-start":"top-end",ue=v()?"bottom-end":"bottom-start",le=v()?"bottom-start":"bottom-end",fe=v()?"left-start":"right-start",de=v()?"right-start":"left-start",he={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},pe={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class ge extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=G.next(this._element,ae)[0]||G.prev(this._element,ae)[0]||G.findOne(ae,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return he}static get DefaultType(){return pe}static get NAME(){return Gt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(f(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!B.trigger(this._element,Qt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))B.on(t,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ne),this._element.classList.add(ne),B.trigger(this._element,Jt,t)}}hide(){if(f(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!B.trigger(this._element,Zt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(ne),this._element.classList.remove(ne),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),B.trigger(this._element,Kt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!c(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Gt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:c(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=r.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(ne)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return fe;if(t.classList.contains("dropstart"))return de;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ce:se:e?le:ue}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(H.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..._(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const r=G.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>l(t)));r.length&&b(r,e,t===qt,!r.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=ge.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=G.find(ie);for(const r of e){const e=ge.getInstance(r);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),o=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!o||"outside"===e._config.autoClose&&o)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const i={relatedTarget:e._element};"click"===t.type&&(i.clickEvent=t),e._completeHide(i)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),r="Escape"===t.key,n=[Yt,qt].includes(t.key);if(!n&&!r)return;if(e&&!r)return;t.preventDefault();const o=this.matches(oe)?this:G.prev(this,oe)[0]||G.next(this,oe)[0]||G.findOne(oe,t.delegateTarget.parentNode),i=ge.getOrCreateInstance(o);if(n)return t.stopPropagation(),i.show(),void i._selectMenuItem(t);i._isShown()&&(t.stopPropagation(),i.hide(),o.focus())}}B.on(document,ee,oe,ge.dataApiKeydownHandler),B.on(document,ee,ae,ge.dataApiKeydownHandler),B.on(document,te,ge.clearMenus),B.on(document,re,ge.clearMenus),B.on(document,te,oe,(function(t){t.preventDefault(),ge.getOrCreateInstance(this).toggle()})),y(ge);const me="backdrop",ve="show",ye=`mousedown.bs.${me}`,_e={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},we={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class be extends U{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return _e}static get DefaultType(){return we}static get NAME(){return me}show(t){if(!this._config.isVisible)return void _(t);this._append();const e=this._getElement();this._config.isAnimated&&p(e),e.classList.add(ve),this._emulateAnimation((()=>{_(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(ve),this._emulateAnimation((()=>{this.dispose(),_(t)}))):_(t)}dispose(){this._isAppended&&(B.off(this._element,ye),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),B.on(t,ye,(()=>{_(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){w(t,this._getElement(),this._config.isAnimated)}}const Ce=".bs.focustrap",Ee=`focusin${Ce}`,Ae=`keydown.tab${Ce}`,Ie="backward",Se={autofocus:!0,trapElement:null},Oe={autofocus:"boolean",trapElement:"element"};class Te extends U{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Se}static get DefaultType(){return Oe}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),B.off(document,Ce),B.on(document,Ee,(t=>this._handleFocusin(t))),B.on(document,Ae,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,B.off(document,Ce))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const r=G.focusableChildren(e);0===r.length?e.focus():this._lastTabNavDirection===Ie?r[r.length-1].focus():r[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ie:"forward")}}const Ne=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",xe=".sticky-top",Re="padding-right",De="margin-right";class Pe{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Re,(e=>e+t)),this._setElementAttributes(Ne,Re,(e=>e+t)),this._setElementAttributes(xe,De,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Re),this._resetElementAttributes(Ne,Re),this._resetElementAttributes(xe,De)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,r){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${r(Number.parseFloat(o))}px`)}))}_saveInitialAttribute(t,e){const r=t.style.getPropertyValue(e);r&&H.setDataAttribute(t,e,r)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const r=H.getDataAttribute(t,e);null!==r?(H.removeDataAttribute(t,e),t.style.setProperty(e,r)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(c(t))e(t);else for(const r of G.find(t,this._element))e(r)}}const Me=".bs.modal",ke=`hide${Me}`,Le=`hidePrevented${Me}`,Be=`hidden${Me}`,je=`show${Me}`,Fe=`shown${Me}`,Ve=`resize${Me}`,He=`click.dismiss${Me}`,Ue=`mousedown.dismiss${Me}`,We=`keydown.dismiss${Me}`,ze=`click${Me}.data-api`,Ge="modal-open",Xe="show",$e="modal-static",Ye={backdrop:!0,focus:!0,keyboard:!0},qe={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ze extends W{constructor(t,e){super(t,e),this._dialog=G.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Pe,this._addEventListeners()}static get Default(){return Ye}static get DefaultType(){return qe}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||B.trigger(this._element,je,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ge),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(B.trigger(this._element,ke).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Xe),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){B.off(window,Me),B.off(this._dialog,Me),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new be({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Te({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=G.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),p(this._element),this._element.classList.add(Xe),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,B.trigger(this._element,Fe,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){B.on(this._element,We,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),B.on(window,Ve,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),B.on(this._element,Ue,(t=>{B.one(this._element,He,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ge),this._resetAdjustments(),this._scrollBar.reset(),B.trigger(this._element,Be)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(B.trigger(this._element,Le).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains($e)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add($e),this._queueCallback((()=>{this._element.classList.remove($e),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),r=e>0;if(r&&!t){const t=v()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!r&&t){const t=v()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const r=Ze.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===r[t])throw new TypeError(`No method named "${t}"`);r[t](e)}}))}}B.on(document,ze,'[data-bs-toggle="modal"]',(function(t){const e=G.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),B.one(e,je,(t=>{t.defaultPrevented||B.one(e,Be,(()=>{l(this)&&this.focus()}))}));const r=G.findOne(".modal.show");r&&Ze.getInstance(r).hide(),Ze.getOrCreateInstance(e).toggle(this)})),X(Ze),y(Ze);const Ke=".bs.offcanvas",Qe=".data-api",Je=`load${Ke}${Qe}`,tr="show",er="showing",rr="hiding",nr=".offcanvas.show",or=`show${Ke}`,ir=`shown${Ke}`,ar=`hide${Ke}`,sr=`hidePrevented${Ke}`,cr=`hidden${Ke}`,ur=`resize${Ke}`,lr=`click${Ke}${Qe}`,fr=`keydown.dismiss${Ke}`,dr={backdrop:!0,keyboard:!0,scroll:!1},hr={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pr extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return dr}static get DefaultType(){return hr}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||B.trigger(this._element,or,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Pe).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(er),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(tr),this._element.classList.remove(er),B.trigger(this._element,ir,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(B.trigger(this._element,ar).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(rr),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(tr,rr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Pe).reset(),B.trigger(this._element,cr)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new be({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():B.trigger(this._element,sr)}:null})}_initializeFocusTrap(){return new Te({trapElement:this._element})}_addEventListeners(){B.on(this._element,fr,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():B.trigger(this._element,sr))}))}static jQueryInterface(t){return this.each((function(){const e=pr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}B.on(document,lr,'[data-bs-toggle="offcanvas"]',(function(t){const e=G.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this))return;B.one(e,cr,(()=>{l(this)&&this.focus()}));const r=G.findOne(nr);r&&r!==e&&pr.getInstance(r).hide(),pr.getOrCreateInstance(e).toggle(this)})),B.on(window,Je,(()=>{for(const t of G.find(nr))pr.getOrCreateInstance(t).show()})),B.on(window,ur,(()=>{for(const t of G.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&pr.getOrCreateInstance(t).hide()})),X(pr),y(pr);const gr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},mr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),vr=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,yr=(t,e)=>{const r=t.nodeName.toLowerCase();return e.includes(r)?!mr.has(r)||Boolean(vr.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(r)))},_r={allowList:gr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},wr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},br={entry:"(string|element|function|null)",selector:"(string|element)"};class Cr extends U{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return _r}static get DefaultType(){return wr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[n,o]of Object.entries(this._config.content))this._setContent(t,o,n);const e=t.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&e.classList.add(...r.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,r]of Object.entries(t))super._typeCheckConfig({selector:e,entry:r},br)}_setContent(t,e,r){const n=G.findOne(r,t);n&&((e=this._resolvePossibleFunction(e))?c(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,r){if(!t.length)return t;if(r&&"function"==typeof r)return r(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...n.body.querySelectorAll("*"));for(const i of o){const t=i.nodeName.toLowerCase();if(!Object.keys(e).includes(t)){i.remove();continue}const r=[].concat(...i.attributes),n=[].concat(e["*"]||[],e[t]||[]);for(const e of r)yr(e,n)||i.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return _(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Er=new Set(["sanitize","allowList","sanitizeFn"]),Ar="fade",Ir="show",Sr=".modal",Or="hide.bs.modal",Tr="hover",Nr="focus",xr={AUTO:"auto",TOP:"top",RIGHT:v()?"left":"right",BOTTOM:"bottom",LEFT:v()?"right":"left"},Rr={allowList:gr,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Dr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Pr extends W{constructor(t,e){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Rr}static get DefaultType(){return Dr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),B.off(this._element.closest(Sr),Or,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=B.trigger(this._element,this.constructor.eventName("show")),e=(d(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(r),B.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(r),r.classList.add(Ir),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))B.on(o,"mouseover",h);this._queueCallback((()=>{B.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!B.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ir),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))B.off(t,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger[Nr]=!1,this._activeTrigger[Tr]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),B.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ar,Ir),e.classList.add(`bs-${this.constructor.NAME}-auto`);const r=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",r),this._isAnimated()&&e.classList.add(Ar),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Cr({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ar)}_isShown(){return this.tip&&this.tip.classList.contains(Ir)}_createPopper(t){const e=_(this._config.placement,[this,t,this._element]),n=xr[e.toUpperCase()];return r.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return _(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..._(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)B.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Tr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),r=e===Tr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");B.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Nr:Tr]=!0,e._enter()})),B.on(this._element,r,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Nr:Tr]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},B.on(this._element.closest(Sr),Or,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=H.getDataAttributes(this._element);for(const r of Object.keys(e))Er.has(r)&&delete e[r];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,r]of Object.entries(this._config))this.constructor.Default[e]!==r&&(t[e]=r);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Pr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}y(Pr);const Mr={...Pr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},kr={...Pr.DefaultType,content:"(null|string|element|function)"};class Lr extends Pr{static get Default(){return Mr}static get DefaultType(){return kr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Lr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}y(Lr);const Br=".bs.scrollspy",jr=`activate${Br}`,Fr=`click${Br}`,Vr=`load${Br}.data-api`,Hr="active",Ur="[href]",Wr=".nav-link",zr=`${Wr}, .nav-item > ${Wr}, .list-group-item`,Gr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Xr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $r extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Gr}static get DefaultType(){return Xr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(B.off(this._config.target,Fr),B.on(this._config.target,Fr,Ur,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const r=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(r.scrollTo)return void r.scrollTo({top:n,behavior:"smooth"});r.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),r=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,o=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const i of t){if(!i.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(i));continue}const t=i.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&t){if(r(i),!n)return}else o||t||r(i)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=G.find(Ur,this._config.target);for(const e of t){if(!e.hash||f(e))continue;const t=G.findOne(decodeURI(e.hash),this._element);l(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Hr),this._activateParents(t),B.trigger(this._element,jr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))G.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Hr);else for(const e of G.parents(t,".nav, .list-group"))for(const t of G.prev(e,zr))t.classList.add(Hr)}_clearActiveClass(t){t.classList.remove(Hr);const e=G.find(`${Ur}.${Hr}`,t);for(const r of e)r.classList.remove(Hr)}static jQueryInterface(t){return this.each((function(){const e=$r.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(window,Vr,(()=>{for(const t of G.find('[data-bs-spy="scroll"]'))$r.getOrCreateInstance(t)})),y($r);const Yr=".bs.tab",qr=`hide${Yr}`,Zr=`hidden${Yr}`,Kr=`show${Yr}`,Qr=`shown${Yr}`,Jr=`click${Yr}`,tn=`keydown${Yr}`,en=`load${Yr}`,rn="ArrowLeft",nn="ArrowRight",on="ArrowUp",an="ArrowDown",sn="Home",cn="End",un="active",ln="fade",fn="show",dn=":not(.dropdown-toggle)",hn='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',pn=`.nav-link${dn}, .list-group-item${dn}, [role="tab"]${dn}, ${hn}`,gn=`.${un}[data-bs-toggle="tab"], .${un}[data-bs-toggle="pill"], .${un}[data-bs-toggle="list"]`;class mn extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),B.on(this._element,tn,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),r=e?B.trigger(e,qr,{relatedTarget:t}):null;B.trigger(t,Kr,{relatedTarget:e}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(un),this._activate(G.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),B.trigger(t,Qr,{relatedTarget:e})):t.classList.add(fn)}),t,t.classList.contains(ln)))}_deactivate(t,e){t&&(t.classList.remove(un),t.blur(),this._deactivate(G.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),B.trigger(t,Zr,{relatedTarget:e})):t.classList.remove(fn)}),t,t.classList.contains(ln)))}_keydown(t){if(![rn,nn,on,an,sn,cn].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!f(t)));let r;if([sn,cn].includes(t.key))r=e[t.key===sn?0:e.length-1];else{const n=[nn,an].includes(t.key);r=b(e,t.target,n,!0)}r&&(r.focus({preventScroll:!0}),mn.getOrCreateInstance(r).show())}_getChildren(){return G.find(pn,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const r of e)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),r=this._getOuterElement(t);t.setAttribute("aria-selected",e),r!==t&&this._setAttributeIfNotExists(r,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=G.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const r=this._getOuterElement(t);if(!r.classList.contains("dropdown"))return;const n=(t,n)=>{const o=G.findOne(t,r);o&&o.classList.toggle(n,e)};n(".dropdown-toggle",un),n(".dropdown-menu",fn),r.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,r){t.hasAttribute(e)||t.setAttribute(e,r)}_elemIsActive(t){return t.classList.contains(un)}_getInnerElement(t){return t.matches(pn)?t:G.findOne(pn,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=mn.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}B.on(document,Jr,hn,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),f(this)||mn.getOrCreateInstance(this).show()})),B.on(window,en,(()=>{for(const t of G.find(gn))mn.getOrCreateInstance(t)})),y(mn);const vn=".bs.toast",yn=`mouseover${vn}`,_n=`mouseout${vn}`,wn=`focusin${vn}`,bn=`focusout${vn}`,Cn=`hide${vn}`,En=`hidden${vn}`,An=`show${vn}`,In=`shown${vn}`,Sn="hide",On="show",Tn="showing",Nn={animation:"boolean",autohide:"boolean",delay:"number"},xn={animation:!0,autohide:!0,delay:5e3};class Rn extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return xn}static get DefaultType(){return Nn}static get NAME(){return"toast"}show(){B.trigger(this._element,An).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Sn),p(this._element),this._element.classList.add(On,Tn),this._queueCallback((()=>{this._element.classList.remove(Tn),B.trigger(this._element,In),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(B.trigger(this._element,Cn).defaultPrevented||(this._element.classList.add(Tn),this._queueCallback((()=>{this._element.classList.add(Sn),this._element.classList.remove(Tn,On),B.trigger(this._element,En)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(On),super.dispose()}isShown(){return this._element.classList.contains(On)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const r=t.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){B.on(this._element,yn,(t=>this._onInteraction(t,!0))),B.on(this._element,_n,(t=>this._onInteraction(t,!1))),B.on(this._element,wn,(t=>this._onInteraction(t,!0))),B.on(this._element,bn,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Rn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}X(Rn),y(Rn)})(g($t));var Yt,qt={exports:{}},Zt={};var Kt,Qt={};
2
2
  /**
3
3
  * @license React
4
- * react-jsx-runtime.development.js
4
+ * react-jsx-runtime.production.min.js
5
5
  *
6
6
  * Copyright (c) Facebook, Inc. and its affiliates.
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */"production"===process.env.NODE_ENV?qt.exports=function(){if(Yt)return Zt;Yt=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(t,e,n){var s,c={},u=null,l=null;for(s in void 0!==n&&(u=""+n),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(l=e.ref),e)o.call(e,s)&&!a.hasOwnProperty(s)&&(c[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===c[s]&&(c[s]=e[s]);return{$$typeof:r,type:t,key:u,ref:l,props:c,_owner:i.current}}return Zt.Fragment=n,Zt.jsx=s,Zt.jsxs=s,Zt}():qt.exports=(Kt||(Kt=1,"production"!==process.env.NODE_ENV&&function(){var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,m="@@iterator",y=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];!function(t,e,r){var n=y.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(e+="%s",r=r.concat([n]));var o=r.map((function(t){return String(t)}));o.unshift("Warning: "+e),Function.prototype.apply.call(console[t],console,o)}("error",t,r)}var _,w=!1,b=!1,C=!1,E=!1,A=!1;function I(t){return t.displayName||"Context"}function S(t){if(null==t)return null;if("number"==typeof t.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case c:return I(t)+".Consumer";case s:return I(t._context)+".Provider";case u:return function(t,e,r){var n=t.displayName;if(n)return n;var o=e.displayName||e.name||"";return""!==o?r+"("+o+")":r}(t,t.render,"ForwardRef");case d:var e=t.displayName||null;return null!==e?e:S(t.type)||"Memo";case h:var r=t,p=r._payload,g=r._init;try{return S(g(p))}catch(m){return null}}return null}_=Symbol.for("react.module.reference");var O,T,N,x,R,D,P,M=Object.assign,k=0;function L(){}L.__reactDisabledLog=!0;var B,j=y.ReactCurrentDispatcher;function F(t,e,r){if(void 0===B)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return"\n"+B+t}var V,H=!1,U="function"==typeof WeakMap?WeakMap:Map;function W(t,e){if(!t||H)return"";var r,n=V.get(t);if(void 0!==n)return n;H=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=j.current,j.current=null,function(){if(0===k){O=console.log,T=console.info,N=console.warn,x=console.error,R=console.group,D=console.groupCollapsed,P=console.groupEnd;var t={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}k++}();try{if(e){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(p){r=p}Reflect.construct(t,[],a)}else{try{a.call()}catch(p){r=p}t.call(a.prototype)}}else{try{throw Error()}catch(p){r=p}t()}}catch(g){if(g&&r&&"string"==typeof g.stack){for(var s=g.stack.split("\n"),c=r.stack.split("\n"),u=s.length-1,l=c.length-1;u>=1&&l>=0&&s[u]!==c[l];)l--;for(;u>=1&&l>=0;u--,l--)if(s[u]!==c[l]){if(1!==u||1!==l)do{if(u--,--l<0||s[u]!==c[l]){var f="\n"+s[u].replace(" at new "," at ");return t.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",t.displayName)),"function"==typeof t&&V.set(t,f),f}}while(u>=1&&l>=0);break}}}finally{H=!1,j.current=o,function(){if(0==--k){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},t,{value:O}),info:M({},t,{value:T}),warn:M({},t,{value:N}),error:M({},t,{value:x}),group:M({},t,{value:R}),groupCollapsed:M({},t,{value:D}),groupEnd:M({},t,{value:P})})}k<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=t?t.displayName||t.name:"",h=d?F(d):"";return"function"==typeof t&&V.set(t,h),h}function z(t,e,r){if(null==t)return"";if("function"==typeof t)return W(t,!(!(n=t.prototype)||!n.isReactComponent));var n;if("string"==typeof t)return F(t);switch(t){case l:return F("Suspense");case f:return F("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case u:return W(t.render,!1);case d:return z(t.type,e,r);case h:var o=t,i=o._payload,a=o._init;try{return z(a(i),e,r)}catch(s){}}return""}V=new U;var G=Object.prototype.hasOwnProperty,X={},$=y.ReactDebugCurrentFrame;function Y(t){if(t){var e=t._owner,r=z(t.type,t._source,e?e.type:null);$.setExtraStackFrame(r)}else $.setExtraStackFrame(null)}var q=Array.isArray;function Z(t){return q(t)}function K(t){return""+t}function Q(t){if(function(t){try{return K(t),!1}catch(e){return!0}}(t))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(t){return"function"==typeof Symbol&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}(t)),K(t)}var J,tt,et,rt=y.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0};et={};var ot=function(t,e,n,o,i,a,s){var c={$$typeof:r,type:t,key:e,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function it(t,e,r,n,o){var i,a={},s=null,c=null;for(i in void 0!==r&&(Q(r),s=""+r),function(t){if(G.call(t,"key")){var e=Object.getOwnPropertyDescriptor(t,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==t.key}(e)&&(Q(e.key),s=""+e.key),function(t){if(G.call(t,"ref")){var e=Object.getOwnPropertyDescriptor(t,"ref").get;if(e&&e.isReactWarning)return!1}return void 0!==t.ref}(e)&&(c=e.ref,function(t,e){if("string"==typeof t.ref&&rt.current&&e&&rt.current.stateNode!==e){var r=S(rt.current.type);et[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(rt.current.type),t.ref),et[r]=!0)}}(e,o)),e)G.call(e,i)&&!nt.hasOwnProperty(i)&&(a[i]=e[i]);if(t&&t.defaultProps){var u=t.defaultProps;for(i in u)void 0===a[i]&&(a[i]=u[i])}if(s||c){var l="function"==typeof t?t.displayName||t.name||"Unknown":t;s&&function(t,e){var r=function(){J||(J=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};r.isReactWarning=!0,Object.defineProperty(t,"key",{get:r,configurable:!0})}(a,l),c&&function(t,e){var r=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};r.isReactWarning=!0,Object.defineProperty(t,"ref",{get:r,configurable:!0})}(a,l)}return ot(t,s,c,o,n,rt.current,a)}var at,st=y.ReactCurrentOwner,ct=y.ReactDebugCurrentFrame;function ut(t){if(t){var e=t._owner,r=z(t.type,t._source,e?e.type:null);ct.setExtraStackFrame(r)}else ct.setExtraStackFrame(null)}function lt(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}function ft(){if(st.current){var t=S(st.current.type);if(t)return"\n\nCheck the render method of `"+t+"`."}return""}at=!1;var dt={};function ht(t,e){if(t._store&&!t._store.validated&&null==t.key){t._store.validated=!0;var r=function(t){var e=ft();if(!e){var r="string"==typeof t?t:t.displayName||t.name;r&&(e="\n\nCheck the top-level render call using <"+r+">.")}return e}(e);if(!dt[r]){dt[r]=!0;var n="";t&&t._owner&&t._owner!==st.current&&(n=" It was passed a child from "+S(t._owner.type)+"."),ut(t),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),ut(null)}}}function pt(t,e){if("object"==typeof t)if(Z(t))for(var r=0;r<t.length;r++){var n=t[r];lt(n)&&ht(n,e)}else if(lt(t))t._store&&(t._store.validated=!0);else if(t){var o=function(t){if(null===t||"object"!=typeof t)return null;var e=g&&t[g]||t[m];return"function"==typeof e?e:null}(t);if("function"==typeof o&&o!==t.entries)for(var i,a=o.call(t);!(i=a.next()).done;)lt(i.value)&&ht(i.value,e)}}function gt(t){var e,r=t.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)e=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==u&&r.$$typeof!==d)return;e=r.propTypes}if(e){var n=S(r);!function(t,e,r,n,o){var i=Function.call.bind(G);for(var a in t)if(i(t,a)){var s=void 0;try{if("function"!=typeof t[a]){var c=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}s=t[a](e,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){s=u}!s||s instanceof Error||(Y(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,typeof s),Y(null)),s instanceof Error&&!(s.message in X)&&(X[s.message]=!0,Y(o),v("Failed %s type: %s",r,s.message),Y(null))}}(e,t.props,"prop",n,t)}else void 0===r.PropTypes||at||(at=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(r)||"Unknown"));"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mt(t,e,n,g,m,y){var I=function(t){return"string"==typeof t||"function"==typeof t||!!(t===o||t===a||A||t===i||t===l||t===f||E||t===p||w||b||C)||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===d||t.$$typeof===s||t.$$typeof===c||t.$$typeof===u||t.$$typeof===_||void 0!==t.getModuleId)}(t);if(!I){var O="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T,N=function(t){return void 0!==t?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":""}(m);O+=N||ft(),null===t?T="null":Z(t)?T="array":void 0!==t&&t.$$typeof===r?(T="<"+(S(t.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):T=typeof t,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,O)}var x=it(t,e,n,m,y);if(null==x)return x;if(I){var R=e.children;if(void 0!==R)if(g)if(Z(R)){for(var D=0;D<R.length;D++)pt(R[D],t);Object.freeze&&Object.freeze(R)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else pt(R,t)}return t===o?function(t){for(var e=Object.keys(t.props),r=0;r<e.length;r++){var n=e[r];if("children"!==n&&"key"!==n){ut(t),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ut(null);break}}null!==t.ref&&(ut(t),v("Invalid attribute `ref` supplied to `React.Fragment`."),ut(null))}(x):gt(x),x}var yt=function(t,e,r){return mt(t,e,r,!1)},vt=function(t,e,r){return mt(t,e,r,!0)};Qt.Fragment=o,Qt.jsx=yt,Qt.jsxs=vt}()),Qt);var Jt=qt.exports;const te=e.createContext({modalList:[],theme:"light"}),ee="sys/theme";function re(){const t=e.useContext(te);if(!(null==t?void 0:t.addModal))throw new Error("'ModalProvider' não encontrado!");return t}const ne={Alerta:1,Aviso:2,Confirmacao:3},oe="jc-alert-hide-sb";function ie({type:t=ne.Aviso,onConfirm:o,onCancel:i,title:a,text:s="",children:c,defaultBtn:u=2}){const l=e.useRef(),f=e.useRef(),{addModal:d,removeModal:h}=re(),[p]=e.useState("alert-"+r.random());let g="jc-erro";switch(t){case ne.Aviso:g="jc-aviso";break;case ne.Confirmacao:g="jc-conf"}const m=e.useCallback((e=>{t===ne.Confirmacao&&("KeyS"===e.code&&o&&o(),"KeyN"===e.code&&i&&i())}),[i,o,t]);return e.useEffect((()=>(t===ne.Confirmacao?d(p,i):d(p,o),()=>h(p))),[]),e.useEffect((()=>{var t;null==(t=null==l?void 0:l.current)||t.focus()}),[l]),e.useEffect((()=>(document.addEventListener("keydown",m,!1),document.body.classList.add(oe),()=>{document.removeEventListener("keydown",m,!1),document.body.classList.remove(oe)})),[m]),Jt.jsx(n.motion.div,{className:"jc-alert--container",ref:f,children:Jt.jsxs(n.motion.div,{className:"jc-alert "+g,drag:!0,dragConstraints:f,dragElastic:.1,dragMomentum:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[Jt.jsx("div",{className:"jc-close-button",onClick:function(){t===ne.Confirmacao?i():o()},children:Jt.jsx("i",{className:"fa-solid fa-xmark"})}),Jt.jsxs("div",{className:"jc-alert-header",children:[Jt.jsxs("div",{className:"icon",children:[t===ne.Aviso&&Jt.jsx("i",{className:"fa-solid fa-check"}),t===ne.Alerta&&Jt.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),t===ne.Confirmacao&&Jt.jsx("i",{className:"fas fa-question"})]}),Jt.jsx("div",{className:"jc-alert-title",children:a})]}),Jt.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?Jt.jsx("span",{dangerouslySetInnerHTML:{__html:s.replaceAll("\n","<br/>")}}):Jt.jsx(Jt.Fragment,{children:c})}),Jt.jsxs("div",{className:"jc-alert-buttons",children:[(t===ne.Alerta||t===ne.Aviso)&&Jt.jsx("button",{ref:l,type:"button",className:"btn btn-confirm",onClick:o,children:"OK"}),t===ne.Confirmacao&&Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:o,tabIndex:99,ref:1===u?l:null,children:[Jt.jsx("u",{children:"S"}),"im"]}),Jt.jsxs("button",{type:"button",className:"btn btn-confirm btn-nao",onClick:i,tabIndex:98,ref:2===u?l:null,children:[Jt.jsx("u",{children:"N"}),"ão"]})]})]})]})})}function ae({onConfirm:t,text:e="",children:r}){return Jt.jsx(ie,{type:ne.Alerta,title:"Atenção!",text:e,onConfirm:t,children:r})}const se={baseURL:"",timeout:3e4,auth:{username:"",password:"",prefix:"Bearer",header:"x-auth"},loginRoute:"/",ident:"",isProductionMode:!0,getToken:()=>"",setToken:t=>console.error("*** setToken() is not defined ***",t),afterRequest:t=>{}};const ce=o.div`
10
+ */"production"===process.env.NODE_ENV?qt.exports=function(){if(Kt)return Qt;Kt=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(t,e,n){var s,c={},u=null,l=null;for(s in void 0!==n&&(u=""+n),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(l=e.ref),e)o.call(e,s)&&!a.hasOwnProperty(s)&&(c[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===c[s]&&(c[s]=e[s]);return{$$typeof:r,type:t,key:u,ref:l,props:c,_owner:i.current}}return Qt.Fragment=n,Qt.jsx=s,Qt.jsxs=s,Qt}():qt.exports=(Yt||(Yt=1,"production"!==process.env.NODE_ENV&&function(){var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,m="@@iterator",v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];!function(t,e,r){var n=v.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(e+="%s",r=r.concat([n]));var o=r.map((function(t){return String(t)}));o.unshift("Warning: "+e),Function.prototype.apply.call(console[t],console,o)}("error",t,r)}var _,w=!1,b=!1,C=!1,E=!1,A=!1;function I(t){return t.displayName||"Context"}function S(t){if(null==t)return null;if("number"==typeof t.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case c:return I(t)+".Consumer";case s:return I(t._context)+".Provider";case u:return function(t,e,r){var n=t.displayName;if(n)return n;var o=e.displayName||e.name||"";return""!==o?r+"("+o+")":r}(t,t.render,"ForwardRef");case d:var e=t.displayName||null;return null!==e?e:S(t.type)||"Memo";case h:var r=t,p=r._payload,g=r._init;try{return S(g(p))}catch(m){return null}}return null}_=Symbol.for("react.module.reference");var O,T,N,x,R,D,P,M=Object.assign,k=0;function L(){}L.__reactDisabledLog=!0;var B,j=v.ReactCurrentDispatcher;function F(t,e,r){if(void 0===B)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return"\n"+B+t}var V,H=!1,U="function"==typeof WeakMap?WeakMap:Map;function W(t,e){if(!t||H)return"";var r,n=V.get(t);if(void 0!==n)return n;H=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=j.current,j.current=null,function(){if(0===k){O=console.log,T=console.info,N=console.warn,x=console.error,R=console.group,D=console.groupCollapsed,P=console.groupEnd;var t={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}k++}();try{if(e){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(p){r=p}Reflect.construct(t,[],a)}else{try{a.call()}catch(p){r=p}t.call(a.prototype)}}else{try{throw Error()}catch(p){r=p}t()}}catch(g){if(g&&r&&"string"==typeof g.stack){for(var s=g.stack.split("\n"),c=r.stack.split("\n"),u=s.length-1,l=c.length-1;u>=1&&l>=0&&s[u]!==c[l];)l--;for(;u>=1&&l>=0;u--,l--)if(s[u]!==c[l]){if(1!==u||1!==l)do{if(u--,--l<0||s[u]!==c[l]){var f="\n"+s[u].replace(" at new "," at ");return t.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",t.displayName)),"function"==typeof t&&V.set(t,f),f}}while(u>=1&&l>=0);break}}}finally{H=!1,j.current=o,function(){if(0==--k){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},t,{value:O}),info:M({},t,{value:T}),warn:M({},t,{value:N}),error:M({},t,{value:x}),group:M({},t,{value:R}),groupCollapsed:M({},t,{value:D}),groupEnd:M({},t,{value:P})})}k<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=t?t.displayName||t.name:"",h=d?F(d):"";return"function"==typeof t&&V.set(t,h),h}function z(t,e,r){if(null==t)return"";if("function"==typeof t)return W(t,!(!(n=t.prototype)||!n.isReactComponent));var n;if("string"==typeof t)return F(t);switch(t){case l:return F("Suspense");case f:return F("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case u:return W(t.render,!1);case d:return z(t.type,e,r);case h:var o=t,i=o._payload,a=o._init;try{return z(a(i),e,r)}catch(s){}}return""}V=new U;var G=Object.prototype.hasOwnProperty,X={},$=v.ReactDebugCurrentFrame;function Y(t){if(t){var e=t._owner,r=z(t.type,t._source,e?e.type:null);$.setExtraStackFrame(r)}else $.setExtraStackFrame(null)}var q=Array.isArray;function Z(t){return q(t)}function K(t){return""+t}function Q(t){if(function(t){try{return K(t),!1}catch(e){return!0}}(t))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(t){return"function"==typeof Symbol&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}(t)),K(t)}var J,tt,et,rt=v.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0};et={};var ot=function(t,e,n,o,i,a,s){var c={$$typeof:r,type:t,key:e,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function it(t,e,r,n,o){var i,a={},s=null,c=null;for(i in void 0!==r&&(Q(r),s=""+r),function(t){if(G.call(t,"key")){var e=Object.getOwnPropertyDescriptor(t,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==t.key}(e)&&(Q(e.key),s=""+e.key),function(t){if(G.call(t,"ref")){var e=Object.getOwnPropertyDescriptor(t,"ref").get;if(e&&e.isReactWarning)return!1}return void 0!==t.ref}(e)&&(c=e.ref,function(t,e){if("string"==typeof t.ref&&rt.current&&e&&rt.current.stateNode!==e){var r=S(rt.current.type);et[r]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(rt.current.type),t.ref),et[r]=!0)}}(e,o)),e)G.call(e,i)&&!nt.hasOwnProperty(i)&&(a[i]=e[i]);if(t&&t.defaultProps){var u=t.defaultProps;for(i in u)void 0===a[i]&&(a[i]=u[i])}if(s||c){var l="function"==typeof t?t.displayName||t.name||"Unknown":t;s&&function(t,e){var r=function(){J||(J=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};r.isReactWarning=!0,Object.defineProperty(t,"key",{get:r,configurable:!0})}(a,l),c&&function(t,e){var r=function(){tt||(tt=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};r.isReactWarning=!0,Object.defineProperty(t,"ref",{get:r,configurable:!0})}(a,l)}return ot(t,s,c,o,n,rt.current,a)}var at,st=v.ReactCurrentOwner,ct=v.ReactDebugCurrentFrame;function ut(t){if(t){var e=t._owner,r=z(t.type,t._source,e?e.type:null);ct.setExtraStackFrame(r)}else ct.setExtraStackFrame(null)}function lt(t){return"object"==typeof t&&null!==t&&t.$$typeof===r}function ft(){if(st.current){var t=S(st.current.type);if(t)return"\n\nCheck the render method of `"+t+"`."}return""}at=!1;var dt={};function ht(t,e){if(t._store&&!t._store.validated&&null==t.key){t._store.validated=!0;var r=function(t){var e=ft();if(!e){var r="string"==typeof t?t:t.displayName||t.name;r&&(e="\n\nCheck the top-level render call using <"+r+">.")}return e}(e);if(!dt[r]){dt[r]=!0;var n="";t&&t._owner&&t._owner!==st.current&&(n=" It was passed a child from "+S(t._owner.type)+"."),ut(t),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),ut(null)}}}function pt(t,e){if("object"==typeof t)if(Z(t))for(var r=0;r<t.length;r++){var n=t[r];lt(n)&&ht(n,e)}else if(lt(t))t._store&&(t._store.validated=!0);else if(t){var o=function(t){if(null===t||"object"!=typeof t)return null;var e=g&&t[g]||t[m];return"function"==typeof e?e:null}(t);if("function"==typeof o&&o!==t.entries)for(var i,a=o.call(t);!(i=a.next()).done;)lt(i.value)&&ht(i.value,e)}}function gt(t){var e,r=t.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)e=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==u&&r.$$typeof!==d)return;e=r.propTypes}if(e){var n=S(r);!function(t,e,r,n,o){var i=Function.call.bind(G);for(var a in t)if(i(t,a)){var s=void 0;try{if("function"!=typeof t[a]){var c=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}s=t[a](e,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){s=u}!s||s instanceof Error||(Y(o),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,typeof s),Y(null)),s instanceof Error&&!(s.message in X)&&(X[s.message]=!0,Y(o),y("Failed %s type: %s",r,s.message),Y(null))}}(e,t.props,"prop",n,t)}else void 0===r.PropTypes||at||(at=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(r)||"Unknown"));"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mt(t,e,n,g,m,v){var I=function(t){return"string"==typeof t||"function"==typeof t||!!(t===o||t===a||A||t===i||t===l||t===f||E||t===p||w||b||C)||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===d||t.$$typeof===s||t.$$typeof===c||t.$$typeof===u||t.$$typeof===_||void 0!==t.getModuleId)}(t);if(!I){var O="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T,N=function(t){return void 0!==t?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":""}(m);O+=N||ft(),null===t?T="null":Z(t)?T="array":void 0!==t&&t.$$typeof===r?(T="<"+(S(t.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):T=typeof t,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,O)}var x=it(t,e,n,m,v);if(null==x)return x;if(I){var R=e.children;if(void 0!==R)if(g)if(Z(R)){for(var D=0;D<R.length;D++)pt(R[D],t);Object.freeze&&Object.freeze(R)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else pt(R,t)}return t===o?function(t){for(var e=Object.keys(t.props),r=0;r<e.length;r++){var n=e[r];if("children"!==n&&"key"!==n){ut(t),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ut(null);break}}null!==t.ref&&(ut(t),y("Invalid attribute `ref` supplied to `React.Fragment`."),ut(null))}(x):gt(x),x}var vt=function(t,e,r){return mt(t,e,r,!1)},yt=function(t,e,r){return mt(t,e,r,!0)};Zt.Fragment=o,Zt.jsx=vt,Zt.jsxs=yt}()),Zt);var Jt=qt.exports;const te=e.createContext({modalList:[],theme:"light"}),ee="sys/theme";function re(){const t=e.useContext(te);if(!(null==t?void 0:t.addModal))throw new Error("'ModalProvider' não encontrado!");return t}const ne={Alerta:1,Aviso:2,Confirmacao:3},oe="jc-alert-hide-sb";function ie({type:t=ne.Aviso,onConfirm:o,onCancel:i,title:a,text:s="",children:c,defaultBtn:u=2}){const l=e.useRef(),f=e.useRef(),{addModal:d,removeModal:h}=re(),[p]=e.useState("alert-"+r.random());let g="jc-erro";switch(t){case ne.Aviso:g="jc-aviso";break;case ne.Confirmacao:g="jc-conf"}const m=e.useCallback((e=>{t===ne.Confirmacao&&("KeyS"===e.code&&o&&o(),"KeyN"===e.code&&i&&i())}),[i,o,t]);return e.useEffect((()=>(t===ne.Confirmacao?d(p,i):d(p,o),()=>h(p))),[]),e.useEffect((()=>{var t;null==(t=null==l?void 0:l.current)||t.focus()}),[l]),e.useEffect((()=>(document.addEventListener("keydown",m,!1),document.body.classList.add(oe),()=>{document.removeEventListener("keydown",m,!1),document.body.classList.remove(oe)})),[m]),Jt.jsx(n.motion.div,{className:"jc-alert--container",ref:f,children:Jt.jsxs(n.motion.div,{className:"jc-alert "+g,drag:!0,dragConstraints:f,dragElastic:.1,dragMomentum:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[Jt.jsx("div",{className:"jc-close-button",onClick:function(){t===ne.Confirmacao?i():o()},children:Jt.jsx("i",{className:"fa-solid fa-xmark"})}),Jt.jsxs("div",{className:"jc-alert-header",children:[Jt.jsxs("div",{className:"icon",children:[t===ne.Aviso&&Jt.jsx("i",{className:"fa-solid fa-check"}),t===ne.Alerta&&Jt.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),t===ne.Confirmacao&&Jt.jsx("i",{className:"fas fa-question"})]}),Jt.jsx("div",{className:"jc-alert-title",children:a})]}),Jt.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?Jt.jsx("span",{dangerouslySetInnerHTML:{__html:s.replaceAll("\n","<br/>")}}):Jt.jsx(Jt.Fragment,{children:c})}),Jt.jsxs("div",{className:"jc-alert-buttons",children:[(t===ne.Alerta||t===ne.Aviso)&&Jt.jsx("button",{ref:l,type:"button",className:"btn btn-confirm",onClick:o,children:"OK"}),t===ne.Confirmacao&&Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:o,tabIndex:99,ref:1===u?l:null,children:[Jt.jsx("u",{children:"S"}),"im"]}),Jt.jsxs("button",{type:"button",className:"btn btn-confirm btn-nao",onClick:i,tabIndex:98,ref:2===u?l:null,children:[Jt.jsx("u",{children:"N"}),"ão"]})]})]})]})})}function ae({onConfirm:t,text:e="",children:r}){return Jt.jsx(ie,{type:ne.Alerta,title:"Atenção!",text:e,onConfirm:t,children:r})}const se={baseURL:"",timeout:3e4,auth:{username:"",password:"",prefix:"Bearer",header:"x-auth"},loginRoute:"/",ident:"",isProductionMode:!0,getToken:()=>"",setToken:t=>console.error("*** setToken() is not defined ***",t),afterRequest:t=>{}};const ce=o.div`
11
11
  @media (max-width: 767px) {
12
12
  overflow-x: auto;
13
13
  }
@@ -173,20 +173,20 @@
173
173
  border-radius: 3px;
174
174
  color: ${t=>t.value?"#fff":""};
175
175
  background-color: ${t=>t.value?"#346fdd":"#fff"};
176
- `,fe=({value:t,money:e,decimalScale:r,...n})=>Jt.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:r,minimumFractionDigits:r,style:e?"currency":"decimal",currency:"BRL"}).format(t)});fe.defaultProps={value:0,money:!0,decimalScale:2};const de=({value:t,decimalScale:e,...r})=>Jt.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:e,minimumFractionDigits:e,style:"decimal"}).format(t)});de.defaultProps={value:0,decimalScale:2};const he=({value:t,decimalScale:e,...r})=>Jt.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:e,minimumFractionDigits:e,style:"decimal"}).format(t)+"%"});he.defaultProps={value:0,decimalScale:2};var pe,ge={exports:{}},me={exports:{}},ye={};var ve,_e,we,be,Ce,Ee,Ae,Ie,Se,Oe,Te,Ne,xe,Re,De={};
176
+ `,fe=({value:t,money:e,decimalScale:r,...n})=>Jt.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:r,minimumFractionDigits:r,style:e?"currency":"decimal",currency:"BRL"}).format(t)});fe.defaultProps={value:0,money:!0,decimalScale:2};const de=({value:t,decimalScale:e,...r})=>Jt.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:e,minimumFractionDigits:e,style:"decimal"}).format(t)});de.defaultProps={value:0,decimalScale:2};const he=({value:t,decimalScale:e,...r})=>Jt.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:e,minimumFractionDigits:e,style:"decimal"}).format(t)+"%"});he.defaultProps={value:0,decimalScale:2};var pe,ge,me,ve,ye={exports:{}};function _e(){if(ge)return pe;ge=1;return pe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}var we,be={exports:{}},Ce={};var Ee,Ae,Ie,Se,Oe,Te,Ne,xe,Re,De,Pe={};
177
177
  /** @license React v16.13.1
178
- * react-is.development.js
178
+ * react-is.production.min.js
179
179
  *
180
180
  * Copyright (c) Facebook, Inc. and its affiliates.
181
181
  *
182
182
  * This source code is licensed under the MIT license found in the
183
183
  * LICENSE file in the root directory of this source tree.
184
- */function Pe(){return _e||(_e=1,"production"===process.env.NODE_ENV?me.exports=function(){if(pe)return ye;pe=1;var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,l=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function _(t){if("object"==typeof t&&null!==t){var d=t.$$typeof;switch(d){case e:switch(t=t.type){case c:case u:case n:case i:case o:case f:return t;default:switch(t=t&&t.$$typeof){case s:case l:case p:case h:case a:return t;default:return d}}case r:return d}}}function w(t){return _(t)===u}return ye.AsyncMode=c,ye.ConcurrentMode=u,ye.ContextConsumer=s,ye.ContextProvider=a,ye.Element=e,ye.ForwardRef=l,ye.Fragment=n,ye.Lazy=p,ye.Memo=h,ye.Portal=r,ye.Profiler=i,ye.StrictMode=o,ye.Suspense=f,ye.isAsyncMode=function(t){return w(t)||_(t)===c},ye.isConcurrentMode=w,ye.isContextConsumer=function(t){return _(t)===s},ye.isContextProvider=function(t){return _(t)===a},ye.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},ye.isForwardRef=function(t){return _(t)===l},ye.isFragment=function(t){return _(t)===n},ye.isLazy=function(t){return _(t)===p},ye.isMemo=function(t){return _(t)===h},ye.isPortal=function(t){return _(t)===r},ye.isProfiler=function(t){return _(t)===i},ye.isStrictMode=function(t){return _(t)===o},ye.isSuspense=function(t){return _(t)===f},ye.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===u||t===i||t===o||t===f||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===m||t.$$typeof===y||t.$$typeof===v||t.$$typeof===g)},ye.typeOf=_,ye}():me.exports=(ve||(ve=1,"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,l=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function _(t){if("object"==typeof t&&null!==t){var d=t.$$typeof;switch(d){case e:var g=t.type;switch(g){case c:case u:case n:case i:case o:case f:return g;default:var m=g&&g.$$typeof;switch(m){case s:case l:case p:case h:case a:return m;default:return d}}case r:return d}}}var w=c,b=u,C=s,E=a,A=e,I=l,S=n,O=p,T=h,N=r,x=i,R=o,D=f,P=!1;function M(t){return _(t)===u}De.AsyncMode=w,De.ConcurrentMode=b,De.ContextConsumer=C,De.ContextProvider=E,De.Element=A,De.ForwardRef=I,De.Fragment=S,De.Lazy=O,De.Memo=T,De.Portal=N,De.Profiler=x,De.StrictMode=R,De.Suspense=D,De.isAsyncMode=function(t){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(t)||_(t)===c},De.isConcurrentMode=M,De.isContextConsumer=function(t){return _(t)===s},De.isContextProvider=function(t){return _(t)===a},De.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},De.isForwardRef=function(t){return _(t)===l},De.isFragment=function(t){return _(t)===n},De.isLazy=function(t){return _(t)===p},De.isMemo=function(t){return _(t)===h},De.isPortal=function(t){return _(t)===r},De.isProfiler=function(t){return _(t)===i},De.isStrictMode=function(t){return _(t)===o},De.isSuspense=function(t){return _(t)===f},De.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===u||t===i||t===o||t===f||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===m||t.$$typeof===y||t.$$typeof===v||t.$$typeof===g)},De.typeOf=_}()),De)),me.exports}
184
+ */function Me(){return Ae||(Ae=1,"production"===process.env.NODE_ENV?be.exports=function(){if(Ee)return Pe;Ee=1;var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,l=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,y=t?Symbol.for("react.scope"):60119;function _(t){if("object"==typeof t&&null!==t){var d=t.$$typeof;switch(d){case e:switch(t=t.type){case c:case u:case n:case i:case o:case f:return t;default:switch(t=t&&t.$$typeof){case s:case l:case p:case h:case a:return t;default:return d}}case r:return d}}}function w(t){return _(t)===u}return Pe.AsyncMode=c,Pe.ConcurrentMode=u,Pe.ContextConsumer=s,Pe.ContextProvider=a,Pe.Element=e,Pe.ForwardRef=l,Pe.Fragment=n,Pe.Lazy=p,Pe.Memo=h,Pe.Portal=r,Pe.Profiler=i,Pe.StrictMode=o,Pe.Suspense=f,Pe.isAsyncMode=function(t){return w(t)||_(t)===c},Pe.isConcurrentMode=w,Pe.isContextConsumer=function(t){return _(t)===s},Pe.isContextProvider=function(t){return _(t)===a},Pe.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Pe.isForwardRef=function(t){return _(t)===l},Pe.isFragment=function(t){return _(t)===n},Pe.isLazy=function(t){return _(t)===p},Pe.isMemo=function(t){return _(t)===h},Pe.isPortal=function(t){return _(t)===r},Pe.isProfiler=function(t){return _(t)===i},Pe.isStrictMode=function(t){return _(t)===o},Pe.isSuspense=function(t){return _(t)===f},Pe.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===u||t===i||t===o||t===f||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===m||t.$$typeof===v||t.$$typeof===y||t.$$typeof===g)},Pe.typeOf=_,Pe}():be.exports=(we||(we=1,"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,l=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,y=t?Symbol.for("react.scope"):60119;function _(t){if("object"==typeof t&&null!==t){var d=t.$$typeof;switch(d){case e:var g=t.type;switch(g){case c:case u:case n:case i:case o:case f:return g;default:var m=g&&g.$$typeof;switch(m){case s:case l:case p:case h:case a:return m;default:return d}}case r:return d}}}var w=c,b=u,C=s,E=a,A=e,I=l,S=n,O=p,T=h,N=r,x=i,R=o,D=f,P=!1;function M(t){return _(t)===u}Ce.AsyncMode=w,Ce.ConcurrentMode=b,Ce.ContextConsumer=C,Ce.ContextProvider=E,Ce.Element=A,Ce.ForwardRef=I,Ce.Fragment=S,Ce.Lazy=O,Ce.Memo=T,Ce.Portal=N,Ce.Profiler=x,Ce.StrictMode=R,Ce.Suspense=D,Ce.isAsyncMode=function(t){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(t)||_(t)===c},Ce.isConcurrentMode=M,Ce.isContextConsumer=function(t){return _(t)===s},Ce.isContextProvider=function(t){return _(t)===a},Ce.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Ce.isForwardRef=function(t){return _(t)===l},Ce.isFragment=function(t){return _(t)===n},Ce.isLazy=function(t){return _(t)===p},Ce.isMemo=function(t){return _(t)===h},Ce.isPortal=function(t){return _(t)===r},Ce.isProfiler=function(t){return _(t)===i},Ce.isStrictMode=function(t){return _(t)===o},Ce.isSuspense=function(t){return _(t)===f},Ce.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===u||t===i||t===o||t===f||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===m||t.$$typeof===v||t.$$typeof===y||t.$$typeof===g)},Ce.typeOf=_}()),Ce)),be.exports}
185
185
  /*
186
186
  object-assign
187
187
  (c) Sindre Sorhus
188
188
  @license MIT
189
- */function Me(){if(be)return we;be=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return we=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}()?Object.assign:function(n,o){for(var i,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(n),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))e.call(i,u)&&(s[u]=i[u]);if(t){a=t(i);for(var l=0;l<a.length;l++)r.call(i,a[l])&&(s[a[l]]=i[a[l]])}}return s},we}function ke(){if(Ee)return Ce;Ee=1;return Ce="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Le(){return Ie?Ae:(Ie=1,Ae=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Be=Pe();ge.exports=function(){if(Ne)return Te;Ne=1;var t=Pe(),e=Me(),r=ke(),n=Le(),o=function(){if(Oe)return Se;Oe=1;var t=function(){};if("production"!==process.env.NODE_ENV){var e=ke(),r={},n=Le();t=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(r){}}}function o(o,i,a,s,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(n(o,u)){var l;try{if("function"!=typeof o[u]){var f=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}l=o[u](i,u,s,a,null,e)}catch(h){l=h}if(!l||l instanceof Error||t((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in r)){r[l.message]=!0;var d=c?c():"";t("Failed "+a+" type: "+l.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},Se=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(r){}}),Te=function(s,c){var u="function"==typeof Symbol&&Symbol.iterator,l="@@iterator",f="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:g(a),arrayOf:function(t){return g((function(e,n,o,i,a){if("function"!=typeof t)return new p("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=e[n];if(!Array.isArray(s))return new p("Invalid "+i+" `"+a+"` of type `"+_(s)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<s.length;c++){var u=t(s,c,o,i,a+"["+c+"]",r);if(u instanceof Error)return u}return null}))},element:g((function(t,e,r,n,o){var i=t[e];return s(i)?null:new p("Invalid "+n+" `"+o+"` of type `"+_(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:g((function(e,r,n,o,i){var a=e[r];return t.isValidElementType(a)?null:new p("Invalid "+o+" `"+i+"` of type `"+_(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(t){return g((function(e,r,n,o,i){if(!(e[r]instanceof t)){var a=t.name||f;return new p("Invalid "+o+" `"+i+"` of type `"+((s=e[r]).constructor&&s.constructor.name?s.constructor.name:f)+"` supplied to `"+n+"`, expected instance of `"+a+"`.")}var s;return null}))},node:g((function(t,e,r,n,o){return v(t[e])?null:new p("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(t){return g((function(e,o,i,a,s){if("function"!=typeof t)return new p("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var c=e[o],u=_(c);if("object"!==u)return new p("Invalid "+a+" `"+s+"` of type `"+u+"` supplied to `"+i+"`, expected an object.");for(var l in c)if(n(c,l)){var f=t(c,l,i,a,s+"."+l,r);if(f instanceof Error)return f}return null}))},oneOf:function(t){return Array.isArray(t)?g((function(e,r,n,o,i){for(var a=e[r],s=0;s<t.length;s++)if(h(a,t[s]))return null;var c=JSON.stringify(t,(function(t,e){return"symbol"===w(e)?String(e):e}));return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+n+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var e=0;e<t.length;e++){var o=t[e];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(o)+" at index "+e+"."),a}return g((function(e,o,i,a,s){for(var c=[],u=0;u<t.length;u++){var l=(0,t[u])(e,o,i,a,s,r);if(null==l)return null;l.data&&n(l.data,"expectedType")&&c.push(l.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(t){return g((function(e,n,o,i,a){var s=e[n],c=_(s);if("object"!==c)return new p("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in t){var l=t[u];if("function"!=typeof l)return y(o,i,a,u,w(l));var f=l(s,u,o,i,a+"."+u,r);if(f)return f}return null}))},exact:function(t){return g((function(o,i,a,s,c){var u=o[i],l=_(u);if("object"!==l)return new p("Invalid "+s+" `"+c+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");var f=e({},o[i],t);for(var d in f){var h=t[d];if(n(t,d)&&"function"!=typeof h)return y(a,s,c,d,w(h));if(!h)return new p("Invalid "+s+" `"+c+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var g=h(u,d,a,s,c+"."+d,r);if(g)return g}return null}))}};function h(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function p(t,e){this.message=t,this.data=e&&"object"==typeof e?e:{},this.stack=""}function g(t){if("production"!==process.env.NODE_ENV)var e={},n=0;function o(o,a,s,u,l,d,h){if(u=u||f,d=d||s,h!==r){if(c){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=u+":"+s;!e[m]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),e[m]=!0,n++)}}return null==a[s]?o?null===a[s]?new p("The "+l+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+l+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:t(a,s,u,l,d)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(t){return g((function(e,r,n,o,i,a){var s=e[r];return _(s)!==t?new p("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+n+"`, expected `"+t+"`.",{expectedType:t}):null}))}function y(t,e,r,n,o){return new p((t||"React class")+": "+e+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(v);if(null===t||s(t))return!0;var e=function(t){var e=t&&(u&&t[u]||t[l]);if("function"==typeof e)return e}(t);if(!e)return!1;var r,n=e.call(t);if(e!==t.entries){for(;!(r=n.next()).done;)if(!v(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function _(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||!!e&&("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}(e,t)?"symbol":e}function w(t){if(null==t)return""+t;var e=_(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function b(t){var e=w(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}return p.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Te}()(Be.isElement,!0)}else ge.exports=function(){if(Re)return xe;Re=1;var t=ke();function e(){}function r(){}return r.resetWarningCache=e,xe=function(){function n(e,r,n,o,i,a){if(a!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i}}()();const je=p(ge.exports);function Fe({title:t,items:r,size:n,children:o,direction:s="start",color:c,dados:u}){const l=a.useHistory(),[f,d]=e.useState(!1);return Jt.jsxs(i.Dropdown,{isOpen:f,toggle:()=>{d((t=>!t))},direction:s,size:n,title:t,children:[Jt.jsxs(i.DropdownMenu,{className:"left-shadow",style:{backgroundColor:"var(--ddm-body-bg)"},children:[t&&Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(i.DropdownItem,{header:!0,children:Jt.jsx("strong",{className:"fs-6 text-body",children:t})}),Jt.jsx(i.DropdownItem,{divider:!0})]}),r&&r.map(((t,e)=>t.isLine?Jt.jsx(i.DropdownItem,{divider:!0},e):Jt.jsx(i.DropdownItem,{disabled:t.disabled,onClick:()=>{var e;(e=t).route?l.push(e.route,!0):e.onClick(u)},children:Jt.jsxs("div",{className:"dropdown-btn--opt-area","data-disabled":Boolean(t.disabled),children:[Jt.jsx("span",{children:t.icon}),Jt.jsx("div",{children:t.title})]})},e)))]}),Jt.jsx(i.DropdownToggle,{color:c||"secondary",children:o})]})}function Ve({colunas:t,incColActions:e=!0}){return t?Jt.jsx("thead",{children:Jt.jsxs("tr",{children:[t.filter((t=>"color"!==t.campo)).map(((t,e)=>"boolean"!=typeof t.visible||t.visible?Jt.jsx("th",{className:(null==t?void 0:t.className)||"",style:{textAlign:ze(t)},children:t.titulo},e):null)),e&&Jt.jsx("th",{})]})}):null}function He({colunas:t,acoes:e,opcoes:r,dados:n,colorir:o}){var i;const a=(null==(i=null==e?void 0:e.acoes)?void 0:i.length)||"auto";return n&&0!==(null==n?void 0:n.length)?Jt.jsx("tbody",{children:null==n?void 0:n.map(((n,i)=>{var s;return Jt.jsxs("tr",{children:[null==t?void 0:t.map(((t,e)=>"boolean"!=typeof t.visible||t.visible?Jt.jsxs("td",{className:t.className||"",style:{textAlign:ze(t),fontWeight:t.campoChave||t.bold?"bold":"normal",width:t.campoChave?65:t.largura||"auto",color:o&&n.color||"var(--bs-body-color)"},children:[t.titulo&&Jt.jsxs("span",{className:"titulo",children:[t.titulo,": "]}),Jt.jsxs(We,{children:["function"==typeof t.campo&&t.campo(n),"string"==typeof t.campo&&(t.campo2?Jt.jsxs("div",{className:"col-campo2",children:[Jt.jsx("strong",{children:n[t.campo]}),Jt.jsx("div",{children:t.campo2&&n[t.campo2]})]}):t.money?Jt.jsx(fe,{value:n[t.campo]}):"boolean"==typeof n[t.campo]?Jt.jsx(Ue,{value:n[t.campo]}):n[t.campo])]})]},e):null)),e&&Jt.jsx("td",{className:"acoes",style:{width:a},children:Jt.jsxs("div",{className:"acoes-layout",children:[null==(s=null==e?void 0:e.acoes)?void 0:s.map(((t,r)=>Jt.jsx("span",{onClick:()=>{var r,o;(null==(o=null==(r=null==t?void 0:t.botao)?void 0:r.props)?void 0:o.disabled)||t.funcao(n[e.campo],n,i)},children:t.botao},r))),r&&Jt.jsx("span",{children:Jt.jsx(Fe,{items:r,size:"sm",title:"Opções",dados:n,children:Jt.jsx("i",{className:"fas fa-ellipsis-h"})})})]})})]},i)}))}):null}Fe.propTypes={direction:je.string};const Ue=({value:t})=>Jt.jsx(le,{value:t,children:t?Jt.jsx("i",{className:"fas fa-check"}):Jt.jsx("i",{children:" "})}),We=({children:t})=>Jt.jsx(Jt.Fragment,{children:"boolean"==typeof t?!0===t?"Sim":"Não":t}),ze=t=>{let e="left";return("float"===t.tipo||"currency"===t.tipo||t.money)&&(e="right"),t.campoChave&&(e="center"),t.align&&(e=t.align),e};o.div`
189
+ */function ke(){if(Se)return Ie;Se=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return Ie=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}()?Object.assign:function(n,o){for(var i,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(n),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))e.call(i,u)&&(s[u]=i[u]);if(t){a=t(i);for(var l=0;l<a.length;l++)r.call(i,a[l])&&(s[a[l]]=i[a[l]])}}return s},Ie}function Le(){return Te?Oe:(Te=1,Oe=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Be=Me();ye.exports=function(){if(De)return Re;De=1;var t=Me(),e=ke(),r=_e(),n=Le(),o=function(){if(xe)return Ne;xe=1;var t=function(){};if("production"!==process.env.NODE_ENV){var e=_e(),r={},n=Le();t=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(r){}}}function o(o,i,a,s,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(n(o,u)){var l;try{if("function"!=typeof o[u]){var f=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}l=o[u](i,u,s,a,null,e)}catch(h){l=h}if(!l||l instanceof Error||t((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in r)){r[l.message]=!0;var d=c?c():"";t("Failed "+a+" type: "+l.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},Ne=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(r){}}),Re=function(s,c){var u="function"==typeof Symbol&&Symbol.iterator,l="@@iterator",f="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:g(a),arrayOf:function(t){return g((function(e,n,o,i,a){if("function"!=typeof t)return new p("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=e[n];if(!Array.isArray(s))return new p("Invalid "+i+" `"+a+"` of type `"+_(s)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<s.length;c++){var u=t(s,c,o,i,a+"["+c+"]",r);if(u instanceof Error)return u}return null}))},element:g((function(t,e,r,n,o){var i=t[e];return s(i)?null:new p("Invalid "+n+" `"+o+"` of type `"+_(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:g((function(e,r,n,o,i){var a=e[r];return t.isValidElementType(a)?null:new p("Invalid "+o+" `"+i+"` of type `"+_(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(t){return g((function(e,r,n,o,i){if(!(e[r]instanceof t)){var a=t.name||f;return new p("Invalid "+o+" `"+i+"` of type `"+((s=e[r]).constructor&&s.constructor.name?s.constructor.name:f)+"` supplied to `"+n+"`, expected instance of `"+a+"`.")}var s;return null}))},node:g((function(t,e,r,n,o){return y(t[e])?null:new p("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(t){return g((function(e,o,i,a,s){if("function"!=typeof t)return new p("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var c=e[o],u=_(c);if("object"!==u)return new p("Invalid "+a+" `"+s+"` of type `"+u+"` supplied to `"+i+"`, expected an object.");for(var l in c)if(n(c,l)){var f=t(c,l,i,a,s+"."+l,r);if(f instanceof Error)return f}return null}))},oneOf:function(t){return Array.isArray(t)?g((function(e,r,n,o,i){for(var a=e[r],s=0;s<t.length;s++)if(h(a,t[s]))return null;var c=JSON.stringify(t,(function(t,e){return"symbol"===w(e)?String(e):e}));return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+n+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var e=0;e<t.length;e++){var o=t[e];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(o)+" at index "+e+"."),a}return g((function(e,o,i,a,s){for(var c=[],u=0;u<t.length;u++){var l=(0,t[u])(e,o,i,a,s,r);if(null==l)return null;l.data&&n(l.data,"expectedType")&&c.push(l.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(t){return g((function(e,n,o,i,a){var s=e[n],c=_(s);if("object"!==c)return new p("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in t){var l=t[u];if("function"!=typeof l)return v(o,i,a,u,w(l));var f=l(s,u,o,i,a+"."+u,r);if(f)return f}return null}))},exact:function(t){return g((function(o,i,a,s,c){var u=o[i],l=_(u);if("object"!==l)return new p("Invalid "+s+" `"+c+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");var f=e({},o[i],t);for(var d in f){var h=t[d];if(n(t,d)&&"function"!=typeof h)return v(a,s,c,d,w(h));if(!h)return new p("Invalid "+s+" `"+c+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var g=h(u,d,a,s,c+"."+d,r);if(g)return g}return null}))}};function h(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function p(t,e){this.message=t,this.data=e&&"object"==typeof e?e:{},this.stack=""}function g(t){if("production"!==process.env.NODE_ENV)var e={},n=0;function o(o,a,s,u,l,d,h){if(u=u||f,d=d||s,h!==r){if(c){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=u+":"+s;!e[m]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),e[m]=!0,n++)}}return null==a[s]?o?null===a[s]?new p("The "+l+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+l+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:t(a,s,u,l,d)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(t){return g((function(e,r,n,o,i,a){var s=e[r];return _(s)!==t?new p("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+n+"`, expected `"+t+"`.",{expectedType:t}):null}))}function v(t,e,r,n,o){return new p((t||"React class")+": "+e+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(y);if(null===t||s(t))return!0;var e=function(t){var e=t&&(u&&t[u]||t[l]);if("function"==typeof e)return e}(t);if(!e)return!1;var r,n=e.call(t);if(e!==t.entries){for(;!(r=n.next()).done;)if(!y(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function _(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||!!e&&("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}(e,t)?"symbol":e}function w(t){if(null==t)return""+t;var e=_(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function b(t){var e=w(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}return p.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Re}()(Be.isElement,!0)}else ye.exports=function(){if(ve)return me;ve=1;var t=_e();function e(){}function r(){}return r.resetWarningCache=e,me=function(){function n(e,r,n,o,i,a){if(a!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i}}()();const je=p(ye.exports);function Fe({title:t,items:r,size:n,children:o,direction:s="start",color:c,dados:u}){const l=a.useHistory(),[f,d]=e.useState(!1);return Jt.jsxs(i.Dropdown,{isOpen:f,toggle:()=>{d((t=>!t))},direction:s,size:n,title:t,children:[Jt.jsxs(i.DropdownMenu,{className:"left-shadow",style:{backgroundColor:"var(--ddm-body-bg)"},children:[t&&Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(i.DropdownItem,{header:!0,children:Jt.jsx("strong",{className:"fs-6 text-body",children:t})}),Jt.jsx(i.DropdownItem,{divider:!0})]}),r&&r.map(((t,e)=>t.isLine?Jt.jsx(i.DropdownItem,{divider:!0},e):Jt.jsx(i.DropdownItem,{disabled:t.disabled,onClick:()=>{var e;(e=t).route?l.push(e.route,!0):e.onClick(u)},children:Jt.jsxs("div",{className:"dropdown-btn--opt-area","data-disabled":Boolean(t.disabled),children:[Jt.jsx("span",{children:t.icon}),Jt.jsx("div",{children:t.title})]})},e)))]}),Jt.jsx(i.DropdownToggle,{color:c||"secondary",children:o})]})}function Ve({colunas:t,incColActions:e=!0}){return t?Jt.jsx("thead",{children:Jt.jsxs("tr",{children:[t.filter((t=>"color"!==t.campo)).map(((t,e)=>"boolean"!=typeof t.visible||t.visible?Jt.jsx("th",{className:(null==t?void 0:t.className)||"",style:{textAlign:ze(t)},children:t.titulo},e):null)),e&&Jt.jsx("th",{})]})}):null}function He({colunas:t,acoes:e,opcoes:r,dados:n,colorir:o}){var i;const a=(null==(i=null==e?void 0:e.acoes)?void 0:i.length)||"auto";return n&&0!==(null==n?void 0:n.length)?Jt.jsx("tbody",{children:null==n?void 0:n.map(((n,i)=>{var s;return Jt.jsxs("tr",{children:[null==t?void 0:t.map(((t,e)=>"boolean"!=typeof t.visible||t.visible?Jt.jsxs("td",{className:t.className||"",style:{textAlign:ze(t),fontWeight:t.campoChave||t.bold?"bold":"normal",width:t.campoChave?65:t.largura||"auto",color:o&&n.color||"var(--bs-body-color)"},children:[t.titulo&&Jt.jsxs("span",{className:"titulo",children:[t.titulo,": "]}),Jt.jsxs(We,{children:["function"==typeof t.campo&&t.campo(n),"string"==typeof t.campo&&(t.campo2?Jt.jsxs("div",{className:"col-campo2",children:[Jt.jsx("strong",{children:n[t.campo]}),Jt.jsx("div",{children:t.campo2&&n[t.campo2]})]}):t.money?Jt.jsx(fe,{value:n[t.campo]}):"boolean"==typeof n[t.campo]?Jt.jsx(Ue,{value:n[t.campo]}):n[t.campo])]})]},e):null)),e&&Jt.jsx("td",{className:"acoes",style:{width:a},children:Jt.jsxs("div",{className:"acoes-layout",children:[null==(s=null==e?void 0:e.acoes)?void 0:s.map(((t,r)=>Jt.jsx("span",{onClick:()=>{var r,o;(null==(o=null==(r=null==t?void 0:t.botao)?void 0:r.props)?void 0:o.disabled)||t.funcao(n[e.campo],n,i)},children:t.botao},r))),r&&Jt.jsx("span",{children:Jt.jsx(Fe,{items:r,size:"sm",title:"Opções",dados:n,children:Jt.jsx("i",{className:"fas fa-ellipsis-h"})})})]})})]},i)}))}):null}Fe.propTypes={direction:je.string};const Ue=({value:t})=>Jt.jsx(le,{value:t,children:t?Jt.jsx("i",{className:"fas fa-check"}):Jt.jsx("i",{children:" "})}),We=({children:t})=>Jt.jsx(Jt.Fragment,{children:"boolean"==typeof t?!0===t?"Sim":"Não":t}),ze=t=>{let e="left";return("float"===t.tipo||"currency"===t.tipo||t.money)&&(e="right"),t.campoChave&&(e="center"),t.align&&(e=t.align),e};o.div`
190
190
  display: inline-block;
191
191
  width: 27px;
192
192
  height: 25px;
@@ -379,7 +379,7 @@
379
379
  @media (max-width: 340px) {
380
380
  right: calc(50vw - 24px);
381
381
  }
382
- `;function fr({smooth:t}){const[r,n]=e.useState(!1);function o(){var t;n((null==(t=document.querySelector("main"))?void 0:t.scrollTop)>0)}return e.useEffect((()=>{var t;return null==(t=document.querySelector("main"))||t.addEventListener("scroll",o),()=>{var t;null==(t=document.querySelector("main"))||t.removeEventListener("scroll",o)}}),[]),Jt.jsx(Jt.Fragment,{children:r&&Jt.jsx(lr,{title:"Ir para o início da tela",visible:o,onClick:function(){var e;null==(e=document.querySelector("main"))||e.scrollTo({top:0,left:0,behavior:t?"smooth":"instant"}),n(!1)},className:"pulsate-bck",children:Jt.jsx("i",{className:"fa-solid fa-arrow-up"})})})}fr.defaultProps={smooth:!1};let dr;function hr(t){return Jt.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:Jt.jsx("path",{fill:"currentColor",d:"M6.225 4.811a1 1 0 00-1.414 1.414L10.586 12 4.81 17.775a1 1 0 101.414 1.414L12 13.414l5.775 5.775a1 1 0 001.414-1.414L13.414 12l5.775-5.775a1 1 0 00-1.414-1.414L12 10.586 6.225 4.81z"})})}function pr(t){return Jt.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:Jt.jsx("path",{fill:"currentColor",d:"M2 6a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM2 12.032a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM3 17.064a1 1 0 100 2h18a1 1 0 000-2H3z"})})}const gr=o.div`
382
+ `;function fr({smooth:t}){const[r,n]=e.useState(!1);function o(){var t;n((null==(t=document.querySelector("main"))?void 0:t.scrollTop)>0)}return e.useEffect((()=>{var t;return null==(t=document.querySelector("main"))||t.addEventListener("scroll",o),()=>{var t;null==(t=document.querySelector("main"))||t.removeEventListener("scroll",o)}}),[]),Jt.jsx(Jt.Fragment,{children:r&&Jt.jsx(lr,{title:"Ir para o início da tela",visible:o,onClick:function(){var e;null==(e=document.querySelector("main"))||e.scrollTo({top:0,left:0,behavior:t?"smooth":"instant"}),n(!1)},className:"pulsate-bck",children:Jt.jsx("i",{className:"fa-solid fa-arrow-up"})})})}let dr;function hr(t){return Jt.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:Jt.jsx("path",{fill:"currentColor",d:"M6.225 4.811a1 1 0 00-1.414 1.414L10.586 12 4.81 17.775a1 1 0 101.414 1.414L12 13.414l5.775 5.775a1 1 0 001.414-1.414L13.414 12l5.775-5.775a1 1 0 00-1.414-1.414L12 10.586 6.225 4.81z"})})}function pr(t){return Jt.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:Jt.jsx("path",{fill:"currentColor",d:"M2 6a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM2 12.032a1 1 0 011-1h18a1 1 0 110 2H3a1 1 0 01-1-1zM3 17.064a1 1 0 100 2h18a1 1 0 000-2H3z"})})}fr.defaultProps={smooth:!1};const gr=o.div`
383
383
  display: flex;
384
384
  justify-content: space-between;
385
385
  align-items: center;
@@ -414,18 +414,18 @@
414
414
  display: none;
415
415
  }
416
416
  }
417
- `;function mr({title:t,count:e,goBack:r,goHome:n,onClose:o,children:i,className:s="",...c}){const u=a.useHistory(),l=e&&"number"==typeof e?e:0,f=l>5e3?"5000+":l,d=Intl.NumberFormat("pt-br",{}).format(l),h=()=>{if(o)return o();r?u.goBack():u.push("/home")};return Jt.jsxs("div",{className:"panel--container bg-body "+s,...c,children:[Jt.jsxs(gr,{children:[Jt.jsxs("div",{className:"pn-title",children:[Jt.jsx("div",{className:"d-none d-sm-block",children:(r||n||o)&&Jt.jsx(ur,{title:"Fechar",onClick:h})}),t,0!==l&&Jt.jsx("span",{className:"pn-count",title:`Total de registros: ${d}`,children:f})]}),(r||n||o)&&Jt.jsx(cr,{title:"Fechar",onClick:h})]}),Jt.jsx("div",{className:"pn-body",children:i})]})}function yr({fileTo:t,previewUrl:n,visible:o,setVisible:i}){const{addModal:a,removeModal:s}=re(),[c]=e.useState("preview-"+r.random());return e.useEffect((()=>(o||s(c),()=>s(c))),[o]),e.useEffect((()=>{a(c,i)}),[c]),Jt.jsxs("div",{className:"pr-box",children:[Jt.jsxs("div",{className:"pr-box--header",children:[Jt.jsxs("div",{className:"pr-box--title",children:[Jt.jsxs("div",{className:"pr-box--name",children:[Jt.jsx("div",{children:"Visualizar relatório:"}),Jt.jsx("div",{className:"fw-bold",children:t})]}),Jt.jsx("div",{children:Jt.jsx("a",{href:n,download:t,children:"Salvar relatório"})})]}),Jt.jsx("button",{className:"ms-4 btn btn-danger rounded-pill",onClick:i,children:Jt.jsx(rr,{})})]}),Jt.jsx("iframe",{className:"pr-box--preview",src:n})]})}function vr(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _r={exports:{}};
417
+ `;function mr({title:t,count:e,goBack:r,goHome:n,onClose:o,children:i,className:s="",...c}){const u=a.useHistory(),l=e&&"number"==typeof e?e:0,f=l>5e3?"5000+":l,d=Intl.NumberFormat("pt-br",{}).format(l),h=()=>{if(o)return o();r?u.goBack():u.push("/home")};return Jt.jsxs("div",{className:"panel--container bg-body "+s,...c,children:[Jt.jsxs(gr,{children:[Jt.jsxs("div",{className:"pn-title",children:[Jt.jsx("div",{className:"d-none d-sm-block",children:(r||n||o)&&Jt.jsx(ur,{title:"Fechar",onClick:h})}),t,0!==l&&Jt.jsx("span",{className:"pn-count",title:`Total de registros: ${d}`,children:f})]}),(r||n||o)&&Jt.jsx(cr,{title:"Fechar",onClick:h})]}),Jt.jsx("div",{className:"pn-body",children:i})]})}function vr({fileTo:t,previewUrl:n,visible:o,setVisible:i}){const{addModal:a,removeModal:s}=re(),[c]=e.useState("preview-"+r.random());return e.useEffect((()=>(o||s(c),()=>s(c))),[o]),e.useEffect((()=>{a(c,i)}),[c]),Jt.jsxs("div",{className:"pr-box",children:[Jt.jsxs("div",{className:"pr-box--header",children:[Jt.jsxs("div",{className:"pr-box--title",children:[Jt.jsxs("div",{className:"pr-box--name",children:[Jt.jsx("div",{children:"Visualizar relatório:"}),Jt.jsx("div",{className:"fw-bold",children:t})]}),Jt.jsx("div",{children:Jt.jsx("a",{href:n,download:t,children:"Salvar relatório"})})]}),Jt.jsx("button",{className:"ms-4 btn btn-danger rounded-pill",onClick:i,children:Jt.jsx(rr,{})})]}),Jt.jsx("iframe",{className:"pr-box--preview",src:n})]})}function yr(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _r={exports:{}};
418
418
  /*!
419
419
  localForage -- Offline Storage, Improved
420
420
  Version 1.10.0
421
421
  https://localforage.github.io/localForage
422
422
  (c) 2013-2017 Mozilla, Apache License 2.0
423
- */!function(t,e){t.exports=function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){if(!s&&vr)return vr(a);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};e[a][0].call(u.exports,(function(t){var r=e[a][1][t];return o(r||t)}),u,u.exports,t,e,r,n)}return r[a].exports}for(var i=vr,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(t,e,r){(function(t){var r,n,o=t.MutationObserver||t.WebKitMutationObserver;if(o){var i=0,a=new o(l),s=t.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=i=++i%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var c=new t.MessageChannel;c.port1.onmessage=l,r=function(){c.port2.postMessage(0)}}var u=[];function l(){var t,e;n=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t<r;)e[t]();r=u.length}n=!1}function f(t){1!==u.push(t)||n||r()}e.exports=f}).call(this,void 0!==h?h:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,r){var n=t(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],c=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,t!==o&&h(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(t,e,r){n((function(){var n;try{n=e(r)}catch(o){return i.reject(t,o)}n===t?i.reject(t,new TypeError("Cannot resolve promise with itself")):i.resolve(t,n)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function h(t,e){var r=!1;function n(e){r||(r=!0,i.reject(t,e))}function o(e){r||(r=!0,i.resolve(t,e))}function a(){e(o,n)}var s=p(a);"error"===s.status&&n(s.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(n){r.status="error",r.value=n}return r}function g(t){return t instanceof this?t:i.resolve(new this(o),t)}function m(t){var e=new this(o);return i.reject(e,t)}function y(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),s=0,c=-1,u=new this(o);++c<r;)l(t[c],c);return u;function l(t,o){function c(t){a[o]=t,++s!==r||n||(n=!0,i.resolve(u,a))}e.resolve(t).then(c,(function(t){n||(n=!0,i.reject(u,t))}))}}function v(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var a=-1,s=new this(o);++a<r;)c(t[a]);return s;function c(t){e.resolve(t).then((function(t){n||(n=!0,i.resolve(s,t))}),(function(t){n||(n=!0,i.reject(s,t))}))}}e.exports=u,u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===s||"function"!=typeof e&&this.state===a)return this;var r=new this.constructor(o);return this.state!==c?f(r,this.state===s?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){i.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){f(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){i.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){f(this.promise,this.onRejected,t)},i.resolve=function(t,e){var r=p(d,e);if("error"===r.status)return i.reject(t,r.value);var n=r.value;if(n)h(t,n);else{t.state=s,t.outcome=e;for(var o=-1,a=t.queue.length;++o<a;)t.queue[o].callFulfilled(e)}return t},i.reject=function(t,e){t.state=a,t.outcome=e;for(var r=-1,n=t.queue.length;++r<n;)t.queue[r].callRejected(e);return t},u.resolve=g,u.reject=m,u.all=y,u.race=v},{1:1}],3:[function(t,e,r){(function(e){"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==h?h:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,r){var n="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};function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}var a=i();function s(){try{if(!a||!a.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(r){return!1}}function c(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(o){if("TypeError"!==o.name)throw o;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)r.append(t[n]);return r.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var u=Promise;function l(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function f(t,e,r){"function"==typeof e&&t.then(e),"function"==typeof r&&t.catch(r)}function d(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",g=void 0,m={},y=Object.prototype.toString,v="readonly",_="readwrite";function w(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),o=0;o<e;o++)n[o]=t.charCodeAt(o);return r}function b(t){return new u((function(e){var r=t.transaction(p,_),n=c([""]);r.objectStore(p).put(n,"key"),r.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},r.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);e(r||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}function C(t){return"boolean"==typeof g?u.resolve(g):b(t).then((function(t){return g=t}))}function E(t){var e=m[t.name],r={};r.promise=new u((function(t,e){r.resolve=t,r.reject=e})),e.deferredOperations.push(r),e.dbReady?e.dbReady=e.dbReady.then((function(){return r.promise})):e.dbReady=r.promise}function A(t){var e=m[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function I(t,e){var r=m[t.name].deferredOperations.pop();if(r)return r.reject(e),r.promise}function S(t,e){return new u((function(r,n){if(m[t.name]=m[t.name]||L(),t.db){if(!e)return r(t.db);E(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var i=a.open.apply(a,o);e&&(i.onupgradeneeded=function(e){var r=i.result;try{r.createObjectStore(t.storeName),e.oldVersion<=1&&r.createObjectStore(p)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),i.onerror=function(t){t.preventDefault(),n(i.error)},i.onsuccess=function(){var e=i.result;e.onversionchange=function(t){t.target.close()},r(e),A(t)}}))}function O(t){return S(t,!1)}function T(t){return S(t,!0)}function N(t,e){if(!t.db)return!0;var r=!t.db.objectStoreNames.contains(t.storeName),n=t.version<t.db.version,o=t.version>t.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),o||r){if(r){var i=t.db.version+1;i>t.version&&(t.version=i)}return!0}return!1}function x(t){return new u((function(e,r){var n=new FileReader;n.onerror=r,n.onloadend=function(r){var n=btoa(r.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:t.type})},n.readAsBinaryString(t)}))}function R(t){return c([w(atob(t.data))],{type:t.type})}function D(t){return t&&t.__local_forage_encoded_blob}function P(t){var e=this,r=e._initReady().then((function(){var t=m[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return f(r,t,t),r}function M(t){E(t);for(var e=m[t.name],r=e.forages,n=0;n<r.length;n++){var o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return t.db=null,O(t).then((function(e){return t.db=e,N(t)?T(t):e})).then((function(n){t.db=e.db=n;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=n})).catch((function(e){throw I(t,e),e}))}function k(t,e,r,n){void 0===n&&(n=1);try{var o=t.db.transaction(t.storeName,e);r(null,o)}catch(i){if(n>0&&(!t.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return u.resolve().then((function(){if(!t.db||"NotFoundError"===i.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),T(t)})).then((function(){return M(t).then((function(){k(t,e,r,n-1)}))})).catch(r);r(i)}}function L(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(t){var e=this,r={db:null};if(t)for(var n in t)r[n]=t[n];var o=m[r.name];o||(o=L(),m[r.name]=o),o.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=P);var i=[];function a(){return u.resolve()}for(var s=0;s<o.forages.length;s++){var c=o.forages[s];c!==e&&i.push(c._initReady().catch(a))}var l=o.forages.slice(0);return u.all(i).then((function(){return r.db=o.db,O(r)})).then((function(t){return r.db=t,N(r,e._defaultConfig.version)?T(r):t})).then((function(t){r.db=o.db=t,e._dbInfo=r;for(var n=0;n<l.length;n++){var i=l[n];i!==e&&(i._dbInfo.db=r.db,i._dbInfo.version=r.version)}}))}function j(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){k(r._dbInfo,v,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).get(t);a.onsuccess=function(){var t=a.result;void 0===t&&(t=null),D(t)&&(t=R(t)),e(t)},a.onerror=function(){n(a.error)}}catch(s){n(s)}}))})).catch(n)}));return l(n,e),n}function F(t,e){var r=this,n=new u((function(e,n){r.ready().then((function(){k(r._dbInfo,v,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var r=a.result;if(r){var n=r.value;D(n)&&(n=R(n));var o=t(n,r.key,s++);void 0!==o?e(o):r.continue()}else e()},a.onerror=function(){n(a.error)}}catch(c){n(c)}}))})).catch(n)}));return l(n,e),n}function V(t,e,r){var n=this;t=d(t);var o=new u((function(r,o){var i;n.ready().then((function(){return i=n._dbInfo,"[object Blob]"===y.call(e)?C(i.db).then((function(t){return t?e:x(e)})):e})).then((function(e){k(n._dbInfo,_,(function(i,a){if(i)return o(i);try{var s=a.objectStore(n._dbInfo.storeName);null===e&&(e=void 0);var c=s.put(e,t);a.oncomplete=function(){void 0===e&&(e=null),r(e)},a.onabort=a.onerror=function(){var t=c.error?c.error:c.transaction.error;o(t)}}catch(u){o(u)}}))})).catch(o)}));return l(o,r),o}function H(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){k(r._dbInfo,_,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).delete(t);i.oncomplete=function(){e()},i.onerror=function(){n(a.error)},i.onabort=function(){var t=a.error?a.error:a.transaction.error;n(t)}}catch(s){n(s)}}))})).catch(n)}));return l(n,e),n}function U(t){var e=this,r=new u((function(t,r){e.ready().then((function(){k(e._dbInfo,_,(function(n,o){if(n)return r(n);try{var i=o.objectStore(e._dbInfo.storeName).clear();o.oncomplete=function(){t()},o.onabort=o.onerror=function(){var t=i.error?i.error:i.transaction.error;r(t)}}catch(a){r(a)}}))})).catch(r)}));return l(r,t),r}function W(t){var e=this,r=new u((function(t,r){e.ready().then((function(){k(e._dbInfo,v,(function(n,o){if(n)return r(n);try{var i=o.objectStore(e._dbInfo.storeName).count();i.onsuccess=function(){t(i.result)},i.onerror=function(){r(i.error)}}catch(a){r(a)}}))})).catch(r)}));return l(r,t),r}function z(t,e){var r=this,n=new u((function(e,n){t<0?e(null):r.ready().then((function(){k(r._dbInfo,v,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName),s=!1,c=a.openKeyCursor();c.onsuccess=function(){var r=c.result;r?0===t||s?e(r.key):(s=!0,r.advance(t)):e(null)},c.onerror=function(){n(c.error)}}catch(u){n(u)}}))})).catch(n)}));return l(n,e),n}function G(t){var e=this,r=new u((function(t,r){e.ready().then((function(){k(e._dbInfo,v,(function(n,o){if(n)return r(n);try{var i=o.objectStore(e._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var e=i.result;e?(a.push(e.key),e.continue()):t(a)},i.onerror=function(){r(i.error)}}catch(s){r(s)}}))})).catch(r)}));return l(r,t),r}function X(t,e){e=h.apply(this,arguments);var r=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||r.name,t.storeName=t.storeName||r.storeName);var n,o=this;if(t.name){var i=t.name===r.name&&o._dbInfo.db?u.resolve(o._dbInfo.db):O(t).then((function(e){var r=m[t.name],n=r.forages;r.db=e;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=e;return e}));n=t.storeName?i.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var r=e.version+1;E(t);var n=m[t.name],o=n.forages;e.close();for(var i=0;i<o.length;i++){var s=o[i];s._dbInfo.db=null,s._dbInfo.version=r}return new u((function(e,n){var o=a.open(t.name,r);o.onerror=function(t){o.result.close(),n(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<o.length;e++){var r=o[e];r._dbInfo.db=t,A(r._dbInfo)}})).catch((function(e){throw(I(t,e)||u.resolve()).catch((function(){})),e}))}})):i.then((function(e){E(t);var r=m[t.name],n=r.forages;e.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new u((function(e,r){var n=a.deleteDatabase(t.name);n.onerror=function(){var t=n.result;t&&t.close(),r(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},n.onsuccess=function(){var t=n.result;t&&t.close(),e(t)}})).then((function(t){r.db=t;for(var e=0;e<n.length;e++)A(n[e]._dbInfo)})).catch((function(e){throw(I(t,e)||u.resolve()).catch((function(){})),e}))}))}else n=u.reject("Invalid arguments");return l(n,e),n}var $={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:F,getItem:j,setItem:V,removeItem:H,clear:U,length:W,key:z,keys:G,dropInstance:X};function Y(){return"function"==typeof openDatabase}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z="~~local_forage_type~",K=/^~~local_forage_type~([^~]+)~/,Q="__lfsc__:",J=Q.length,tt="arbf",et="blob",rt="si08",nt="ui08",ot="uic8",it="si16",at="si32",st="ur16",ct="ui32",ut="fl32",lt="fl64",ft=J+tt.length,dt=Object.prototype.toString;function ht(t){var e,r,n,o,i,a=.75*t.length,s=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),l=new Uint8Array(u);for(e=0;e<s;e+=4)r=q.indexOf(t[e]),n=q.indexOf(t[e+1]),o=q.indexOf(t[e+2]),i=q.indexOf(t[e+3]),l[c++]=r<<2|n>>4,l[c++]=(15&n)<<4|o>>2,l[c++]=(3&o)<<6|63&i;return u}function pt(t){var e,r=new Uint8Array(t),n="";for(e=0;e<r.length;e+=3)n+=q[r[e]>>2],n+=q[(3&r[e])<<4|r[e+1]>>4],n+=q[(15&r[e+1])<<2|r[e+2]>>6],n+=q[63&r[e+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}function gt(t,e){var r="";if(t&&(r=dt.call(t)),t&&("[object ArrayBuffer]"===r||t.buffer&&"[object ArrayBuffer]"===dt.call(t.buffer))){var n,o=Q;t instanceof ArrayBuffer?(n=t,o+=tt):(n=t.buffer,"[object Int8Array]"===r?o+=rt:"[object Uint8Array]"===r?o+=nt:"[object Uint8ClampedArray]"===r?o+=ot:"[object Int16Array]"===r?o+=it:"[object Uint16Array]"===r?o+=st:"[object Int32Array]"===r?o+=at:"[object Uint32Array]"===r?o+=ct:"[object Float32Array]"===r?o+=ut:"[object Float64Array]"===r?o+=lt:e(new Error("Failed to get type for BinaryArray"))),e(o+pt(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r=Z+t.type+"~"+pt(this.result);e(Q+et+r)},i.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(a){console.error("Couldn't convert value into a JSON string: ",t),e(null,a)}}function mt(t){if(t.substring(0,J)!==Q)return JSON.parse(t);var e,r=t.substring(ft),n=t.substring(J,ft);if(n===et&&K.test(r)){var o=r.match(K);e=o[1],r=r.substring(o[0].length)}var i=ht(r);switch(n){case tt:return i;case et:return c([i],{type:e});case rt:return new Int8Array(i);case nt:return new Uint8Array(i);case ot:return new Uint8ClampedArray(i);case it:return new Int16Array(i);case st:return new Uint16Array(i);case at:return new Int32Array(i);case ct:return new Uint32Array(i);case ut:return new Float32Array(i);case lt:return new Float64Array(i);default:throw new Error("Unkown type: "+n)}}var yt={serialize:gt,deserialize:mt,stringToBuffer:ht,bufferToString:pt};function vt(t,e,r,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function _t(t){var e=this,r={db:null};if(t)for(var n in t)r[n]="string"!=typeof t[n]?t[n].toString():t[n];var o=new u((function(t,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(o){return n(o)}r.db.transaction((function(o){vt(o,r,(function(){e._dbInfo=r,t()}),(function(t,e){n(e)}))}),n)}));return r.serializer=yt,o}function wt(t,e,r,n,o,i){t.executeSql(r,n,o,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,s){s.rows.length?i(t,a):vt(t,e,(function(){t.executeSql(r,n,o,i)}),i)}),i):i(t,a)}),i)}function bt(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=o.serializer.deserialize(n)),e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function Ct(t,e){var r=this,n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,a=i.length,s=0;s<a;s++){var c=i.item(s),u=c.value;if(u&&(u=o.serializer.deserialize(u)),void 0!==(u=t(u,c.key,s+1)))return void e(u)}e()}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function Et(t,e,r,n){var o=this;t=d(t);var i=new u((function(i,a){o.ready().then((function(){void 0===e&&(e=null);var s=e,c=o._dbInfo;c.serializer.serialize(e,(function(e,u){u?a(u):c.db.transaction((function(r){wt(r,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){i(s)}),(function(t,e){a(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void i(Et.apply(o,[t,s,r,n-1]));a(e)}}))}))})).catch(a)}));return l(i,r),i}function At(t,e,r){return Et.apply(this,[t,e,r,1])}function It(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function St(t){var e=this,r=new u((function(t,r){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){wt(e,n,"DELETE FROM "+n.storeName,[],(function(){t()}),(function(t,e){r(e)}))}))})).catch(r)}));return l(r,t),r}function Ot(t){var e=this,r=new u((function(t,r){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){wt(e,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(e,r){var n=r.rows.item(0).c;t(n)}),(function(t,e){r(e)}))}))})).catch(r)}));return l(r,t),r}function Tt(t,e){var r=this,n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,r){var n=r.rows.length?r.rows.item(0).key:null;e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function Nt(t){var e=this,r=new u((function(t,r){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){wt(e,n,"SELECT key FROM "+n.storeName,[],(function(e,r){for(var n=[],o=0;o<r.rows.length;o++)n.push(r.rows.item(o).key);t(n)}),(function(t,e){r(e)}))}))})).catch(r)}));return l(r,t),r}function xt(t){return new u((function(e,r){t.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var o=[],i=0;i<n.rows.length;i++)o.push(n.rows.item(i).name);e({db:t,storeNames:o})}),(function(t,e){r(e)}))}),(function(t){r(t)}))}))}function Rt(t,e){e=h.apply(this,arguments);var r=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||r.name,t.storeName=t.storeName||r.storeName);var n,o=this;return l(n=t.name?new u((function(e){var n;n=t.name===r.name?o._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:n,storeNames:[t.storeName]}):e(xt(n))})).then((function(t){return new u((function(e,r){t.db.transaction((function(n){function o(t){return new u((function(e,r){n.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){r(e)}))}))}for(var i=[],a=0,s=t.storeNames.length;a<s;a++)i.push(o(t.storeNames[a]));u.all(i).then((function(){e()})).catch((function(t){r(t)}))}),(function(t){r(t)}))}))})):u.reject("Invalid arguments"),e),n}var Dt={_driver:"webSQLStorage",_initStorage:_t,_support:Y(),iterate:Ct,getItem:bt,setItem:At,removeItem:It,clear:St,length:Ot,key:Tt,keys:Nt,dropInstance:Rt};function Pt(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}function Mt(t,e){var r=t.name+"/";return t.storeName!==e.storeName&&(r+=t.storeName+"/"),r}function kt(){var t="_localforage_support_test";try{return localStorage.setItem(t,!0),localStorage.removeItem(t),!1}catch(e){return!0}}function Lt(){return!kt()||localStorage.length>0}function Bt(t){var e=this,r={};if(t)for(var n in t)r[n]=t[n];return r.keyPrefix=Mt(t,e._defaultConfig),Lt()?(e._dbInfo=r,r.serializer=yt,u.resolve()):u.reject()}function jt(t){var e=this,r=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return l(r,t),r}function Ft(t,e){var r=this;t=d(t);var n=r.ready().then((function(){var e=r._dbInfo,n=localStorage.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n}));return l(n,e),n}function Vt(t,e){var r=this,n=r.ready().then((function(){for(var e=r._dbInfo,n=e.keyPrefix,o=n.length,i=localStorage.length,a=1,s=0;s<i;s++){var c=localStorage.key(s);if(0===c.indexOf(n)){var u=localStorage.getItem(c);if(u&&(u=e.serializer.deserialize(u)),void 0!==(u=t(u,c.substring(o),a++)))return u}}}));return l(n,e),n}function Ht(t,e){var r=this,n=r.ready().then((function(){var e,n=r._dbInfo;try{e=localStorage.key(t)}catch(o){e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return l(n,e),n}function Ut(t){var e=this,r=e.ready().then((function(){for(var t=e._dbInfo,r=localStorage.length,n=[],o=0;o<r;o++){var i=localStorage.key(o);0===i.indexOf(t.keyPrefix)&&n.push(i.substring(t.keyPrefix.length))}return n}));return l(r,t),r}function Wt(t){var e=this.keys().then((function(t){return t.length}));return l(e,t),e}function zt(t,e){var r=this;t=d(t);var n=r.ready().then((function(){var e=r._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return l(n,e),n}function Gt(t,e,r){var n=this;t=d(t);var o=n.ready().then((function(){void 0===e&&(e=null);var r=e;return new u((function(o,i){var a=n._dbInfo;a.serializer.serialize(e,(function(e,n){if(n)i(n);else try{localStorage.setItem(a.keyPrefix+t,e),o(r)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}}))}))}));return l(o,r),o}function Xt(t,e){if(e=h.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var r=this.config();t.name=t.name||r.name,t.storeName=t.storeName||r.storeName}var n,o=this;return l(n=t.name?new u((function(e){t.storeName?e(Mt(t,o._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var r=localStorage.key(e);0===r.indexOf(t)&&localStorage.removeItem(r)}})):u.reject("Invalid arguments"),e),n}var $t={_driver:"localStorageWrapper",_initStorage:Bt,_support:Pt(),iterate:Vt,getItem:Ft,setItem:Gt,removeItem:zt,clear:jt,length:Wt,key:Ht,keys:Ut,dropInstance:Xt},Yt=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},qt=function(t,e){for(var r=t.length,n=0;n<r;){if(Yt(t[n],e))return!0;n++}return!1},Zt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Kt={},Qt={},Jt={INDEXEDDB:$,WEBSQL:Dt,LOCALSTORAGE:$t},te=[Jt.INDEXEDDB._driver,Jt.WEBSQL._driver,Jt.LOCALSTORAGE._driver],ee=["dropInstance"],re=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ee),ne={description:"",driver:te.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function oe(t,e){t[e]=function(){var r=arguments;return t.ready().then((function(){return t[e].apply(t,r)}))}}function ie(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var r in e)e.hasOwnProperty(r)&&(Zt(e[r])?arguments[0][r]=e[r].slice():arguments[0][r]=e[r])}return arguments[0]}var ae=function(){function t(e){for(var r in o(this,t),Jt)if(Jt.hasOwnProperty(r)){var n=Jt[r],i=n._driver;this[r]=i,Kt[i]||this.defineDriver(n)}this._defaultConfig=ie({},ne),this._config=ie({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,r){var n=new u((function(e,r){try{var n=t._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void r(o);for(var i=re.concat("_initStorage"),a=0,s=i.length;a<s;a++){var c=i[a];if((!qt(ee,c)||t[c])&&"function"!=typeof t[c])return void r(o)}var f=function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),r=u.reject(e);return l(r,arguments[arguments.length-1]),r}},r=0,n=ee.length;r<n;r++){var o=ee[r];t[o]||(t[o]=e(o))}};f();var d=function(r){Kt[n]&&console.info("Redefining LocalForage driver: "+n),Kt[n]=t,Qt[n]=r,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(d,r):d(!!t._support):d(!0)}catch(h){r(h)}}));return f(n,e,r),n},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,r){var n=Kt[t]?u.resolve(Kt[t]):u.reject(new Error("Driver not found."));return f(n,e,r),n},t.prototype.getSerializer=function(t){var e=u.resolve(yt);return f(e,t),e},t.prototype.ready=function(t){var e=this,r=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return f(r,t,t),r},t.prototype.setDriver=function(t,e,r){var n=this;Zt(t)||(t=[t]);var o=this._getSupportedDrivers(t);function i(){n._config.driver=n.driver()}function a(t){return n._extend(t),i(),n._ready=n._initStorage(n._config),n._ready}function s(t){return function(){var e=0;function r(){for(;e<t.length;){var o=t[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(o).then(a).catch(r)}i();var s=new Error("No available storage method found.");return n._driverSet=u.reject(s),n._driverSet}return r()}}var c=null!==this._driverSet?this._driverSet.catch((function(){return u.resolve()})):u.resolve();return this._driverSet=c.then((function(){var t=o[0];return n._dbInfo=null,n._ready=null,n.getDriver(t).then((function(t){n._driver=t._driver,i(),n._wrapLibraryMethodsWithReady(),n._initDriver=s(o)}))})).catch((function(){i();var t=new Error("No available storage method found.");return n._driverSet=u.reject(t),n._driverSet})),f(this._driverSet,e,r),this._driverSet},t.prototype.supports=function(t){return!!Qt[t]},t.prototype._extend=function(t){ie(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],r=0,n=t.length;r<n;r++){var o=t[r];this.supports(o)&&e.push(o)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=re.length;t<e;t++)oe(this,re[t])},t.prototype.createInstance=function(e){return new t(e)},t}(),se=new ae;e.exports=se},{3:3}]},{},[4])(4)}(_r);var wr=_r.exports;wr.config({driver:wr.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const br={init:async t=>{let e=await wr.getItem(t.url);e&&(t.headers["x-tag"]=e.xtag,t.data=e.data)},save:async(t,e)=>{if(304===t.status)t.data=e.data;else if(t.status<400)try{let r={xtag:t.headers["x-tag"],data:t.data};await wr.setItem(e.url,r)}catch(r){console.info("Cache: ",r)}},clear:()=>{wr.clear()}},Cr={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Er(t){const r=a.useHistory(),n=new AbortController,{globalApiConfig:o}=re(),[i,s]=e.useState(Cr);return"string"==typeof t&&(t={url:t}),[async function(e){var i,a,u;let l,f={username:o.auth.username,password:o.auth.password};if(t.headers={},o.getToken){let e=o.getToken();e&&(o.auth.prefix&&(e=`${o.auth.prefix} ${e}`),t.headers[o.auth.header]=e)}o.ident&&(t.headers["x-identify"]=o.ident),t.cache=Boolean(o.isProductionMode&&(!t.method||"get"==t.method)),(null==t?void 0:t.cache)&&await br.init(t);let d={baseURL:o.baseURL,timeout:o.timeout,auth:f,validateStatus:t=>t>=200&&t<400,...t,...e};d.report&&(d={...d,responseType:"blob",timeout:0}),s({...Cr,loading:!0}),d.onBefore&&d.onBefore(d);try{const t=await c({...d,signal:n.signal});o.afterRequest&&o.afterRequest(t),l={...Cr,data:t.data,message:t.statusText,status:t.status,headers:t.headers}}catch(p){if("ERR_NETWORK"===(null==p?void 0:p.code))l={...Cr,isError:!0,message:p.message,status:400};else if(p.response)switch(l={...Cr,isError:!0,status:p.response.status,message:null==(i=p.response.data)?void 0:i.error,code:null==(a=p.response.data)?void 0:a.code},p.response.status){case 400:if("blob"===(null==d?void 0:d.responseType)){let t=await p.response.data.text();t=JSON.parse(t),l.message=t.error||"Ocorreu um erro ao consultar o servidor!"}break;case 401:l.message="Servidor requer autenticação!",o.setToken&&o.setToken(""),r.push(o.loginRoute);break;case 404:l.message="Servidor não possui este recurso!";break;case 405:l.message=`Método [${(null==(u=d.method)?void 0:u.toUpperCase())||"GET"}] indisponível!`}else l={...Cr,isError:!0,message:p.message}}const h=`timeout of ${o.timeout}ms exceeded`;return l.message!==h&&"Network Error"!==l.message||(l.message="Sem conexão com o servidor!"),l.isError?l.error=l.message:l.error=null,(null==t?void 0:t.cache)&&await br.save(l,t),l={...l,loading:!1},s(l),(null==t?void 0:t.onTerminated)&&t.onTerminated(l),l},i,function(){n&&n.abort("Cancelado pelo usuário!")}]}let Ar=null;function Ir({url:t,file:n,fileTo:o,setLoading:i}){const[a,c]=e.useState(""),[u,l]=e.useState(!1),[f,d]=e.useState(0),[h,p]=e.useState(n),[g,m]=e.useState(""),[y,,v]=Er({url:t,method:"post",data:{file:h},report:!0,onDownloadProgress:t=>{l(t.loaded>0),d(t.loaded/t.total*100)},onTerminated:t=>{if(204===t.status)return w(3);var e;t.error?(c(t.error),_()):r.isDesktop()?(e=t.data,m(URL.createObjectURL(e))):(s(t.data,function(){let t=o.split(".");return t[0]+="-"+r.getHash(o),t=t.join("."),t}()),p(""))}});function _(){Ar&&clearTimeout(Ar)}function w(t){_(),Ar=setTimeout((()=>y()),1e3*t)}return e.useEffect((()=>()=>_()),[]),e.useEffect((()=>()=>g&&URL.revokeObjectURL(g)),[g]),e.useEffect((()=>{h?(i(!0),w(2)):i(!1)}),[h]),Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("div",{className:"loading-report--area",children:[Jt.jsxs("div",{className:"loading-box",style:{display:g?"none":"block"},children:[Jt.jsx("button",{className:"btn-loading-close",title:"Cancelar",onClick:function(){u?v():c(""),i(!1)},children:Jt.jsx("i",{className:"fas fa-times"})}),Jt.jsxs("div",{className:"line",children:[u?Jt.jsx("i",{className:"fa-solid fa-file-arrow-down pulse"}):Jt.jsx("div",{className:"spinner"}),Jt.jsx("span",{children:u?"Baixando relatório...":"Gerando relatório..."})]}),Jt.jsx("div",{className:"pbar",children:Jt.jsx("div",{style:{width:`${f}%`}})})]}),g&&Jt.jsx(yr,{fileTo:o,previewUrl:g,setVisible:()=>p(""),visible:!0})]}),a&&Jt.jsx(ae,{onConfirm:()=>i(!1),children:a})]})}function Sr({valor:t,time:n,format:o,currency:i}){const[a,s]=e.useState(0);return e.useEffect((()=>{const e=setInterval((()=>{const r=Math.ceil(t/10)+1;s((n=>{let o=n+r;return o>t&&(o=t),o===t&&clearInterval(e),o}))}),n);return()=>clearInterval(e)}),[t,n]),o?r.formatValor(a,i?2:0,Boolean(i)):a}Sr.defaultProps={valor:0,time:25,format:!1,currency:!1};function Or({search:t,setSearch:n,fnSearch:o,fnFilter:a,fnValidateFilter:s,placeHolder:c,...u}){const l=e.useRef();return Jt.jsxs("div",{className:"inp-pesq--input-area",children:[Jt.jsxs(i.InputGroup,{children:[Jt.jsx(i.Input,{innerRef:l,value:t,onChange:t=>n(t.target.value),placeholder:c,...u}),Jt.jsx(i.Button,{color:"outline-secondary",type:"button",onClick:()=>{n(""),r.isDesktop()&&(null==l?void 0:l.current)&&l.current.focus()},title:"Limpar campo de pesquisa",children:Jt.jsx(rr,{})}),Jt.jsx(i.Button,{color:"info",title:"Pesquisar",onClick:o,type:o?"button":"submit",children:Jt.jsx(er,{})})]}),a&&Jt.jsxs(i.Button,{type:"button",color:"outline-filter",className:"position-relative ip--btn-filter",title:"Filtros avançados",onClick:a,children:[Jt.jsx("i",{className:"fas fa-filter"})," Filtros",s&&s()&&Jt.jsx("span",{className:"position-absolute top-0 start-100 translate-middle \r\n p-2 bg-danger border border-light rounded-circle",children:Jt.jsx("span",{className:"visually-hidden",children:"Filtro ativo"})})]})]})}function Tr({to:t,children:e,...r}){return Jt.jsx("a",{href:t||e,target:"_blank",rel:"noreferrer",...r,children:e||t})}const Nr=o.div`
423
+ */!function(t,e){t.exports=function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){if(!s&&yr)return yr(a);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};e[a][0].call(u.exports,(function(t){var r=e[a][1][t];return o(r||t)}),u,u.exports,t,e,r,n)}return r[a].exports}for(var i=yr,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(t,e,r){(function(t){var r,n,o=t.MutationObserver||t.WebKitMutationObserver;if(o){var i=0,a=new o(l),s=t.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=i=++i%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var c=new t.MessageChannel;c.port1.onmessage=l,r=function(){c.port2.postMessage(0)}}var u=[];function l(){var t,e;n=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t<r;)e[t]();r=u.length}n=!1}function f(t){1!==u.push(t)||n||r()}e.exports=f}).call(this,void 0!==h?h:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,r){var n=t(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],c=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,t!==o&&h(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(t,e,r){n((function(){var n;try{n=e(r)}catch(o){return i.reject(t,o)}n===t?i.reject(t,new TypeError("Cannot resolve promise with itself")):i.resolve(t,n)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function h(t,e){var r=!1;function n(e){r||(r=!0,i.reject(t,e))}function o(e){r||(r=!0,i.resolve(t,e))}function a(){e(o,n)}var s=p(a);"error"===s.status&&n(s.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(n){r.status="error",r.value=n}return r}function g(t){return t instanceof this?t:i.resolve(new this(o),t)}function m(t){var e=new this(o);return i.reject(e,t)}function v(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),s=0,c=-1,u=new this(o);++c<r;)l(t[c],c);return u;function l(t,o){function c(t){a[o]=t,++s!==r||n||(n=!0,i.resolve(u,a))}e.resolve(t).then(c,(function(t){n||(n=!0,i.reject(u,t))}))}}function y(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var a=-1,s=new this(o);++a<r;)c(t[a]);return s;function c(t){e.resolve(t).then((function(t){n||(n=!0,i.resolve(s,t))}),(function(t){n||(n=!0,i.reject(s,t))}))}}e.exports=u,u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===s||"function"!=typeof e&&this.state===a)return this;var r=new this.constructor(o);return this.state!==c?f(r,this.state===s?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){i.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){f(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){i.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){f(this.promise,this.onRejected,t)},i.resolve=function(t,e){var r=p(d,e);if("error"===r.status)return i.reject(t,r.value);var n=r.value;if(n)h(t,n);else{t.state=s,t.outcome=e;for(var o=-1,a=t.queue.length;++o<a;)t.queue[o].callFulfilled(e)}return t},i.reject=function(t,e){t.state=a,t.outcome=e;for(var r=-1,n=t.queue.length;++r<n;)t.queue[r].callRejected(e);return t},u.resolve=g,u.reject=m,u.all=v,u.race=y},{1:1}],3:[function(t,e,r){(function(e){"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==h?h:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,r){var n="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};function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}var a=i();function s(){try{if(!a||!a.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(r){return!1}}function c(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(o){if("TypeError"!==o.name)throw o;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)r.append(t[n]);return r.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var u=Promise;function l(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function f(t,e,r){"function"==typeof e&&t.then(e),"function"==typeof r&&t.catch(r)}function d(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",g=void 0,m={},v=Object.prototype.toString,y="readonly",_="readwrite";function w(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),o=0;o<e;o++)n[o]=t.charCodeAt(o);return r}function b(t){return new u((function(e){var r=t.transaction(p,_),n=c([""]);r.objectStore(p).put(n,"key"),r.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},r.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);e(r||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}function C(t){return"boolean"==typeof g?u.resolve(g):b(t).then((function(t){return g=t}))}function E(t){var e=m[t.name],r={};r.promise=new u((function(t,e){r.resolve=t,r.reject=e})),e.deferredOperations.push(r),e.dbReady?e.dbReady=e.dbReady.then((function(){return r.promise})):e.dbReady=r.promise}function A(t){var e=m[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function I(t,e){var r=m[t.name].deferredOperations.pop();if(r)return r.reject(e),r.promise}function S(t,e){return new u((function(r,n){if(m[t.name]=m[t.name]||L(),t.db){if(!e)return r(t.db);E(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var i=a.open.apply(a,o);e&&(i.onupgradeneeded=function(e){var r=i.result;try{r.createObjectStore(t.storeName),e.oldVersion<=1&&r.createObjectStore(p)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),i.onerror=function(t){t.preventDefault(),n(i.error)},i.onsuccess=function(){var e=i.result;e.onversionchange=function(t){t.target.close()},r(e),A(t)}}))}function O(t){return S(t,!1)}function T(t){return S(t,!0)}function N(t,e){if(!t.db)return!0;var r=!t.db.objectStoreNames.contains(t.storeName),n=t.version<t.db.version,o=t.version>t.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),o||r){if(r){var i=t.db.version+1;i>t.version&&(t.version=i)}return!0}return!1}function x(t){return new u((function(e,r){var n=new FileReader;n.onerror=r,n.onloadend=function(r){var n=btoa(r.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:t.type})},n.readAsBinaryString(t)}))}function R(t){return c([w(atob(t.data))],{type:t.type})}function D(t){return t&&t.__local_forage_encoded_blob}function P(t){var e=this,r=e._initReady().then((function(){var t=m[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return f(r,t,t),r}function M(t){E(t);for(var e=m[t.name],r=e.forages,n=0;n<r.length;n++){var o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return t.db=null,O(t).then((function(e){return t.db=e,N(t)?T(t):e})).then((function(n){t.db=e.db=n;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=n})).catch((function(e){throw I(t,e),e}))}function k(t,e,r,n){void 0===n&&(n=1);try{var o=t.db.transaction(t.storeName,e);r(null,o)}catch(i){if(n>0&&(!t.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return u.resolve().then((function(){if(!t.db||"NotFoundError"===i.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),T(t)})).then((function(){return M(t).then((function(){k(t,e,r,n-1)}))})).catch(r);r(i)}}function L(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(t){var e=this,r={db:null};if(t)for(var n in t)r[n]=t[n];var o=m[r.name];o||(o=L(),m[r.name]=o),o.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=P);var i=[];function a(){return u.resolve()}for(var s=0;s<o.forages.length;s++){var c=o.forages[s];c!==e&&i.push(c._initReady().catch(a))}var l=o.forages.slice(0);return u.all(i).then((function(){return r.db=o.db,O(r)})).then((function(t){return r.db=t,N(r,e._defaultConfig.version)?T(r):t})).then((function(t){r.db=o.db=t,e._dbInfo=r;for(var n=0;n<l.length;n++){var i=l[n];i!==e&&(i._dbInfo.db=r.db,i._dbInfo.version=r.version)}}))}function j(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){k(r._dbInfo,y,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).get(t);a.onsuccess=function(){var t=a.result;void 0===t&&(t=null),D(t)&&(t=R(t)),e(t)},a.onerror=function(){n(a.error)}}catch(s){n(s)}}))})).catch(n)}));return l(n,e),n}function F(t,e){var r=this,n=new u((function(e,n){r.ready().then((function(){k(r._dbInfo,y,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var r=a.result;if(r){var n=r.value;D(n)&&(n=R(n));var o=t(n,r.key,s++);void 0!==o?e(o):r.continue()}else e()},a.onerror=function(){n(a.error)}}catch(c){n(c)}}))})).catch(n)}));return l(n,e),n}function V(t,e,r){var n=this;t=d(t);var o=new u((function(r,o){var i;n.ready().then((function(){return i=n._dbInfo,"[object Blob]"===v.call(e)?C(i.db).then((function(t){return t?e:x(e)})):e})).then((function(e){k(n._dbInfo,_,(function(i,a){if(i)return o(i);try{var s=a.objectStore(n._dbInfo.storeName);null===e&&(e=void 0);var c=s.put(e,t);a.oncomplete=function(){void 0===e&&(e=null),r(e)},a.onabort=a.onerror=function(){var t=c.error?c.error:c.transaction.error;o(t)}}catch(u){o(u)}}))})).catch(o)}));return l(o,r),o}function H(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){k(r._dbInfo,_,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).delete(t);i.oncomplete=function(){e()},i.onerror=function(){n(a.error)},i.onabort=function(){var t=a.error?a.error:a.transaction.error;n(t)}}catch(s){n(s)}}))})).catch(n)}));return l(n,e),n}function U(t){var e=this,r=new u((function(t,r){e.ready().then((function(){k(e._dbInfo,_,(function(n,o){if(n)return r(n);try{var i=o.objectStore(e._dbInfo.storeName).clear();o.oncomplete=function(){t()},o.onabort=o.onerror=function(){var t=i.error?i.error:i.transaction.error;r(t)}}catch(a){r(a)}}))})).catch(r)}));return l(r,t),r}function W(t){var e=this,r=new u((function(t,r){e.ready().then((function(){k(e._dbInfo,y,(function(n,o){if(n)return r(n);try{var i=o.objectStore(e._dbInfo.storeName).count();i.onsuccess=function(){t(i.result)},i.onerror=function(){r(i.error)}}catch(a){r(a)}}))})).catch(r)}));return l(r,t),r}function z(t,e){var r=this,n=new u((function(e,n){t<0?e(null):r.ready().then((function(){k(r._dbInfo,y,(function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName),s=!1,c=a.openKeyCursor();c.onsuccess=function(){var r=c.result;r?0===t||s?e(r.key):(s=!0,r.advance(t)):e(null)},c.onerror=function(){n(c.error)}}catch(u){n(u)}}))})).catch(n)}));return l(n,e),n}function G(t){var e=this,r=new u((function(t,r){e.ready().then((function(){k(e._dbInfo,y,(function(n,o){if(n)return r(n);try{var i=o.objectStore(e._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var e=i.result;e?(a.push(e.key),e.continue()):t(a)},i.onerror=function(){r(i.error)}}catch(s){r(s)}}))})).catch(r)}));return l(r,t),r}function X(t,e){e=h.apply(this,arguments);var r=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||r.name,t.storeName=t.storeName||r.storeName);var n,o=this;if(t.name){var i=t.name===r.name&&o._dbInfo.db?u.resolve(o._dbInfo.db):O(t).then((function(e){var r=m[t.name],n=r.forages;r.db=e;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=e;return e}));n=t.storeName?i.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var r=e.version+1;E(t);var n=m[t.name],o=n.forages;e.close();for(var i=0;i<o.length;i++){var s=o[i];s._dbInfo.db=null,s._dbInfo.version=r}return new u((function(e,n){var o=a.open(t.name,r);o.onerror=function(t){o.result.close(),n(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<o.length;e++){var r=o[e];r._dbInfo.db=t,A(r._dbInfo)}})).catch((function(e){throw(I(t,e)||u.resolve()).catch((function(){})),e}))}})):i.then((function(e){E(t);var r=m[t.name],n=r.forages;e.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new u((function(e,r){var n=a.deleteDatabase(t.name);n.onerror=function(){var t=n.result;t&&t.close(),r(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},n.onsuccess=function(){var t=n.result;t&&t.close(),e(t)}})).then((function(t){r.db=t;for(var e=0;e<n.length;e++)A(n[e]._dbInfo)})).catch((function(e){throw(I(t,e)||u.resolve()).catch((function(){})),e}))}))}else n=u.reject("Invalid arguments");return l(n,e),n}var $={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:F,getItem:j,setItem:V,removeItem:H,clear:U,length:W,key:z,keys:G,dropInstance:X};function Y(){return"function"==typeof openDatabase}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z="~~local_forage_type~",K=/^~~local_forage_type~([^~]+)~/,Q="__lfsc__:",J=Q.length,tt="arbf",et="blob",rt="si08",nt="ui08",ot="uic8",it="si16",at="si32",st="ur16",ct="ui32",ut="fl32",lt="fl64",ft=J+tt.length,dt=Object.prototype.toString;function ht(t){var e,r,n,o,i,a=.75*t.length,s=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),l=new Uint8Array(u);for(e=0;e<s;e+=4)r=q.indexOf(t[e]),n=q.indexOf(t[e+1]),o=q.indexOf(t[e+2]),i=q.indexOf(t[e+3]),l[c++]=r<<2|n>>4,l[c++]=(15&n)<<4|o>>2,l[c++]=(3&o)<<6|63&i;return u}function pt(t){var e,r=new Uint8Array(t),n="";for(e=0;e<r.length;e+=3)n+=q[r[e]>>2],n+=q[(3&r[e])<<4|r[e+1]>>4],n+=q[(15&r[e+1])<<2|r[e+2]>>6],n+=q[63&r[e+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}function gt(t,e){var r="";if(t&&(r=dt.call(t)),t&&("[object ArrayBuffer]"===r||t.buffer&&"[object ArrayBuffer]"===dt.call(t.buffer))){var n,o=Q;t instanceof ArrayBuffer?(n=t,o+=tt):(n=t.buffer,"[object Int8Array]"===r?o+=rt:"[object Uint8Array]"===r?o+=nt:"[object Uint8ClampedArray]"===r?o+=ot:"[object Int16Array]"===r?o+=it:"[object Uint16Array]"===r?o+=st:"[object Int32Array]"===r?o+=at:"[object Uint32Array]"===r?o+=ct:"[object Float32Array]"===r?o+=ut:"[object Float64Array]"===r?o+=lt:e(new Error("Failed to get type for BinaryArray"))),e(o+pt(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){var r=Z+t.type+"~"+pt(this.result);e(Q+et+r)},i.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(a){console.error("Couldn't convert value into a JSON string: ",t),e(null,a)}}function mt(t){if(t.substring(0,J)!==Q)return JSON.parse(t);var e,r=t.substring(ft),n=t.substring(J,ft);if(n===et&&K.test(r)){var o=r.match(K);e=o[1],r=r.substring(o[0].length)}var i=ht(r);switch(n){case tt:return i;case et:return c([i],{type:e});case rt:return new Int8Array(i);case nt:return new Uint8Array(i);case ot:return new Uint8ClampedArray(i);case it:return new Int16Array(i);case st:return new Uint16Array(i);case at:return new Int32Array(i);case ct:return new Uint32Array(i);case ut:return new Float32Array(i);case lt:return new Float64Array(i);default:throw new Error("Unkown type: "+n)}}var vt={serialize:gt,deserialize:mt,stringToBuffer:ht,bufferToString:pt};function yt(t,e,r,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function _t(t){var e=this,r={db:null};if(t)for(var n in t)r[n]="string"!=typeof t[n]?t[n].toString():t[n];var o=new u((function(t,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(o){return n(o)}r.db.transaction((function(o){yt(o,r,(function(){e._dbInfo=r,t()}),(function(t,e){n(e)}))}),n)}));return r.serializer=vt,o}function wt(t,e,r,n,o,i){t.executeSql(r,n,o,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,s){s.rows.length?i(t,a):yt(t,e,(function(){t.executeSql(r,n,o,i)}),i)}),i):i(t,a)}),i)}function bt(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=o.serializer.deserialize(n)),e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function Ct(t,e){var r=this,n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"SELECT * FROM "+o.storeName,[],(function(r,n){for(var i=n.rows,a=i.length,s=0;s<a;s++){var c=i.item(s),u=c.value;if(u&&(u=o.serializer.deserialize(u)),void 0!==(u=t(u,c.key,s+1)))return void e(u)}e()}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function Et(t,e,r,n){var o=this;t=d(t);var i=new u((function(i,a){o.ready().then((function(){void 0===e&&(e=null);var s=e,c=o._dbInfo;c.serializer.serialize(e,(function(e,u){u?a(u):c.db.transaction((function(r){wt(r,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){i(s)}),(function(t,e){a(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void i(Et.apply(o,[t,s,r,n-1]));a(e)}}))}))})).catch(a)}));return l(i,r),i}function At(t,e,r){return Et.apply(this,[t,e,r,1])}function It(t,e){var r=this;t=d(t);var n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function St(t){var e=this,r=new u((function(t,r){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){wt(e,n,"DELETE FROM "+n.storeName,[],(function(){t()}),(function(t,e){r(e)}))}))})).catch(r)}));return l(r,t),r}function Ot(t){var e=this,r=new u((function(t,r){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){wt(e,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(e,r){var n=r.rows.item(0).c;t(n)}),(function(t,e){r(e)}))}))})).catch(r)}));return l(r,t),r}function Tt(t,e){var r=this,n=new u((function(e,n){r.ready().then((function(){var o=r._dbInfo;o.db.transaction((function(r){wt(r,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,r){var n=r.rows.length?r.rows.item(0).key:null;e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return l(n,e),n}function Nt(t){var e=this,r=new u((function(t,r){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){wt(e,n,"SELECT key FROM "+n.storeName,[],(function(e,r){for(var n=[],o=0;o<r.rows.length;o++)n.push(r.rows.item(o).key);t(n)}),(function(t,e){r(e)}))}))})).catch(r)}));return l(r,t),r}function xt(t){return new u((function(e,r){t.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var o=[],i=0;i<n.rows.length;i++)o.push(n.rows.item(i).name);e({db:t,storeNames:o})}),(function(t,e){r(e)}))}),(function(t){r(t)}))}))}function Rt(t,e){e=h.apply(this,arguments);var r=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||r.name,t.storeName=t.storeName||r.storeName);var n,o=this;return l(n=t.name?new u((function(e){var n;n=t.name===r.name?o._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:n,storeNames:[t.storeName]}):e(xt(n))})).then((function(t){return new u((function(e,r){t.db.transaction((function(n){function o(t){return new u((function(e,r){n.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){r(e)}))}))}for(var i=[],a=0,s=t.storeNames.length;a<s;a++)i.push(o(t.storeNames[a]));u.all(i).then((function(){e()})).catch((function(t){r(t)}))}),(function(t){r(t)}))}))})):u.reject("Invalid arguments"),e),n}var Dt={_driver:"webSQLStorage",_initStorage:_t,_support:Y(),iterate:Ct,getItem:bt,setItem:At,removeItem:It,clear:St,length:Ot,key:Tt,keys:Nt,dropInstance:Rt};function Pt(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}function Mt(t,e){var r=t.name+"/";return t.storeName!==e.storeName&&(r+=t.storeName+"/"),r}function kt(){var t="_localforage_support_test";try{return localStorage.setItem(t,!0),localStorage.removeItem(t),!1}catch(e){return!0}}function Lt(){return!kt()||localStorage.length>0}function Bt(t){var e=this,r={};if(t)for(var n in t)r[n]=t[n];return r.keyPrefix=Mt(t,e._defaultConfig),Lt()?(e._dbInfo=r,r.serializer=vt,u.resolve()):u.reject()}function jt(t){var e=this,r=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return l(r,t),r}function Ft(t,e){var r=this;t=d(t);var n=r.ready().then((function(){var e=r._dbInfo,n=localStorage.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n}));return l(n,e),n}function Vt(t,e){var r=this,n=r.ready().then((function(){for(var e=r._dbInfo,n=e.keyPrefix,o=n.length,i=localStorage.length,a=1,s=0;s<i;s++){var c=localStorage.key(s);if(0===c.indexOf(n)){var u=localStorage.getItem(c);if(u&&(u=e.serializer.deserialize(u)),void 0!==(u=t(u,c.substring(o),a++)))return u}}}));return l(n,e),n}function Ht(t,e){var r=this,n=r.ready().then((function(){var e,n=r._dbInfo;try{e=localStorage.key(t)}catch(o){e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return l(n,e),n}function Ut(t){var e=this,r=e.ready().then((function(){for(var t=e._dbInfo,r=localStorage.length,n=[],o=0;o<r;o++){var i=localStorage.key(o);0===i.indexOf(t.keyPrefix)&&n.push(i.substring(t.keyPrefix.length))}return n}));return l(r,t),r}function Wt(t){var e=this.keys().then((function(t){return t.length}));return l(e,t),e}function zt(t,e){var r=this;t=d(t);var n=r.ready().then((function(){var e=r._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return l(n,e),n}function Gt(t,e,r){var n=this;t=d(t);var o=n.ready().then((function(){void 0===e&&(e=null);var r=e;return new u((function(o,i){var a=n._dbInfo;a.serializer.serialize(e,(function(e,n){if(n)i(n);else try{localStorage.setItem(a.keyPrefix+t,e),o(r)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}}))}))}));return l(o,r),o}function Xt(t,e){if(e=h.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var r=this.config();t.name=t.name||r.name,t.storeName=t.storeName||r.storeName}var n,o=this;return l(n=t.name?new u((function(e){t.storeName?e(Mt(t,o._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var r=localStorage.key(e);0===r.indexOf(t)&&localStorage.removeItem(r)}})):u.reject("Invalid arguments"),e),n}var $t={_driver:"localStorageWrapper",_initStorage:Bt,_support:Pt(),iterate:Vt,getItem:Ft,setItem:Gt,removeItem:zt,clear:jt,length:Wt,key:Ht,keys:Ut,dropInstance:Xt},Yt=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},qt=function(t,e){for(var r=t.length,n=0;n<r;){if(Yt(t[n],e))return!0;n++}return!1},Zt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Kt={},Qt={},Jt={INDEXEDDB:$,WEBSQL:Dt,LOCALSTORAGE:$t},te=[Jt.INDEXEDDB._driver,Jt.WEBSQL._driver,Jt.LOCALSTORAGE._driver],ee=["dropInstance"],re=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ee),ne={description:"",driver:te.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function oe(t,e){t[e]=function(){var r=arguments;return t.ready().then((function(){return t[e].apply(t,r)}))}}function ie(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var r in e)e.hasOwnProperty(r)&&(Zt(e[r])?arguments[0][r]=e[r].slice():arguments[0][r]=e[r])}return arguments[0]}var ae=function(){function t(e){for(var r in o(this,t),Jt)if(Jt.hasOwnProperty(r)){var n=Jt[r],i=n._driver;this[r]=i,Kt[i]||this.defineDriver(n)}this._defaultConfig=ie({},ne),this._config=ie({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,r){var n=new u((function(e,r){try{var n=t._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void r(o);for(var i=re.concat("_initStorage"),a=0,s=i.length;a<s;a++){var c=i[a];if((!qt(ee,c)||t[c])&&"function"!=typeof t[c])return void r(o)}var f=function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),r=u.reject(e);return l(r,arguments[arguments.length-1]),r}},r=0,n=ee.length;r<n;r++){var o=ee[r];t[o]||(t[o]=e(o))}};f();var d=function(r){Kt[n]&&console.info("Redefining LocalForage driver: "+n),Kt[n]=t,Qt[n]=r,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(d,r):d(!!t._support):d(!0)}catch(h){r(h)}}));return f(n,e,r),n},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,r){var n=Kt[t]?u.resolve(Kt[t]):u.reject(new Error("Driver not found."));return f(n,e,r),n},t.prototype.getSerializer=function(t){var e=u.resolve(vt);return f(e,t),e},t.prototype.ready=function(t){var e=this,r=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return f(r,t,t),r},t.prototype.setDriver=function(t,e,r){var n=this;Zt(t)||(t=[t]);var o=this._getSupportedDrivers(t);function i(){n._config.driver=n.driver()}function a(t){return n._extend(t),i(),n._ready=n._initStorage(n._config),n._ready}function s(t){return function(){var e=0;function r(){for(;e<t.length;){var o=t[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(o).then(a).catch(r)}i();var s=new Error("No available storage method found.");return n._driverSet=u.reject(s),n._driverSet}return r()}}var c=null!==this._driverSet?this._driverSet.catch((function(){return u.resolve()})):u.resolve();return this._driverSet=c.then((function(){var t=o[0];return n._dbInfo=null,n._ready=null,n.getDriver(t).then((function(t){n._driver=t._driver,i(),n._wrapLibraryMethodsWithReady(),n._initDriver=s(o)}))})).catch((function(){i();var t=new Error("No available storage method found.");return n._driverSet=u.reject(t),n._driverSet})),f(this._driverSet,e,r),this._driverSet},t.prototype.supports=function(t){return!!Qt[t]},t.prototype._extend=function(t){ie(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],r=0,n=t.length;r<n;r++){var o=t[r];this.supports(o)&&e.push(o)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=re.length;t<e;t++)oe(this,re[t])},t.prototype.createInstance=function(e){return new t(e)},t}(),se=new ae;e.exports=se},{3:3}]},{},[4])(4)}(_r);var wr=_r.exports;wr.config({driver:wr.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const br={init:async t=>{let e=await wr.getItem(t.url);e&&(t.headers["x-tag"]=e.xtag,t.data=e.data)},save:async(t,e)=>{if(304===t.status)t.data=e.data;else if(t.status<400)try{let r={xtag:t.headers["x-tag"],data:t.data};await wr.setItem(e.url,r)}catch(r){console.info("Cache: ",r)}},clear:()=>{wr.clear()}},Cr={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Er(t){const r=a.useHistory(),n=new AbortController,{globalApiConfig:o}=re(),[i,s]=e.useState(Cr);return"string"==typeof t&&(t={url:t}),[async function(e){var i,a,u;let l,f={username:o.auth.username,password:o.auth.password};if(t.headers={},o.getToken){let e=o.getToken();e&&(o.auth.prefix&&(e=`${o.auth.prefix} ${e}`),t.headers[o.auth.header]=e)}o.ident&&(t.headers["x-identify"]=o.ident),t.cache=Boolean(o.isProductionMode&&(!t.method||"get"==t.method)),(null==t?void 0:t.cache)&&await br.init(t);let d={baseURL:o.baseURL,timeout:o.timeout,auth:f,validateStatus:t=>t>=200&&t<400,...t,...e};d.report&&(d={...d,responseType:"blob",timeout:0}),s({...Cr,loading:!0}),d.onBefore&&d.onBefore(d);try{const t=await c({...d,signal:n.signal});o.afterRequest&&o.afterRequest(t),l={...Cr,data:t.data,message:t.statusText,status:t.status,headers:t.headers}}catch(p){if("ERR_NETWORK"===(null==p?void 0:p.code))l={...Cr,isError:!0,message:p.message,status:400};else if(p.response)switch(l={...Cr,isError:!0,status:p.response.status,message:null==(i=p.response.data)?void 0:i.error,code:null==(a=p.response.data)?void 0:a.code},p.response.status){case 400:if("blob"===(null==d?void 0:d.responseType)){let t=await p.response.data.text();t=JSON.parse(t),l.message=t.error||"Ocorreu um erro ao consultar o servidor!"}break;case 401:l.message="Servidor requer autenticação!",o.setToken&&o.setToken(""),r.push(o.loginRoute);break;case 404:l.message="Servidor não possui este recurso!";break;case 405:l.message=`Método [${(null==(u=d.method)?void 0:u.toUpperCase())||"GET"}] indisponível!`}else l={...Cr,isError:!0,message:p.message}}const h=`timeout of ${o.timeout}ms exceeded`;return l.message!==h&&"Network Error"!==l.message||(l.message="Sem conexão com o servidor!"),l.isError?l.error=l.message:l.error=null,(null==t?void 0:t.cache)&&await br.save(l,t),l={...l,loading:!1},s(l),(null==t?void 0:t.onTerminated)&&t.onTerminated(l),l},i,function(){n&&n.abort("Cancelado pelo usuário!")}]}let Ar=null;function Ir({url:t,file:n,fileTo:o,setLoading:i}){const[a,c]=e.useState(""),[u,l]=e.useState(!1),[f,d]=e.useState(0),[h,p]=e.useState(n),[g,m]=e.useState(""),[v,,y]=Er({url:t,method:"post",data:{file:h},report:!0,onDownloadProgress:t=>{l(t.loaded>0),d(t.loaded/t.total*100)},onTerminated:t=>{if(204===t.status)return w(3);var e;t.error?(c(t.error),_()):r.isDesktop()?(e=t.data,m(URL.createObjectURL(e))):(s(t.data,function(){let t=o.split(".");return t[0]+="-"+r.getHash(o),t=t.join("."),t}()),p(""))}});function _(){Ar&&clearTimeout(Ar)}function w(t){_(),Ar=setTimeout((()=>v()),1e3*t)}return e.useEffect((()=>()=>_()),[]),e.useEffect((()=>()=>g&&URL.revokeObjectURL(g)),[g]),e.useEffect((()=>{h?(i(!0),w(2)):i(!1)}),[h]),Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("div",{className:"loading-report--area",children:[Jt.jsxs("div",{className:"loading-box",style:{display:g?"none":"block"},children:[Jt.jsx("button",{className:"btn-loading-close",title:"Cancelar",onClick:function(){u?y():c(""),i(!1)},children:Jt.jsx("i",{className:"fas fa-times"})}),Jt.jsxs("div",{className:"line",children:[u?Jt.jsx("i",{className:"fa-solid fa-file-arrow-down pulse"}):Jt.jsx("div",{className:"spinner"}),Jt.jsx("span",{children:u?"Baixando relatório...":"Gerando relatório..."})]}),Jt.jsx("div",{className:"pbar",children:Jt.jsx("div",{style:{width:`${f}%`}})})]}),g&&Jt.jsx(vr,{fileTo:o,previewUrl:g,setVisible:()=>p(""),visible:!0})]}),a&&Jt.jsx(ae,{onConfirm:()=>i(!1),children:a})]})}function Sr({valor:t,time:n,format:o,currency:i}){const[a,s]=e.useState(0);return e.useEffect((()=>{const e=setInterval((()=>{const r=Math.ceil(t/10)+1;s((n=>{let o=n+r;return o>t&&(o=t),o===t&&clearInterval(e),o}))}),n);return()=>clearInterval(e)}),[t,n]),o?r.formatValor(a,i?2:0,Boolean(i)):a}function Or({search:t,setSearch:n,fnSearch:o,fnFilter:a,fnValidateFilter:s,placeHolder:c,...u}){const l=e.useRef();return Jt.jsxs("div",{className:"inp-pesq--input-area",children:[Jt.jsxs(i.InputGroup,{children:[Jt.jsx(i.Input,{innerRef:l,value:t,onChange:t=>n(t.target.value),placeholder:c,...u}),Jt.jsx(i.Button,{color:"outline-secondary",type:"button",onClick:()=>{n(""),r.isDesktop()&&(null==l?void 0:l.current)&&l.current.focus()},title:"Limpar campo de pesquisa",children:Jt.jsx(rr,{})}),Jt.jsx(i.Button,{color:"info",title:"Pesquisar",onClick:o,type:o?"button":"submit",children:Jt.jsx(er,{})})]}),a&&Jt.jsxs(i.Button,{type:"button",color:"outline-filter",className:"position-relative ip--btn-filter",title:"Filtros avançados",onClick:a,children:[Jt.jsx("i",{className:"fas fa-filter"})," Filtros",s&&s()&&Jt.jsx("span",{className:"position-absolute top-0 start-100 translate-middle \r\n p-2 bg-danger border border-light rounded-circle",children:Jt.jsx("span",{className:"visually-hidden",children:"Filtro ativo"})})]})]})}function Tr({to:t,children:e,...r}){return Jt.jsx("a",{href:t||e,target:"_blank",rel:"noreferrer",...r,children:e||t})}Sr.defaultProps={valor:0,time:25,format:!1,currency:!1};const Nr=o.div`
424
424
  display: flex;
425
425
  justify-content: center;
426
426
  align-items: center;
427
427
  background-color: var(--jc-overlay-bg);
428
- padding: 0 6px;
428
+ padding: 0 calc(6px + var(--scroll-width)) 0 6px;
429
429
 
430
430
  position: fixed;
431
431
  top: 0;
@@ -455,7 +455,7 @@
455
455
  padding: 10px 15px;
456
456
  }
457
457
  }
458
- `,xr="modal-hide-sb";function Rr({maxWidth:t,visible:n,setVisible:o,title:i,children:a,hideScrollBar:s=!0,id:c}){const{addModal:u,removeModal:l}=re(),[f]=e.useState(c||"modal-"+r.random());return e.useEffect((()=>(n?s&&document.body.classList.add(xr):(l(f),s&&document.body.classList.remove(xr)),()=>{l(f),s&&document.body.classList.remove(xr)})),[n,s]),e.useEffect((()=>{u(f,o)}),[f]),n?Jt.jsx(Nr,{maxWidth:t,children:Jt.jsxs("div",{className:"mod-panel",children:[Jt.jsxs(gr,{children:[Jt.jsx("div",{className:"pn-title",children:i}),Jt.jsx(cr,{type:"button",onClick:()=>o(!1)})]}),Jt.jsx("div",{className:"mod-body",children:a})]})}):null}var Dr,Pr,Mr,kr=(Dr=function(t,e){return(Dr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}Dr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Lr=function(t){function e(e){var r,n,o,i=this.constructor,a=t.call(this,e)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),r=a,n=i.prototype,(o=Object.setPrototypeOf)?o(r,n):r.__proto__=n,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(a),a}return kr(e,t),e}(Error),Br=(Mr=function(t,e){return(Mr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}Mr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),jr=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return Br(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(Lr),Fr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fr(e,t),e.kind="ArgumentException",e}(jr),Hr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ur=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hr(e,t),e.kind="IllegalArgumentException",e}(jr),Wr=function(){function t(t){if(this.binarizer=t,null===t)throw new Ur("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),zr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zr(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(jr),Xr=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),$r=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Yr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Yr(e,t),e.kind="IndexOutOfBoundsException",e}(jr),Zr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kr=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return Zr(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(qr),Qr=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new Ur("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new Kr(e);if(r>t)throw new Kr(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next())n=31*n+i.value}catch(a){e={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return $r.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Jr=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!=(e=t<<16)&&(r-=16,t=e),0!=(e=t<<8)&&(r-=8,t=e),0!=(e=t<<4)&&(r-=4,t=e),0!=(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-(t>>>31)},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),tn=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);$r.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Jr.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Jr.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new Ur;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new Ur;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new Ur("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new Ur("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var c=t[o];s|=c<<32-a,t[o-1]=s,s=c>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&Qr.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+Qr.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)0==(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ASSUME_GS1=7]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"}(Pr||(Pr={}));var en,rn=Pr,nn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),on=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nn(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(jr);!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(en||(en={}));var an,sn=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var c=this.values,u=0,l=c.length;u!==l;u++){var f=c[u];t.VALUES_TO_ECI.set(f,this)}try{for(var d=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),h=d.next();!h.done;h=d.next()){var p=h.value;t.NAME_TO_ECI.set(p,this)}}catch(g){o={error:g}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new on("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new on("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new on("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(en.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(en.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(en.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(en.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(en.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(en.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(en.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(en.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(en.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(en.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(en.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(en.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(en.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(en.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(en.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(en.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(en.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(en.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(en.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(en.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(en.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(en.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(en.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(en.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(en.Big5,28,"Big5"),t.GB18030=new t(en.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(en.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),cn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cn(e,t),e.kind="UnsupportedOperationException",e}(jr),ln=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof sn?t:sn.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(sn.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new un("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(sn.UTF8)||t.equals(sn.ISO8859_1)||t.equals(sn.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),fn=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return ln.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(rn.CHARACTER_SET))return r.get(rn.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,c=0,u=0,l=0,f=0,d=0,h=0,p=0,g=0,m=0,y=0,v=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],_=0;_<n&&(o||i||a);_++){var w=255&e[_];a&&(s>0?0==(128&w)?a=!1:s--:0!=(128&w)&&(0==(64&w)?a=!1:(s++,0==(32&w)?c++:(s++,0==(16&w)?u++:(s++,0==(8&w)?l++:a=!1))))),o&&(w>127&&w<160?o=!1:w>159&&(w<192||215===w||247===w)&&y++),i&&(f>0?w<64||127===w||w>252?i=!1:f--:128===w||160===w||w>239?i=!1:w>160&&w<224?(d++,p=0,++h>g&&(g=h)):w>127?(f++,h=0,++p>m&&(m=p)):(h=0,p=0))}return a&&s>0&&(a=!1),i&&f>0&&(i=!1),a&&(v||c+u+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===d||10*y>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var c,u=a?parseInt(a.substr(1)):void 0;switch(s){case"s":c=e[n];break;case"c":c=e[n][0];break;case"f":c=parseFloat(e[n]).toFixed(t);break;case"p":c=parseFloat(e[n]).toPrecision(t);break;case"e":c=parseFloat(e[n]).toExponential(t);break;case"x":c=parseInt(e[n]).toString(u||16);break;case"d":c=parseFloat(parseInt(e[n],u||10).toPrecision(t)).toFixed(0)}c="object"==typeof c?JSON.stringify(c):(+c).toString(u);for(var l=parseInt(o),f=o&&o[0]+""=="0"?"0":" ";c.length<l;)c=void 0!==r?c+f:f+c;return c}}))},t.getBytes=function(t,e){return ln.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=sn.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=sn.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=sn.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),dn=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=fn.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)},t}(),hn=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new Ur("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new Ur("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,c=0,u=0;u<e.length;)if("\n"===e.charAt(u)||"\r"===e.charAt(u)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Ur("row lengths do not match");a=i,c++}u++}else if(e.substring(u,u+r.length)===r)u+=r.length,o[i]=!0,i++;else{if(e.substring(u,u+n.length)!==n)throw new Ur("illegal character encountered: "+e.substring(u));u+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Ur("row lengths do not match");c++}for(var l=new t(s,c),f=0;f<i;f++)o[f]&&l.set(Math.floor(f%s),Math.floor(f/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return 0!=(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Ur("input matrix dimensions do not match");for(var e=new tn(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),c=0;c<r;c++)n[a+c]^=s[c]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new Ur("Left and top must be nonnegative");if(n<1||r<1)throw new Ur("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new Ur("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,c=e;c<i;c++)for(var u=c*a,l=t;l<o;l++)s[u+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new tn(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){$r.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new tn(t),n=new tn(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,c=0;c<e;c++)for(var u=0;u<r;u++){var l=n[c*r+u];if(0!==l){if(c<i&&(i=c),c>s&&(s=c),32*u<o){for(var f=0;0==(l<<31-f&4294967295);)f++;32*u+f<o&&(o=32*u+f)}if(32*u+31>a){for(f=31;l>>>f==0;)f--;32*u+f>a&&(a=32*u+f)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;0==(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&Qr.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return 31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+Qr.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new dn,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),pn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pn(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(jr),mn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yn=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return mn(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new tn(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var c=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<c&&r.set(s);else{var u=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var f=255&i[s+1];(4*l-u-f)/2<c&&r.set(s),u=l,l=f}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new hn(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),c=t.getRow(s,this.luminances),u=Math.floor(4*r/5),l=Math.floor(r/5);l<u;l++)i[(255&c[l])>>e.LUMINANCE_SHIFT]++;var f=e.estimateBlackPoint(i),d=t.getMatrix();for(a=0;a<n;a++){var h=a*r;for(l=0;l<r;l++)(255&d[h+l])<f&&o.set(l,a)}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,c=0;for(a=0;a<r;a++){var u=a-o;(h=t[a]*u*u)>c&&(s=a,c=h)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new gn;var f=s-1,d=-1;for(a=s-1;a>o;a--){var h,p=a-o;(h=p*p*(s-a)*(n-t[a]))>d&&(f=a,d=h)}return f<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Xr),vn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_n=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return vn(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;0!=(n&e.BLOCK_SIZE_MASK)&&a++;var s=o>>e.BLOCK_SIZE_POWER;0!=(o&e.BLOCK_SIZE_MASK)&&s++;var c=e.calculateBlackPoints(i,a,s,n,o),u=new hn(n,o);e.calculateThresholdForBlock(i,a,s,n,o,c,u),this.matrix=u}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var c=i-e.BLOCK_SIZE,u=o-e.BLOCK_SIZE,l=0;l<n;l++){var f=l<<e.BLOCK_SIZE_POWER;f>c&&(f=c);for(var d=e.cap(l,2,n-3),h=0;h<r;h++){var p=h<<e.BLOCK_SIZE_POWER;p>u&&(p=u);for(var g=e.cap(h,2,r-3),m=0,y=-2;y<=2;y++){var v=a[d+y];m+=v[g-2]+v[g-1]+v[g]+v[g+1]+v[g+2]}var _=m/25;e.thresholdBlock(t,p,f,_,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,c=n*i+r;s<e.BLOCK_SIZE;s++,c+=i)for(var u=0;u<e.BLOCK_SIZE;u++)(255&t[c+u])<=o&&a.set(r+u,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,c=new Array(n),u=0;u<n;u++){c[u]=new Int32Array(r);var l=u<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var f=0;f<r;f++){var d=f<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var h=0,p=255,g=0,m=0,y=l*o+d;m<e.BLOCK_SIZE;m++,y+=o){for(var v=0;v<e.BLOCK_SIZE;v++){var _=255&t[y+v];h+=_,_<p&&(p=_),_>g&&(g=_)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,y+=o;m<e.BLOCK_SIZE;m++,y+=o)for(v=0;v<e.BLOCK_SIZE;v++)h+=255&t[y+v]}var w=h>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(w=p/2,u>0&&f>0)){var b=(c[u-1][f]+2*c[u][f-1]+c[u-1][f-1])/4;p<b&&(w=b)}c[u][f]=w}}return c},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(yn),wn=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new un("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new un("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new un("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new dn,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i,a=255&n[o];i=a<64?"#":a<128?"+":a<192?".":" ",e.append(i)}e.append("\n")}return e.toString()},t}(),bn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cn=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return bn(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(wn),En=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return En(e,t),e.makeBufferFromCanvasImageData=function(t){var r=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(r.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;s=0===t[o+3]?255:306*t[o]+601*t[o+1]+117*t[o+2]+512>>10,n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),c=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=c,n.translate(s/2,c/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new Cn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e}(wn),In=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),Sn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n.throw(t))}catch(e){i(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},On=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Tn=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return Sn(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,c,u,l,f;return On(this,(function(d){switch(d.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=d.sent(),e=[];try{for(r=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),c=o.groupId,u={deviceId:a,label:s,kind:i,groupId:c},e.push(u))}catch(h){l={error:h}}finally{try{n&&!n.done&&(f=r.return)&&f.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return Sn(this,void 0,void 0,(function(){return On(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new In(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return Sn(this,void 0,void 0,(function(){var e;return On(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return Sn(this,void 0,void 0,(function(){return On(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return Sn(this,void 0,void 0,(function(){return On(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return Sn(this,void 0,void 0,(function(){var n;return On(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return Sn(this,void 0,void 0,(function(){var n;return On(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return Sn(this,void 0,void 0,(function(){var n;return On(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return Sn(this,void 0,void 0,(function(){return On(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Vr("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Vr("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new Vr("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new Vr("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new Vr("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new Vr("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new Vr("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new Vr("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new Vr("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new Vr("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return Sn(this,void 0,void 0,(function(){return On(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return Sn(this,void 0,void 0,(function(){return On(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(n._stopAsyncDecode)return a(new gn("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(s){if(e&&s instanceof gn||(s instanceof Gr||s instanceof on)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(s)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(i){e(null,i),(i instanceof Gr||i instanceof on||i instanceof gn)&&setTimeout(n,r._timeBetweenDecodingAttempts)}};n()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){var e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);var r=this.getCaptureCanvas(t),n=new An(r),o=new _n(n);return new Wr(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),Nn=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=$r.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?$r.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);$r.arraycopy(e,0,r,0,e.length),$r.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(an||(an={}));var xn,Rn=an;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(xn||(xn={}));var Dn,Pn=xn,Mn=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),kn=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Ur;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),Ln=function(){function t(t,e){if(0===e.length)throw new Ur;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),$r.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=kn.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=kn.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Ur("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;$r.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=kn.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Ur("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,c=0;c<n;c++)for(var u=r[c],l=0;l<i;l++)a[c+l]=kn.addOrSubtract(a[c+l],s.multiply(u,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Ur;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new Ur("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new Ur("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),c=t.multiplyByMonomial(a,s),u=e.buildMonomial(a,s);r=r.addOrSubtract(u),n=n.addOrSubtract(c)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),Bn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(e,t),e.kind="ArithmeticException",e}(jr),Fn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vn=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var c=new Int32Array(r);for(s=0;s<r-1;s++)c[i[s]]=s;return o.logTable=c,o.zero=new Ln(o,Int32Array.from([0])),o.one=new Ln(o,Int32Array.from([1])),o}return Fn(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Ur;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Ln(this,r)},e.prototype.inverse=function(t){if(0===t)throw new jn;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Jr.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(kn),Hn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hn(e,t),e.kind="ReedSolomonException",e}(jr),Wn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wn(e,t),e.kind="IllegalStateException",e}(jr),Gn=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new Ln(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var c=new Ln(r,o),u=this.runEuclideanAlgorithm(r.buildMonomial(e,1),c,e),l=u[0],f=u[1],d=this.findErrorLocations(l),h=this.findErrorMagnitudes(f,d);for(a=0;a<d.length;a++){var p=t.length-1-r.log(d[a]);if(p<0)throw new Un("Bad error location");t[p]=Vn.addOrSubtract(t[p],h[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),c=o.getOne();a.getDegree()>=(r/2|0);){var u=i,l=s;if(s=c,(i=a).isZero())throw new Un("r_{i-1} was zero");a=u;for(var f=o.getZero(),d=i.getCoefficient(i.getDegree()),h=o.inverse(d);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),h);f=f.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(c=f.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new zn("Division algorithm failed to reduce polynomial?")}var m=c.getCoefficient(0);if(0===m)throw new Un("sigmaTilde(0) was zero");var y=o.inverse(m);return[c.multiplyScalar(y),a.multiplyScalar(y)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Un("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,c=0;c<r;c++)if(i!==c){var u=o.multiply(e[c],a),l=0==(1&u)?1|u:-2&u;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(Dn||(Dn={}));var Xn=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new Mn(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=Dn.UPPER,o=Dn.UPPER,i="",a=0;a<r;)if(o===Dn.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var c=0;c<s;c++){if(r-a<8){a=r;break}var u=t.readCode(e,a,8);i+=fn.castAsNonUtf8Char(u),a+=8}o=n}else{var l=o===Dn.DIGIT?4:5;if(r-a<l)break;u=t.readCode(e,a,l),a+=l;var f=t.getCharacter(o,u);f.startsWith("CTRL_")?(n=o,o=t.getTable(f.charAt(5)),"L"===f.charAt(6)&&(n=o)):(i+=f,o=n)}return i},t.getTable=function(t){switch(t){case"L":return Dn.LOWER;case"P":return Dn.PUNCT;case"M":return Dn.MIXED;case"D":return Dn.DIGIT;case"B":return Dn.BINARY;default:return Dn.UPPER}},t.getCharacter=function(e,r){switch(e){case Dn.UPPER:return t.UPPER_TABLE[r];case Dn.LOWER:return t.LOWER_TABLE[r];case Dn.MIXED:return t.MIXED_TABLE[r];case Dn.PUNCT:return t.PUNCT_TABLE[r];case Dn.DIGIT:return t.DIGIT_TABLE[r];default:throw new zn("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Vn.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Vn.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Vn.AZTEC_DATA_10):(n=12,r=Vn.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new on;for(var a=e.length%n,s=new Int32Array(i),c=0;c<i;c++,a+=n)s[c]=t.readCode(e,a,n);try{new Gn(r).decode(s,i-o)}catch(g){throw new on(g)}var u=(1<<n)-1,l=0;for(c=0;c<o;c++){if(0===(h=s[c])||h===u)throw new on;1!==h&&h!==u-1||l++}var f=new Array(o*n-l),d=0;for(c=0;c<o;c++){var h;if(1===(h=s[c])||h===u-1)f.fill(h>1,d,d+n-1),d+=n-1;else for(var p=n-1;p>=0;--p)f[d++]=0!=(h&1<<p)}return f},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Jr.truncDivision(Jr.truncDivision(n,2)-1,15),c=n/2,u=Jr.truncDivision(s,2);for(a=0;a<c;a++){var l=a+Jr.truncDivision(a,15);o[c-a-1]=u-l-1,o[c+a]=u+l+1}}a=0;for(var f=0;a<r;a++){for(var d=4*(r-a)+(e?9:12),h=2*a,p=n-1-h,g=0;g<d;g++)for(var m=2*g,y=0;y<2;y++)i[f+m+y]=t.get(o[h+y],o[h+g]),i[f+2*d+m+y]=t.get(o[h+g],o[p-y]),i[f+4*d+m+y]=t.get(o[p-y],o[p-g]),i[f+6*d+m+y]=t.get(o[p-g],o[h+y]);f+=8*d}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","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","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","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","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b","\t","\n","\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),$n=function(){function t(){}return t.round=function(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++)e+=t[r];return e},t}(),Yn=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),qn=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Yn.floatToIntBits(this.x)+Yn.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return $n.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),Zn=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Kn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qn=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return Kn(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Zn),Jn=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new gn}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,c=!1,u=!1,l=!1,f=this.width,d=this.height;i;){i=!1;for(var h=!0;(h||!s)&&e<f;)(h=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=f){o=!0;break}for(var p=!0;(p||!c)&&n<d;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,c=!0):c||n++;if(n>=d){o=!0;break}for(var g=!0;(g||!u)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,u=!0):u||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var y=e-t,v=null,_=1;null===v&&_<y;_++)v=this.getBlackPointOnSegment(t,n-_,t+_,n);if(null==v)throw new gn;var w=null;for(_=1;null===w&&_<y;_++)w=this.getBlackPointOnSegment(t,r+_,t+_,r);if(null==w)throw new gn;var b=null;for(_=1;null===b&&_<y;_++)b=this.getBlackPointOnSegment(e,r+_,e-_,r);if(null==b)throw new gn;var C=null;for(_=1;null===C&&_<y;_++)C=this.getBlackPointOnSegment(e,n-_,e-_,n);if(null==C)throw new gn;return this.centerEdges(C,v,b,w)}throw new gn},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=$n.round($n.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,c=0;c<o;c++){var u=$n.round(t+c*i),l=$n.round(e+c*a);if(s.get(u,l))return new qn(u,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),c=r.getY(),u=n.getX(),l=n.getY(),f=o.getX(),d=o.getY(),h=t.CORR;return i<this.width/2?[new qn(f-h,d+h),new qn(s+h,c+h),new qn(u-h,l-h),new qn(i+h,a-h)]:[new qn(f+h,d+h),new qn(s+h,c-h),new qn(u-h,l+h),new qn(i-h,a-h)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),to=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new gn;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}for(o=!0,i=e.length-2;i>=0&&o;i-=2){if(a=Math.floor(e[i]),s=Math.floor(e[i+1]),a<-1||a>r||s<-1||s>n)throw new gn;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),eo=function(){function t(t,e,r,n,o,i,a,s,c){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=c}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,c,u,l,f,d,h,p,g,m){var y=t.quadrilateralToSquare(e,r,n,o,i,a,s,c);return t.squareToQuadrilateral(u,l,f,d,h,p,g,m).times(y)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33,f=0;f<e;f+=2){var d=t[f],h=t[f+1],p=o*d+s*h+l;t[f]=(r*d+i*h+c)/p,t[f+1]=(n*d+a*h+u)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33,f=t.length,d=0;d<f;d++){var h=t[d],p=e[d],g=o*h+s*p+l;t[d]=(r*h+i*p+c)/g,e[d]=(n*h+a*p+u)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,c){var u=e-n+i-s,l=r-o+a-c;if(0===u&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var f=n-i,d=s-i,h=o-a,p=c-a,g=f*p-d*h,m=(u*p-d*l)/g,y=(f*l-u*h)/g;return new t(n-e+m*n,s-e+y*s,e,o-r+m*o,c-r+y*c,r,m,y,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,c){return t.squareToQuadrilateral(e,r,n,o,i,a,s,c).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),ro=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),no=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,c,u,l,f,d,h,p,g,m,y,v){var _=eo.quadrilateralToQuadrilateral(n,o,i,a,s,c,u,l,f,d,h,p,g,m,y,v);return this.sampleGridWithTransform(t,e,r,_)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new gn;for(var o=new hn(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,c=a+.5,u=0;u<s;u+=2)i[u]=u/2+.5,i[u+1]=c;n.transformPoints(i),to.checkAndNudgePoints(t,i);try{for(u=0;u<s;u+=2)t.get(Math.floor(i[u]),Math.floor(i[u+1]))&&o.set(u/2,a)}catch(l){throw new gn}}return o},e}(to),oo=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new no,t}(),io=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new qn(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),ao=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Qn(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new gn;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(t>>e-2<<1)+(1&t)+(r<<3)})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Jr.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new gn},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new Gn(Vn.AZTEC_PARAM).decode(i,o)}catch(c){throw new gn}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),c=this.getFirstDifferent(n,i,-1,1),u=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(u,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,c,u))break}e=a,r=s,n=c,o=u,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new gn;this.compact=5===this.nbCenterLayers;var f=new qn(e.getX()+.5,e.getY()-.5),d=new qn(r.getX()+.5,r.getY()+.5),h=new qn(n.getX()-.5,n.getY()+.5),p=new qn(o.getX()-.5,o.getY()-.5);return this.expandSquare([f,d,h,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(c=new Jn(this.image).detect())[0],e=c[1],r=c[2],n=c[3]}catch(u){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new io(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new io(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new io(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new io(o-7,i-7),!1,-1,-1).toResultPoint()}var a=$n.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=$n.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var c;t=(c=new Jn(this.image,15,a,s).detect())[0],e=c[1],r=c[2],n=c[3]}catch(l){t=this.getFirstDifferent(new io(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new io(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new io(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new io(a-7,s-7),!1,-1,-1).toResultPoint()}return a=$n.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=$n.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new io(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=oo.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,c=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,c,s,c,c,s,c,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),c=i*(e.getX()-t.getX())/o,u=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get($n.round(a+l*c),$n.round(s+l*u))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new io(t.getX()-3,t.getY()+3),e=new io(e.getX()-3,e.getY()-3),r=new io(r.getX()+3,r.getY()-3),n=new io(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&(i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),c=this.image.get(t.getX(),t.getY()),u=Math.ceil(r),l=0;l<u;l++)a+=n,s+=o,this.image.get($n.round(a),$n.round(s))!==c&&i++;var f=i/r;return f>.1&&f<.9?0:f<=.1===c?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new io(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,c=new qn(a+n*o,s+n*i),u=new qn(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[c,new qn(a+n*o,s+n*i),u,new qn(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=$n.round(t.getX()),r=$n.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return $n.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return $n.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Jr.truncDivision(this.nbLayers-4,8)+1)+15},t}(),so=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new ao(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Xn).decode(a)}catch(l){r=l}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Xn).decode(a)}catch(l){if(null!=r)throw r;throw l}var s=new Nn(i.getText(),i.getRawBytes(),i.getNumBits(),o,Rn.AZTEC,$r.currentTimeMillis()),c=i.getByteSegments();null!=c&&s.putMetadata(Pn.BYTE_SEGMENTS,c);var u=i.getECLevel();return null!=u&&s.putMetadata(Pn.ERROR_CORRECTION_LEVEL,u),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(rn.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),co=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){co((function(e){return void 0===e&&(e=500),t.call(this,new so,e)||this}),t)}(Tn);var uo=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(u){if(e&&!0===e.get(rn.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(Pn.ORIENTATION)&&(i+=o.get(Pn.ORIENTATION)%360),n.putMetadata(Pn.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),c=0;c<a.length;c++)a[c]=new qn(s-a[c].getY()-1,a[c].getX());return n}throw new gn}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new tn(n),a=e&&!0===e.get(rn.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var c=Math.trunc(o/2),u=0;u<r;u++){var l=Math.trunc((u+1)/2),f=c+s*(0==(1&u)?l:-l);if(f<0||f>=o)break;try{i=t.getBlackRow(f,i)}catch(m){continue}for(var d=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(rn.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(rn.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=h.decodeRow(f,i,e);if(1===t){o.putMetadata(Pn.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new qn(n-a[0].getX()-1,a[0].getY()),a[1]=new qn(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(s){}},h=this,p=0;p<2;p++){var g=d(p);if("object"==typeof g)return g.value}}throw new gn},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new gn;for(var a=!t.get(e),s=0,c=e;c<i;){if(t.get(c)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}c++}if(s!==n&&(s!==n-1||c!==i))throw new gn},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new gn;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var c=0,u=0;u<n;u++){var l=t[u],f=e[u]*s,d=l>f?l-f:f-l;if(d>r)return Number.POSITIVE_INFINITY;c+=d}return c/o},t}(),lo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lo(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,c=n;c<r;c++)if(t.get(c)!==s)i[o]++;else{if(5===o){for(var u=e.MAX_AVG_VARIANCE,l=-1,f=e.CODE_START_A;f<=e.CODE_START_C;f++){var d=uo.patternMatchVariance(i,e.CODE_PATTERNS[f],e.MAX_INDIVIDUAL_VARIANCE);d<u&&(u=d,l=f)}if(l>=0&&t.isRange(Math.max(0,a-(c-a)/2),a,!1))return Int32Array.from([a,c,l]);a+=i[0]+i[1],(i=i.slice(2,i.length-1))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new gn},e.decodeCode=function(t,r,n){uo.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],c=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);c<o&&(o=c,i=a)}if(i>=0)return i;throw new gn},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(rn.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],c=0,u=new Uint8Array(20);switch(u[c++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new on}for(var l=!1,f=!1,d="",h=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,y=0,v=s,_=0,w=!0,b=!1,C=!1;!l;){var E=f;switch(f=!1,m=y,y=e.decodeCode(r,g,p),u[c++]=y,y!==e.CODE_STOP&&(w=!0),y!==e.CODE_STOP&&(v+=++_*y),h=p,p+=g.reduce((function(t,e){return t+e}),0),y){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new on}switch(o){case e.CODE_CODE_A:if(y<64)d+=C===b?String.fromCharCode(" ".charCodeAt(0)+y):String.fromCharCode(" ".charCodeAt(0)+y+128),C=!1;else if(y<96)d+=C===b?String.fromCharCode(y-64):String.fromCharCode(y+64),C=!1;else switch(y!==e.CODE_STOP&&(w=!1),y){case e.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!b&&C?(b=!0,C=!1):b&&C?(b=!1,C=!1):C=!0;break;case e.CODE_SHIFT:f=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(y<96)d+=C===b?String.fromCharCode(" ".charCodeAt(0)+y):String.fromCharCode(" ".charCodeAt(0)+y+128),C=!1;else switch(y!==e.CODE_STOP&&(w=!1),y){case e.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!b&&C?(b=!0,C=!1):b&&C?(b=!1,C=!1):C=!0;break;case e.CODE_SHIFT:f=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(y<100)y<10&&(d+="0"),d+=y;else switch(y!==e.CODE_STOP&&(w=!1),y){case e.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}E&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var A=p-h;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-h)/2),!1))throw new gn;if((v-=_*m)%103!==m)throw new Gr;var I=d.length;if(0===I)throw new gn;I>0&&w&&(d=o===e.CODE_CODE_C?d.substring(0,I-2):d.substring(0,I-1));for(var S=(a[1]+a[0])/2,O=h+A/2,T=u.length,N=new Uint8Array(T),x=0;x<T;x++)N[x]=u[x];var R=[new qn(S,t),new qn(O,t)];return new Nn(d,N,0,R,Rn.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(uo),ho=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),po=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},go=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return ho(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,c=this.counters;c.fill(0),this.decodeRowResult="";var u,l,f=e.findAsteriskPattern(r,c),d=r.getNextSet(f[1]),h=r.getSize();do{e.recordPattern(r,d,c);var p=e.toNarrowWidePattern(c);if(p<0)throw new gn;u=e.patternToChar(p),this.decodeRowResult+=u,l=d;try{for(var g=(o=void 0,po(c)),m=g.next();!m.done;m=g.next())d+=m.value}catch(S){o={error:S}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var y,v=0;try{for(var _=po(c),w=_.next();!w.done;w=_.next())v+=w.value}catch(S){a={error:S}}finally{try{w&&!w.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}if(d!==h&&2*(d-l-v)<v)throw new gn;if(this.usingCheckDigit){for(var b=this.decodeRowResult.length-1,C=0,E=0;E<b;E++)C+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(E));if(this.decodeRowResult.charAt(b)!==e.ALPHABET_STRING.charAt(C%43))throw new Gr;this.decodeRowResult=this.decodeRowResult.substring(0,b)}if(0===this.decodeRowResult.length)throw new gn;y=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var A=(f[1]+f[0])/2,I=l+v/2;return new Nn(y,null,0,[new qn(A,t),new qn(I,t)],Rn.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,c=r.length,u=o;u<n;u++)if(t.get(u)!==s)r[i]++;else{if(i===c-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((u-a)/2)),a,!1))return[a,u];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new gn},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,po(t)),c=s.next();!c.done;c=s.next())(d=c.value)<a&&d>i&&(a=d)}catch(h){e={error:h}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var u=0,l=0,f=0;f<o;f++)(d=t[f])>i&&(l|=1<<o-1-f,n++,u+=d);if(3===n){for(f=0;f<o&&n>0;f++){var d;if((d=t[f])>i&&(n--,2*d>=u))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new gn},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new on;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new on;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new on;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new on;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(uo),mo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return mo(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),c=new dn;e.decodeMiddle(r,a[1],s[0],c);var u=c.toString(),l=null;null!=n&&(l=n.get(rn.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var f=u.length,d=!1,h=0;try{for(var p=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(f===m){d=!0;break}m>h&&(h=m)}}catch(v){o={error:v}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!d&&f>h&&(d=!0),!d)throw new on;var y=[new qn(a[1],t),new qn(s[0],t)];return new Nn(u,null,0,y,Rn.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){uo.recordPattern(t,r,i);for(var c=0;c<5;c++){var u=2*c;a[c]=i[u],s[c]=i[u+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new gn},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new gn;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(i){i instanceof gn&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,c=0,u=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[c]++;else{if(c===o-1){if(uo.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[u,l];u+=i[0]+i[1],$r.arraycopy(i,2,i,0,c-1),i[c-1]=0,i[c]=0,c--}else c++;i[c]=1,s=!s}throw new gn},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=uo.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new gn},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(uo),vo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return vo(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}for(r*=3,n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,c=r=n?t.getNextUnset(r):t.getNextSet(r),u=o.length,l=n,f=r;f<a;f++)if(t.get(f)!==l)i[s]++;else{if(s===u-1){if(uo.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([c,f]);c+=i[0]+i[1];for(var d=i.slice(2,i.length-1),h=0;h<s-1;h++)i[h]=d[h];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new gn},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,c=0;c<s;c++){var u=o[c],l=uo.patternMatchVariance(r,u,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=c)}if(a>=0)return a;throw new gn},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(uo),wo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bo=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),c=[new qn((n[0]+n[1])/2,e),new qn(i,e)],u=new Nn(a,null,0,c,Rn.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),c=r[1],u=0,l=0;l<5&&c<s;l++){var f=_o.decodeDigit(e,a,c,_o.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var d=(o=void 0,wo(a)),h=d.next();!h.done;h=d.next())c+=h.value}catch(g){o={error:g}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}f>=10&&(u|=1<<4-l),4!==l&&(c=e.getNextSet(c),c=e.getNextUnset(c))}if(5!==n.length)throw new gn;var p=this.determineCheckDigit(u);if(t.extensionChecksum(n.toString())!==p)throw new gn;return c},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);for(r*=3,n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new gn},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[Pn.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),Co=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Eo=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),c=[new qn((n[0]+n[1])/2,e),new qn(i,e)],u=new Nn(a,null,0,c,Rn.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],c=0,u=0;u<2&&s<a;u++){var l=_o.decodeDigit(t,i,s,_o.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var f=(n=void 0,Co(i)),d=f.next();!d.done;d=f.next())s+=d.value}catch(h){n={error:h}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}l>=10&&(c|=1<<1-u),1!==u&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new gn;if(parseInt(r.toString())%4!==c)throw new gn;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[Pn.ISSUE_NUMBER,parseInt(t)]])},t}(),Ao=function(){function t(){}return t.decodeRow=function(t,e,r){var n=_o.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new bo).decodeRow(t,e,n)}catch(o){return(new Eo).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),Io=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),So=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return Io(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(rn.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new qn((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),c=s.rowOffset,u=s.resultString;if(null!=i){var l=new qn(c,t);i.foundPossibleResultPoint(l)}var f=e.decodeEnd(r,c);if(null!=i){var d=new qn((f[0]+f[1])/2,t);i.foundPossibleResultPoint(d)}var h=f[1],p=h+(h-f[0]);if(p>=r.getSize()||!r.isRange(h,p,!1))throw new gn;var g=u.toString();if(g.length<8)throw new on;if(!e.checkChecksum(g))throw new Gr;var m=(o[1]+o[0])/2,y=(f[1]+f[0])/2,v=this.getBarcodeFormat(),_=[new qn(m,t),new qn(y,t)],w=new Nn(g,null,0,_,v,(new Date).getTime()),b=0;try{var C=Ao.decodeRow(t,r,f[1]);w.putMetadata(Pn.UPC_EAN_EXTENSION,C.getText()),w.putAllMetadata(C.getResultMetadata()),w.addResultPoints(C.getResultPoints()),b=C.getText().length}catch(S){}var E=null==n?null:n.get(rn.ALLOWED_EAN_EXTENSIONS);if(null!=E){var A=!1;for(var I in E)if(b.toString()===I){A=!0;break}if(!A)throw new gn}return v===Rn.EAN_13||Rn.UPC_A,w},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}for(r*=3,n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(_o),Oo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),To=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},No=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Oo(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var u=t.getSize(),l=r[1],f=0,d=0;d<6&&l<u;d++){var h=So.decodeDigit(t,c,l,So.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+h%10);try{for(var p=(o=void 0,To(c)),g=p.next();!g.done;g=p.next())l+=g.value}catch(v){o={error:v}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}h>=10&&(f|=1<<5-d)}for(n=e.determineFirstDigit(n,f),l=So.findGuardPattern(t,l,!0,So.MIDDLE_PATTERN,new Int32Array(So.MIDDLE_PATTERN.length).fill(0))[1],d=0;d<6&&l<u;d++){h=So.decodeDigit(t,c,l,So.L_PATTERNS),n+=String.fromCharCode("0".charCodeAt(0)+h);try{for(var m=(a=void 0,To(c)),y=m.next();!y.done;y=m.next())l+=y.value}catch(v){a={error:v}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return Rn.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return String.fromCharCode("0".charCodeAt(0)+r)+t;throw new gn},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(So),xo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ro=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Do=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return xo(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var c=t.getSize(),u=e[1],l=0;l<4&&u<c;l++){var f=So.decodeDigit(t,s,u,So.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var d=(n=void 0,Ro(s)),h=d.next();!h.done;h=d.next())u+=h.value}catch(m){n={error:m}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}for(u=So.findGuardPattern(t,u,!0,So.MIDDLE_PATTERN,new Int32Array(So.MIDDLE_PATTERN.length).fill(0))[1],l=0;l<4&&u<c;l++){f=So.decodeDigit(t,s,u,So.L_PATTERNS),r+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var p=(i=void 0,Ro(s)),g=p.next();!g.done;g=p.next())u+=g.value}catch(m){i={error:m}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:u,resultString:r}},e.prototype.getBarcodeFormat=function(){return Rn.EAN_8},e}(So),Po=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new No,e}return Po(e,t),e.prototype.getBarcodeFormat=function(){return Rn.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new Nn(e.substring(1),null,null,t.getResultPoints(),Rn.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new gn},e.prototype.reset=function(){this.ean13Reader.reset()},e}(So),ko=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bo=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return ko(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),c=r[1],u=0,l=0;l<6&&c<s;l++){var f=e.decodeDigit(t,a,c,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var d=(o=void 0,Lo(a)),h=d.next();!h.done;h=d.next())c+=h.value}catch(p){o={error:p}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}f>=10&&(u|=1<<5-l)}return e.determineNumSysAndCheckDigit(new dn(n),u),c},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return So.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw gn.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Rn.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new dn;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(So),jo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vo=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(rn.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(Rn.EAN_13)>-1?o.push(new No):n.indexOf(Rn.UPC_A)>-1&&o.push(new Mo),n.indexOf(Rn.EAN_8)>-1&&o.push(new Do),n.indexOf(Rn.UPC_E)>-1&&o.push(new Bo)),0===o.length&&(o.push(new No),o.push(new Do),o.push(new Bo)),r.readers=o,r}return jo(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Fo(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var c=s.decodeRow(t,e,r),u=c.getBarcodeFormat()===Rn.EAN_13&&"0"===c.getText().charAt(0),l=null==r?null:r.get(rn.POSSIBLE_FORMATS),f=null==l||l.includes(Rn.UPC_A);if(u&&f){var d=c.getRawBytes(),h=new Nn(c.getText().substring(1),d,d.length,c.getResultPoints(),Rn.UPC_A);return h.putAllMetadata(c.getResultMetadata()),h}return c}catch(p){}}}catch(p){n={error:p}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new gn},e.prototype.reset=function(){var t,e;try{for(var r=Fo(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(o){t={error:o}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(uo),Ho=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uo=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Ho(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(uo.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new gn},e.count=function(t){return $n.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),u=c.next();!u.done;u=c.next()){var l=u.value;l>s&&(s=l),l<a&&(a=l)}}catch(f){r={error:f}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(uo),Wo=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),zo=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new qn(r,o)),this.resultPoints.push(new qn(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),Go=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),c=s.next();!c.done;c=s.next())a+=c.value}catch(y){o={error:y}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var u=0,l=0,f=e.length,d=0;d<f-1;d++){var h=void 0;for(h=1,l|=1<<d;h<e[d];h++,l&=~(1<<d)){var p=t.combins(a-h-1,f-d-2);if(n&&0===l&&a-h-(f-d-1)>=f-d-1&&(p-=t.combins(a-h-(f-d),f-d-2)),f-d-1>1){for(var g=0,m=a-h-(f-d-2);m>r;m--)g+=t.combins(a-h-m-1,f-d-3);p-=g*(f-1-d)}else a-h>r&&p--;u+=p}a-=h}return u},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),Xo=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new tn(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)0!=(o&1<<i)&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),c=11;c>=0;--c)0!=(s&1<<c)&&r.set(n),n++;if(null!=a.getRightChar()){var u=a.getRightChar().getValue();for(c=11;c>=0;--c)0!=(u&1<<c)&&r.set(n),n++}}return r},t}(),$o=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Yo=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),qo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zo=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return qo(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Yo),Ko=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qo=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return Ko(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Yo),Jo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ti=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new on;return o.firstDigit=r,o.secondDigit=n,o}return Jo(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Yo),ei=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ri=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,c,u;if(!e)return null;if(e.length<2)throw new gn;var l=e.substring(0,2);try{for(var f=ei(t.TWO_DIGIT_DATA_LENGTH),d=f.next();!d.done;d=f.next())if((b=d.value)[0]===l)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,b[2],e):t.processFixedAI(2,b[1],e)}catch(C){r={error:C}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(e.length<3)throw new gn;var h=e.substring(0,3);try{for(var p=ei(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next())if((b=g.value)[0]===h)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,b[2],e):t.processFixedAI(3,b[1],e)}catch(C){o={error:C}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=ei(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=m.next();!y.done;y=m.next())if((b=y.value)[0]===h)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,b[2],e):t.processFixedAI(4,b[1],e)}catch(C){a={error:C}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new gn;var v=e.substring(0,4);try{for(var _=ei(t.FOUR_DIGIT_DATA_LENGTH),w=_.next();!w.done;w=_.next()){var b;if((b=w.value)[0]===v)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,b[2],e):t.processFixedAI(4,b[1],e)}}catch(C){c={error:C}}finally{try{w&&!w.done&&(u=_.return)&&u.call(_)}finally{if(c)throw c.error}}throw new gn},t.processFixedAI=function(e,r,n){if(n.length<e)throw new gn;var o=n.substring(0,e);if(n.length<e+r)throw new gn;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,c=t.parseFieldsInGeneralPurpose(a);return null==c?s:s+c},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),c="("+i+")"+a,u=t.parseFieldsInGeneralPurpose(s);return null==u?c:c+u},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),ni=function(){function t(t){this.buffer=new dn,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=ri.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new ti(this.information.getSize(),0===e?ti.FNC1:e-1,ti.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new ti(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new Qo(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new Qo(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),r===this.current.getPosition()&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new Qo(this.current.getPosition(),this.buffer.toString()):new Qo(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new $o(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1())return e=new Qo(this.current.getPosition(),this.buffer.toString()),new $o(!0,e);this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new $o(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Qo(this.current.getPosition(),this.buffer.toString());return new $o(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new $o(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Qo(this.current.getPosition(),this.buffer.toString());return new $o(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new $o(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Zo(t+5,Zo.FNC1);if(e>=5&&e<15)return new Zo(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Zo(t+7,""+(n+1));if(n>=90&&n<116)return new Zo(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new on}return new Zo(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Zo(t+5,Zo.FNC1);if(e>=5&&e<15)return new Zo(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Zo(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new zn("Decoding invalid alphanumeric value: "+n)}return new Zo(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),oi=function(){function t(t){this.information=t,this.generalDecoder=new ni(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),ii=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ai=function(t){function e(e){return t.call(this,e)||this}return ii(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=0==(1&n)?3*o:o}10==(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(oi),si=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ci=function(t){function e(e){return t.call(this,e)||this}return si(e,t),e.prototype.parseInformation=function(){var t=new dn;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(ai),ui=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),li=function(t){function e(e){return t.call(this,e)||this}return ui(e,t),e.prototype.parseInformation=function(){var t=new dn;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(oi),fi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),di=function(t){function e(e){return t.call(this,e)||this}return fi(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(ai),hi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pi=function(t){function e(e){return t.call(this,e)||this}return hi(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+di.GTIN_SIZE+e.WEIGHT_SIZE)throw new gn;var t=new dn;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+di.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(di),gi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mi=function(t){function e(e){return t.call(this,e)||this}return gi(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(pi),yi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vi=function(t){function e(e){return t.call(this,e)||this}return yi(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(pi),_i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wi=function(t){function e(e){return t.call(this,e)||this}return _i(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+ai.GTIN_SIZE)throw new gn;var t=new dn;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+ai.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+ai.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(ai),bi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ci=function(t){function e(e){return t.call(this,e)||this}return bi(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+ai.GTIN_SIZE)throw new gn;var t=new dn;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+ai.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+ai.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+ai.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(ai),Ei=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ai=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return Ei(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new gn;var t=new dn;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!=n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(di),Ii=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern)},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),Si=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),Oi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ti=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ni=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return Oi(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(o){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(i){if(i instanceof gn){if(!this.pairs.length)throw new gn;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new gn},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(r){console.log(r)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,Ti(t)),c=s.next();!c.done;c=s.next()){var u=c.value;this.pairs.push(u.getPairs())}}catch(f){n={error:f}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(f){console.log(f)}}}throw new gn},e.isValidSequence=function(t){var r,n;try{for(var o=Ti(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,c=0;c<t.length;c++)if(t[c].getFinderPattern().getValue()!=a[c]){s=!1;break}if(s)return!0}}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new Si(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var c=Ti(e),u=c.next();!u.done;u=c.next()){var l=u.value;if(l.getPairs().length!==t.length)try{for(var f=(o=void 0,Ti(l.getPairs())),d=f.next();!d.done;d=f.next()){var h=d.value;try{for(var p=(a=void 0,Ti(t)),g=p.next();!g.done;g=p.next()){var m=g.value;if(Ii.equals(h,m)){!0;break}}}catch(y){a={error:y}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(y){o={error:y}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}}catch(y){r={error:y}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var c=Ti(e),u=c.next();!u.done;u=c.next()){var l=u.value,f=!0;try{for(var d=(o=void 0,Ti(t)),h=d.next();!h.done;h=d.next()){var p=h.value,g=!1;try{for(var m=(a=void 0,Ti(l.getPairs())),y=m.next();!y.done;y=m.next()){var v=y.value;if(p.equals(v)){g=!0;break}}}catch(_){a={error:_}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){f=!1;break}}}catch(_){o={error:_}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(f)return!0}}catch(_){r={error:_}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new ci(t);if(!t.get(2))return new li(t);switch(ni.extractNumericValueFromBitArray(t,1,4)){case 4:return new mi(t);case 5:return new vi(t)}switch(ni.extractNumericValueFromBitArray(t,1,5)){case 12:return new wi(t);case 13:return new Ci(t)}switch(ni.extractNumericValueFromBitArray(t,1,7)){case 56:return new Ai(t,"310","11");case 57:return new Ai(t,"320","11");case 58:return new Ai(t,"310","13");case 59:return new Ai(t,"320","13");case 60:return new Ai(t,"310","15");case 61:return new Ai(t,"320","15");case 62:return new Ai(t,"310","17");case 63:return new Ai(t,"320","17")}}catch(e){throw console.log(e),new zn("unknown decoder: "+t)}}(Xo.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new Nn(e,null,null,o,Rn.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null==r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)==e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null==(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var c,u=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new gn;try{c=this.decodeDataCharacter(t,o,i,!1)}catch(l){c=null,console.log(l)}return new Ii(u,c,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();i=n>=0?n:this.isEmptyPair(r)?0:r[r.length-1].getFinderPattern().getStartEnd()[1];var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var c=!1;i<a&&(c=!t.get(i));)i++;for(var u=0,l=i,f=i;f<a;f++)if(t.get(f)!=c)o[u]++;else{if(3==u){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=f);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,u--}else u++;o[u]=1,c=!c}throw new gn},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var c,u=this.getDecodeFinderCounters();$r.arraycopy(u,0,u,1,u.length-1),u[0]=o;try{c=this.parseFinderValue(u,e.FINDER_PATTERNS)}catch(l){return null}return new zo(c,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,c=i.length-1;s<c;s++,c--){var u=i[s];i[s]=i[c],i[c]=u}}var l=$n.sum(new Int32Array(i))/17,f=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-f)/f>.3)throw new gn;var d=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,y=m+.5;if(y<1){if(m<.3)throw new gn;y=1}else if(y>8){if(m>8.7)throw new gn;y=8}var v=s/2;0==(1&s)?(d[v]=y,p[v]=m-y):(h[v]=y,g[v]=m-y)}this.adjustOddEvenCounts(17);var _=4*r.getValue()+(n?0:2)+(o?0:1)-1,w=0,b=0;for(s=d.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var C=e.WEIGHTS[_][2*s];b+=d[s]*C}w+=d[s]}var E=0;for(s=h.length-1;s>=0;s--)e.isNotA1left(r,n,o)&&(C=e.WEIGHTS[_][2*s+1],E+=h[s]*C);var A=b+E;if(0!=(1&w)||w>13||w<4)throw new gn;var I=(13-w)/2,S=e.SYMBOL_WIDEST[I],O=9-S,T=Go.getRSSvalue(d,S,!0),N=Go.getRSSvalue(h,O,!1),x=e.EVEN_TOTAL_SUBSET[I],R=e.GSUM[I];return new Wo(T*x+N+R,A)},e.isNotA1left=function(t,e,r){return!(0==t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=$n.sum(new Int32Array(this.getOddCounts())),n=$n.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var c=r+n-t,u=1==(1&r),l=0==(1&n);if(1==c)if(u){if(l)throw new gn;i=!0}else{if(!l)throw new gn;s=!0}else if(-1==c)if(u){if(l)throw new gn;o=!0}else{if(!l)throw new gn;a=!0}else{if(0!=c)throw new gn;if(u){if(!l)throw new gn;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new gn}if(o){if(i)throw new gn;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new gn;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Uo),xi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ri=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return xi(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Wo),Di=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return Di(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,c=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,c),r.reverse();var u=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,u),r.reverse();try{for(var l=Pi(this.possibleLeftPairs),f=l.next();!f.done;f=l.next()){var d=f.value;if(d.getCount()>1)try{for(var h=(a=void 0,Pi(this.possibleRightPairs)),p=h.next();!p.done;p=h.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(d,g))return e.constructResult(d,g)}}catch(m){a={error:m}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}}}catch(m){o={error:m}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new gn},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Pi(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new dn,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=0==(1&i)?3*s:s}10==(a=10-a%10)&&(a=0),o.append(a.toString());var c=t.getFinderPattern().getResultPoints(),u=e.getFinderPattern().getResultPoints();return new Nn(o.toString(),null,0,[c[0],c[1],u[0],u[1]],Rn.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(rn.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new qn(s,r))}var c=this.decodeDataCharacter(t,i,!0),u=this.decodeDataCharacter(t,i,!1);return new Ri(1597*c.getValue()+u.getValue(),c.getChecksumPortion()+4*u.getChecksumPortion(),i)}catch(l){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)uo.recordPatternInReverse(t,r.getStartEnd()[0],o);else{uo.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var c=o[a];o[a]=o[s],o[s]=c}}var u=n?16:15,l=$n.sum(new Int32Array(o))/u,f=this.getOddCounts(),d=this.getEvenCounts(),h=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var y=Math.floor(a/2);0==(1&a)?(f[y]=m,h[y]=g-m):(d[y]=m,p[y]=g-m)}this.adjustOddEvenCounts(n,u);var v=0,_=0;for(a=f.length-1;a>=0;a--)_*=9,_+=f[a],v+=f[a];var w=0,b=0;for(a=d.length-1;a>=0;a--)w*=9,w+=d[a],b+=d[a];var C=_+3*w;if(n){if(0!=(1&v)||v>12||v<4)throw new gn;var E=(12-v)/2,A=9-(N=e.OUTSIDE_ODD_WIDEST[E]),I=Go.getRSSvalue(f,N,!1),S=Go.getRSSvalue(d,A,!0),O=e.OUTSIDE_EVEN_TOTAL_SUBSET[E],T=e.OUTSIDE_GSUM[E];return new Wo(I*O+S+T,C)}if(0!=(1&b)||b>10||b<4)throw new gn;E=(10-b)/2,A=9-(N=e.INSIDE_ODD_WIDEST[E]),I=Go.getRSSvalue(f,N,!0),S=Go.getRSSvalue(d,A,!1);var N,x=e.INSIDE_ODD_TOTAL_SUBSET[E];return T=e.INSIDE_GSUM[E],new Wo(S*x+I+T,C)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,c=i;c<n;c++)if(t.get(c)!==o)r[a]++;else{if(3===a){if(Uo.isFinderPattern(r))return[s,c];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new gn},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,c=this.getDecodeFinderCounters(),u=new Int32Array(c.length);$r.arraycopy(c,0,u,1,c.length-1),u[0]=s;var l=this.parseFinderValue(u,e.FINDER_PATTERNS),f=a,d=o[1];return n&&(f=t.getSize()-1-f,d=t.getSize()-1-d),new zo(l,[a,o[1]],f,d,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=$n.sum(new Int32Array(this.getOddCounts())),n=$n.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var c=r+n-e,u=(1&r)==(t?1:0),l=1==(1&n);if(1===c)if(u){if(l)throw new gn;i=!0}else{if(!l)throw new gn;s=!0}else if(-1===c)if(u){if(l)throw new gn;o=!0}else{if(!l)throw new gn;a=!0}else{if(0!==c)throw new gn;if(u){if(!l)throw new gn;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new gn}if(o){if(i)throw new gn;Uo.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Uo.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new gn;Uo.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Uo.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Uo),ki=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Li=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(rn.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(rn.ASSUME_CODE_39_CHECK_DIGIT);return n&&((n.includes(Rn.EAN_13)||n.includes(Rn.UPC_A)||n.includes(Rn.EAN_8)||n.includes(Rn.UPC_E))&&r.readers.push(new Vo(e)),n.includes(Rn.CODE_39)&&r.readers.push(new go(o)),n.includes(Rn.CODE_128)&&r.readers.push(new fo),n.includes(Rn.ITF)&&r.readers.push(new yo),n.includes(Rn.RSS_14)&&r.readers.push(new Mi),n.includes(Rn.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new Ni))),0===r.readers.length&&(r.readers.push(new Vo(e)),r.readers.push(new go),r.readers.push(new Vo(e)),r.readers.push(new fo),r.readers.push(new yo),r.readers.push(new Mi)),r}return ki(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(o){}throw new gn},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(uo),Bi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Bi((function(e,r){return void 0===e&&(e=500),t.call(this,new Li(r),e,r)||this}),t)}(Tn);var ji,Fi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vi=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Hi=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Ui=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var c=0,u=i.getECCodewords(),l=i.getECBlocks();try{for(var f=Fi(l),d=f.next();!d.done;d=f.next()){var h=d.value;c+=h.getCount()*(h.getDataCodewords()+u)}}catch(p){a={error:p}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}this.totalCodewords=c}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(0!=(1&e)||0!=(1&r))throw new on;try{for(var i=Fi(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(c){n={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new on},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Vi(5,new Hi(1,3))),new t(2,12,12,10,10,new Vi(7,new Hi(1,5))),new t(3,14,14,12,12,new Vi(10,new Hi(1,8))),new t(4,16,16,14,14,new Vi(12,new Hi(1,12))),new t(5,18,18,16,16,new Vi(14,new Hi(1,18))),new t(6,20,20,18,18,new Vi(18,new Hi(1,22))),new t(7,22,22,20,20,new Vi(20,new Hi(1,30))),new t(8,24,24,22,22,new Vi(24,new Hi(1,36))),new t(9,26,26,24,24,new Vi(28,new Hi(1,44))),new t(10,32,32,14,14,new Vi(36,new Hi(1,62))),new t(11,36,36,16,16,new Vi(42,new Hi(1,86))),new t(12,40,40,18,18,new Vi(48,new Hi(1,114))),new t(13,44,44,20,20,new Vi(56,new Hi(1,144))),new t(14,48,48,22,22,new Vi(68,new Hi(1,174))),new t(15,52,52,24,24,new Vi(42,new Hi(2,102))),new t(16,64,64,14,14,new Vi(56,new Hi(2,140))),new t(17,72,72,16,16,new Vi(36,new Hi(4,92))),new t(18,80,80,18,18,new Vi(48,new Hi(4,114))),new t(19,88,88,20,20,new Vi(56,new Hi(4,144))),new t(20,96,96,22,22,new Vi(68,new Hi(4,174))),new t(21,104,104,24,24,new Vi(56,new Hi(6,136))),new t(22,120,120,18,18,new Vi(68,new Hi(6,175))),new t(23,132,132,20,20,new Vi(62,new Hi(8,163))),new t(24,144,144,22,22,new Vi(62,new Hi(8,156),new Hi(2,155))),new t(25,8,18,6,16,new Vi(7,new Hi(1,5))),new t(26,8,32,6,14,new Vi(11,new Hi(1,10))),new t(27,12,26,10,24,new Vi(14,new Hi(1,16))),new t(28,12,36,10,16,new Vi(18,new Hi(1,22))),new t(29,16,36,14,16,new Vi(24,new Hi(1,32))),new t(30,16,48,14,22,new Vi(28,new Hi(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),Wi=function(){function t(e){var r=e.getHeight();if(r<8||r>144||0!=(1&r))throw new on;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new hn(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return Ui.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,c=!1,u=!1;do{if(r!==o||0!==n||a)if(r!==o-2||0!==n||0==(3&i)||s)if(r!==o+4||2!==n||0!=(7&i)||c)if(r!==o-2||0!==n||4!=(7&i)||u){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new on;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new Ur("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new hn(a*o,i*n),c=0;c<i;++c)for(var u=c*n,l=0;l<a;++l)for(var f=l*o,d=0;d<n;++d)for(var h=c*(n+2)+1+d,p=u+d,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,h)){var y=f+g;s.set(y,p)}}return s},t}(),zi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gi=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),c=0,u=s.getECBlocks();try{for(var l=zi(u),f=l.next();!f.done;f=l.next())c+=(m=f.value).getCount()}catch(N){n={error:N}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var d=new Array(c),h=0;try{for(var p=zi(u),g=p.next();!g.done;g=p.next())for(var m=g.value,y=0;y<m.getCount();y++){var v=m.getDataCodewords(),_=s.getECCodewords()+v;d[h++]=new t(v,new Uint8Array(_))}}catch(N){i={error:N}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var w=d[0].codewords.length-s.getECCodewords(),b=w-1,C=0;for(y=0;y<b;y++)for(var E=0;E<h;E++)d[E].codewords[y]=e[C++];var A=24===r.getVersionNumber(),I=A?8:h;for(E=0;E<I;E++)d[E].codewords[w-1]=e[C++];var S=d[0].codewords.length;for(y=w;y<S;y++)for(E=0;E<h;E++){var O=A?(E+8)%h:E,T=A&&O>7?y-1:y;d[O].codewords[T]=e[C++]}if(C!==e.length)throw new Ur;return d},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Xi=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Ur(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(c=i-a);e=(o[n]&s)>>c,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;var c;if(t>0)s=255>>(c=8-t)<<c,e=e<<t|(o[n]&s)>>c,r+=t}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(ji||(ji={}));var $i,Yi=function(){function t(){}return t.decode=function(t){var e=new Xi(t),r=new dn,n=new dn,o=new Array,i=ji.ASCII_ENCODE;do{if(i===ji.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case ji.C40_ENCODE:this.decodeC40Segment(e,r);break;case ji.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case ji.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case ji.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case ji.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new on}i=ji.ASCII_ENCODE}}while(i!==ji.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new Mn(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new on;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),ji.ASCII_ENCODE;if(129===o)return ji.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return ji.C40_ENCODE;case 231:return ji.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return ji.ANSIX12_ENCODE;case 239:return ji.TEXT_ENCODE;case 240:return ji.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new on}}while(t.available()>0);return ji.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new on;var c=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length)c=this.C40_SHIFT2_SET_CHARS[s],r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c);else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new on}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new on}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new on;var c=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length)c=this.TEXT_SHIFT2_SET_CHARS[s],r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c);else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new on}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new on;c=this.TEXT_SHIFT3_SET_CHARS[s],r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c),o=0;break;default:throw new on}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new on;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}0==(32&n)&&(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new on;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new on;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(ln.decode(a,fn.ISO88591))}catch(c){throw new zn("Platform does not support required encoding: "+c.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","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"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","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","{","|","}","~",String.fromCharCode(127)],t}(),qi=function(){function t(){this.rsDecoder=new Gn(Vn.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new Wi(t),o=n.getVersion(),i=n.readCodewords(),a=Gi.getDataBlocks(i,o),s=0;try{for(var c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),u=c.next();!u.done;u=c.next())s+=u.value.getNumDataCodewords()}catch(y){e={error:y}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),f=a.length,d=0;d<f;d++){var h=a[d],p=h.getCodewords(),g=h.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*f+d]=p[m]}return Yi.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(o){throw new Gr}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Zi=function(){function t(t){this.image=t,this.rectangleDetector=new Jn(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new gn;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,c=this.transitionsBetween(i,a)+1;1==(1&s)&&(s+=1),1==(1&c)&&(c+=1),4*s<7*c&&4*c<7*s&&(s=c=Math.max(s,c));var u=t.sampleGrid(this.image,n,o,i,a,s,c);return new Zn(u,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new qn(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new qn(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),c=this.transitionsBetween(o,e),u=i,l=[o,e,r,n];return u>a&&(u=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),u>s&&(u=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),u>c&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),c=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(c,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),c=t.shiftPoint(r,n,4*(s+1)),u=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(c,i),s=this.transitionsBetween(u,i);var l=new qn(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),f=new qn(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(f)?this.transitionsBetween(c,l)+this.transitionsBetween(u,l)>this.transitionsBetween(c,f)+this.transitionsBetween(u,f)?l:f:l:this.isValid(f)?f:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,c=t.shiftPoint(r,n,4*s),u=t.shiftPoint(o,n,4*a);1==(1&(a=this.transitionsBetween(c,i)+1))&&(a+=1),1==(1&(s=this.transitionsBetween(u,i)+1))&&(s+=1);var l,f,d=(r.getX()+n.getX()+o.getX()+i.getX())/4,h=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,d,h),n=t.moveAway(n,d,h),o=t.moveAway(o,d,h),i=t.moveAway(i,d,h),c=t.shiftPoint(r,n,4*s),c=t.shiftPoint(c,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),u=t.shiftPoint(o,i,4*s),u=t.shiftPoint(u,n,4*a),f=t.shiftPoint(i,o,4*s),[c,l,u,f=t.shiftPoint(f,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return oo.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var c=Math.abs(o-r),u=Math.abs(i-n),l=-c/2,f=n<i?1:-1,d=r<o?1:-1,h=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=d){var y=this.image.get(a?m:g,a?g:m);if(y!==p&&(h++,p=y),(l+=u)>0){if(m===i)break;m+=f,l-=c}}return h},t}(),Ki=function(){function t(){this.decoder=new qi}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(rn.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Zi(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),c=new Nn(n.getText(),s,8*s.length,o,Rn.DATA_MATRIX,$r.currentTimeMillis()),u=n.getByteSegments();null!=u&&c.putMetadata(Pn.BYTE_SEGMENTS,u);var l=n.getECLevel();return null!=l&&c.putMetadata(Pn.ERROR_CORRECTION_LEVEL,l),c},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new gn;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,c=(i-o+1)/n;if(s<=0||c<=0)throw new gn;var u=n/2;o+=u,a+=u;for(var l=new hn(s,c),f=0;f<c;f++)for(var d=o+f*n,h=0;h<s;h++)t.get(a+h*n,d)&&l.set(h,f);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new gn;var i=n-t[0];if(0===i)throw new gn;return i},t.NO_POINTS=[],t}(),Qi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Qi((function(e){return void 0===e&&(e=500),t.call(this,new Ki,e)||this}),t)}(Tn),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}($i||($i={}));var Ji,ta=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Vr(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Ur;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t($i.L,"L",1),t.M=new t($i.M,"M",0),t.Q=new t($i.Q,"Q",3),t.H=new t($i.H,"H",2),t}(),ea=function(){function t(t){this.errorCorrectionLevel=ta.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Jr.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t.FORMAT_INFO_DECODE_LOOKUP),c=s.next();!c.done;c=s.next()){var u=c.value,l=u[0];if(l===e||l===r)return new t(u[1]);var f=t.numBitsDiffering(e,l);f<i&&(a=u[1],i=f),e!==r&&(f=t.numBitsDiffering(r,l))<i&&(a=u[1],i=f)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),ra=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),i=o.next();!i.done;i=o.next())r+=i.value.getCount()}catch(a){t={error:a}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),na=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),oa=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),c=o[0].getECBlocks();try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),l=u.next();!l.done;l=u.next()){var f=l.value;a+=f.getCount()*(f.getDataCodewords()+s)}}catch(d){r={error:d}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new on;try{return this.getVersionForNumber((t-17)/4)}catch(e){throw new on}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Ur;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=ea.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new hn(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new ra(7,new na(1,19)),new ra(10,new na(1,16)),new ra(13,new na(1,13)),new ra(17,new na(1,9))),new t(2,Int32Array.from([6,18]),new ra(10,new na(1,34)),new ra(16,new na(1,28)),new ra(22,new na(1,22)),new ra(28,new na(1,16))),new t(3,Int32Array.from([6,22]),new ra(15,new na(1,55)),new ra(26,new na(1,44)),new ra(18,new na(2,17)),new ra(22,new na(2,13))),new t(4,Int32Array.from([6,26]),new ra(20,new na(1,80)),new ra(18,new na(2,32)),new ra(26,new na(2,24)),new ra(16,new na(4,9))),new t(5,Int32Array.from([6,30]),new ra(26,new na(1,108)),new ra(24,new na(2,43)),new ra(18,new na(2,15),new na(2,16)),new ra(22,new na(2,11),new na(2,12))),new t(6,Int32Array.from([6,34]),new ra(18,new na(2,68)),new ra(16,new na(4,27)),new ra(24,new na(4,19)),new ra(28,new na(4,15))),new t(7,Int32Array.from([6,22,38]),new ra(20,new na(2,78)),new ra(18,new na(4,31)),new ra(18,new na(2,14),new na(4,15)),new ra(26,new na(4,13),new na(1,14))),new t(8,Int32Array.from([6,24,42]),new ra(24,new na(2,97)),new ra(22,new na(2,38),new na(2,39)),new ra(22,new na(4,18),new na(2,19)),new ra(26,new na(4,14),new na(2,15))),new t(9,Int32Array.from([6,26,46]),new ra(30,new na(2,116)),new ra(22,new na(3,36),new na(2,37)),new ra(20,new na(4,16),new na(4,17)),new ra(24,new na(4,12),new na(4,13))),new t(10,Int32Array.from([6,28,50]),new ra(18,new na(2,68),new na(2,69)),new ra(26,new na(4,43),new na(1,44)),new ra(24,new na(6,19),new na(2,20)),new ra(28,new na(6,15),new na(2,16))),new t(11,Int32Array.from([6,30,54]),new ra(20,new na(4,81)),new ra(30,new na(1,50),new na(4,51)),new ra(28,new na(4,22),new na(4,23)),new ra(24,new na(3,12),new na(8,13))),new t(12,Int32Array.from([6,32,58]),new ra(24,new na(2,92),new na(2,93)),new ra(22,new na(6,36),new na(2,37)),new ra(26,new na(4,20),new na(6,21)),new ra(28,new na(7,14),new na(4,15))),new t(13,Int32Array.from([6,34,62]),new ra(26,new na(4,107)),new ra(22,new na(8,37),new na(1,38)),new ra(24,new na(8,20),new na(4,21)),new ra(22,new na(12,11),new na(4,12))),new t(14,Int32Array.from([6,26,46,66]),new ra(30,new na(3,115),new na(1,116)),new ra(24,new na(4,40),new na(5,41)),new ra(20,new na(11,16),new na(5,17)),new ra(24,new na(11,12),new na(5,13))),new t(15,Int32Array.from([6,26,48,70]),new ra(22,new na(5,87),new na(1,88)),new ra(24,new na(5,41),new na(5,42)),new ra(30,new na(5,24),new na(7,25)),new ra(24,new na(11,12),new na(7,13))),new t(16,Int32Array.from([6,26,50,74]),new ra(24,new na(5,98),new na(1,99)),new ra(28,new na(7,45),new na(3,46)),new ra(24,new na(15,19),new na(2,20)),new ra(30,new na(3,15),new na(13,16))),new t(17,Int32Array.from([6,30,54,78]),new ra(28,new na(1,107),new na(5,108)),new ra(28,new na(10,46),new na(1,47)),new ra(28,new na(1,22),new na(15,23)),new ra(28,new na(2,14),new na(17,15))),new t(18,Int32Array.from([6,30,56,82]),new ra(30,new na(5,120),new na(1,121)),new ra(26,new na(9,43),new na(4,44)),new ra(28,new na(17,22),new na(1,23)),new ra(28,new na(2,14),new na(19,15))),new t(19,Int32Array.from([6,30,58,86]),new ra(28,new na(3,113),new na(4,114)),new ra(26,new na(3,44),new na(11,45)),new ra(26,new na(17,21),new na(4,22)),new ra(26,new na(9,13),new na(16,14))),new t(20,Int32Array.from([6,34,62,90]),new ra(28,new na(3,107),new na(5,108)),new ra(26,new na(3,41),new na(13,42)),new ra(30,new na(15,24),new na(5,25)),new ra(28,new na(15,15),new na(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new ra(28,new na(4,116),new na(4,117)),new ra(26,new na(17,42)),new ra(28,new na(17,22),new na(6,23)),new ra(30,new na(19,16),new na(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new ra(28,new na(2,111),new na(7,112)),new ra(28,new na(17,46)),new ra(30,new na(7,24),new na(16,25)),new ra(24,new na(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new ra(30,new na(4,121),new na(5,122)),new ra(28,new na(4,47),new na(14,48)),new ra(30,new na(11,24),new na(14,25)),new ra(30,new na(16,15),new na(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new ra(30,new na(6,117),new na(4,118)),new ra(28,new na(6,45),new na(14,46)),new ra(30,new na(11,24),new na(16,25)),new ra(30,new na(30,16),new na(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new ra(26,new na(8,106),new na(4,107)),new ra(28,new na(8,47),new na(13,48)),new ra(30,new na(7,24),new na(22,25)),new ra(30,new na(22,15),new na(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new ra(28,new na(10,114),new na(2,115)),new ra(28,new na(19,46),new na(4,47)),new ra(28,new na(28,22),new na(6,23)),new ra(30,new na(33,16),new na(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new ra(30,new na(8,122),new na(4,123)),new ra(28,new na(22,45),new na(3,46)),new ra(30,new na(8,23),new na(26,24)),new ra(30,new na(12,15),new na(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new ra(30,new na(3,117),new na(10,118)),new ra(28,new na(3,45),new na(23,46)),new ra(30,new na(4,24),new na(31,25)),new ra(30,new na(11,15),new na(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new ra(30,new na(7,116),new na(7,117)),new ra(28,new na(21,45),new na(7,46)),new ra(30,new na(1,23),new na(37,24)),new ra(30,new na(19,15),new na(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new ra(30,new na(5,115),new na(10,116)),new ra(28,new na(19,47),new na(10,48)),new ra(30,new na(15,24),new na(25,25)),new ra(30,new na(23,15),new na(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new ra(30,new na(13,115),new na(3,116)),new ra(28,new na(2,46),new na(29,47)),new ra(30,new na(42,24),new na(1,25)),new ra(30,new na(23,15),new na(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new ra(30,new na(17,115)),new ra(28,new na(10,46),new na(23,47)),new ra(30,new na(10,24),new na(35,25)),new ra(30,new na(19,15),new na(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new ra(30,new na(17,115),new na(1,116)),new ra(28,new na(14,46),new na(21,47)),new ra(30,new na(29,24),new na(19,25)),new ra(30,new na(11,15),new na(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new ra(30,new na(13,115),new na(6,116)),new ra(28,new na(14,46),new na(23,47)),new ra(30,new na(44,24),new na(7,25)),new ra(30,new na(59,16),new na(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new ra(30,new na(12,121),new na(7,122)),new ra(28,new na(12,47),new na(26,48)),new ra(30,new na(39,24),new na(14,25)),new ra(30,new na(22,15),new na(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new ra(30,new na(6,121),new na(14,122)),new ra(28,new na(6,47),new na(34,48)),new ra(30,new na(46,24),new na(10,25)),new ra(30,new na(2,15),new na(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new ra(30,new na(17,122),new na(4,123)),new ra(28,new na(29,46),new na(14,47)),new ra(30,new na(49,24),new na(10,25)),new ra(30,new na(24,15),new na(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new ra(30,new na(4,122),new na(18,123)),new ra(28,new na(13,46),new na(32,47)),new ra(30,new na(48,24),new na(14,25)),new ra(30,new na(42,15),new na(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new ra(30,new na(20,117),new na(4,118)),new ra(28,new na(40,47),new na(7,48)),new ra(30,new na(43,24),new na(22,25)),new ra(30,new na(10,15),new na(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new ra(30,new na(19,118),new na(6,119)),new ra(28,new na(18,47),new na(31,48)),new ra(30,new na(34,24),new na(34,25)),new ra(30,new na(20,15),new na(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(Ji||(Ji={}));var ia,aa=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[Ji.DATA_MASK_000,new t(Ji.DATA_MASK_000,(function(t,e){return 0==(t+e&1)}))],[Ji.DATA_MASK_001,new t(Ji.DATA_MASK_001,(function(t,e){return 0==(1&t)}))],[Ji.DATA_MASK_010,new t(Ji.DATA_MASK_010,(function(t,e){return e%3==0}))],[Ji.DATA_MASK_011,new t(Ji.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[Ji.DATA_MASK_100,new t(Ji.DATA_MASK_100,(function(t,e){return 0==(Math.floor(t/2)+Math.floor(e/3)&1)}))],[Ji.DATA_MASK_101,new t(Ji.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[Ji.DATA_MASK_110,new t(Ji.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[Ji.DATA_MASK_111,new t(Ji.DATA_MASK_111,(function(t,e){return 0==(t+e+t*e%3&1)}))]]),t}(),sa=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new on;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=ea.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new on},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return oa.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=oa.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;for(r=0,i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=oa.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new on},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=aa.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,c=0,u=0,l=n-1;l>0;l-=2){6===l&&l--;for(var f=0;f<n;f++)for(var d=i?n-1-f:f,h=0;h<2;h++)o.get(l-h,d)||(u++,c<<=1,this.bitMatrix.get(l-h,d)&&(c|=1),8===u&&(a[s++]=c,u=0,c=0));i=!i}if(s!==e.getTotalCodewords())throw new on;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=aa.values[this.parsedFormatInfo.getDataMask()],e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),ca=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ua=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new Ur;var c=r.getECBlocksForLevel(n),u=0,l=c.getECBlocks();try{for(var f=ca(l),d=f.next();!d.done;d=f.next())u+=(y=d.value).getCount()}catch(T){o={error:T}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}var h=new Array(u),p=0;try{for(var g=ca(l),m=g.next();!m.done;m=g.next())for(var y=m.value,v=0;v<y.getCount();v++){var _=y.getDataCodewords(),w=c.getECCodewordsPerBlock()+_;h[p++]=new t(_,new Uint8Array(w))}}catch(T){a={error:T}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var b=h[0].codewords.length,C=h.length-1;C>=0&&h[C].codewords.length!==b;)C--;C++;var E=b-c.getECCodewordsPerBlock(),A=0;for(v=0;v<E;v++)for(var I=0;I<p;I++)h[I].codewords[v]=e[A++];for(I=C;I<p;I++)h[I].codewords[E]=e[A++];var S=h[0].codewords.length;for(v=E;v<S;v++)for(I=0;I<p;I++){var O=I<C?v:v+1;h[I].codewords[O]=e[A++]}return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(ia||(ia={}));var la,fa,da=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new Ur;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(ia.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(ia.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(ia.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(ia.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(ia.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(ia.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(ia.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(ia.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(ia.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(ia.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),ha=function(){function t(){}return t.decode=function(e,r,n,o){var i=new Xi(e),a=new dn,s=new Array,c=-1,u=-1;try{var l=null,f=!1,d=void 0;do{if(i.available()<4)d=da.TERMINATOR;else{var h=i.readBits(4);d=da.forBits(h)}switch(d){case da.TERMINATOR:break;case da.FNC1_FIRST_POSITION:case da.FNC1_SECOND_POSITION:f=!0;break;case da.STRUCTURED_APPEND:if(i.available()<16)throw new on;c=i.readBits(8),u=i.readBits(8);break;case da.ECI:var p=t.parseECIValue(i);if(null===(l=sn.getCharacterSetECIByValue(p)))throw new on;break;case da.HANZI:var g=i.readBits(4),m=i.readBits(d.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var y=i.readBits(d.getCharacterCountBits(r));switch(d){case da.NUMERIC:t.decodeNumericSegment(i,a,y);break;case da.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,y,f);break;case da.BYTE:t.decodeByteSegment(i,a,y,l,s,o);break;case da.KANJI:t.decodeKanjiSegment(i,a,y);break;default:throw new on}}}while(d!==da.TERMINATOR)}catch(v){throw new on}return new Mn(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),c,u)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new on;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(ln.decode(n,fn.GB2312))}catch(s){throw new on(s)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new on;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(ln.decode(n,fn.SHIFT_JIS))}catch(s){throw new on(s)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new on;for(var a,s=new Uint8Array(r),c=0;c<r;c++)s[c]=t.readBits(8);a=null===n?fn.guessEncoding(s,i):n.getName();try{e.append(ln.decode(s,a))}catch(u){throw new on(u)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new on;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new on;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new on;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new on;var o=e.readBits(10);if(o>=1e3)throw new on;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new on;var i=e.readBits(7);if(i>=100)throw new on;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new on;var a=e.readBits(4);if(a>=10)throw new on;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new on},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),pa=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),ga=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ma=function(){function t(){this.rsDecoder=new Gn(Vn.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(hn.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new sa(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(i){n=i}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new pa(!0)),o}catch(i){if(null!==n)throw n;throw i}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),c=t.readCodewords(),u=ua.getDataBlocks(c,a,s),l=0;try{for(var f=ga(u),d=f.next();!d.done;d=f.next())l+=(y=d.value).getNumDataCodewords()}catch(b){r={error:b}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}var h=new Uint8Array(l),p=0;try{for(var g=ga(u),m=g.next();!m.done;m=g.next()){var y,v=(y=m.value).getCodewords(),_=y.getNumDataCodewords();this.correctErrors(v,_);for(var w=0;w<_;w++)h[p++]=v[w]}}catch(b){o={error:b}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return ha.decode(h,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(o){throw new Gr}for(var n=0;n<e;n++)t[n]=r[n]},t}(),ya=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),va=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return ya(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(qn),_a=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(0==(1&a)?Math.floor((a+1)/2):-Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var c=t;c<r&&!i.get(c,s);)c++;for(var u=0;c<r;){if(i.get(c,s))if(1===u)o[1]++;else if(2===u){var l;if(this.foundPatternCross(o)&&null!==(l=this.handlePossibleCenter(o,s,c)))return l;o[0]=o[2],o[1]=1,o[2]=0,u=1}else o[++u]++;else 1===u&&u++,o[u]++;c++}if(this.foundPatternCross(o)&&null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new gn},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var c=e;c>=0&&i.get(r,c)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&!i.get(r,c)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&i.get(r,c)&&s[1]<=n;)s[1]++,c++;if(c===a||s[1]>n)return NaN;for(;c<a&&!i.get(r,c)&&s[2]<=n;)s[2]++,c++;if(s[2]>n)return NaN;var u=s[0]+s[1]+s[2];return 5*Math.abs(u-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),c=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(c)){var u=(e[0]+e[1]+e[2])/3;try{for(var l=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.possibleCenters),f=l.next();!f.done;f=l.next()){var d=f.value;if(d.aboutEquals(u,c,s))return d.combineEstimate(c,s,u)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var h=new va(s,c,u);this.possibleCenters.push(h),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t}(),wa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ba=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return wa(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(qn),Ca=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),Ea=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Aa=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(rn.TRY_HARDER),n=null!=e&&void 0!==e.get(rn.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var c=!1,u=new Int32Array(5),l=s-1;l<i&&!c;l+=s){u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0;for(var f=0,d=0;d<a;d++)if(o.get(d,l))1==(1&f)&&f++,u[f]++;else if(0==(1&f))if(4===f)if(t.foundPatternCross(u)){if(!0!==this.handlePossibleCenter(u,l,d,n)){u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,f=3;continue}if(s=2,!0===this.hasSkipped)c=this.haveMultiplyConfirmedCenters();else{var h=this.findRowSkip();h>u[2]&&(l+=h-u[2]-s,d=a-1)}f=0,u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0}else u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,f=3;else u[++f]++;else u[f]++;t.foundPatternCross(u)&&!0===this.handlePossibleCenter(u,l,a,n)&&(s=u[0],this.hasSkipped&&(c=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return qn.orderBestPatterns(p),new Ca(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var c=s.getHeight(),u=s.getWidth();for(a=1;e+a<c&&r+a<u&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=c||r+a>=u)return!1;for(;e+a<c&&r+a<u&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=c||r+a>=u||i[3]>=n)return!1;for(;e+a<c&&r+a<u&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),c=e;c>=0&&i.get(r,c);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!i.get(r,c)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&i.get(r,c)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&i.get(r,c);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!i.get(r,c)&&s[3]<n;)s[3]++,c++;if(c===a||s[3]>=n)return NaN;for(;c<a&&i.get(r,c)&&s[4]<n;)s[4]++,c++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),c=e;c>=0&&i.get(c,r);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!i.get(c,r)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&i.get(c,r)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&i.get(c,r);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!i.get(c,r)&&s[3]<n;)s[3]++,c++;if(c===a||s[3]>=n)return NaN;for(;c<a&&i.get(c,r)&&s[4]<n;)s[4]++,c++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var c=i/7,u=!1,l=this.possibleCenters,f=0,d=l.length;f<d;f++){var h=l[f];if(h.aboutEquals(c,s,a)){l[f]=h.combineEstimate(s,a,c),u=!0;break}}if(!u){var p=new ba(a,s,c);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=Ea(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(s){e={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var c=Ea(this.possibleCenters),u=c.next();!u.done;u=c.next())(p=u.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}catch(g){e={error:g}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,f=0;try{for(var d=Ea(this.possibleCenters),h=d.next();!h.done;h=d.next()){var p=h.value;f+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(g){n={error:g}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}return f<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new gn;var i,a=this.possibleCenters;if(o>3){var s=0,c=0;try{for(var u=Ea(this.possibleCenters),l=u.next();!l.done;l=u.next()){var f=l.value.getEstimatedModuleSize();s+=f,c+=f*f}}catch(v){t={error:v}}finally{try{l&&!l.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}i=s/o;var d=Math.sqrt(c/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var h=Math.max(.2*i,d),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>h&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=Ea(a),y=m.next();!y.done;y=m.next())s+=y.value.getEstimatedModuleSize()}catch(_){r={error:_}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),Ia=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(rn.NEED_RESULT_POINT_CALLBACK);var e=new Aa(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new gn("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=oa.getProvisionalVersionForDimension(a),c=s.getDimensionForVersion()-7,u=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),f=n.getY()-r.getY()+o.getY(),d=1-3/c,h=Math.floor(r.getX()+d*(l-r.getX())),p=Math.floor(r.getY()+d*(f-r.getY())),g=4;g<=16;g<<=1)try{u=this.findAlignmentInRegion(i,h,p,g);break}catch(v){if(!(v instanceof gn))throw v}var m=t.createTransform(r,n,o,u,a),y=t.sampleGrid(this.image,m,a);return new Zn(y,null===u?[o,r,n]:[o,r,n,u])},t.createTransform=function(t,e,r,n,o){var i,a,s,c,u=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),c=s=u-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=u,c=u),eo.quadrilateralToQuadrilateral(3.5,3.5,u,3.5,s,c,3.5,u,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return oo.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=$n.round(qn.distance(t,e)/n),i=$n.round(qn.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new gn("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),c=-a/2,u=t<r?1:-1,l=e<n?1:-1,f=0,d=r+u,h=t,p=e;h!==d;h+=u){var g=o?p:h,m=o?h:p;if(1===f===this.image.get(g,m)){if(2===f)return $n.distance(h,p,t,e);f++}if((c+=s)>0){if(p===n)break;p+=l,c-=a}}return 2===f?$n.distance(r+u,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new gn("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),c=Math.min(this.image.getHeight()-1,r+o);if(c-s<3*t)throw new gn("Alignment bottom exceeds estimated module size.");return new _a(this.image,i,s,a-i,c-s,t,this.resultPointCallback).find()},t}(),Sa=function(){function t(){this.decoder=new ma}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(rn.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new Ia(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof pa&&n.getOther().applyMirroredCorrection(o);var s=new Nn(n.getText(),n.getRawBytes(),void 0,o,Rn.QR_CODE,void 0),c=n.getByteSegments();null!==c&&s.putMetadata(Pn.BYTE_SEGMENTS,c);var u=n.getECLevel();return null!==u&&s.putMetadata(Pn.ERROR_CORRECTION_LEVEL,u),n.hasStructuredAppend()&&(s.putMetadata(Pn.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(Pn.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new gn;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new gn;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new gn;var c=Math.round((s-a+1)/n),u=Math.round((i-o+1)/n);if(c<=0||u<=0)throw new gn;if(u!==c)throw new gn;var l=Math.floor(n/2);o+=l;var f=(a+=l)+Math.floor((c-1)*n)-s;if(f>0){if(f>l)throw new gn;a-=f}var d=o+Math.floor((u-1)*n)-i;if(d>0){if(d>l)throw new gn;o-=d}for(var h=new hn(c,u),p=0;p<u;p++)for(var g=o+Math.floor(p*n),m=0;m<c;m++)t.get(a+Math.floor(m*n),g)&&h.set(m,p);return h},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new gn;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),Oa=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return $n.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),s=a.next();!s.done;s=a.next()){var c=s.value;o[i++]=c}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=Qr.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Ta=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Na=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new Ta(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,c=!1;a<r.getHeight();){var u=t.findVertices(r,a,s);if(null!=u[0]||null!=u[3]){if(c=!0,i.push(u),!e)break;null!=u[2]?(s=Math.trunc(u[2].getX()),a=Math.trunc(u[2].getY())):(s=Math.trunc(u[4].getX()),a=Math.trunc(u[4].getY()))}else{if(!c)break;c=!1,s=0;try{for(var l=(n=void 0,Na(i)),f=l.next();!f.done;f=l.next()){var d=f.value;null!=d[1]&&(a=Math.trunc(Math.max(a,d[1].getY()))),null!=d[3]&&(a=Math.max(a,Math.trunc(d[3].getY())))}}catch(h){n={error:h}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),c=!1,u=new Int32Array(a.length);o<r;o+=t.ROW_STEP)if(null!=(h=t.findGuardPattern(e,i,o,n,!1,a,u))){for(;o>0;){if(null==(d=t.findGuardPattern(e,i,--o,n,!1,a,u))){o++;break}h=d}s[0]=new qn(h[0],o),s[1]=new qn(h[1],o),c=!0;break}var l=o+1;if(c){for(var f=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var h;if(null!=(h=t.findGuardPattern(e,d[0],l,n,!1,a,u))&&Math.abs(d[0]-h[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-h[1])<t.MAX_PATTERN_DRIFT)d=h,f=0;else{if(f>t.SKIPPED_ROW_COUNT_MAX)break;f++}}l-=f+1,s[2]=new qn(d[0],l),s[3]=new qn(d[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&Qr.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){Qr.fillWithin(s,0,s.length,0);for(var c=r,u=0;e.get(c,n)&&c>0&&u++<t.MAX_PIXEL_DRIFT;)c--;for(var l=c,f=0,d=a.length,h=i;l<o;l++)if(e.get(l,n)!==h)s[f]++;else{if(f===d-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([c,l]);c+=s[0]+s[1],$r.arraycopy(s,2,s,0,f-1),s[f-1]=0,s[f]=0,f--}else f++;s[f]=1,h=!h}return f===d-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([c,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var c=0,u=0;u<n;u++){var l=t[u],f=e[u]*s,d=l>f?l-f:f-l;if(d>r)return 1/0;c+=d}return c/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Ra=function(){function t(t,e){if(0===e.length)throw new Ur;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),$r.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(l){e={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],c=this.coefficients.length,u=1;u<c;u++)s=this.field.add(this.field.multiply(t,s),this.coefficients[u]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Ur("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;$r.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new Ur("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new Ur("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var c=r[s],u=0;u<i;u++)a[s+u]=this.field.add(a[s+u],this.field.multiply(c,o[u]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Ur;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new dn,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Da=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Ur;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new jn;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Pa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ma=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new Ra(n,new Int32Array([0])),n.one=new Ra(n,new Int32Array([1])),n}return Pa(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Ur;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Ra(this,r)},e.PDF417_GF=new e(Oa.NUMBER_OF_CODEWORDS,3),e}(Da),ka=function(){function t(){this.field=Ma.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new Ra(this.field,t),a=new Int32Array(e),s=!1,c=e;c>0;c--){var u=i.evaluateAt(this.field.exp(c));a[e-c]=u,0!==u&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var f=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),d=f.next();!d.done;d=f.next()){var h=d.value,p=this.field.exp(t.length-1-h),g=new Ra(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(E){n={error:E}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}var m=new Ra(this.field,a),y=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),v=y[0],_=y[1],w=this.findErrorLocations(v),b=this.findErrorMagnitudes(_,v,w);for(c=0;c<w.length;c++){var C=t.length-1-this.field.log(w[c]);if(C<0)throw Gr.getChecksumInstance();t[C]=this.field.subtract(t[C],b[c])}return w.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var c=o,u=a;if(a=s,(o=i).isZero())throw Gr.getChecksumInstance();i=c;for(var l=this.field.getZero(),f=o.getCoefficient(o.getDegree()),d=this.field.inverse(f);i.getDegree()>=o.getDegree()&&!i.isZero();){var h=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),d);l=l.add(this.field.buildMonomial(h,p)),i=i.subtract(o.multiplyByMonomial(h,p))}s=l.multiply(a).subtract(u).negative()}var g=s.getCoefficient(0);if(0===g)throw Gr.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Gr.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new Ra(this.field,o),s=r.length,c=new Int32Array(s);for(i=0;i<s;i++){var u=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(u)),f=this.field.inverse(a.evaluateAt(u));c[i]=this.field.multiply(l,f)}return c},t}(),La=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new gn;i?(e=new qn(0,n.getY()),r=new qn(0,o.getY())):a&&(n=new qn(t.getWidth()-1,e.getY()),o=new qn(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var c=n?this.topLeft:this.topRight,u=Math.trunc(c.getY()-e);u<0&&(u=0);var l=new qn(c.getX(),u);n?o=l:a=l}if(r>0){var f=n?this.bottomLeft:this.bottomRight,d=Math.trunc(f.getY()+r);d>=this.image.getHeight()&&(d=this.image.getHeight()-1);var h=new qn(f.getX(),d);n?i=h:s=h}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Ba=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),ja=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var c,u=a?parseInt(a.substr(1)):void 0;switch(s){case"s":c=e[r];break;case"c":c=e[r][0];break;case"f":c=parseFloat(e[r]).toFixed(t);break;case"p":c=parseFloat(e[r]).toPrecision(t);break;case"e":c=parseFloat(e[r]).toExponential(t);break;case"x":c=parseInt(e[r]).toString(u||16);break;case"d":c=parseFloat(parseInt(e[r],u||10).toPrecision(t)).toFixed(0)}c="object"==typeof c?JSON.stringify(c):(+c).toString(u);for(var l=parseInt(o),f=o&&o[0]+""=="0"?"0":" ";c.length<l;)c=void 0!==n?c+f:f+c;return c}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Fa=function(){function t(t){this.boundingBox=new La(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new ja,n=0;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Va=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Ha=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=Va(a.value,2);o(s[0],s[1])}}catch(c){t={error:c}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Oa.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),Ua=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wa=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},za=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return Ua(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=Wa(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(i){t={error:i}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,c=1,u=0,l=i;l<a;l++)if(null!=e[l]){var f=e[l],d=f.getRowNumber()-s;if(0===d)u++;else if(1===d)c=Math.max(c,u),u=1,s=f.getRowNumber();else if(d<0||f.getRowNumber()>=t.getRowCount()||d>l)e[l]=null;else{for(var h,p=(h=c>2?(c-2)*d:d)>=l,g=1;g<=h&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=f.getRowNumber(),u=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=Wa(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(c){t={error:c}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,c=o;c<i;c++)if(null!=a[c]){var u=a[c];u.setRowNumberAsRowIndicatorColumn();var l=u.getRowNumber()-s;0===l||(1===l?s=u.getRowNumber():u.getRowNumber()>=t.getRowCount()?a[c]=null:s=u.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new Ha,o=new Ha,i=new Ha,a=new Ha;try{for(var s=Wa(r),c=s.next();!c.done;c=s.next()){var u=c.value;if(null!=u){u.setRowNumberAsRowIndicatorColumn();var l=u.getValue()%30,f=u.getRowNumber();switch(this._isLeft||(f+=2),f%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(h){t={error:h}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Oa.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Oa.MAX_ROWS_IN_BARCODE)return null;var d=new Ba(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,d),d},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Fa),Ga=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Oa.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i,a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),c=s;null!=this.detectionResultColumns[e+1]&&(c=this.detectionResultColumns[e+1].getCodewords());var u=new Array(14);u[2]=s[r],u[3]=c[r],r>0&&(u[0]=n[r-1],u[4]=s[r-1],u[5]=c[r-1]),r>1&&(u[8]=n[r-2],u[10]=s[r-2],u[11]=c[r-2]),r<n.length-1&&(u[1]=n[r+1],u[6]=s[r+1],u[7]=c[r+1]),r<n.length-2&&(u[9]=n[r+2],u[12]=s[r+2],u[13]=c[r+2]);try{for(var l=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),f=l.next();!f.done;f=l.next()){var d=f.value;if(t.adjustRowNumber(a,d))return}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}},t.adjustRowNumber=function(t,e){return!(null==e||!e.hasValidRowNumber()||e.getBucket()!==t.getBucket()||(t.setRowNumber(e.getRowNumber()),0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new ja,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),Xa=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),$a=function(){function t(){}return t.initialize=function(){for(var e=0;e<Oa.SYMBOL_TABLE.length;e++)for(var r=Oa.SYMBOL_TABLE[e],n=1&r,o=0;o<Oa.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Oa.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Oa.BARS_IN_MODULE-o-1]=Math.fround(i/Oa.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=$n.sum(t),r=new Int32Array(Oa.BARS_IN_MODULE),n=0,o=0,i=0;i<Oa.MODULES_IN_CODEWORD;i++){var a=e/(2*Oa.MODULES_IN_CODEWORD)+i*e/Oa.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Oa.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=$n.sum(e),n=new Array(Oa.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Yn.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var c=0,u=t.RATIOS_TABLE[s],l=0;l<Oa.BARS_IN_MODULE;l++){var f=Math.fround(u[l]-n[l]);if((c+=Math.fround(f*f))>=i)break}c<i&&(i=c,a=Oa.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Oa.SYMBOL_TABLE.length).map((function(t){return new Array(Oa.BARS_IN_MODULE)})),t}(),Ya=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),qa=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),Za=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Za(e,t),e.kind="NullPointerException",e}(jr),Qa=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new Ka;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new qr;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),Ja=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e}(jr),es=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rs=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new Ur("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return es(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new ts;e=Jr.MAX_VALUE}this.buf=Qr.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new qr;this.ensureCapacity(this.count+r),$r.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return Qr.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(Qa);function ns(){if("undefined"!=typeof window)return window.BigInt||null;if("undefined"!=typeof global)return global.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function os(t){if(void 0===fa&&(fa=ns()),null===fa)throw new Error("BigInt is not supported!");return fa(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(la||(la={}));var is=function(){function t(){}return t.decode=function(e,r){var n=new dn(""),o=sn.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new Ya;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:sn.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new on;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw on.getFormatInstance();a=e[i++]}if(0===n.length())throw on.getFormatInstance();var c=new Mn(null,n.toString(),null,r);return c.setOther(s),c},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw on.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Jr.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new dn;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var c=new dn;r=t.textCompaction(e,r+1,c),n.setFileName(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var u=new dn;r=t.textCompaction(e,r+1,u),n.setSender(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new dn;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var f=new dn;r=t.numericCompaction(e,r+1,f),n.setSegmentCount(Jr.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var d=new dn;r=t.numericCompaction(e,r+1,d),n.setTimestamp(qa.parseLong(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new dn;r=t.numericCompaction(e,r+1,h),n.setChecksum(Jr.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new dn;r=t.numericCompaction(e,r+1,p),n.setFileSize(qa.parseLong(p.toString()));break;default:throw on.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw on.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(Qr.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var c=e[r++];if(c<t.TEXT_COMPACTION_MODE_LATCH)o[a]=c/30,o[a+1]=c%30,a+=2;else switch(c){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,c=e[r++],i[a]=c,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=la.ALPHA,a=la.ALPHA,s=0;s<n;){var c=e[s],u="";switch(i){case la.ALPHA:if(c<26)u=String.fromCharCode(65+c);else switch(c){case 26:u=" ";break;case t.LL:i=la.LOWER;break;case t.ML:i=la.MIXED;break;case t.PS:a=i,i=la.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.LOWER:if(c<26)u=String.fromCharCode(97+c);else switch(c){case 26:u=" ";break;case t.AS:a=i,i=la.ALPHA_SHIFT;break;case t.ML:i=la.MIXED;break;case t.PS:a=i,i=la.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.MIXED:if(c<t.PL)u=t.MIXED_CHARS[c];else switch(c){case t.PL:i=la.PUNCT;break;case 26:u=" ";break;case t.LL:i=la.LOWER;break;case t.AL:i=la.ALPHA;break;case t.PS:a=i,i=la.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.PUNCT:if(c<t.PAL)u=t.PUNCT_CHARS[c];else switch(c){case t.PAL:i=la.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.ALPHA_SHIFT:if(i=a,c<26)u=String.fromCharCode(65+c);else switch(c){case 26:u=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.PUNCT_SHIFT:if(i=a,c<t.PAL)u=t.PUNCT_CHARS[c];else switch(c){case t.PAL:i=la.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}}""!==u&&o.append(u),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new rs,s=0,c=0,u=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),f=r[o++];o<r[0]&&!u;)switch(l[s++]=f,c=900*c+f,f=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,u=!0;break;default:if(s%5==0&&s>0){for(var d=0;d<6;++d)a.write(Number(os(c)>>os(8*(5-d))));c=0,s=0}}o===r[0]&&f<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=f);for(var h=0;h<s;h++)a.write(l[h]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!u;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,c=900*c+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,u=!0}if(s%5==0&&s>0){for(d=0;d<6;++d)a.write(Number(os(c)>>os(8*(5-d))));c=0,s=0}}}return i.append(ln.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=os(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*os(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new on;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=ns()?function(){var t=[];t[0]=os(1);var e=os(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),as=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ss=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var c,u=new La(e,r,n,o,i),l=null,f=null,d=!0;;d=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,u,r,!0,a,s)),null!=o&&(f=t.getRowIndicatorColumn(e,u,o,!1,a,s)),null==(c=t.merge(l,f)))throw gn.getNotFoundInstance();var h=c.getBoundingBox();if(!d||null==h||!(h.getMinY()<u.getMinY()||h.getMaxY()>u.getMaxY()))break;u=h}c.setBoundingBox(u);var p=c.getBarcodeColumnCount()+1;c.setDetectionResultColumn(0,l),c.setDetectionResultColumn(p,f);for(var g=null!=l,m=1;m<=p;m++){var y=g?m:p-m;if(void 0===c.getDetectionResultColumn(y)){var v=void 0;v=0===y||y===p?new za(u,0===y):new Fa(u),c.setDetectionResultColumn(y,v);for(var _=-1,w=_,b=u.getMinY();b<=u.getMaxY();b++){if((_=t.getStartColumn(c,y,b,g))<0||_>u.getMaxX()){if(-1===w)continue;_=w}var C=t.detectCodeword(e,u.getMinX(),u.getMaxX(),g,_,b,a,s);null!=C&&(v.setCodeword(b,C),w=_,a=Math.min(a,C.getWidth()),s=Math.max(s,C.getWidth()))}}}return t.createDecoderResult(c)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=La.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Ga(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=as(o),c=s.next();!c.done;c=s.next()){var u=c.value;if(a+=i-u,u>0)break}}catch(h){r={error:h}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),f=0;a>0&&null==l[f];f++)a--;var d=0;for(f=o.length-1;f>=0&&(d+=i-o[f],!(o[f]>0));f--);for(f=l.length-1;d>0&&null==l[f];f--)d--;return e.getBoundingBox().addMissingRows(a,d,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=as(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new za(r,o),c=0;c<2;c++)for(var u=0===c?1:-1,l=Math.trunc(Math.trunc(n.getX())),f=Math.trunc(Math.trunc(n.getY()));f<=r.getMaxY()&&f>=r.getMinY();f+=u){var d=t.detectCodeword(e,0,e.getWidth(),o,l,f,i,a);null!=d&&(s.setCodeword(f,d),l=o?d.getStartX():d.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Oa.MAX_CODEWORDS_IN_BARCODE)throw gn.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var c=0;c<e.getBarcodeColumnCount();c++){var u=r[s][c+1].getValue(),l=s*e.getBarcodeColumnCount()+c;0===u.length?n.push(l):1===u.length?o[l]=u[0]:(a.push(l),i.push(u))}for(var f=new Array(i.length),d=0;d<f.length;d++)f[d]=i[d];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Oa.toIntArray(n),Oa.toIntArray(a),f)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var c=0;c<a.length;c++)r[o[c]]=i[c][a[c]];try{return t.decodeCodewords(r,e,n)}catch(u){if(!(u instanceof Gr))throw u}if(0===a.length)throw Gr.getChecksumInstance();for(c=0;c<a.length;c++){if(a[c]<i[c].length-1){a[c]++;break}if(a[c]=0,c===a.length-1)throw Gr.getChecksumInstance()}}throw Gr.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Ha;var c=0;try{for(var u=as(t.getDetectionResultColumns()),l=u.next();!l.done;l=u.next()){var f=l.value;if(null!=f)try{for(var d=(n=void 0,as(f.getCodewords())),h=d.next();!h.done;h=d.next()){var p=h.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][c].setValue(p.getValue())}}}}catch(m){n={error:m}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}c++}}catch(m){e={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,c=null;if(t.isValidBarcodeColumn(e,r-s)&&(c=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=c)return o?c.getEndX():c.getStartX();if(null!=(c=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?c.getStartX():c.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(c=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=c)return o?c.getEndX():c.getStartX();for(var u=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,as(e.getDetectionResultColumn(r).getCodewords())),f=l.next();!f.done;f=l.next()){var d=f.value;if(null!=d)return(o?d.getEndX():d.getStartX())+s*u*(d.getEndX()-d.getStartX())}}catch(h){i={error:h}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}u++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,c){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var u,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var f=$n.sum(l);if(o)u=i+f;else{for(var d=0;d<l.length/2;d++){var h=l[d];l[d]=l[l.length-1-d],l[l.length-1-d]=h}i=(u=i)-f}if(!t.checkCodewordSkew(f,s,c))return null;var p=$a.getDecodedValue(l),g=Oa.getCodeword(p);return-1===g?null:new Xa(i,u,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),c=0,u=n?1:-1,l=n;(n?a<r:a>=e)&&c<s.length;)t.get(a,i)===l?(s[c]++,a+=u):(c++,l=!l);return c===s.length||a===(n?r:e)&&c===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,c=o?-1:1,u=0;u<2;u++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=c}c=-c,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw on.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=is.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Gr.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw on.getFormatInstance();var r=t[0];if(r>t.length)throw on.getFormatInstance();if(0===r){if(!(e<t.length))throw on.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new ja,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new ka,t}(),cs=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw gn.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(n){if(n instanceof on||n instanceof Gr)throw gn.getNotFoundInstance();throw n}},t.decode=function(e,r,n){var o,i,a=new Array,s=xa.detectMultiple(e,r,n);try{for(var c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s.getPoints()),u=c.next();!u.done;u=c.next()){var l=u.value,f=ss.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),d=new Nn(f.getText(),f.getRawBytes(),void 0,l,Rn.PDF_417);d.putMetadata(Pn.ERROR_CORRECTION_LEVEL,f.getECLevel());var h=f.getOther();null!=h&&d.putMetadata(Pn.PDF417_EXTRA_METADATA,h),a.push(d)}}catch(p){o={error:p}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Jr.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),us=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ls=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return us(e,t),e.kind="ReaderException",e}(jr),fs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ds=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(rn.TRY_HARDER),r=null==t?null:t.get(rn.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===Rn.UPC_A||t===Rn.UPC_E||t===Rn.EAN_13||t===Rn.EAN_8||t===Rn.CODABAR||t===Rn.CODE_39||t===Rn.CODE_93||t===Rn.CODE_128||t===Rn.ITF||t===Rn.RSS_14||t===Rn.RSS_EXPANDED}));o&&!e&&n.push(new Li(t)),r.includes(Rn.QR_CODE)&&n.push(new Sa),r.includes(Rn.DATA_MATRIX)&&n.push(new Ki),r.includes(Rn.AZTEC)&&n.push(new so),r.includes(Rn.PDF_417)&&n.push(new cs),o&&e&&n.push(new Li(t))}0===n.length&&(e||n.push(new Li(t)),n.push(new Sa),n.push(new Ki),n.push(new so),n.push(new cs),e&&n.push(new Li(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=fs(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(o){t={error:o}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new ls("No readers where selected, nothing can be read.");try{for(var n=fs(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(a){if(a instanceof ls)continue}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new gn("No MultiFormat Readers were able to detect the code.")},t}(),hs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new ds;return n.setHints(e),t.call(this,n,r)||this}hs(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(Tn);var ps=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){ps((function(e){return void 0===e&&(e=500),t.call(this,new cs,e)||this}),t)}(Tn);var gs,ms=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){ms((function(e){return void 0===e&&(e=500),t.call(this,new Sa,e)||this}),t)}(Tn),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"}(gs||(gs={}));var ys=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],c=0;c<o-1;c++){var u=s[c];u===s[c+1]&&u===n[a+1][c]&&u===n[a+1][c+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var c=n[a];s+6<o&&1===c[s]&&0===c[s+1]&&1===c[s+2]&&1===c[s+3]&&1===c[s+4]&&0===c[s+5]&&1===c[s+6]&&(t.isWhiteHorizontal(c,s-4,s)||t.isWhiteHorizontal(c,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],c=0;c<o;c++)1===s[c]&&r++;var u=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-u)/u)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new Ur("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var c=0,u=-1,l=0;l<i;l++){var f=r?a[s][l]:a[l][s];f===u?c++:(c>=5&&(n+=t.N1+(c-5)),c=1,u=f)}c>=5&&(n+=t.N1+(c-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),vs=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new dn;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),_s=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ws=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _s(e,t),e.kind="WriterException",e}(jr);!function(){function t(){}t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new tn;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),c=t.TYPE_INFO_COORDINATES[i],u=c[0],l=c[1];if(n.setBoolean(u,l,s),i<8){var f=n.getWidth()-i-1,d=8;n.setBoolean(f,d,s)}else f=8,d=n.getHeight()-7+(i-8),n.setBoolean(f,d,s)}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new tn;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var c=0;c<2;++c){var u=a-c;if(t.isEmpty(n.get(u,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&ys.getDataMaskBit(r,u,s)&&(l=!l),n.setBoolean(u,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new ws("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Jr.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new Ur("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!vs.isValidMaskPattern(r))throw new ws("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new tn;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new ws("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new ws("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new ws;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new ws;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new ws;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e),t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e),t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var c=0;c!==a;c++){var u=o[c];u>=0&&t.isEmpty(r.get(u,s))&&t.embedPositionAdjustmentPattern(u-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522}(),Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),sn.UTF8.getName();var bs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,c){var u=t.call(this,a,s)||this;if(u.yuvData=e,u.dataWidth=r,u.dataHeight=n,u.left=o,u.top=i,o+a>r||i+s>n)throw new Ur("Crop rectangle does not fit within image data.");return c&&u.reverseHorizontal(a,s),u}bs(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return $r.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return $r.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;$r.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,c=0;c<t;c++){var u=255&o[i+c*e.THUMBNAIL_SCALE_FACTOR];n[s+c]=4278190080|65793*u}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var c=r[a];r[a]=r[s],r[s]=c}},e.prototype.invert=function(){return new Cn(this)},e.THUMBNAIL_SCALE_FACTOR=2}(wn);var Cs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var c=t.call(this,r,n)||this;if(c.dataWidth=o,c.dataHeight=i,c.left=a,c.top=s,4===e.BYTES_PER_ELEMENT){for(var u=r*n,l=new Uint8ClampedArray(u),f=0;f<u;f++){var d=e[f],h=d>>16&255,p=d>>7&510,g=255&d;l[f]=(h+p+g)/4&255}c.luminances=l}else c.luminances=e;if(void 0===o&&(c.dataWidth=r),void 0===i&&(c.dataHeight=n),void 0===a&&(c.left=0),void 0===s&&(c.top=0),c.left+r>c.dataWidth||c.top+n>c.dataHeight)throw new Ur("Crop rectangle does not fit within image data.");return c}Cs(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return $r.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return $r.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;$r.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new Cn(this)}}(wn);var Es=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Es(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)}}(sn);var As=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),Is=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ss=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return Is(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Jr.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(As),Os=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}Os(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(Ss),new Ss(null,0,0);!function(t){var e,r;try{for(var n=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=n.next();!o.done;o=n.next()){var i=o.value;Qr.fill(i,-1)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(Qr.createInt32Array(6,6)),function(t){var e=fn.getCharCode(" "),r=fn.getCharCode("."),n=fn.getCharCode(",");t[0][e]=1;for(var o=fn.getCharCode("Z"),i=fn.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=fn.getCharCode("z"),c=fn.getCharCode("a");for(a=c;a<=s;a++)t[1][a]=a-c+2;t[2][e]=1;var u=fn.getCharCode("9"),l=fn.getCharCode("0");for(a=l;a<=u;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var f=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],d=0;d<f.length;d++)t[3][fn.getCharCode(f[d])]=d;var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(d=0;d<h.length;d++)fn.getCharCode(h[d])>0&&(t[4][fn.getCharCode(h[d])]=d)}(Qr.createInt32Array(5,256));var Ts=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ns=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.buffer=e.makeBufferFromCanvasImageData(r),n}return Ts(e,t),e.makeBufferFromCanvasImageData=function(t){var r=t.getContext("2d");if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;s=0===t[o+3]?255:306*t[o]+601*t[o+1]+117*t[o+2]+512>>10,n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new Cn(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var c=r.getContext("2d");if(!c)throw new Error("Could not create a Convas Context element.");return c.translate(a/2,s/2),c.rotate(n),c.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(wn);function xs(){return"undefined"!=typeof navigator}var Rs=function(){return Rs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rs.apply(this,arguments)},Ds=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n.throw(t))}catch(e){i(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},Ps=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ms=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ks={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},Ls=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=Rs(Rs({},ks),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(rn.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.mediaStreamSetTorch=function(t,e){return Ds(this,void 0,void 0,(function(){return Ps(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=Ms(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(e){return console.error(e),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Vr("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Vr("element with id '"+t+"' must be an "+e+" element");return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new Ns(t),r=new _n(e);return new Wr(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimentions!")},t.createCaptureCanvas=function(e){if(!e)throw new Vr("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return Ds(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,c,u,l,f;return Ps(this,(function(d){switch(d.label){case 0:if(!xs())throw new Error("Can't enumerate devices, navigator is not present.");if(!(xs()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices))throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=d.sent(),e=[];try{for(r=Ms(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),c=o.groupId,u={deviceId:a,label:s,kind:i,groupId:c},e.push(u))}catch(h){l={error:h}}finally{try{n&&!n.done&&(f=r.return)&&f.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.playVideoOnLoadAsync=function(e,r){return Ds(this,void 0,void 0,(function(){return Ps(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),Ds(this,void 0,void 0,(function(){var o;return Ps(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new Vr("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:if(!e)throw new Vr("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:if(!e)throw new Vr("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return Ds(this,void 0,void 0,(function(){var o,i;return Ps(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,navigator.mediaDevices.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return Ds(this,void 0,void 0,(function(){var o,i,a,s,c,u,l,f,d,h,p=this;return Ps(this,(function(g){switch(g.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=g.sent(),a=function(){var t,r;try{for(var n=Ms(e.getVideoTracks()),o=n.next();!o.done;o=n.next())o.value.stop()}catch(i){t={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e=void 0},s=function(){a(),t.cleanVideoSource(i)},c=this.scan(i,n,s),u=e.getVideoTracks(),l=Rs(Rs({},c),{stop:function(){c.stop()},streamVideoConstraintsApply:function(t,e){return Ds(this,void 0,void 0,(function(){var r,n,o,i,a,s;return Ps(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=Ms(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(f=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return Ds(p,void 0,void 0,(function(){return Ps(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(f,e)];case 1:return r.sent(),[2]}}))}))},l.switchTorch=d,h=function(){c.stop(),d(!1)},l.stop=h),[2,l]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return Ds(this,void 0,void 0,(function(){var o;return Ps(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return Ds(this,void 0,void 0,(function(){var n,o;return Ps(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Vr("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return Ds(this,void 0,void 0,(function(){var n,o,i;return Ps(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Vr("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return Ds(this,void 0,void 0,(function(){var n,o;return Ps(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return Ds(this,void 0,void 0,(function(){var r,n;return Ps(this,(function(o){switch(o.label){case 0:if(!e)throw new Vr("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return Ds(this,void 0,void 0,(function(){var r,n;return Ps(this,(function(o){switch(o.label){case 0:if(!e)throw new Vr("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof gn&&e)return;if(o instanceof Gr&&r)return;if(o instanceof on&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i=t.createCaptureCanvas(e),a=i.getContext("2d");if(!a)throw new Error("Couldn't create canvas for visual element scan.");var s,c=function(){a=void 0,i=void 0},u=!1,l={stop:function(){u=!0,clearTimeout(s),c(),n&&n()}},f=function(){if(!u)try{t.drawImageOnCanvas(a,e);var d=o.decodeFromCanvas(i);r(d,void 0,l),s=setTimeout(f,o.options.delayBetweenScanSuccess)}catch(h){if(r(void 0,h,l),h instanceof Gr||h instanceof on||h instanceof gn)return void(s=setTimeout(f,o.options.delayBetweenScanAttempts));c(),n&&n(h)}};return f(),l},t.prototype._decodeOnLoadImage=function(e){return Ds(this,void 0,void 0,(function(){return Ps(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t}(),Bs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Bs((function(e,r){return t.call(this,new so,e,r)||this}),t)}(Ls);var js=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){js((function(e,r){return t.call(this,new Li(e),e,r)||this}),t)}(Ls);var Fs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Fs((function(e,r){return t.call(this,new Ki,e,r)||this}),t)}(Ls);var Vs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){var n=this,o=new ds;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}Vs(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(rn.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)}}(Ls);var Hs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Hs((function(e,r){return t.call(this,new cs,e,r)||this}),t)}(Ls);var Us=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ws=function(t){function e(e,r){return t.call(this,new Sa,e,r)||this}return Us(e,t),e}(Ls),zs=function(t,e,r){var n=typeof t===r;return n||console.warn('[ReactQrReader]: Expected "'.concat(e,'" to be a of type "').concat(r,'".')),n},Gs=function(){return Gs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Gs.apply(this,arguments)},Xs={width:"100%",paddingTop:"100%",overflow:"hidden",position:"relative"},$s={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden",position:"absolute",transform:void 0},Ys=function(t){var r=t.videoContainerStyle,n=t.containerStyle,o=t.videoStyle,i=t.constraints,a=t.ViewFinder,s=t.scanDelay,c=t.className,u=t.onResult,l=t.videoId;return function(t){var r=t.scanDelay,n=t.constraints,o=t.onResult,i=t.videoId,a=e.useRef(null);e.useEffect((function(){var t,e=new Ws(null,{delayBetweenScanAttempts:r});return(t="undefined"!=typeof navigator&&!!navigator.mediaDevices)||console.warn('[ReactQrReader]: MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),!t&&zs(o,"onResult","function")&&o(null,new Error('MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),e),zs(n,"constraints","object")&&e.decodeFromConstraints({video:n},i,(function(t,r){zs(o,"onResult","function")&&o(t,r,e)})).then((function(t){return a.current=t})).catch((function(t){zs(o,"onResult","function")&&o(null,t,e)})),function(){var t;null===(t=a.current)||void 0===t||t.stop()}}),[])}({constraints:i,scanDelay:s,onResult:u,videoId:l}),d.createElement("section",{className:c,style:n},d.createElement("div",{style:Gs(Gs({},Xs),r)},!!a&&d.createElement(a,null),d.createElement("video",{muted:!0,id:l,style:Gs(Gs(Gs({},$s),o),{transform:"user"===(null==i?void 0:i.facingMode)&&"scaleX(-1)"})})))};function qs({onResult:t,setVisible:r,title:n}){const[o,i]=e.useState(""),[a,s]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(Rr,{title:n,visible:!0,setVisible:r,hideScrollBar:!1,maxWidth:500,children:Jt.jsxs("div",{className:"position-relative my-2",children:[Jt.jsx(Ys,{onResult:function(e,n){(null==n?void 0:n.message)&&(i(`Ocorreu um erro ao fazer a leitura: ${n.message}`),"Requested device not found"===n.message&&s(!0)),e&&t&&(t(e),r(!1))},constraints:{facingMode:"environment"}}),Jt.jsxs("svg",{width:"50px",viewBox:"0 0 100 100",style:{top:"0px",left:"0px",zIndex:1,boxSizing:"border-box",border:"50px solid rgba(0, 0, 0, 0.25)",borderRadius:"15px",position:"absolute",width:"100%",height:"100%"},children:[Jt.jsx("path",{fill:"none",d:"M13,0 L0,0 L0,13",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),Jt.jsx("path",{fill:"none",d:"M0,87 L0,100 L13,100",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),Jt.jsx("path",{fill:"none",d:"M87,100 L100,100 L100,87",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),Jt.jsx("path",{fill:"none",d:"M100,13 L100,0 87,0",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"})]})]})}),o&&Jt.jsx(ae,{onConfirm:function(){i(),a&&r(!1)},children:o})]})}Ys.displayName="QrReader",Ys.defaultProps={constraints:{facingMode:"user"},videoId:"video",scanDelay:500};const Zs=o.div`
458
+ `,xr="modal-hide-sb";function Rr({maxWidth:t,visible:n,setVisible:o,title:i,children:a,hideScrollBar:s=!0,id:c}){const{addModal:u,removeModal:l}=re(),[f]=e.useState(c||"modal-"+r.random());return e.useEffect((()=>(n?s&&document.body.classList.add(xr):(l(f),s&&document.body.classList.remove(xr)),()=>{l(f),s&&document.body.classList.remove(xr)})),[n,s]),e.useEffect((()=>{u(f,o)}),[f]),n?Jt.jsx(Nr,{maxWidth:t,children:Jt.jsxs("div",{className:"mod-panel",children:[Jt.jsxs(gr,{children:[Jt.jsx("div",{className:"pn-title",children:i}),Jt.jsx(cr,{type:"button",onClick:()=>o(!1)})]}),Jt.jsx("div",{className:"mod-body",children:a})]})}):null}var Dr,Pr,Mr,kr=(Dr=function(t,e){return(Dr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}Dr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Lr=function(t){function e(e){var r,n,o,i=this.constructor,a=t.call(this,e)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),r=a,n=i.prototype,(o=Object.setPrototypeOf)?o(r,n):r.__proto__=n,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(a),a}return kr(e,t),e}(Error),Br=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jr=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return Br(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(Lr),Fr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fr(e,t),e.kind="ArgumentException",e}(jr),Hr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ur=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hr(e,t),e.kind="IllegalArgumentException",e}(jr),Wr=function(){function t(t){if(this.binarizer=t,null===t)throw new Ur("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),zr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zr(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(jr),Xr=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),$r=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Yr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Yr(e,t),e.kind="IndexOutOfBoundsException",e}(jr),Zr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kr=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return Zr(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(qr),Qr=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new Ur("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new Kr(e);if(r>t)throw new Kr(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next())n=31*n+i.value}catch(a){e={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return $r.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Jr=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!=(e=t<<16)&&(r-=16,t=e),0!=(e=t<<8)&&(r-=8,t=e),0!=(e=t<<4)&&(r-=4,t=e),0!=(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-(t>>>31)},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),tn=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);$r.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Jr.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Jr.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new Ur;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new Ur;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new Ur("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new Ur("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var c=t[o];s|=c<<32-a,t[o-1]=s,s=c>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&Qr.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+Qr.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)0==(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t}();(Mr=Pr||(Pr={}))[Mr.OTHER=0]="OTHER",Mr[Mr.PURE_BARCODE=1]="PURE_BARCODE",Mr[Mr.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",Mr[Mr.TRY_HARDER=3]="TRY_HARDER",Mr[Mr.CHARACTER_SET=4]="CHARACTER_SET",Mr[Mr.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",Mr[Mr.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",Mr[Mr.ASSUME_GS1=7]="ASSUME_GS1",Mr[Mr.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",Mr[Mr.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",Mr[Mr.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS";var en,rn=Pr,nn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),on=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nn(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(jr);!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(en||(en={}));var an,sn=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var c=this.values,u=0,l=c.length;u!==l;u++){var f=c[u];t.VALUES_TO_ECI.set(f,this)}try{for(var d=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),h=d.next();!h.done;h=d.next()){var p=h.value;t.NAME_TO_ECI.set(p,this)}}catch(g){o={error:g}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new on("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new on("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new on("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(en.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(en.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(en.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(en.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(en.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(en.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(en.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(en.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(en.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(en.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(en.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(en.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(en.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(en.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(en.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(en.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(en.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(en.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(en.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(en.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(en.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(en.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(en.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(en.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(en.Big5,28,"Big5"),t.GB18030=new t(en.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(en.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),cn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cn(e,t),e.kind="UnsupportedOperationException",e}(jr),ln=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof sn?t:sn.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(sn.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new un("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(sn.UTF8)||t.equals(sn.ISO8859_1)||t.equals(sn.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),fn=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return ln.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(rn.CHARACTER_SET))return r.get(rn.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,c=0,u=0,l=0,f=0,d=0,h=0,p=0,g=0,m=0,v=0,y=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],_=0;_<n&&(o||i||a);_++){var w=255&e[_];a&&(s>0?0==(128&w)?a=!1:s--:0!=(128&w)&&(0==(64&w)?a=!1:(s++,0==(32&w)?c++:(s++,0==(16&w)?u++:(s++,0==(8&w)?l++:a=!1))))),o&&(w>127&&w<160?o=!1:w>159&&(w<192||215===w||247===w)&&v++),i&&(f>0?w<64||127===w||w>252?i=!1:f--:128===w||160===w||w>239?i=!1:w>160&&w<224?(d++,p=0,++h>g&&(g=h)):w>127?(f++,h=0,++p>m&&(m=p)):(h=0,p=0))}return a&&s>0&&(a=!1),i&&f>0&&(i=!1),a&&(y||c+u+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===d||10*v>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var c,u=a?parseInt(a.substr(1)):void 0;switch(s){case"s":c=e[n];break;case"c":c=e[n][0];break;case"f":c=parseFloat(e[n]).toFixed(t);break;case"p":c=parseFloat(e[n]).toPrecision(t);break;case"e":c=parseFloat(e[n]).toExponential(t);break;case"x":c=parseInt(e[n]).toString(u||16);break;case"d":c=parseFloat(parseInt(e[n],u||10).toPrecision(t)).toFixed(0)}c="object"==typeof c?JSON.stringify(c):(+c).toString(u);for(var l=parseInt(o),f=o&&o[0]+""=="0"?"0":" ";c.length<l;)c=void 0!==r?c+f:f+c;return c}}))},t.getBytes=function(t,e){return ln.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=sn.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=sn.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=sn.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),dn=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=fn.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)},t}(),hn=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new Ur("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new Ur("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,c=0,u=0;u<e.length;)if("\n"===e.charAt(u)||"\r"===e.charAt(u)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Ur("row lengths do not match");a=i,c++}u++}else if(e.substring(u,u+r.length)===r)u+=r.length,o[i]=!0,i++;else{if(e.substring(u,u+n.length)!==n)throw new Ur("illegal character encountered: "+e.substring(u));u+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Ur("row lengths do not match");c++}for(var l=new t(s,c),f=0;f<i;f++)o[f]&&l.set(Math.floor(f%s),Math.floor(f/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return 0!=(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Ur("input matrix dimensions do not match");for(var e=new tn(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),c=0;c<r;c++)n[a+c]^=s[c]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new Ur("Left and top must be nonnegative");if(n<1||r<1)throw new Ur("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new Ur("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,c=e;c<i;c++)for(var u=c*a,l=t;l<o;l++)s[u+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new tn(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){$r.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new tn(t),n=new tn(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,c=0;c<e;c++)for(var u=0;u<r;u++){var l=n[c*r+u];if(0!==l){if(c<i&&(i=c),c>s&&(s=c),32*u<o){for(var f=0;0==(l<<31-f&4294967295);)f++;32*u+f<o&&(o=32*u+f)}if(32*u+31>a){for(f=31;l>>>f==0;)f--;32*u+f>a&&(a=32*u+f)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;0==(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&Qr.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return 31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+Qr.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new dn,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),pn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pn(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(jr),mn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vn=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return mn(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new tn(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var c=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<c&&r.set(s);else{var u=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var f=255&i[s+1];(4*l-u-f)/2<c&&r.set(s),u=l,l=f}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new hn(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),c=t.getRow(s,this.luminances),u=Math.floor(4*r/5),l=Math.floor(r/5);l<u;l++)i[(255&c[l])>>e.LUMINANCE_SHIFT]++;var f=e.estimateBlackPoint(i),d=t.getMatrix();for(a=0;a<n;a++){var h=a*r;for(l=0;l<r;l++)(255&d[h+l])<f&&o.set(l,a)}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,c=0;for(a=0;a<r;a++){var u=a-o;(h=t[a]*u*u)>c&&(s=a,c=h)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new gn;var f=s-1,d=-1;for(a=s-1;a>o;a--){var h,p=a-o;(h=p*p*(s-a)*(n-t[a]))>d&&(f=a,d=h)}return f<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Xr),yn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_n=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return yn(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;0!=(n&e.BLOCK_SIZE_MASK)&&a++;var s=o>>e.BLOCK_SIZE_POWER;0!=(o&e.BLOCK_SIZE_MASK)&&s++;var c=e.calculateBlackPoints(i,a,s,n,o),u=new hn(n,o);e.calculateThresholdForBlock(i,a,s,n,o,c,u),this.matrix=u}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var c=i-e.BLOCK_SIZE,u=o-e.BLOCK_SIZE,l=0;l<n;l++){var f=l<<e.BLOCK_SIZE_POWER;f>c&&(f=c);for(var d=e.cap(l,2,n-3),h=0;h<r;h++){var p=h<<e.BLOCK_SIZE_POWER;p>u&&(p=u);for(var g=e.cap(h,2,r-3),m=0,v=-2;v<=2;v++){var y=a[d+v];m+=y[g-2]+y[g-1]+y[g]+y[g+1]+y[g+2]}var _=m/25;e.thresholdBlock(t,p,f,_,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,c=n*i+r;s<e.BLOCK_SIZE;s++,c+=i)for(var u=0;u<e.BLOCK_SIZE;u++)(255&t[c+u])<=o&&a.set(r+u,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,c=new Array(n),u=0;u<n;u++){c[u]=new Int32Array(r);var l=u<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var f=0;f<r;f++){var d=f<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var h=0,p=255,g=0,m=0,v=l*o+d;m<e.BLOCK_SIZE;m++,v+=o){for(var y=0;y<e.BLOCK_SIZE;y++){var _=255&t[v+y];h+=_,_<p&&(p=_),_>g&&(g=_)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,v+=o;m<e.BLOCK_SIZE;m++,v+=o)for(y=0;y<e.BLOCK_SIZE;y++)h+=255&t[v+y]}var w=h>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(w=p/2,u>0&&f>0)){var b=(c[u-1][f]+2*c[u][f-1]+c[u-1][f-1])/4;p<b&&(w=b)}c[u][f]=w}}return c},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(vn),wn=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new un("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new un("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new un("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new dn,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i,a=255&n[o];i=a<64?"#":a<128?"+":a<192?".":" ",e.append(i)}e.append("\n")}return e.toString()},t}(),bn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cn=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return bn(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(wn),En=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return En(e,t),e.makeBufferFromCanvasImageData=function(t){var r=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(r.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;s=0===t[o+3]?255:306*t[o]+601*t[o+1]+117*t[o+2]+512>>10,n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),c=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=c,n.translate(s/2,c/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new Cn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e}(wn),In=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),Sn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n.throw(t))}catch(e){i(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},On=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Tn=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return Sn(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,c,u,l,f;return On(this,(function(d){switch(d.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=d.sent(),e=[];try{for(r=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),c=o.groupId,u={deviceId:a,label:s,kind:i,groupId:c},e.push(u))}catch(h){l={error:h}}finally{try{n&&!n.done&&(f=r.return)&&f.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return Sn(this,void 0,void 0,(function(){return On(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new In(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return Sn(this,void 0,void 0,(function(){var e;return On(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return Sn(this,void 0,void 0,(function(){return On(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return Sn(this,void 0,void 0,(function(){return On(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return Sn(this,void 0,void 0,(function(){var n;return On(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return Sn(this,void 0,void 0,(function(){var n;return On(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return Sn(this,void 0,void 0,(function(){var n;return On(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return Sn(this,void 0,void 0,(function(){var r;return On(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return Sn(this,void 0,void 0,(function(){return On(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Vr("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Vr("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new Vr("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new Vr("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new Vr("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new Vr("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new Vr("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new Vr("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new Vr("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new Vr("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return Sn(this,void 0,void 0,(function(){return On(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return Sn(this,void 0,void 0,(function(){return On(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(n._stopAsyncDecode)return a(new gn("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(s){if(e&&s instanceof gn||(s instanceof Gr||s instanceof on)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(s)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(i){e(null,i),(i instanceof Gr||i instanceof on||i instanceof gn)&&setTimeout(n,r._timeBetweenDecodingAttempts)}};n()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){var e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);var r=this.getCaptureCanvas(t),n=new An(r),o=new _n(n);return new Wr(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),Nn=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=$r.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?$r.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);$r.arraycopy(e,0,r,0,e.length),$r.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(an||(an={}));var xn,Rn=an;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(xn||(xn={}));var Dn,Pn=xn,Mn=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),kn=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Ur;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),Ln=function(){function t(t,e){if(0===e.length)throw new Ur;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),$r.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=kn.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=kn.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Ur("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;$r.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=kn.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Ur("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,c=0;c<n;c++)for(var u=r[c],l=0;l<i;l++)a[c+l]=kn.addOrSubtract(a[c+l],s.multiply(u,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Ur;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new Ur("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new Ur("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),c=t.multiplyByMonomial(a,s),u=e.buildMonomial(a,s);r=r.addOrSubtract(u),n=n.addOrSubtract(c)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),Bn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(e,t),e.kind="ArithmeticException",e}(jr),Fn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vn=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var c=new Int32Array(r);for(s=0;s<r-1;s++)c[i[s]]=s;return o.logTable=c,o.zero=new Ln(o,Int32Array.from([0])),o.one=new Ln(o,Int32Array.from([1])),o}return Fn(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Ur;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Ln(this,r)},e.prototype.inverse=function(t){if(0===t)throw new jn;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Jr.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(kn),Hn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hn(e,t),e.kind="ReedSolomonException",e}(jr),Wn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wn(e,t),e.kind="IllegalStateException",e}(jr),Gn=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new Ln(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var c=new Ln(r,o),u=this.runEuclideanAlgorithm(r.buildMonomial(e,1),c,e),l=u[0],f=u[1],d=this.findErrorLocations(l),h=this.findErrorMagnitudes(f,d);for(a=0;a<d.length;a++){var p=t.length-1-r.log(d[a]);if(p<0)throw new Un("Bad error location");t[p]=Vn.addOrSubtract(t[p],h[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),c=o.getOne();a.getDegree()>=(r/2|0);){var u=i,l=s;if(s=c,(i=a).isZero())throw new Un("r_{i-1} was zero");a=u;for(var f=o.getZero(),d=i.getCoefficient(i.getDegree()),h=o.inverse(d);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),h);f=f.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(c=f.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new zn("Division algorithm failed to reduce polynomial?")}var m=c.getCoefficient(0);if(0===m)throw new Un("sigmaTilde(0) was zero");var v=o.inverse(m);return[c.multiplyScalar(v),a.multiplyScalar(v)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Un("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,c=0;c<r;c++)if(i!==c){var u=o.multiply(e[c],a),l=0==(1&u)?1|u:-2&u;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(Dn||(Dn={}));var Xn=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new Mn(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=Dn.UPPER,o=Dn.UPPER,i="",a=0;a<r;)if(o===Dn.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var c=0;c<s;c++){if(r-a<8){a=r;break}var u=t.readCode(e,a,8);i+=fn.castAsNonUtf8Char(u),a+=8}o=n}else{var l=o===Dn.DIGIT?4:5;if(r-a<l)break;u=t.readCode(e,a,l),a+=l;var f=t.getCharacter(o,u);f.startsWith("CTRL_")?(n=o,o=t.getTable(f.charAt(5)),"L"===f.charAt(6)&&(n=o)):(i+=f,o=n)}return i},t.getTable=function(t){switch(t){case"L":return Dn.LOWER;case"P":return Dn.PUNCT;case"M":return Dn.MIXED;case"D":return Dn.DIGIT;case"B":return Dn.BINARY;default:return Dn.UPPER}},t.getCharacter=function(e,r){switch(e){case Dn.UPPER:return t.UPPER_TABLE[r];case Dn.LOWER:return t.LOWER_TABLE[r];case Dn.MIXED:return t.MIXED_TABLE[r];case Dn.PUNCT:return t.PUNCT_TABLE[r];case Dn.DIGIT:return t.DIGIT_TABLE[r];default:throw new zn("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Vn.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Vn.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Vn.AZTEC_DATA_10):(n=12,r=Vn.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new on;for(var a=e.length%n,s=new Int32Array(i),c=0;c<i;c++,a+=n)s[c]=t.readCode(e,a,n);try{new Gn(r).decode(s,i-o)}catch(g){throw new on(g)}var u=(1<<n)-1,l=0;for(c=0;c<o;c++){if(0===(h=s[c])||h===u)throw new on;1!==h&&h!==u-1||l++}var f=new Array(o*n-l),d=0;for(c=0;c<o;c++){var h;if(1===(h=s[c])||h===u-1)f.fill(h>1,d,d+n-1),d+=n-1;else for(var p=n-1;p>=0;--p)f[d++]=0!=(h&1<<p)}return f},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Jr.truncDivision(Jr.truncDivision(n,2)-1,15),c=n/2,u=Jr.truncDivision(s,2);for(a=0;a<c;a++){var l=a+Jr.truncDivision(a,15);o[c-a-1]=u-l-1,o[c+a]=u+l+1}}a=0;for(var f=0;a<r;a++){for(var d=4*(r-a)+(e?9:12),h=2*a,p=n-1-h,g=0;g<d;g++)for(var m=2*g,v=0;v<2;v++)i[f+m+v]=t.get(o[h+v],o[h+g]),i[f+2*d+m+v]=t.get(o[h+g],o[p-v]),i[f+4*d+m+v]=t.get(o[p-v],o[p-g]),i[f+6*d+m+v]=t.get(o[p-g],o[h+v]);f+=8*d}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","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","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","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","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b","\t","\n","\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),$n=function(){function t(){}return t.round=function(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++)e+=t[r];return e},t}(),Yn=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),qn=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Yn.floatToIntBits(this.x)+Yn.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return $n.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),Zn=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Kn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qn=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return Kn(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Zn),Jn=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new gn}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,c=!1,u=!1,l=!1,f=this.width,d=this.height;i;){i=!1;for(var h=!0;(h||!s)&&e<f;)(h=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=f){o=!0;break}for(var p=!0;(p||!c)&&n<d;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,c=!0):c||n++;if(n>=d){o=!0;break}for(var g=!0;(g||!u)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,u=!0):u||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var v=e-t,y=null,_=1;null===y&&_<v;_++)y=this.getBlackPointOnSegment(t,n-_,t+_,n);if(null==y)throw new gn;var w=null;for(_=1;null===w&&_<v;_++)w=this.getBlackPointOnSegment(t,r+_,t+_,r);if(null==w)throw new gn;var b=null;for(_=1;null===b&&_<v;_++)b=this.getBlackPointOnSegment(e,r+_,e-_,r);if(null==b)throw new gn;var C=null;for(_=1;null===C&&_<v;_++)C=this.getBlackPointOnSegment(e,n-_,e-_,n);if(null==C)throw new gn;return this.centerEdges(C,y,b,w)}throw new gn},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=$n.round($n.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,c=0;c<o;c++){var u=$n.round(t+c*i),l=$n.round(e+c*a);if(s.get(u,l))return new qn(u,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),c=r.getY(),u=n.getX(),l=n.getY(),f=o.getX(),d=o.getY(),h=t.CORR;return i<this.width/2?[new qn(f-h,d+h),new qn(s+h,c+h),new qn(u-h,l-h),new qn(i+h,a-h)]:[new qn(f+h,d+h),new qn(s+h,c-h),new qn(u-h,l+h),new qn(i-h,a-h)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),to=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new gn;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}for(o=!0,i=e.length-2;i>=0&&o;i-=2){if(a=Math.floor(e[i]),s=Math.floor(e[i+1]),a<-1||a>r||s<-1||s>n)throw new gn;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),eo=function(){function t(t,e,r,n,o,i,a,s,c){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=c}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,c,u,l,f,d,h,p,g,m){var v=t.quadrilateralToSquare(e,r,n,o,i,a,s,c);return t.squareToQuadrilateral(u,l,f,d,h,p,g,m).times(v)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33,f=0;f<e;f+=2){var d=t[f],h=t[f+1],p=o*d+s*h+l;t[f]=(r*d+i*h+c)/p,t[f+1]=(n*d+a*h+u)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33,f=t.length,d=0;d<f;d++){var h=t[d],p=e[d],g=o*h+s*p+l;t[d]=(r*h+i*p+c)/g,e[d]=(n*h+a*p+u)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,c){var u=e-n+i-s,l=r-o+a-c;if(0===u&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var f=n-i,d=s-i,h=o-a,p=c-a,g=f*p-d*h,m=(u*p-d*l)/g,v=(f*l-u*h)/g;return new t(n-e+m*n,s-e+v*s,e,o-r+m*o,c-r+v*c,r,m,v,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,c){return t.squareToQuadrilateral(e,r,n,o,i,a,s,c).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),ro=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),no=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,c,u,l,f,d,h,p,g,m,v,y){var _=eo.quadrilateralToQuadrilateral(n,o,i,a,s,c,u,l,f,d,h,p,g,m,v,y);return this.sampleGridWithTransform(t,e,r,_)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new gn;for(var o=new hn(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,c=a+.5,u=0;u<s;u+=2)i[u]=u/2+.5,i[u+1]=c;n.transformPoints(i),to.checkAndNudgePoints(t,i);try{for(u=0;u<s;u+=2)t.get(Math.floor(i[u]),Math.floor(i[u+1]))&&o.set(u/2,a)}catch(l){throw new gn}}return o},e}(to),oo=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new no,t}(),io=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new qn(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),ao=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Qn(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new gn;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(t>>e-2<<1)+(1&t)+(r<<3)})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Jr.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new gn},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new Gn(Vn.AZTEC_PARAM).decode(i,o)}catch(c){throw new gn}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),c=this.getFirstDifferent(n,i,-1,1),u=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(u,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,c,u))break}e=a,r=s,n=c,o=u,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new gn;this.compact=5===this.nbCenterLayers;var f=new qn(e.getX()+.5,e.getY()-.5),d=new qn(r.getX()+.5,r.getY()+.5),h=new qn(n.getX()-.5,n.getY()+.5),p=new qn(o.getX()-.5,o.getY()-.5);return this.expandSquare([f,d,h,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(c=new Jn(this.image).detect())[0],e=c[1],r=c[2],n=c[3]}catch(u){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new io(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new io(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new io(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new io(o-7,i-7),!1,-1,-1).toResultPoint()}var a=$n.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=$n.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var c;t=(c=new Jn(this.image,15,a,s).detect())[0],e=c[1],r=c[2],n=c[3]}catch(l){t=this.getFirstDifferent(new io(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new io(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new io(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new io(a-7,s-7),!1,-1,-1).toResultPoint()}return a=$n.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=$n.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new io(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=oo.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,c=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,c,s,c,c,s,c,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),c=i*(e.getX()-t.getX())/o,u=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get($n.round(a+l*c),$n.round(s+l*u))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new io(t.getX()-3,t.getY()+3),e=new io(e.getX()-3,e.getY()-3),r=new io(r.getX()+3,r.getY()-3),n=new io(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&(i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),c=this.image.get(t.getX(),t.getY()),u=Math.ceil(r),l=0;l<u;l++)a+=n,s+=o,this.image.get($n.round(a),$n.round(s))!==c&&i++;var f=i/r;return f>.1&&f<.9?0:f<=.1===c?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new io(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,c=new qn(a+n*o,s+n*i),u=new qn(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[c,new qn(a+n*o,s+n*i),u,new qn(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=$n.round(t.getX()),r=$n.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return $n.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return $n.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Jr.truncDivision(this.nbLayers-4,8)+1)+15},t}(),so=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new ao(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Xn).decode(a)}catch(l){r=l}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Xn).decode(a)}catch(l){if(null!=r)throw r;throw l}var s=new Nn(i.getText(),i.getRawBytes(),i.getNumBits(),o,Rn.AZTEC,$r.currentTimeMillis()),c=i.getByteSegments();null!=c&&s.putMetadata(Pn.BYTE_SEGMENTS,c);var u=i.getECLevel();return null!=u&&s.putMetadata(Pn.ERROR_CORRECTION_LEVEL,u),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(rn.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),co=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){co((function(e){return void 0===e&&(e=500),t.call(this,new so,e)||this}),t)}(Tn);var uo=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(u){if(e&&!0===e.get(rn.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(Pn.ORIENTATION)&&(i+=o.get(Pn.ORIENTATION)%360),n.putMetadata(Pn.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),c=0;c<a.length;c++)a[c]=new qn(s-a[c].getY()-1,a[c].getX());return n}throw new gn}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new tn(n),a=e&&!0===e.get(rn.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var c=Math.trunc(o/2),u=0;u<r;u++){var l=Math.trunc((u+1)/2),f=c+s*(0==(1&u)?l:-l);if(f<0||f>=o)break;try{i=t.getBlackRow(f,i)}catch(m){continue}for(var d=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(rn.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(rn.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=h.decodeRow(f,i,e);if(1===t){o.putMetadata(Pn.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new qn(n-a[0].getX()-1,a[0].getY()),a[1]=new qn(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(s){}},h=this,p=0;p<2;p++){var g=d(p);if("object"==typeof g)return g.value}}throw new gn},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new gn;for(var a=!t.get(e),s=0,c=e;c<i;){if(t.get(c)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}c++}if(s!==n&&(s!==n-1||c!==i))throw new gn},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new gn;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var c=0,u=0;u<n;u++){var l=t[u],f=e[u]*s,d=l>f?l-f:f-l;if(d>r)return Number.POSITIVE_INFINITY;c+=d}return c/o},t}(),lo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lo(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,c=n;c<r;c++)if(t.get(c)!==s)i[o]++;else{if(5===o){for(var u=e.MAX_AVG_VARIANCE,l=-1,f=e.CODE_START_A;f<=e.CODE_START_C;f++){var d=uo.patternMatchVariance(i,e.CODE_PATTERNS[f],e.MAX_INDIVIDUAL_VARIANCE);d<u&&(u=d,l=f)}if(l>=0&&t.isRange(Math.max(0,a-(c-a)/2),a,!1))return Int32Array.from([a,c,l]);a+=i[0]+i[1],(i=i.slice(2,i.length-1))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new gn},e.decodeCode=function(t,r,n){uo.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],c=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);c<o&&(o=c,i=a)}if(i>=0)return i;throw new gn},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(rn.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],c=0,u=new Uint8Array(20);switch(u[c++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new on}for(var l=!1,f=!1,d="",h=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,v=0,y=s,_=0,w=!0,b=!1,C=!1;!l;){var E=f;switch(f=!1,m=v,v=e.decodeCode(r,g,p),u[c++]=v,v!==e.CODE_STOP&&(w=!0),v!==e.CODE_STOP&&(y+=++_*v),h=p,p+=g.reduce((function(t,e){return t+e}),0),v){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new on}switch(o){case e.CODE_CODE_A:if(v<64)d+=C===b?String.fromCharCode(" ".charCodeAt(0)+v):String.fromCharCode(" ".charCodeAt(0)+v+128),C=!1;else if(v<96)d+=C===b?String.fromCharCode(v-64):String.fromCharCode(v+64),C=!1;else switch(v!==e.CODE_STOP&&(w=!1),v){case e.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!b&&C?(b=!0,C=!1):b&&C?(b=!1,C=!1):C=!0;break;case e.CODE_SHIFT:f=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(v<96)d+=C===b?String.fromCharCode(" ".charCodeAt(0)+v):String.fromCharCode(" ".charCodeAt(0)+v+128),C=!1;else switch(v!==e.CODE_STOP&&(w=!1),v){case e.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!b&&C?(b=!0,C=!1):b&&C?(b=!1,C=!1):C=!0;break;case e.CODE_SHIFT:f=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(v<100)v<10&&(d+="0"),d+=v;else switch(v!==e.CODE_STOP&&(w=!1),v){case e.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}E&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var A=p-h;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-h)/2),!1))throw new gn;if((y-=_*m)%103!==m)throw new Gr;var I=d.length;if(0===I)throw new gn;I>0&&w&&(d=o===e.CODE_CODE_C?d.substring(0,I-2):d.substring(0,I-1));for(var S=(a[1]+a[0])/2,O=h+A/2,T=u.length,N=new Uint8Array(T),x=0;x<T;x++)N[x]=u[x];var R=[new qn(S,t),new qn(O,t)];return new Nn(d,N,0,R,Rn.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(uo),ho=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),po=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},go=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return ho(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,c=this.counters;c.fill(0),this.decodeRowResult="";var u,l,f=e.findAsteriskPattern(r,c),d=r.getNextSet(f[1]),h=r.getSize();do{e.recordPattern(r,d,c);var p=e.toNarrowWidePattern(c);if(p<0)throw new gn;u=e.patternToChar(p),this.decodeRowResult+=u,l=d;try{for(var g=(o=void 0,po(c)),m=g.next();!m.done;m=g.next())d+=m.value}catch(S){o={error:S}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var v,y=0;try{for(var _=po(c),w=_.next();!w.done;w=_.next())y+=w.value}catch(S){a={error:S}}finally{try{w&&!w.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}if(d!==h&&2*(d-l-y)<y)throw new gn;if(this.usingCheckDigit){for(var b=this.decodeRowResult.length-1,C=0,E=0;E<b;E++)C+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(E));if(this.decodeRowResult.charAt(b)!==e.ALPHABET_STRING.charAt(C%43))throw new Gr;this.decodeRowResult=this.decodeRowResult.substring(0,b)}if(0===this.decodeRowResult.length)throw new gn;v=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var A=(f[1]+f[0])/2,I=l+y/2;return new Nn(v,null,0,[new qn(A,t),new qn(I,t)],Rn.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,c=r.length,u=o;u<n;u++)if(t.get(u)!==s)r[i]++;else{if(i===c-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((u-a)/2)),a,!1))return[a,u];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new gn},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,po(t)),c=s.next();!c.done;c=s.next())(d=c.value)<a&&d>i&&(a=d)}catch(h){e={error:h}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var u=0,l=0,f=0;f<o;f++)(d=t[f])>i&&(l|=1<<o-1-f,n++,u+=d);if(3===n){for(f=0;f<o&&n>0;f++){var d;if((d=t[f])>i&&(n--,2*d>=u))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new gn},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new on;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new on;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new on;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new on;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(uo),mo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return mo(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),c=new dn;e.decodeMiddle(r,a[1],s[0],c);var u=c.toString(),l=null;null!=n&&(l=n.get(rn.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var f=u.length,d=!1,h=0;try{for(var p=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(f===m){d=!0;break}m>h&&(h=m)}}catch(y){o={error:y}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!d&&f>h&&(d=!0),!d)throw new on;var v=[new qn(a[1],t),new qn(s[0],t)];return new Nn(u,null,0,v,Rn.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){uo.recordPattern(t,r,i);for(var c=0;c<5;c++){var u=2*c;a[c]=i[u],s[c]=i[u+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new gn},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new gn;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(i){i instanceof gn&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,c=0,u=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[c]++;else{if(c===o-1){if(uo.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[u,l];u+=i[0]+i[1],$r.arraycopy(i,2,i,0,c-1),i[c-1]=0,i[c]=0,c--}else c++;i[c]=1,s=!s}throw new gn},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=uo.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new gn},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(uo),yo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return yo(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}for(r*=3,n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,c=r=n?t.getNextUnset(r):t.getNextSet(r),u=o.length,l=n,f=r;f<a;f++)if(t.get(f)!==l)i[s]++;else{if(s===u-1){if(uo.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([c,f]);c+=i[0]+i[1];for(var d=i.slice(2,i.length-1),h=0;h<s-1;h++)i[h]=d[h];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new gn},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,c=0;c<s;c++){var u=o[c],l=uo.patternMatchVariance(r,u,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=c)}if(a>=0)return a;throw new gn},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(uo),wo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bo=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),c=[new qn((n[0]+n[1])/2,e),new qn(i,e)],u=new Nn(a,null,0,c,Rn.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),c=r[1],u=0,l=0;l<5&&c<s;l++){var f=_o.decodeDigit(e,a,c,_o.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var d=(o=void 0,wo(a)),h=d.next();!h.done;h=d.next())c+=h.value}catch(g){o={error:g}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}f>=10&&(u|=1<<4-l),4!==l&&(c=e.getNextSet(c),c=e.getNextUnset(c))}if(5!==n.length)throw new gn;var p=this.determineCheckDigit(u);if(t.extensionChecksum(n.toString())!==p)throw new gn;return c},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);for(r*=3,n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new gn},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[Pn.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),Co=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Eo=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),c=[new qn((n[0]+n[1])/2,e),new qn(i,e)],u=new Nn(a,null,0,c,Rn.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],c=0,u=0;u<2&&s<a;u++){var l=_o.decodeDigit(t,i,s,_o.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var f=(n=void 0,Co(i)),d=f.next();!d.done;d=f.next())s+=d.value}catch(h){n={error:h}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}l>=10&&(c|=1<<1-u),1!==u&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new gn;if(parseInt(r.toString())%4!==c)throw new gn;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[Pn.ISSUE_NUMBER,parseInt(t)]])},t}(),Ao=function(){function t(){}return t.decodeRow=function(t,e,r){var n=_o.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new bo).decodeRow(t,e,n)}catch(o){return(new Eo).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),Io=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),So=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return Io(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(rn.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new qn((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),c=s.rowOffset,u=s.resultString;if(null!=i){var l=new qn(c,t);i.foundPossibleResultPoint(l)}var f=e.decodeEnd(r,c);if(null!=i){var d=new qn((f[0]+f[1])/2,t);i.foundPossibleResultPoint(d)}var h=f[1],p=h+(h-f[0]);if(p>=r.getSize()||!r.isRange(h,p,!1))throw new gn;var g=u.toString();if(g.length<8)throw new on;if(!e.checkChecksum(g))throw new Gr;var m=(o[1]+o[0])/2,v=(f[1]+f[0])/2,y=this.getBarcodeFormat(),_=[new qn(m,t),new qn(v,t)],w=new Nn(g,null,0,_,y,(new Date).getTime()),b=0;try{var C=Ao.decodeRow(t,r,f[1]);w.putMetadata(Pn.UPC_EAN_EXTENSION,C.getText()),w.putAllMetadata(C.getResultMetadata()),w.addResultPoints(C.getResultPoints()),b=C.getText().length}catch(S){}var E=null==n?null:n.get(rn.ALLOWED_EAN_EXTENSIONS);if(null!=E){var A=!1;for(var I in E)if(b.toString()===I){A=!0;break}if(!A)throw new gn}return y===Rn.EAN_13||Rn.UPC_A,w},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}for(r*=3,n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new on;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(_o),Oo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),To=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},No=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Oo(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var u=t.getSize(),l=r[1],f=0,d=0;d<6&&l<u;d++){var h=So.decodeDigit(t,c,l,So.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+h%10);try{for(var p=(o=void 0,To(c)),g=p.next();!g.done;g=p.next())l+=g.value}catch(y){o={error:y}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}h>=10&&(f|=1<<5-d)}for(n=e.determineFirstDigit(n,f),l=So.findGuardPattern(t,l,!0,So.MIDDLE_PATTERN,new Int32Array(So.MIDDLE_PATTERN.length).fill(0))[1],d=0;d<6&&l<u;d++){h=So.decodeDigit(t,c,l,So.L_PATTERNS),n+=String.fromCharCode("0".charCodeAt(0)+h);try{for(var m=(a=void 0,To(c)),v=m.next();!v.done;v=m.next())l+=v.value}catch(y){a={error:y}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return Rn.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return String.fromCharCode("0".charCodeAt(0)+r)+t;throw new gn},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(So),xo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ro=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Do=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return xo(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var c=t.getSize(),u=e[1],l=0;l<4&&u<c;l++){var f=So.decodeDigit(t,s,u,So.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var d=(n=void 0,Ro(s)),h=d.next();!h.done;h=d.next())u+=h.value}catch(m){n={error:m}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}for(u=So.findGuardPattern(t,u,!0,So.MIDDLE_PATTERN,new Int32Array(So.MIDDLE_PATTERN.length).fill(0))[1],l=0;l<4&&u<c;l++){f=So.decodeDigit(t,s,u,So.L_PATTERNS),r+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var p=(i=void 0,Ro(s)),g=p.next();!g.done;g=p.next())u+=g.value}catch(m){i={error:m}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:u,resultString:r}},e.prototype.getBarcodeFormat=function(){return Rn.EAN_8},e}(So),Po=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new No,e}return Po(e,t),e.prototype.getBarcodeFormat=function(){return Rn.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new Nn(e.substring(1),null,null,t.getResultPoints(),Rn.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new gn},e.prototype.reset=function(){this.ean13Reader.reset()},e}(So),ko=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bo=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return ko(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),c=r[1],u=0,l=0;l<6&&c<s;l++){var f=e.decodeDigit(t,a,c,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var d=(o=void 0,Lo(a)),h=d.next();!h.done;h=d.next())c+=h.value}catch(p){o={error:p}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}f>=10&&(u|=1<<5-l)}return e.determineNumSysAndCheckDigit(new dn(n),u),c},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return So.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw gn.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Rn.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new dn;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(So),jo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vo=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(rn.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(Rn.EAN_13)>-1?o.push(new No):n.indexOf(Rn.UPC_A)>-1&&o.push(new Mo),n.indexOf(Rn.EAN_8)>-1&&o.push(new Do),n.indexOf(Rn.UPC_E)>-1&&o.push(new Bo)),0===o.length&&(o.push(new No),o.push(new Do),o.push(new Bo)),r.readers=o,r}return jo(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Fo(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var c=s.decodeRow(t,e,r),u=c.getBarcodeFormat()===Rn.EAN_13&&"0"===c.getText().charAt(0),l=null==r?null:r.get(rn.POSSIBLE_FORMATS),f=null==l||l.includes(Rn.UPC_A);if(u&&f){var d=c.getRawBytes(),h=new Nn(c.getText().substring(1),d,d.length,c.getResultPoints(),Rn.UPC_A);return h.putAllMetadata(c.getResultMetadata()),h}return c}catch(p){}}}catch(p){n={error:p}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new gn},e.prototype.reset=function(){var t,e;try{for(var r=Fo(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(o){t={error:o}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(uo),Ho=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uo=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Ho(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(uo.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new gn},e.count=function(t){return $n.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),u=c.next();!u.done;u=c.next()){var l=u.value;l>s&&(s=l),l<a&&(a=l)}}catch(f){r={error:f}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(uo),Wo=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),zo=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new qn(r,o)),this.resultPoints.push(new qn(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),Go=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),c=s.next();!c.done;c=s.next())a+=c.value}catch(v){o={error:v}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var u=0,l=0,f=e.length,d=0;d<f-1;d++){var h=void 0;for(h=1,l|=1<<d;h<e[d];h++,l&=~(1<<d)){var p=t.combins(a-h-1,f-d-2);if(n&&0===l&&a-h-(f-d-1)>=f-d-1&&(p-=t.combins(a-h-(f-d),f-d-2)),f-d-1>1){for(var g=0,m=a-h-(f-d-2);m>r;m--)g+=t.combins(a-h-m-1,f-d-3);p-=g*(f-1-d)}else a-h>r&&p--;u+=p}a-=h}return u},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),Xo=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new tn(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)0!=(o&1<<i)&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),c=11;c>=0;--c)0!=(s&1<<c)&&r.set(n),n++;if(null!=a.getRightChar()){var u=a.getRightChar().getValue();for(c=11;c>=0;--c)0!=(u&1<<c)&&r.set(n),n++}}return r},t}(),$o=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Yo=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),qo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zo=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return qo(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Yo),Ko=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qo=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return Ko(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Yo),Jo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ti=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new on;return o.firstDigit=r,o.secondDigit=n,o}return Jo(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Yo),ei=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ri=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,c,u;if(!e)return null;if(e.length<2)throw new gn;var l=e.substring(0,2);try{for(var f=ei(t.TWO_DIGIT_DATA_LENGTH),d=f.next();!d.done;d=f.next())if((b=d.value)[0]===l)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,b[2],e):t.processFixedAI(2,b[1],e)}catch(C){r={error:C}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(e.length<3)throw new gn;var h=e.substring(0,3);try{for(var p=ei(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next())if((b=g.value)[0]===h)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,b[2],e):t.processFixedAI(3,b[1],e)}catch(C){o={error:C}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=ei(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),v=m.next();!v.done;v=m.next())if((b=v.value)[0]===h)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,b[2],e):t.processFixedAI(4,b[1],e)}catch(C){a={error:C}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new gn;var y=e.substring(0,4);try{for(var _=ei(t.FOUR_DIGIT_DATA_LENGTH),w=_.next();!w.done;w=_.next()){var b;if((b=w.value)[0]===y)return b[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,b[2],e):t.processFixedAI(4,b[1],e)}}catch(C){c={error:C}}finally{try{w&&!w.done&&(u=_.return)&&u.call(_)}finally{if(c)throw c.error}}throw new gn},t.processFixedAI=function(e,r,n){if(n.length<e)throw new gn;var o=n.substring(0,e);if(n.length<e+r)throw new gn;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,c=t.parseFieldsInGeneralPurpose(a);return null==c?s:s+c},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),c="("+i+")"+a,u=t.parseFieldsInGeneralPurpose(s);return null==u?c:c+u},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),ni=function(){function t(t){this.buffer=new dn,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=ri.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new ti(this.information.getSize(),0===e?ti.FNC1:e-1,ti.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new ti(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new Qo(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new Qo(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),r===this.current.getPosition()&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new Qo(this.current.getPosition(),this.buffer.toString()):new Qo(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new $o(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1())return e=new Qo(this.current.getPosition(),this.buffer.toString()),new $o(!0,e);this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new $o(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Qo(this.current.getPosition(),this.buffer.toString());return new $o(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new $o(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new Qo(this.current.getPosition(),this.buffer.toString());return new $o(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new $o(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Zo(t+5,Zo.FNC1);if(e>=5&&e<15)return new Zo(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Zo(t+7,""+(n+1));if(n>=90&&n<116)return new Zo(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new on}return new Zo(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Zo(t+5,Zo.FNC1);if(e>=5&&e<15)return new Zo(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Zo(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new zn("Decoding invalid alphanumeric value: "+n)}return new Zo(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),oi=function(){function t(t){this.information=t,this.generalDecoder=new ni(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),ii=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ai=function(t){function e(e){return t.call(this,e)||this}return ii(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=0==(1&n)?3*o:o}10==(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(oi),si=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ci=function(t){function e(e){return t.call(this,e)||this}return si(e,t),e.prototype.parseInformation=function(){var t=new dn;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(ai),ui=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),li=function(t){function e(e){return t.call(this,e)||this}return ui(e,t),e.prototype.parseInformation=function(){var t=new dn;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(oi),fi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),di=function(t){function e(e){return t.call(this,e)||this}return fi(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(ai),hi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pi=function(t){function e(e){return t.call(this,e)||this}return hi(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+di.GTIN_SIZE+e.WEIGHT_SIZE)throw new gn;var t=new dn;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+di.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(di),gi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mi=function(t){function e(e){return t.call(this,e)||this}return gi(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(pi),vi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yi=function(t){function e(e){return t.call(this,e)||this}return vi(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(pi),_i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wi=function(t){function e(e){return t.call(this,e)||this}return _i(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+ai.GTIN_SIZE)throw new gn;var t=new dn;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+ai.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+ai.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(ai),bi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ci=function(t){function e(e){return t.call(this,e)||this}return bi(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+ai.GTIN_SIZE)throw new gn;var t=new dn;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+ai.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+ai.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+ai.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(ai),Ei=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ai=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return Ei(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new gn;var t=new dn;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!=n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(di),Ii=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern)},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),Si=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),Oi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ti=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ni=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return Oi(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(o){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(i){if(i instanceof gn){if(!this.pairs.length)throw new gn;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new gn},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(r){console.log(r)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,Ti(t)),c=s.next();!c.done;c=s.next()){var u=c.value;this.pairs.push(u.getPairs())}}catch(f){n={error:f}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(f){console.log(f)}}}throw new gn},e.isValidSequence=function(t){var r,n;try{for(var o=Ti(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,c=0;c<t.length;c++)if(t[c].getFinderPattern().getValue()!=a[c]){s=!1;break}if(s)return!0}}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new Si(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var c=Ti(e),u=c.next();!u.done;u=c.next()){var l=u.value;if(l.getPairs().length!==t.length)try{for(var f=(o=void 0,Ti(l.getPairs())),d=f.next();!d.done;d=f.next()){var h=d.value;try{for(var p=(a=void 0,Ti(t)),g=p.next();!g.done;g=p.next()){var m=g.value;if(Ii.equals(h,m)){!0;break}}}catch(v){a={error:v}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(v){o={error:v}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var c=Ti(e),u=c.next();!u.done;u=c.next()){var l=u.value,f=!0;try{for(var d=(o=void 0,Ti(t)),h=d.next();!h.done;h=d.next()){var p=h.value,g=!1;try{for(var m=(a=void 0,Ti(l.getPairs())),v=m.next();!v.done;v=m.next()){var y=v.value;if(p.equals(y)){g=!0;break}}}catch(_){a={error:_}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){f=!1;break}}}catch(_){o={error:_}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(f)return!0}}catch(_){r={error:_}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new ci(t);if(!t.get(2))return new li(t);switch(ni.extractNumericValueFromBitArray(t,1,4)){case 4:return new mi(t);case 5:return new yi(t)}switch(ni.extractNumericValueFromBitArray(t,1,5)){case 12:return new wi(t);case 13:return new Ci(t)}switch(ni.extractNumericValueFromBitArray(t,1,7)){case 56:return new Ai(t,"310","11");case 57:return new Ai(t,"320","11");case 58:return new Ai(t,"310","13");case 59:return new Ai(t,"320","13");case 60:return new Ai(t,"310","15");case 61:return new Ai(t,"320","15");case 62:return new Ai(t,"310","17");case 63:return new Ai(t,"320","17")}}catch(e){throw console.log(e),new zn("unknown decoder: "+t)}}(Xo.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new Nn(e,null,null,o,Rn.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null==r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)==e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null==(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var c,u=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new gn;try{c=this.decodeDataCharacter(t,o,i,!1)}catch(l){c=null,console.log(l)}return new Ii(u,c,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();i=n>=0?n:this.isEmptyPair(r)?0:r[r.length-1].getFinderPattern().getStartEnd()[1];var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var c=!1;i<a&&(c=!t.get(i));)i++;for(var u=0,l=i,f=i;f<a;f++)if(t.get(f)!=c)o[u]++;else{if(3==u){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=f);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,u--}else u++;o[u]=1,c=!c}throw new gn},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var c,u=this.getDecodeFinderCounters();$r.arraycopy(u,0,u,1,u.length-1),u[0]=o;try{c=this.parseFinderValue(u,e.FINDER_PATTERNS)}catch(l){return null}return new zo(c,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,c=i.length-1;s<c;s++,c--){var u=i[s];i[s]=i[c],i[c]=u}}var l=$n.sum(new Int32Array(i))/17,f=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-f)/f>.3)throw new gn;var d=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,v=m+.5;if(v<1){if(m<.3)throw new gn;v=1}else if(v>8){if(m>8.7)throw new gn;v=8}var y=s/2;0==(1&s)?(d[y]=v,p[y]=m-v):(h[y]=v,g[y]=m-v)}this.adjustOddEvenCounts(17);var _=4*r.getValue()+(n?0:2)+(o?0:1)-1,w=0,b=0;for(s=d.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var C=e.WEIGHTS[_][2*s];b+=d[s]*C}w+=d[s]}var E=0;for(s=h.length-1;s>=0;s--)e.isNotA1left(r,n,o)&&(C=e.WEIGHTS[_][2*s+1],E+=h[s]*C);var A=b+E;if(0!=(1&w)||w>13||w<4)throw new gn;var I=(13-w)/2,S=e.SYMBOL_WIDEST[I],O=9-S,T=Go.getRSSvalue(d,S,!0),N=Go.getRSSvalue(h,O,!1),x=e.EVEN_TOTAL_SUBSET[I],R=e.GSUM[I];return new Wo(T*x+N+R,A)},e.isNotA1left=function(t,e,r){return!(0==t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=$n.sum(new Int32Array(this.getOddCounts())),n=$n.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var c=r+n-t,u=1==(1&r),l=0==(1&n);if(1==c)if(u){if(l)throw new gn;i=!0}else{if(!l)throw new gn;s=!0}else if(-1==c)if(u){if(l)throw new gn;o=!0}else{if(!l)throw new gn;a=!0}else{if(0!=c)throw new gn;if(u){if(!l)throw new gn;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new gn}if(o){if(i)throw new gn;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new gn;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Uo),xi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ri=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return xi(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Wo),Di=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return Di(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,c=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,c),r.reverse();var u=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,u),r.reverse();try{for(var l=Pi(this.possibleLeftPairs),f=l.next();!f.done;f=l.next()){var d=f.value;if(d.getCount()>1)try{for(var h=(a=void 0,Pi(this.possibleRightPairs)),p=h.next();!p.done;p=h.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(d,g))return e.constructResult(d,g)}}catch(m){a={error:m}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}}}catch(m){o={error:m}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new gn},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Pi(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new dn,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=0==(1&i)?3*s:s}10==(a=10-a%10)&&(a=0),o.append(a.toString());var c=t.getFinderPattern().getResultPoints(),u=e.getFinderPattern().getResultPoints();return new Nn(o.toString(),null,0,[c[0],c[1],u[0],u[1]],Rn.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(rn.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new qn(s,r))}var c=this.decodeDataCharacter(t,i,!0),u=this.decodeDataCharacter(t,i,!1);return new Ri(1597*c.getValue()+u.getValue(),c.getChecksumPortion()+4*u.getChecksumPortion(),i)}catch(l){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)uo.recordPatternInReverse(t,r.getStartEnd()[0],o);else{uo.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var c=o[a];o[a]=o[s],o[s]=c}}var u=n?16:15,l=$n.sum(new Int32Array(o))/u,f=this.getOddCounts(),d=this.getEvenCounts(),h=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var v=Math.floor(a/2);0==(1&a)?(f[v]=m,h[v]=g-m):(d[v]=m,p[v]=g-m)}this.adjustOddEvenCounts(n,u);var y=0,_=0;for(a=f.length-1;a>=0;a--)_*=9,_+=f[a],y+=f[a];var w=0,b=0;for(a=d.length-1;a>=0;a--)w*=9,w+=d[a],b+=d[a];var C=_+3*w;if(n){if(0!=(1&y)||y>12||y<4)throw new gn;var E=(12-y)/2,A=9-(N=e.OUTSIDE_ODD_WIDEST[E]),I=Go.getRSSvalue(f,N,!1),S=Go.getRSSvalue(d,A,!0),O=e.OUTSIDE_EVEN_TOTAL_SUBSET[E],T=e.OUTSIDE_GSUM[E];return new Wo(I*O+S+T,C)}if(0!=(1&b)||b>10||b<4)throw new gn;E=(10-b)/2,A=9-(N=e.INSIDE_ODD_WIDEST[E]),I=Go.getRSSvalue(f,N,!0),S=Go.getRSSvalue(d,A,!1);var N,x=e.INSIDE_ODD_TOTAL_SUBSET[E];return T=e.INSIDE_GSUM[E],new Wo(S*x+I+T,C)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,c=i;c<n;c++)if(t.get(c)!==o)r[a]++;else{if(3===a){if(Uo.isFinderPattern(r))return[s,c];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new gn},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,c=this.getDecodeFinderCounters(),u=new Int32Array(c.length);$r.arraycopy(c,0,u,1,c.length-1),u[0]=s;var l=this.parseFinderValue(u,e.FINDER_PATTERNS),f=a,d=o[1];return n&&(f=t.getSize()-1-f,d=t.getSize()-1-d),new zo(l,[a,o[1]],f,d,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=$n.sum(new Int32Array(this.getOddCounts())),n=$n.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var c=r+n-e,u=(1&r)==(t?1:0),l=1==(1&n);if(1===c)if(u){if(l)throw new gn;i=!0}else{if(!l)throw new gn;s=!0}else if(-1===c)if(u){if(l)throw new gn;o=!0}else{if(!l)throw new gn;a=!0}else{if(0!==c)throw new gn;if(u){if(!l)throw new gn;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new gn}if(o){if(i)throw new gn;Uo.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Uo.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new gn;Uo.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Uo.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Uo),ki=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Li=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(rn.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(rn.ASSUME_CODE_39_CHECK_DIGIT);return n&&((n.includes(Rn.EAN_13)||n.includes(Rn.UPC_A)||n.includes(Rn.EAN_8)||n.includes(Rn.UPC_E))&&r.readers.push(new Vo(e)),n.includes(Rn.CODE_39)&&r.readers.push(new go(o)),n.includes(Rn.CODE_128)&&r.readers.push(new fo),n.includes(Rn.ITF)&&r.readers.push(new vo),n.includes(Rn.RSS_14)&&r.readers.push(new Mi),n.includes(Rn.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new Ni))),0===r.readers.length&&(r.readers.push(new Vo(e)),r.readers.push(new go),r.readers.push(new Vo(e)),r.readers.push(new fo),r.readers.push(new vo),r.readers.push(new Mi)),r}return ki(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(o){}throw new gn},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(uo),Bi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Bi((function(e,r){return void 0===e&&(e=500),t.call(this,new Li(r),e,r)||this}),t)}(Tn);var ji,Fi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vi=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Hi=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Ui=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var c=0,u=i.getECCodewords(),l=i.getECBlocks();try{for(var f=Fi(l),d=f.next();!d.done;d=f.next()){var h=d.value;c+=h.getCount()*(h.getDataCodewords()+u)}}catch(p){a={error:p}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}this.totalCodewords=c}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(0!=(1&e)||0!=(1&r))throw new on;try{for(var i=Fi(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(c){n={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new on},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Vi(5,new Hi(1,3))),new t(2,12,12,10,10,new Vi(7,new Hi(1,5))),new t(3,14,14,12,12,new Vi(10,new Hi(1,8))),new t(4,16,16,14,14,new Vi(12,new Hi(1,12))),new t(5,18,18,16,16,new Vi(14,new Hi(1,18))),new t(6,20,20,18,18,new Vi(18,new Hi(1,22))),new t(7,22,22,20,20,new Vi(20,new Hi(1,30))),new t(8,24,24,22,22,new Vi(24,new Hi(1,36))),new t(9,26,26,24,24,new Vi(28,new Hi(1,44))),new t(10,32,32,14,14,new Vi(36,new Hi(1,62))),new t(11,36,36,16,16,new Vi(42,new Hi(1,86))),new t(12,40,40,18,18,new Vi(48,new Hi(1,114))),new t(13,44,44,20,20,new Vi(56,new Hi(1,144))),new t(14,48,48,22,22,new Vi(68,new Hi(1,174))),new t(15,52,52,24,24,new Vi(42,new Hi(2,102))),new t(16,64,64,14,14,new Vi(56,new Hi(2,140))),new t(17,72,72,16,16,new Vi(36,new Hi(4,92))),new t(18,80,80,18,18,new Vi(48,new Hi(4,114))),new t(19,88,88,20,20,new Vi(56,new Hi(4,144))),new t(20,96,96,22,22,new Vi(68,new Hi(4,174))),new t(21,104,104,24,24,new Vi(56,new Hi(6,136))),new t(22,120,120,18,18,new Vi(68,new Hi(6,175))),new t(23,132,132,20,20,new Vi(62,new Hi(8,163))),new t(24,144,144,22,22,new Vi(62,new Hi(8,156),new Hi(2,155))),new t(25,8,18,6,16,new Vi(7,new Hi(1,5))),new t(26,8,32,6,14,new Vi(11,new Hi(1,10))),new t(27,12,26,10,24,new Vi(14,new Hi(1,16))),new t(28,12,36,10,16,new Vi(18,new Hi(1,22))),new t(29,16,36,14,16,new Vi(24,new Hi(1,32))),new t(30,16,48,14,22,new Vi(28,new Hi(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),Wi=function(){function t(e){var r=e.getHeight();if(r<8||r>144||0!=(1&r))throw new on;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new hn(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return Ui.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,c=!1,u=!1;do{if(r!==o||0!==n||a)if(r!==o-2||0!==n||0==(3&i)||s)if(r!==o+4||2!==n||0!=(7&i)||c)if(r!==o-2||0!==n||4!=(7&i)||u){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new on;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new Ur("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new hn(a*o,i*n),c=0;c<i;++c)for(var u=c*n,l=0;l<a;++l)for(var f=l*o,d=0;d<n;++d)for(var h=c*(n+2)+1+d,p=u+d,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,h)){var v=f+g;s.set(v,p)}}return s},t}(),zi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gi=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),c=0,u=s.getECBlocks();try{for(var l=zi(u),f=l.next();!f.done;f=l.next())c+=(m=f.value).getCount()}catch(N){n={error:N}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var d=new Array(c),h=0;try{for(var p=zi(u),g=p.next();!g.done;g=p.next())for(var m=g.value,v=0;v<m.getCount();v++){var y=m.getDataCodewords(),_=s.getECCodewords()+y;d[h++]=new t(y,new Uint8Array(_))}}catch(N){i={error:N}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var w=d[0].codewords.length-s.getECCodewords(),b=w-1,C=0;for(v=0;v<b;v++)for(var E=0;E<h;E++)d[E].codewords[v]=e[C++];var A=24===r.getVersionNumber(),I=A?8:h;for(E=0;E<I;E++)d[E].codewords[w-1]=e[C++];var S=d[0].codewords.length;for(v=w;v<S;v++)for(E=0;E<h;E++){var O=A?(E+8)%h:E,T=A&&O>7?v-1:v;d[O].codewords[T]=e[C++]}if(C!==e.length)throw new Ur;return d},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Xi=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Ur(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(c=i-a);e=(o[n]&s)>>c,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;var c;if(t>0)s=255>>(c=8-t)<<c,e=e<<t|(o[n]&s)>>c,r+=t}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(ji||(ji={}));var $i,Yi=function(){function t(){}return t.decode=function(t){var e=new Xi(t),r=new dn,n=new dn,o=new Array,i=ji.ASCII_ENCODE;do{if(i===ji.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case ji.C40_ENCODE:this.decodeC40Segment(e,r);break;case ji.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case ji.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case ji.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case ji.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new on}i=ji.ASCII_ENCODE}}while(i!==ji.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new Mn(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new on;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),ji.ASCII_ENCODE;if(129===o)return ji.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return ji.C40_ENCODE;case 231:return ji.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return ji.ANSIX12_ENCODE;case 239:return ji.TEXT_ENCODE;case 240:return ji.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new on}}while(t.available()>0);return ji.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new on;var c=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length)c=this.C40_SHIFT2_SET_CHARS[s],r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c);else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new on}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new on}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new on;var c=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length)c=this.TEXT_SHIFT2_SET_CHARS[s],r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c);else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new on}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new on;c=this.TEXT_SHIFT3_SET_CHARS[s],r?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),r=!1):e.append(c),o=0;break;default:throw new on}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new on;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}0==(32&n)&&(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new on;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new on;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(ln.decode(a,fn.ISO88591))}catch(c){throw new zn("Platform does not support required encoding: "+c.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","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"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","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","{","|","}","~",String.fromCharCode(127)],t}(),qi=function(){function t(){this.rsDecoder=new Gn(Vn.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new Wi(t),o=n.getVersion(),i=n.readCodewords(),a=Gi.getDataBlocks(i,o),s=0;try{for(var c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),u=c.next();!u.done;u=c.next())s+=u.value.getNumDataCodewords()}catch(v){e={error:v}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),f=a.length,d=0;d<f;d++){var h=a[d],p=h.getCodewords(),g=h.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*f+d]=p[m]}return Yi.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(o){throw new Gr}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Zi=function(){function t(t){this.image=t,this.rectangleDetector=new Jn(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new gn;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,c=this.transitionsBetween(i,a)+1;1==(1&s)&&(s+=1),1==(1&c)&&(c+=1),4*s<7*c&&4*c<7*s&&(s=c=Math.max(s,c));var u=t.sampleGrid(this.image,n,o,i,a,s,c);return new Zn(u,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new qn(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new qn(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),c=this.transitionsBetween(o,e),u=i,l=[o,e,r,n];return u>a&&(u=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),u>s&&(u=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),u>c&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),c=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(c,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),c=t.shiftPoint(r,n,4*(s+1)),u=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(c,i),s=this.transitionsBetween(u,i);var l=new qn(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),f=new qn(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(f)?this.transitionsBetween(c,l)+this.transitionsBetween(u,l)>this.transitionsBetween(c,f)+this.transitionsBetween(u,f)?l:f:l:this.isValid(f)?f:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,c=t.shiftPoint(r,n,4*s),u=t.shiftPoint(o,n,4*a);1==(1&(a=this.transitionsBetween(c,i)+1))&&(a+=1),1==(1&(s=this.transitionsBetween(u,i)+1))&&(s+=1);var l,f,d=(r.getX()+n.getX()+o.getX()+i.getX())/4,h=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,d,h),n=t.moveAway(n,d,h),o=t.moveAway(o,d,h),i=t.moveAway(i,d,h),c=t.shiftPoint(r,n,4*s),c=t.shiftPoint(c,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),u=t.shiftPoint(o,i,4*s),u=t.shiftPoint(u,n,4*a),f=t.shiftPoint(i,o,4*s),[c,l,u,f=t.shiftPoint(f,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return oo.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var c=Math.abs(o-r),u=Math.abs(i-n),l=-c/2,f=n<i?1:-1,d=r<o?1:-1,h=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=d){var v=this.image.get(a?m:g,a?g:m);if(v!==p&&(h++,p=v),(l+=u)>0){if(m===i)break;m+=f,l-=c}}return h},t}(),Ki=function(){function t(){this.decoder=new qi}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(rn.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Zi(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),c=new Nn(n.getText(),s,8*s.length,o,Rn.DATA_MATRIX,$r.currentTimeMillis()),u=n.getByteSegments();null!=u&&c.putMetadata(Pn.BYTE_SEGMENTS,u);var l=n.getECLevel();return null!=l&&c.putMetadata(Pn.ERROR_CORRECTION_LEVEL,l),c},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new gn;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,c=(i-o+1)/n;if(s<=0||c<=0)throw new gn;var u=n/2;o+=u,a+=u;for(var l=new hn(s,c),f=0;f<c;f++)for(var d=o+f*n,h=0;h<s;h++)t.get(a+h*n,d)&&l.set(h,f);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new gn;var i=n-t[0];if(0===i)throw new gn;return i},t.NO_POINTS=[],t}(),Qi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Qi((function(e){return void 0===e&&(e=500),t.call(this,new Ki,e)||this}),t)}(Tn),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}($i||($i={}));var Ji,ta=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Vr(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Ur;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t($i.L,"L",1),t.M=new t($i.M,"M",0),t.Q=new t($i.Q,"Q",3),t.H=new t($i.H,"H",2),t}(),ea=function(){function t(t){this.errorCorrectionLevel=ta.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Jr.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t.FORMAT_INFO_DECODE_LOOKUP),c=s.next();!c.done;c=s.next()){var u=c.value,l=u[0];if(l===e||l===r)return new t(u[1]);var f=t.numBitsDiffering(e,l);f<i&&(a=u[1],i=f),e!==r&&(f=t.numBitsDiffering(r,l))<i&&(a=u[1],i=f)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),ra=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),i=o.next();!i.done;i=o.next())r+=i.value.getCount()}catch(a){t={error:a}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),na=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),oa=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),c=o[0].getECBlocks();try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),l=u.next();!l.done;l=u.next()){var f=l.value;a+=f.getCount()*(f.getDataCodewords()+s)}}catch(d){r={error:d}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new on;try{return this.getVersionForNumber((t-17)/4)}catch(e){throw new on}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Ur;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=ea.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new hn(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new ra(7,new na(1,19)),new ra(10,new na(1,16)),new ra(13,new na(1,13)),new ra(17,new na(1,9))),new t(2,Int32Array.from([6,18]),new ra(10,new na(1,34)),new ra(16,new na(1,28)),new ra(22,new na(1,22)),new ra(28,new na(1,16))),new t(3,Int32Array.from([6,22]),new ra(15,new na(1,55)),new ra(26,new na(1,44)),new ra(18,new na(2,17)),new ra(22,new na(2,13))),new t(4,Int32Array.from([6,26]),new ra(20,new na(1,80)),new ra(18,new na(2,32)),new ra(26,new na(2,24)),new ra(16,new na(4,9))),new t(5,Int32Array.from([6,30]),new ra(26,new na(1,108)),new ra(24,new na(2,43)),new ra(18,new na(2,15),new na(2,16)),new ra(22,new na(2,11),new na(2,12))),new t(6,Int32Array.from([6,34]),new ra(18,new na(2,68)),new ra(16,new na(4,27)),new ra(24,new na(4,19)),new ra(28,new na(4,15))),new t(7,Int32Array.from([6,22,38]),new ra(20,new na(2,78)),new ra(18,new na(4,31)),new ra(18,new na(2,14),new na(4,15)),new ra(26,new na(4,13),new na(1,14))),new t(8,Int32Array.from([6,24,42]),new ra(24,new na(2,97)),new ra(22,new na(2,38),new na(2,39)),new ra(22,new na(4,18),new na(2,19)),new ra(26,new na(4,14),new na(2,15))),new t(9,Int32Array.from([6,26,46]),new ra(30,new na(2,116)),new ra(22,new na(3,36),new na(2,37)),new ra(20,new na(4,16),new na(4,17)),new ra(24,new na(4,12),new na(4,13))),new t(10,Int32Array.from([6,28,50]),new ra(18,new na(2,68),new na(2,69)),new ra(26,new na(4,43),new na(1,44)),new ra(24,new na(6,19),new na(2,20)),new ra(28,new na(6,15),new na(2,16))),new t(11,Int32Array.from([6,30,54]),new ra(20,new na(4,81)),new ra(30,new na(1,50),new na(4,51)),new ra(28,new na(4,22),new na(4,23)),new ra(24,new na(3,12),new na(8,13))),new t(12,Int32Array.from([6,32,58]),new ra(24,new na(2,92),new na(2,93)),new ra(22,new na(6,36),new na(2,37)),new ra(26,new na(4,20),new na(6,21)),new ra(28,new na(7,14),new na(4,15))),new t(13,Int32Array.from([6,34,62]),new ra(26,new na(4,107)),new ra(22,new na(8,37),new na(1,38)),new ra(24,new na(8,20),new na(4,21)),new ra(22,new na(12,11),new na(4,12))),new t(14,Int32Array.from([6,26,46,66]),new ra(30,new na(3,115),new na(1,116)),new ra(24,new na(4,40),new na(5,41)),new ra(20,new na(11,16),new na(5,17)),new ra(24,new na(11,12),new na(5,13))),new t(15,Int32Array.from([6,26,48,70]),new ra(22,new na(5,87),new na(1,88)),new ra(24,new na(5,41),new na(5,42)),new ra(30,new na(5,24),new na(7,25)),new ra(24,new na(11,12),new na(7,13))),new t(16,Int32Array.from([6,26,50,74]),new ra(24,new na(5,98),new na(1,99)),new ra(28,new na(7,45),new na(3,46)),new ra(24,new na(15,19),new na(2,20)),new ra(30,new na(3,15),new na(13,16))),new t(17,Int32Array.from([6,30,54,78]),new ra(28,new na(1,107),new na(5,108)),new ra(28,new na(10,46),new na(1,47)),new ra(28,new na(1,22),new na(15,23)),new ra(28,new na(2,14),new na(17,15))),new t(18,Int32Array.from([6,30,56,82]),new ra(30,new na(5,120),new na(1,121)),new ra(26,new na(9,43),new na(4,44)),new ra(28,new na(17,22),new na(1,23)),new ra(28,new na(2,14),new na(19,15))),new t(19,Int32Array.from([6,30,58,86]),new ra(28,new na(3,113),new na(4,114)),new ra(26,new na(3,44),new na(11,45)),new ra(26,new na(17,21),new na(4,22)),new ra(26,new na(9,13),new na(16,14))),new t(20,Int32Array.from([6,34,62,90]),new ra(28,new na(3,107),new na(5,108)),new ra(26,new na(3,41),new na(13,42)),new ra(30,new na(15,24),new na(5,25)),new ra(28,new na(15,15),new na(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new ra(28,new na(4,116),new na(4,117)),new ra(26,new na(17,42)),new ra(28,new na(17,22),new na(6,23)),new ra(30,new na(19,16),new na(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new ra(28,new na(2,111),new na(7,112)),new ra(28,new na(17,46)),new ra(30,new na(7,24),new na(16,25)),new ra(24,new na(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new ra(30,new na(4,121),new na(5,122)),new ra(28,new na(4,47),new na(14,48)),new ra(30,new na(11,24),new na(14,25)),new ra(30,new na(16,15),new na(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new ra(30,new na(6,117),new na(4,118)),new ra(28,new na(6,45),new na(14,46)),new ra(30,new na(11,24),new na(16,25)),new ra(30,new na(30,16),new na(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new ra(26,new na(8,106),new na(4,107)),new ra(28,new na(8,47),new na(13,48)),new ra(30,new na(7,24),new na(22,25)),new ra(30,new na(22,15),new na(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new ra(28,new na(10,114),new na(2,115)),new ra(28,new na(19,46),new na(4,47)),new ra(28,new na(28,22),new na(6,23)),new ra(30,new na(33,16),new na(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new ra(30,new na(8,122),new na(4,123)),new ra(28,new na(22,45),new na(3,46)),new ra(30,new na(8,23),new na(26,24)),new ra(30,new na(12,15),new na(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new ra(30,new na(3,117),new na(10,118)),new ra(28,new na(3,45),new na(23,46)),new ra(30,new na(4,24),new na(31,25)),new ra(30,new na(11,15),new na(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new ra(30,new na(7,116),new na(7,117)),new ra(28,new na(21,45),new na(7,46)),new ra(30,new na(1,23),new na(37,24)),new ra(30,new na(19,15),new na(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new ra(30,new na(5,115),new na(10,116)),new ra(28,new na(19,47),new na(10,48)),new ra(30,new na(15,24),new na(25,25)),new ra(30,new na(23,15),new na(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new ra(30,new na(13,115),new na(3,116)),new ra(28,new na(2,46),new na(29,47)),new ra(30,new na(42,24),new na(1,25)),new ra(30,new na(23,15),new na(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new ra(30,new na(17,115)),new ra(28,new na(10,46),new na(23,47)),new ra(30,new na(10,24),new na(35,25)),new ra(30,new na(19,15),new na(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new ra(30,new na(17,115),new na(1,116)),new ra(28,new na(14,46),new na(21,47)),new ra(30,new na(29,24),new na(19,25)),new ra(30,new na(11,15),new na(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new ra(30,new na(13,115),new na(6,116)),new ra(28,new na(14,46),new na(23,47)),new ra(30,new na(44,24),new na(7,25)),new ra(30,new na(59,16),new na(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new ra(30,new na(12,121),new na(7,122)),new ra(28,new na(12,47),new na(26,48)),new ra(30,new na(39,24),new na(14,25)),new ra(30,new na(22,15),new na(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new ra(30,new na(6,121),new na(14,122)),new ra(28,new na(6,47),new na(34,48)),new ra(30,new na(46,24),new na(10,25)),new ra(30,new na(2,15),new na(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new ra(30,new na(17,122),new na(4,123)),new ra(28,new na(29,46),new na(14,47)),new ra(30,new na(49,24),new na(10,25)),new ra(30,new na(24,15),new na(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new ra(30,new na(4,122),new na(18,123)),new ra(28,new na(13,46),new na(32,47)),new ra(30,new na(48,24),new na(14,25)),new ra(30,new na(42,15),new na(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new ra(30,new na(20,117),new na(4,118)),new ra(28,new na(40,47),new na(7,48)),new ra(30,new na(43,24),new na(22,25)),new ra(30,new na(10,15),new na(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new ra(30,new na(19,118),new na(6,119)),new ra(28,new na(18,47),new na(31,48)),new ra(30,new na(34,24),new na(34,25)),new ra(30,new na(20,15),new na(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(Ji||(Ji={}));var ia,aa=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[Ji.DATA_MASK_000,new t(Ji.DATA_MASK_000,(function(t,e){return 0==(t+e&1)}))],[Ji.DATA_MASK_001,new t(Ji.DATA_MASK_001,(function(t,e){return 0==(1&t)}))],[Ji.DATA_MASK_010,new t(Ji.DATA_MASK_010,(function(t,e){return e%3==0}))],[Ji.DATA_MASK_011,new t(Ji.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[Ji.DATA_MASK_100,new t(Ji.DATA_MASK_100,(function(t,e){return 0==(Math.floor(t/2)+Math.floor(e/3)&1)}))],[Ji.DATA_MASK_101,new t(Ji.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[Ji.DATA_MASK_110,new t(Ji.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[Ji.DATA_MASK_111,new t(Ji.DATA_MASK_111,(function(t,e){return 0==(t+e+t*e%3&1)}))]]),t}(),sa=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new on;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=ea.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new on},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return oa.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=oa.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;for(r=0,i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=oa.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new on},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=aa.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,c=0,u=0,l=n-1;l>0;l-=2){6===l&&l--;for(var f=0;f<n;f++)for(var d=i?n-1-f:f,h=0;h<2;h++)o.get(l-h,d)||(u++,c<<=1,this.bitMatrix.get(l-h,d)&&(c|=1),8===u&&(a[s++]=c,u=0,c=0));i=!i}if(s!==e.getTotalCodewords())throw new on;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=aa.values[this.parsedFormatInfo.getDataMask()],e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),ca=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ua=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new Ur;var c=r.getECBlocksForLevel(n),u=0,l=c.getECBlocks();try{for(var f=ca(l),d=f.next();!d.done;d=f.next())u+=(v=d.value).getCount()}catch(T){o={error:T}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}var h=new Array(u),p=0;try{for(var g=ca(l),m=g.next();!m.done;m=g.next())for(var v=m.value,y=0;y<v.getCount();y++){var _=v.getDataCodewords(),w=c.getECCodewordsPerBlock()+_;h[p++]=new t(_,new Uint8Array(w))}}catch(T){a={error:T}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var b=h[0].codewords.length,C=h.length-1;C>=0&&h[C].codewords.length!==b;)C--;C++;var E=b-c.getECCodewordsPerBlock(),A=0;for(y=0;y<E;y++)for(var I=0;I<p;I++)h[I].codewords[y]=e[A++];for(I=C;I<p;I++)h[I].codewords[E]=e[A++];var S=h[0].codewords.length;for(y=E;y<S;y++)for(I=0;I<p;I++){var O=I<C?y:y+1;h[I].codewords[O]=e[A++]}return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(ia||(ia={}));var la,fa,da=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new Ur;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(ia.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(ia.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(ia.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(ia.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(ia.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(ia.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(ia.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(ia.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(ia.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(ia.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),ha=function(){function t(){}return t.decode=function(e,r,n,o){var i=new Xi(e),a=new dn,s=new Array,c=-1,u=-1;try{var l=null,f=!1,d=void 0;do{if(i.available()<4)d=da.TERMINATOR;else{var h=i.readBits(4);d=da.forBits(h)}switch(d){case da.TERMINATOR:break;case da.FNC1_FIRST_POSITION:case da.FNC1_SECOND_POSITION:f=!0;break;case da.STRUCTURED_APPEND:if(i.available()<16)throw new on;c=i.readBits(8),u=i.readBits(8);break;case da.ECI:var p=t.parseECIValue(i);if(null===(l=sn.getCharacterSetECIByValue(p)))throw new on;break;case da.HANZI:var g=i.readBits(4),m=i.readBits(d.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var v=i.readBits(d.getCharacterCountBits(r));switch(d){case da.NUMERIC:t.decodeNumericSegment(i,a,v);break;case da.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,v,f);break;case da.BYTE:t.decodeByteSegment(i,a,v,l,s,o);break;case da.KANJI:t.decodeKanjiSegment(i,a,v);break;default:throw new on}}}while(d!==da.TERMINATOR)}catch(y){throw new on}return new Mn(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),c,u)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new on;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(ln.decode(n,fn.GB2312))}catch(s){throw new on(s)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new on;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(ln.decode(n,fn.SHIFT_JIS))}catch(s){throw new on(s)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new on;for(var a,s=new Uint8Array(r),c=0;c<r;c++)s[c]=t.readBits(8);a=null===n?fn.guessEncoding(s,i):n.getName();try{e.append(ln.decode(s,a))}catch(u){throw new on(u)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new on;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new on;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new on;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new on;var o=e.readBits(10);if(o>=1e3)throw new on;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new on;var i=e.readBits(7);if(i>=100)throw new on;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new on;var a=e.readBits(4);if(a>=10)throw new on;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new on},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),pa=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),ga=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ma=function(){function t(){this.rsDecoder=new Gn(Vn.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(hn.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new sa(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(i){n=i}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new pa(!0)),o}catch(i){if(null!==n)throw n;throw i}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),c=t.readCodewords(),u=ua.getDataBlocks(c,a,s),l=0;try{for(var f=ga(u),d=f.next();!d.done;d=f.next())l+=(v=d.value).getNumDataCodewords()}catch(b){r={error:b}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}var h=new Uint8Array(l),p=0;try{for(var g=ga(u),m=g.next();!m.done;m=g.next()){var v,y=(v=m.value).getCodewords(),_=v.getNumDataCodewords();this.correctErrors(y,_);for(var w=0;w<_;w++)h[p++]=y[w]}}catch(b){o={error:b}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return ha.decode(h,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(o){throw new Gr}for(var n=0;n<e;n++)t[n]=r[n]},t}(),va=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ya=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return va(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(qn),_a=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(0==(1&a)?Math.floor((a+1)/2):-Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var c=t;c<r&&!i.get(c,s);)c++;for(var u=0;c<r;){if(i.get(c,s))if(1===u)o[1]++;else if(2===u){var l;if(this.foundPatternCross(o)&&null!==(l=this.handlePossibleCenter(o,s,c)))return l;o[0]=o[2],o[1]=1,o[2]=0,u=1}else o[++u]++;else 1===u&&u++,o[u]++;c++}if(this.foundPatternCross(o)&&null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new gn},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var c=e;c>=0&&i.get(r,c)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&!i.get(r,c)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&i.get(r,c)&&s[1]<=n;)s[1]++,c++;if(c===a||s[1]>n)return NaN;for(;c<a&&!i.get(r,c)&&s[2]<=n;)s[2]++,c++;if(s[2]>n)return NaN;var u=s[0]+s[1]+s[2];return 5*Math.abs(u-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),c=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(c)){var u=(e[0]+e[1]+e[2])/3;try{for(var l=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.possibleCenters),f=l.next();!f.done;f=l.next()){var d=f.value;if(d.aboutEquals(u,c,s))return d.combineEstimate(c,s,u)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var h=new ya(s,c,u);this.possibleCenters.push(h),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t}(),wa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ba=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return wa(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(qn),Ca=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),Ea=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Aa=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(rn.TRY_HARDER),n=null!=e&&void 0!==e.get(rn.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var c=!1,u=new Int32Array(5),l=s-1;l<i&&!c;l+=s){u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0;for(var f=0,d=0;d<a;d++)if(o.get(d,l))1==(1&f)&&f++,u[f]++;else if(0==(1&f))if(4===f)if(t.foundPatternCross(u)){if(!0!==this.handlePossibleCenter(u,l,d,n)){u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,f=3;continue}if(s=2,!0===this.hasSkipped)c=this.haveMultiplyConfirmedCenters();else{var h=this.findRowSkip();h>u[2]&&(l+=h-u[2]-s,d=a-1)}f=0,u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0}else u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,f=3;else u[++f]++;else u[f]++;t.foundPatternCross(u)&&!0===this.handlePossibleCenter(u,l,a,n)&&(s=u[0],this.hasSkipped&&(c=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return qn.orderBestPatterns(p),new Ca(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var c=s.getHeight(),u=s.getWidth();for(a=1;e+a<c&&r+a<u&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=c||r+a>=u)return!1;for(;e+a<c&&r+a<u&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=c||r+a>=u||i[3]>=n)return!1;for(;e+a<c&&r+a<u&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),c=e;c>=0&&i.get(r,c);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!i.get(r,c)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&i.get(r,c)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&i.get(r,c);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!i.get(r,c)&&s[3]<n;)s[3]++,c++;if(c===a||s[3]>=n)return NaN;for(;c<a&&i.get(r,c)&&s[4]<n;)s[4]++,c++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),c=e;c>=0&&i.get(c,r);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!i.get(c,r)&&s[1]<=n;)s[1]++,c--;if(c<0||s[1]>n)return NaN;for(;c>=0&&i.get(c,r)&&s[0]<=n;)s[0]++,c--;if(s[0]>n)return NaN;for(c=e+1;c<a&&i.get(c,r);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!i.get(c,r)&&s[3]<n;)s[3]++,c++;if(c===a||s[3]>=n)return NaN;for(;c<a&&i.get(c,r)&&s[4]<n;)s[4]++,c++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var c=i/7,u=!1,l=this.possibleCenters,f=0,d=l.length;f<d;f++){var h=l[f];if(h.aboutEquals(c,s,a)){l[f]=h.combineEstimate(s,a,c),u=!0;break}}if(!u){var p=new ba(a,s,c);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=Ea(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(s){e={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var c=Ea(this.possibleCenters),u=c.next();!u.done;u=c.next())(p=u.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}catch(g){e={error:g}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,f=0;try{for(var d=Ea(this.possibleCenters),h=d.next();!h.done;h=d.next()){var p=h.value;f+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(g){n={error:g}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}return f<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new gn;var i,a=this.possibleCenters;if(o>3){var s=0,c=0;try{for(var u=Ea(this.possibleCenters),l=u.next();!l.done;l=u.next()){var f=l.value.getEstimatedModuleSize();s+=f,c+=f*f}}catch(y){t={error:y}}finally{try{l&&!l.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}i=s/o;var d=Math.sqrt(c/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var h=Math.max(.2*i,d),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>h&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=Ea(a),v=m.next();!v.done;v=m.next())s+=v.value.getEstimatedModuleSize()}catch(_){r={error:_}}finally{try{v&&!v.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),Ia=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(rn.NEED_RESULT_POINT_CALLBACK);var e=new Aa(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new gn("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=oa.getProvisionalVersionForDimension(a),c=s.getDimensionForVersion()-7,u=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),f=n.getY()-r.getY()+o.getY(),d=1-3/c,h=Math.floor(r.getX()+d*(l-r.getX())),p=Math.floor(r.getY()+d*(f-r.getY())),g=4;g<=16;g<<=1)try{u=this.findAlignmentInRegion(i,h,p,g);break}catch(y){if(!(y instanceof gn))throw y}var m=t.createTransform(r,n,o,u,a),v=t.sampleGrid(this.image,m,a);return new Zn(v,null===u?[o,r,n]:[o,r,n,u])},t.createTransform=function(t,e,r,n,o){var i,a,s,c,u=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),c=s=u-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=u,c=u),eo.quadrilateralToQuadrilateral(3.5,3.5,u,3.5,s,c,3.5,u,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return oo.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=$n.round(qn.distance(t,e)/n),i=$n.round(qn.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new gn("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),c=-a/2,u=t<r?1:-1,l=e<n?1:-1,f=0,d=r+u,h=t,p=e;h!==d;h+=u){var g=o?p:h,m=o?h:p;if(1===f===this.image.get(g,m)){if(2===f)return $n.distance(h,p,t,e);f++}if((c+=s)>0){if(p===n)break;p+=l,c-=a}}return 2===f?$n.distance(r+u,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new gn("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),c=Math.min(this.image.getHeight()-1,r+o);if(c-s<3*t)throw new gn("Alignment bottom exceeds estimated module size.");return new _a(this.image,i,s,a-i,c-s,t,this.resultPointCallback).find()},t}(),Sa=function(){function t(){this.decoder=new ma}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(rn.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new Ia(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof pa&&n.getOther().applyMirroredCorrection(o);var s=new Nn(n.getText(),n.getRawBytes(),void 0,o,Rn.QR_CODE,void 0),c=n.getByteSegments();null!==c&&s.putMetadata(Pn.BYTE_SEGMENTS,c);var u=n.getECLevel();return null!==u&&s.putMetadata(Pn.ERROR_CORRECTION_LEVEL,u),n.hasStructuredAppend()&&(s.putMetadata(Pn.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(Pn.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new gn;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new gn;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new gn;var c=Math.round((s-a+1)/n),u=Math.round((i-o+1)/n);if(c<=0||u<=0)throw new gn;if(u!==c)throw new gn;var l=Math.floor(n/2);o+=l;var f=(a+=l)+Math.floor((c-1)*n)-s;if(f>0){if(f>l)throw new gn;a-=f}var d=o+Math.floor((u-1)*n)-i;if(d>0){if(d>l)throw new gn;o-=d}for(var h=new hn(c,u),p=0;p<u;p++)for(var g=o+Math.floor(p*n),m=0;m<c;m++)t.get(a+Math.floor(m*n),g)&&h.set(m,p);return h},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new gn;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),Oa=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return $n.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),s=a.next();!s.done;s=a.next()){var c=s.value;o[i++]=c}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=Qr.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Ta=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Na=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new Ta(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,c=!1;a<r.getHeight();){var u=t.findVertices(r,a,s);if(null!=u[0]||null!=u[3]){if(c=!0,i.push(u),!e)break;null!=u[2]?(s=Math.trunc(u[2].getX()),a=Math.trunc(u[2].getY())):(s=Math.trunc(u[4].getX()),a=Math.trunc(u[4].getY()))}else{if(!c)break;c=!1,s=0;try{for(var l=(n=void 0,Na(i)),f=l.next();!f.done;f=l.next()){var d=f.value;null!=d[1]&&(a=Math.trunc(Math.max(a,d[1].getY()))),null!=d[3]&&(a=Math.max(a,Math.trunc(d[3].getY())))}}catch(h){n={error:h}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),c=!1,u=new Int32Array(a.length);o<r;o+=t.ROW_STEP)if(null!=(h=t.findGuardPattern(e,i,o,n,!1,a,u))){for(;o>0;){if(null==(d=t.findGuardPattern(e,i,--o,n,!1,a,u))){o++;break}h=d}s[0]=new qn(h[0],o),s[1]=new qn(h[1],o),c=!0;break}var l=o+1;if(c){for(var f=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var h;if(null!=(h=t.findGuardPattern(e,d[0],l,n,!1,a,u))&&Math.abs(d[0]-h[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-h[1])<t.MAX_PATTERN_DRIFT)d=h,f=0;else{if(f>t.SKIPPED_ROW_COUNT_MAX)break;f++}}l-=f+1,s[2]=new qn(d[0],l),s[3]=new qn(d[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&Qr.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){Qr.fillWithin(s,0,s.length,0);for(var c=r,u=0;e.get(c,n)&&c>0&&u++<t.MAX_PIXEL_DRIFT;)c--;for(var l=c,f=0,d=a.length,h=i;l<o;l++)if(e.get(l,n)!==h)s[f]++;else{if(f===d-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([c,l]);c+=s[0]+s[1],$r.arraycopy(s,2,s,0,f-1),s[f-1]=0,s[f]=0,f--}else f++;s[f]=1,h=!h}return f===d-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([c,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var c=0,u=0;u<n;u++){var l=t[u],f=e[u]*s,d=l>f?l-f:f-l;if(d>r)return 1/0;c+=d}return c/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Ra=function(){function t(t,e){if(0===e.length)throw new Ur;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),$r.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(l){e={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],c=this.coefficients.length,u=1;u<c;u++)s=this.field.add(this.field.multiply(t,s),this.coefficients[u]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Ur("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;$r.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new Ur("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new Ur("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var c=r[s],u=0;u<i;u++)a[s+u]=this.field.add(a[s+u],this.field.multiply(c,o[u]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Ur;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new dn,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Da=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Ur;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new jn;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Pa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ma=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new Ra(n,new Int32Array([0])),n.one=new Ra(n,new Int32Array([1])),n}return Pa(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Ur;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Ra(this,r)},e.PDF417_GF=new e(Oa.NUMBER_OF_CODEWORDS,3),e}(Da),ka=function(){function t(){this.field=Ma.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new Ra(this.field,t),a=new Int32Array(e),s=!1,c=e;c>0;c--){var u=i.evaluateAt(this.field.exp(c));a[e-c]=u,0!==u&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var f=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),d=f.next();!d.done;d=f.next()){var h=d.value,p=this.field.exp(t.length-1-h),g=new Ra(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(E){n={error:E}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}var m=new Ra(this.field,a),v=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),y=v[0],_=v[1],w=this.findErrorLocations(y),b=this.findErrorMagnitudes(_,y,w);for(c=0;c<w.length;c++){var C=t.length-1-this.field.log(w[c]);if(C<0)throw Gr.getChecksumInstance();t[C]=this.field.subtract(t[C],b[c])}return w.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var c=o,u=a;if(a=s,(o=i).isZero())throw Gr.getChecksumInstance();i=c;for(var l=this.field.getZero(),f=o.getCoefficient(o.getDegree()),d=this.field.inverse(f);i.getDegree()>=o.getDegree()&&!i.isZero();){var h=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),d);l=l.add(this.field.buildMonomial(h,p)),i=i.subtract(o.multiplyByMonomial(h,p))}s=l.multiply(a).subtract(u).negative()}var g=s.getCoefficient(0);if(0===g)throw Gr.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Gr.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new Ra(this.field,o),s=r.length,c=new Int32Array(s);for(i=0;i<s;i++){var u=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(u)),f=this.field.inverse(a.evaluateAt(u));c[i]=this.field.multiply(l,f)}return c},t}(),La=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new gn;i?(e=new qn(0,n.getY()),r=new qn(0,o.getY())):a&&(n=new qn(t.getWidth()-1,e.getY()),o=new qn(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var c=n?this.topLeft:this.topRight,u=Math.trunc(c.getY()-e);u<0&&(u=0);var l=new qn(c.getX(),u);n?o=l:a=l}if(r>0){var f=n?this.bottomLeft:this.bottomRight,d=Math.trunc(f.getY()+r);d>=this.image.getHeight()&&(d=this.image.getHeight()-1);var h=new qn(f.getX(),d);n?i=h:s=h}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Ba=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),ja=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var c,u=a?parseInt(a.substr(1)):void 0;switch(s){case"s":c=e[r];break;case"c":c=e[r][0];break;case"f":c=parseFloat(e[r]).toFixed(t);break;case"p":c=parseFloat(e[r]).toPrecision(t);break;case"e":c=parseFloat(e[r]).toExponential(t);break;case"x":c=parseInt(e[r]).toString(u||16);break;case"d":c=parseFloat(parseInt(e[r],u||10).toPrecision(t)).toFixed(0)}c="object"==typeof c?JSON.stringify(c):(+c).toString(u);for(var l=parseInt(o),f=o&&o[0]+""=="0"?"0":" ";c.length<l;)c=void 0!==n?c+f:f+c;return c}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Fa=function(){function t(t){this.boundingBox=new La(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new ja,n=0;try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Va=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Ha=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=Va(a.value,2);o(s[0],s[1])}}catch(c){t={error:c}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Oa.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),Ua=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wa=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},za=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return Ua(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=Wa(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(i){t={error:i}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,c=1,u=0,l=i;l<a;l++)if(null!=e[l]){var f=e[l],d=f.getRowNumber()-s;if(0===d)u++;else if(1===d)c=Math.max(c,u),u=1,s=f.getRowNumber();else if(d<0||f.getRowNumber()>=t.getRowCount()||d>l)e[l]=null;else{for(var h,p=(h=c>2?(c-2)*d:d)>=l,g=1;g<=h&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=f.getRowNumber(),u=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=Wa(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(c){t={error:c}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,c=o;c<i;c++)if(null!=a[c]){var u=a[c];u.setRowNumberAsRowIndicatorColumn();var l=u.getRowNumber()-s;0===l||(1===l?s=u.getRowNumber():u.getRowNumber()>=t.getRowCount()?a[c]=null:s=u.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new Ha,o=new Ha,i=new Ha,a=new Ha;try{for(var s=Wa(r),c=s.next();!c.done;c=s.next()){var u=c.value;if(null!=u){u.setRowNumberAsRowIndicatorColumn();var l=u.getValue()%30,f=u.getRowNumber();switch(this._isLeft||(f+=2),f%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(h){t={error:h}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Oa.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Oa.MAX_ROWS_IN_BARCODE)return null;var d=new Ba(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,d),d},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Fa),Ga=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Oa.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i,a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),c=s;null!=this.detectionResultColumns[e+1]&&(c=this.detectionResultColumns[e+1].getCodewords());var u=new Array(14);u[2]=s[r],u[3]=c[r],r>0&&(u[0]=n[r-1],u[4]=s[r-1],u[5]=c[r-1]),r>1&&(u[8]=n[r-2],u[10]=s[r-2],u[11]=c[r-2]),r<n.length-1&&(u[1]=n[r+1],u[6]=s[r+1],u[7]=c[r+1]),r<n.length-2&&(u[9]=n[r+2],u[12]=s[r+2],u[13]=c[r+2]);try{for(var l=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),f=l.next();!f.done;f=l.next()){var d=f.value;if(t.adjustRowNumber(a,d))return}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}},t.adjustRowNumber=function(t,e){return!(null==e||!e.hasValidRowNumber()||e.getBucket()!==t.getBucket()||(t.setRowNumber(e.getRowNumber()),0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new ja,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),Xa=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),$a=function(){function t(){}return t.initialize=function(){for(var e=0;e<Oa.SYMBOL_TABLE.length;e++)for(var r=Oa.SYMBOL_TABLE[e],n=1&r,o=0;o<Oa.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Oa.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Oa.BARS_IN_MODULE-o-1]=Math.fround(i/Oa.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=$n.sum(t),r=new Int32Array(Oa.BARS_IN_MODULE),n=0,o=0,i=0;i<Oa.MODULES_IN_CODEWORD;i++){var a=e/(2*Oa.MODULES_IN_CODEWORD)+i*e/Oa.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Oa.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=$n.sum(e),n=new Array(Oa.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Yn.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var c=0,u=t.RATIOS_TABLE[s],l=0;l<Oa.BARS_IN_MODULE;l++){var f=Math.fround(u[l]-n[l]);if((c+=Math.fround(f*f))>=i)break}c<i&&(i=c,a=Oa.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Oa.SYMBOL_TABLE.length).map((function(t){return new Array(Oa.BARS_IN_MODULE)})),t}(),Ya=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),qa=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),Za=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Za(e,t),e.kind="NullPointerException",e}(jr),Qa=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new Ka;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new qr;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),Ja=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e}(jr),es=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rs=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new Ur("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return es(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new ts;e=Jr.MAX_VALUE}this.buf=Qr.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new qr;this.ensureCapacity(this.count+r),$r.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return Qr.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(Qa);function ns(){if("undefined"!=typeof window)return window.BigInt||null;if("undefined"!=typeof global)return global.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function os(t){if(void 0===fa&&(fa=ns()),null===fa)throw new Error("BigInt is not supported!");return fa(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(la||(la={}));var is=function(){function t(){}return t.decode=function(e,r){var n=new dn(""),o=sn.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new Ya;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:sn.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new on;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw on.getFormatInstance();a=e[i++]}if(0===n.length())throw on.getFormatInstance();var c=new Mn(null,n.toString(),null,r);return c.setOther(s),c},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw on.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Jr.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new dn;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var c=new dn;r=t.textCompaction(e,r+1,c),n.setFileName(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var u=new dn;r=t.textCompaction(e,r+1,u),n.setSender(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new dn;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var f=new dn;r=t.numericCompaction(e,r+1,f),n.setSegmentCount(Jr.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var d=new dn;r=t.numericCompaction(e,r+1,d),n.setTimestamp(qa.parseLong(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new dn;r=t.numericCompaction(e,r+1,h),n.setChecksum(Jr.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new dn;r=t.numericCompaction(e,r+1,p),n.setFileSize(qa.parseLong(p.toString()));break;default:throw on.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw on.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(Qr.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var c=e[r++];if(c<t.TEXT_COMPACTION_MODE_LATCH)o[a]=c/30,o[a+1]=c%30,a+=2;else switch(c){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,c=e[r++],i[a]=c,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=la.ALPHA,a=la.ALPHA,s=0;s<n;){var c=e[s],u="";switch(i){case la.ALPHA:if(c<26)u=String.fromCharCode(65+c);else switch(c){case 26:u=" ";break;case t.LL:i=la.LOWER;break;case t.ML:i=la.MIXED;break;case t.PS:a=i,i=la.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.LOWER:if(c<26)u=String.fromCharCode(97+c);else switch(c){case 26:u=" ";break;case t.AS:a=i,i=la.ALPHA_SHIFT;break;case t.ML:i=la.MIXED;break;case t.PS:a=i,i=la.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.MIXED:if(c<t.PL)u=t.MIXED_CHARS[c];else switch(c){case t.PL:i=la.PUNCT;break;case 26:u=" ";break;case t.LL:i=la.LOWER;break;case t.AL:i=la.ALPHA;break;case t.PS:a=i,i=la.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.PUNCT:if(c<t.PAL)u=t.PUNCT_CHARS[c];else switch(c){case t.PAL:i=la.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.ALPHA_SHIFT:if(i=a,c<26)u=String.fromCharCode(65+c);else switch(c){case 26:u=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}break;case la.PUNCT_SHIFT:if(i=a,c<t.PAL)u=t.PUNCT_CHARS[c];else switch(c){case t.PAL:i=la.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=la.ALPHA}}""!==u&&o.append(u),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new rs,s=0,c=0,u=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),f=r[o++];o<r[0]&&!u;)switch(l[s++]=f,c=900*c+f,f=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,u=!0;break;default:if(s%5==0&&s>0){for(var d=0;d<6;++d)a.write(Number(os(c)>>os(8*(5-d))));c=0,s=0}}o===r[0]&&f<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=f);for(var h=0;h<s;h++)a.write(l[h]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!u;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,c=900*c+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,u=!0}if(s%5==0&&s>0){for(d=0;d<6;++d)a.write(Number(os(c)>>os(8*(5-d))));c=0,s=0}}}return i.append(ln.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=os(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*os(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new on;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=ns()?function(){var t=[];t[0]=os(1);var e=os(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),as=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ss=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var c,u=new La(e,r,n,o,i),l=null,f=null,d=!0;;d=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,u,r,!0,a,s)),null!=o&&(f=t.getRowIndicatorColumn(e,u,o,!1,a,s)),null==(c=t.merge(l,f)))throw gn.getNotFoundInstance();var h=c.getBoundingBox();if(!d||null==h||!(h.getMinY()<u.getMinY()||h.getMaxY()>u.getMaxY()))break;u=h}c.setBoundingBox(u);var p=c.getBarcodeColumnCount()+1;c.setDetectionResultColumn(0,l),c.setDetectionResultColumn(p,f);for(var g=null!=l,m=1;m<=p;m++){var v=g?m:p-m;if(void 0===c.getDetectionResultColumn(v)){var y=void 0;y=0===v||v===p?new za(u,0===v):new Fa(u),c.setDetectionResultColumn(v,y);for(var _=-1,w=_,b=u.getMinY();b<=u.getMaxY();b++){if((_=t.getStartColumn(c,v,b,g))<0||_>u.getMaxX()){if(-1===w)continue;_=w}var C=t.detectCodeword(e,u.getMinX(),u.getMaxX(),g,_,b,a,s);null!=C&&(y.setCodeword(b,C),w=_,a=Math.min(a,C.getWidth()),s=Math.max(s,C.getWidth()))}}}return t.createDecoderResult(c)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=La.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Ga(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=as(o),c=s.next();!c.done;c=s.next()){var u=c.value;if(a+=i-u,u>0)break}}catch(h){r={error:h}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),f=0;a>0&&null==l[f];f++)a--;var d=0;for(f=o.length-1;f>=0&&(d+=i-o[f],!(o[f]>0));f--);for(f=l.length-1;d>0&&null==l[f];f--)d--;return e.getBoundingBox().addMissingRows(a,d,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=as(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new za(r,o),c=0;c<2;c++)for(var u=0===c?1:-1,l=Math.trunc(Math.trunc(n.getX())),f=Math.trunc(Math.trunc(n.getY()));f<=r.getMaxY()&&f>=r.getMinY();f+=u){var d=t.detectCodeword(e,0,e.getWidth(),o,l,f,i,a);null!=d&&(s.setCodeword(f,d),l=o?d.getStartX():d.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Oa.MAX_CODEWORDS_IN_BARCODE)throw gn.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var c=0;c<e.getBarcodeColumnCount();c++){var u=r[s][c+1].getValue(),l=s*e.getBarcodeColumnCount()+c;0===u.length?n.push(l):1===u.length?o[l]=u[0]:(a.push(l),i.push(u))}for(var f=new Array(i.length),d=0;d<f.length;d++)f[d]=i[d];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Oa.toIntArray(n),Oa.toIntArray(a),f)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var c=0;c<a.length;c++)r[o[c]]=i[c][a[c]];try{return t.decodeCodewords(r,e,n)}catch(u){if(!(u instanceof Gr))throw u}if(0===a.length)throw Gr.getChecksumInstance();for(c=0;c<a.length;c++){if(a[c]<i[c].length-1){a[c]++;break}if(a[c]=0,c===a.length-1)throw Gr.getChecksumInstance()}}throw Gr.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Ha;var c=0;try{for(var u=as(t.getDetectionResultColumns()),l=u.next();!l.done;l=u.next()){var f=l.value;if(null!=f)try{for(var d=(n=void 0,as(f.getCodewords())),h=d.next();!h.done;h=d.next()){var p=h.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][c].setValue(p.getValue())}}}}catch(m){n={error:m}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}c++}}catch(m){e={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,c=null;if(t.isValidBarcodeColumn(e,r-s)&&(c=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=c)return o?c.getEndX():c.getStartX();if(null!=(c=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?c.getStartX():c.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(c=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=c)return o?c.getEndX():c.getStartX();for(var u=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,as(e.getDetectionResultColumn(r).getCodewords())),f=l.next();!f.done;f=l.next()){var d=f.value;if(null!=d)return(o?d.getEndX():d.getStartX())+s*u*(d.getEndX()-d.getStartX())}}catch(h){i={error:h}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}u++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,c){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var u,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var f=$n.sum(l);if(o)u=i+f;else{for(var d=0;d<l.length/2;d++){var h=l[d];l[d]=l[l.length-1-d],l[l.length-1-d]=h}i=(u=i)-f}if(!t.checkCodewordSkew(f,s,c))return null;var p=$a.getDecodedValue(l),g=Oa.getCodeword(p);return-1===g?null:new Xa(i,u,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),c=0,u=n?1:-1,l=n;(n?a<r:a>=e)&&c<s.length;)t.get(a,i)===l?(s[c]++,a+=u):(c++,l=!l);return c===s.length||a===(n?r:e)&&c===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,c=o?-1:1,u=0;u<2;u++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=c}c=-c,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw on.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=is.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Gr.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw on.getFormatInstance();var r=t[0];if(r>t.length)throw on.getFormatInstance();if(0===r){if(!(e<t.length))throw on.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new ja,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new ka,t}(),cs=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw gn.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(n){if(n instanceof on||n instanceof Gr)throw gn.getNotFoundInstance();throw n}},t.decode=function(e,r,n){var o,i,a=new Array,s=xa.detectMultiple(e,r,n);try{for(var c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s.getPoints()),u=c.next();!u.done;u=c.next()){var l=u.value,f=ss.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),d=new Nn(f.getText(),f.getRawBytes(),void 0,l,Rn.PDF_417);d.putMetadata(Pn.ERROR_CORRECTION_LEVEL,f.getECLevel());var h=f.getOther();null!=h&&d.putMetadata(Pn.PDF417_EXTRA_METADATA,h),a.push(d)}}catch(p){o={error:p}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Jr.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Oa.MODULES_IN_CODEWORD/Oa.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),us=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ls=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return us(e,t),e.kind="ReaderException",e}(jr),fs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ds=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(rn.TRY_HARDER),r=null==t?null:t.get(rn.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===Rn.UPC_A||t===Rn.UPC_E||t===Rn.EAN_13||t===Rn.EAN_8||t===Rn.CODABAR||t===Rn.CODE_39||t===Rn.CODE_93||t===Rn.CODE_128||t===Rn.ITF||t===Rn.RSS_14||t===Rn.RSS_EXPANDED}));o&&!e&&n.push(new Li(t)),r.includes(Rn.QR_CODE)&&n.push(new Sa),r.includes(Rn.DATA_MATRIX)&&n.push(new Ki),r.includes(Rn.AZTEC)&&n.push(new so),r.includes(Rn.PDF_417)&&n.push(new cs),o&&e&&n.push(new Li(t))}0===n.length&&(e||n.push(new Li(t)),n.push(new Sa),n.push(new Ki),n.push(new so),n.push(new cs),e&&n.push(new Li(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=fs(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(o){t={error:o}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new ls("No readers where selected, nothing can be read.");try{for(var n=fs(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(a){if(a instanceof ls)continue}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new gn("No MultiFormat Readers were able to detect the code.")},t}(),hs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new ds;return n.setHints(e),t.call(this,n,r)||this}hs(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(Tn);var ps=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){ps((function(e){return void 0===e&&(e=500),t.call(this,new cs,e)||this}),t)}(Tn);var gs,ms=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){ms((function(e){return void 0===e&&(e=500),t.call(this,new Sa,e)||this}),t)}(Tn),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"}(gs||(gs={}));var vs=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],c=0;c<o-1;c++){var u=s[c];u===s[c+1]&&u===n[a+1][c]&&u===n[a+1][c+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var c=n[a];s+6<o&&1===c[s]&&0===c[s+1]&&1===c[s+2]&&1===c[s+3]&&1===c[s+4]&&0===c[s+5]&&1===c[s+6]&&(t.isWhiteHorizontal(c,s-4,s)||t.isWhiteHorizontal(c,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],c=0;c<o;c++)1===s[c]&&r++;var u=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-u)/u)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new Ur("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var c=0,u=-1,l=0;l<i;l++){var f=r?a[s][l]:a[l][s];f===u?c++:(c>=5&&(n+=t.N1+(c-5)),c=1,u=f)}c>=5&&(n+=t.N1+(c-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),ys=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new dn;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),_s=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ws=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _s(e,t),e.kind="WriterException",e}(jr);!function(){function t(){}t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new tn;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),c=t.TYPE_INFO_COORDINATES[i],u=c[0],l=c[1];if(n.setBoolean(u,l,s),i<8){var f=n.getWidth()-i-1,d=8;n.setBoolean(f,d,s)}else f=8,d=n.getHeight()-7+(i-8),n.setBoolean(f,d,s)}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new tn;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var c=0;c<2;++c){var u=a-c;if(t.isEmpty(n.get(u,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&vs.getDataMaskBit(r,u,s)&&(l=!l),n.setBoolean(u,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new ws("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Jr.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new Ur("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!ys.isValidMaskPattern(r))throw new ws("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new tn;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new ws("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new ws("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new ws;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new ws;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new ws;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e),t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e),t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var c=0;c!==a;c++){var u=o[c];u>=0&&t.isEmpty(r.get(u,s))&&t.embedPositionAdjustmentPattern(u-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522}(),Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),sn.UTF8.getName();var bs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,c){var u=t.call(this,a,s)||this;if(u.yuvData=e,u.dataWidth=r,u.dataHeight=n,u.left=o,u.top=i,o+a>r||i+s>n)throw new Ur("Crop rectangle does not fit within image data.");return c&&u.reverseHorizontal(a,s),u}bs(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return $r.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return $r.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;$r.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,c=0;c<t;c++){var u=255&o[i+c*e.THUMBNAIL_SCALE_FACTOR];n[s+c]=4278190080|65793*u}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var c=r[a];r[a]=r[s],r[s]=c}},e.prototype.invert=function(){return new Cn(this)},e.THUMBNAIL_SCALE_FACTOR=2}(wn);var Cs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var c=t.call(this,r,n)||this;if(c.dataWidth=o,c.dataHeight=i,c.left=a,c.top=s,4===e.BYTES_PER_ELEMENT){for(var u=r*n,l=new Uint8ClampedArray(u),f=0;f<u;f++){var d=e[f],h=d>>16&255,p=d>>7&510,g=255&d;l[f]=(h+p+g)/4&255}c.luminances=l}else c.luminances=e;if(void 0===o&&(c.dataWidth=r),void 0===i&&(c.dataHeight=n),void 0===a&&(c.left=0),void 0===s&&(c.top=0),c.left+r>c.dataWidth||c.top+n>c.dataHeight)throw new Ur("Crop rectangle does not fit within image data.");return c}Cs(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return $r.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return $r.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;$r.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new Cn(this)}}(wn);var Es=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Es(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)}}(sn);var As=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),Is=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ss=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return Is(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Jr.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(As),Os=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}Os(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(Ss),new Ss(null,0,0);!function(t){var e,r;try{for(var n=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=n.next();!o.done;o=n.next()){var i=o.value;Qr.fill(i,-1)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(Qr.createInt32Array(6,6)),function(t){var e=fn.getCharCode(" "),r=fn.getCharCode("."),n=fn.getCharCode(",");t[0][e]=1;for(var o=fn.getCharCode("Z"),i=fn.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=fn.getCharCode("z"),c=fn.getCharCode("a");for(a=c;a<=s;a++)t[1][a]=a-c+2;t[2][e]=1;var u=fn.getCharCode("9"),l=fn.getCharCode("0");for(a=l;a<=u;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var f=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],d=0;d<f.length;d++)t[3][fn.getCharCode(f[d])]=d;var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(d=0;d<h.length;d++)fn.getCharCode(h[d])>0&&(t[4][fn.getCharCode(h[d])]=d)}(Qr.createInt32Array(5,256));var Ts=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ns=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.buffer=e.makeBufferFromCanvasImageData(r),n}return Ts(e,t),e.makeBufferFromCanvasImageData=function(t){var r=t.getContext("2d");if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;s=0===t[o+3]?255:306*t[o]+601*t[o+1]+117*t[o+2]+512>>10,n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Ur("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new Cn(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var c=r.getContext("2d");if(!c)throw new Error("Could not create a Convas Context element.");return c.translate(a/2,s/2),c.rotate(n),c.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(wn);function xs(){return"undefined"!=typeof navigator}var Rs=function(){return Rs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rs.apply(this,arguments)},Ds=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(e){i(e)}}function s(t){try{c(n.throw(t))}catch(e){i(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},Ps=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(s){i=[6,s],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ms=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ks={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},Ls=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=Rs(Rs({},ks),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(rn.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.mediaStreamSetTorch=function(t,e){return Ds(this,void 0,void 0,(function(){return Ps(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=Ms(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(e){return console.error(e),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Vr("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Vr("element with id '"+t+"' must be an "+e+" element");return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new Ns(t),r=new _n(e);return new Wr(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimentions!")},t.createCaptureCanvas=function(e){if(!e)throw new Vr("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return Ds(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,c,u,l,f;return Ps(this,(function(d){switch(d.label){case 0:if(!xs())throw new Error("Can't enumerate devices, navigator is not present.");if(!(xs()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices))throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=d.sent(),e=[];try{for(r=Ms(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),c=o.groupId,u={deviceId:a,label:s,kind:i,groupId:c},e.push(u))}catch(h){l={error:h}}finally{try{n&&!n.done&&(f=r.return)&&f.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.playVideoOnLoadAsync=function(e,r){return Ds(this,void 0,void 0,(function(){return Ps(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),Ds(this,void 0,void 0,(function(){var o;return Ps(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new Vr("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:if(!e)throw new Vr("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:if(!e)throw new Vr("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return Ds(this,void 0,void 0,(function(){var o,i;return Ps(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,navigator.mediaDevices.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return Ds(this,void 0,void 0,(function(){var o,i,a,s,c,u,l,f,d,h,p=this;return Ps(this,(function(g){switch(g.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=g.sent(),a=function(){var t,r;try{for(var n=Ms(e.getVideoTracks()),o=n.next();!o.done;o=n.next())o.value.stop()}catch(i){t={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e=void 0},s=function(){a(),t.cleanVideoSource(i)},c=this.scan(i,n,s),u=e.getVideoTracks(),l=Rs(Rs({},c),{stop:function(){c.stop()},streamVideoConstraintsApply:function(t,e){return Ds(this,void 0,void 0,(function(){var r,n,o,i,a,s;return Ps(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=Ms(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(f=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return Ds(p,void 0,void 0,(function(){return Ps(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(f,e)];case 1:return r.sent(),[2]}}))}))},l.switchTorch=d,h=function(){c.stop(),d(!1)},l.stop=h),[2,l]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return Ds(this,void 0,void 0,(function(){var o;return Ps(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return Ds(this,void 0,void 0,(function(){var n,o;return Ps(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Vr("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return Ds(this,void 0,void 0,(function(){var n,o,i;return Ps(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Vr("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return Ds(this,void 0,void 0,(function(){var n,o;return Ps(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return Ds(this,void 0,void 0,(function(){var r;return Ps(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return Ds(this,void 0,void 0,(function(){var r,n;return Ps(this,(function(o){switch(o.label){case 0:if(!e)throw new Vr("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return Ds(this,void 0,void 0,(function(){var r,n;return Ps(this,(function(o){switch(o.label){case 0:if(!e)throw new Vr("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof gn&&e)return;if(o instanceof Gr&&r)return;if(o instanceof on&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i=t.createCaptureCanvas(e),a=i.getContext("2d");if(!a)throw new Error("Couldn't create canvas for visual element scan.");var s,c=function(){a=void 0,i=void 0},u=!1,l={stop:function(){u=!0,clearTimeout(s),c(),n&&n()}},f=function(){if(!u)try{t.drawImageOnCanvas(a,e);var d=o.decodeFromCanvas(i);r(d,void 0,l),s=setTimeout(f,o.options.delayBetweenScanSuccess)}catch(h){if(r(void 0,h,l),h instanceof Gr||h instanceof on||h instanceof gn)return void(s=setTimeout(f,o.options.delayBetweenScanAttempts));c(),n&&n(h)}};return f(),l},t.prototype._decodeOnLoadImage=function(e){return Ds(this,void 0,void 0,(function(){return Ps(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t}(),Bs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Bs((function(e,r){return t.call(this,new so,e,r)||this}),t)}(Ls);var js=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){js((function(e,r){return t.call(this,new Li(e),e,r)||this}),t)}(Ls);var Fs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Fs((function(e,r){return t.call(this,new Ki,e,r)||this}),t)}(Ls);var Vs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){var n=this,o=new ds;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}Vs(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(rn.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)}}(Ls);var Hs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){Hs((function(e,r){return t.call(this,new cs,e,r)||this}),t)}(Ls);var Us=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ws=function(t){function e(e,r){return t.call(this,new Sa,e,r)||this}return Us(e,t),e}(Ls),zs=function(t,e,r){var n=typeof t===r;return n||console.warn('[ReactQrReader]: Expected "'.concat(e,'" to be a of type "').concat(r,'".')),n},Gs=function(){return Gs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Gs.apply(this,arguments)},Xs={width:"100%",paddingTop:"100%",overflow:"hidden",position:"relative"},$s={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden",position:"absolute",transform:void 0},Ys=function(t){var r=t.videoContainerStyle,n=t.containerStyle,o=t.videoStyle,i=t.constraints,a=t.ViewFinder,s=t.scanDelay,c=t.className,u=t.onResult,l=t.videoId;return function(t){var r=t.scanDelay,n=t.constraints,o=t.onResult,i=t.videoId,a=e.useRef(null);e.useEffect((function(){var t,e=new Ws(null,{delayBetweenScanAttempts:r});return(t="undefined"!=typeof navigator&&!!navigator.mediaDevices)||console.warn('[ReactQrReader]: MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),!t&&zs(o,"onResult","function")&&o(null,new Error('MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),e),zs(n,"constraints","object")&&e.decodeFromConstraints({video:n},i,(function(t,r){zs(o,"onResult","function")&&o(t,r,e)})).then((function(t){return a.current=t})).catch((function(t){zs(o,"onResult","function")&&o(null,t,e)})),function(){var t;null===(t=a.current)||void 0===t||t.stop()}}),[])}({constraints:i,scanDelay:s,onResult:u,videoId:l}),d.createElement("section",{className:c,style:n},d.createElement("div",{style:Gs(Gs({},Xs),r)},!!a&&d.createElement(a,null),d.createElement("video",{muted:!0,id:l,style:Gs(Gs(Gs({},$s),o),{transform:"user"===(null==i?void 0:i.facingMode)&&"scaleX(-1)"})})))};function qs({onResult:t,setVisible:r,title:n}){const[o,i]=e.useState(""),[a,s]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(Rr,{title:n,visible:!0,setVisible:r,hideScrollBar:!1,maxWidth:500,children:Jt.jsxs("div",{className:"position-relative my-2",children:[Jt.jsx(Ys,{onResult:function(e,n){(null==n?void 0:n.message)&&(i(`Ocorreu um erro ao fazer a leitura: ${n.message}`),"Requested device not found"===n.message&&s(!0)),e&&t&&(t(e),r(!1))},constraints:{facingMode:"environment"}}),Jt.jsxs("svg",{width:"50px",viewBox:"0 0 100 100",style:{top:"0px",left:"0px",zIndex:1,boxSizing:"border-box",border:"50px solid rgba(0, 0, 0, 0.25)",borderRadius:"15px",position:"absolute",width:"100%",height:"100%"},children:[Jt.jsx("path",{fill:"none",d:"M13,0 L0,0 L0,13",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),Jt.jsx("path",{fill:"none",d:"M0,87 L0,100 L13,100",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),Jt.jsx("path",{fill:"none",d:"M87,100 L100,100 L100,87",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"}),Jt.jsx("path",{fill:"none",d:"M100,13 L100,0 87,0",stroke:"rgba(255, 0, 0, 0.5)",strokeWidth:"5"})]})]})}),o&&Jt.jsx(ae,{onConfirm:function(){i(),a&&r(!1)},children:o})]})}Ys.displayName="QrReader",Ys.defaultProps={constraints:{facingMode:"user"},videoId:"video",scanDelay:500};const Zs=o.div`
459
459
  display: flex;
460
460
  align-items: center;
461
461
 
@@ -494,7 +494,7 @@
494
494
  width: ${({position:t})=>t[1]}%;
495
495
  animation: FadeIn 0.5s both;
496
496
  }
497
- `;function Qs({visible:t}){const[r,n]=e.useState([0,0]);return t?(setTimeout((()=>{let[t,e]=r;e<100?e++:e>50&&t++,100==t&&(t=0,e=0),n([t,e])}),5),Jt.jsx(Ks,{position:r,children:Jt.jsx("div",{className:"floating-bar",children:Jt.jsx("span",{className:"d-none",children:"Carregando..."})})})):null}function Js({visible:t,message:e="Aguarde...",isbar:r=!1}){return t?r?Jt.jsx(Qs,{visible:t}):Jt.jsx("div",{className:"loading--container",children:Jt.jsxs("div",{className:"loading-body",children:[Jt.jsx("span",{className:"loading-spinner"}),Jt.jsx("span",{children:e})]})}):null}const tc=async(t,e)=>{let r={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((t=t.replace(/\D+/g,""))&&8===t.length){const n=`https://viacep.com.br/ws/${t}/json`;try{r=await(await fetch(n,{mode:"cors"})).json()}catch{r={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{e&&e(r)}}return r};function ec({dados:t,setDados:r,onSearch:n,...o}){const[i,a]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(Js,{visible:i,message:"Buscando CEP..."}),Jt.jsxs("div",{className:"input-group",children:[Jt.jsx(u,{name:o.name,mask:"99.999-999",value:o.value,onChange:o.onChange,className:"form-control",...o}),Jt.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>(async e=>{a(!0);const o=await tc(e,n);!o.erro&&t&&r&&r({...t,ende:o.logradouro,bairro:o.bairro,cida:o.localidade,uf:o.uf,cep:o.cep}),a(!1)})(o.value),children:Jt.jsx("i",{className:"fas fa-search"})})]})]})}function rc({name:t,value:e,onChange:r,...n}){return Jt.jsx(u,{placeholder:"Informe o telefone",className:"form-control",mask:"(99) 9 9999-9999",name:t,value:e,onChange:r,...n})}function nc(t,e,r){if(r){r({target:{name:e,value:(n=t.floatValue,!n||null==n||isNaN(n)?0:Number(n))}})}var n}const oc=({name:t,onChange:e,allowNegative:r=!1,...n})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,prefix:"R$ ",className:"form-control",allowNegative:r,onValueChange:r=>nc(r,t,e),...n}),ic=({name:t,onChange:e,allowNegative:r=!0,decimalScale:n=2,...o})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:n,allowNegative:r,onValueChange:r=>nc(r,t,e),...o}),ac=({name:t,onChange:e,allowNegative:r=!0,decimalScale:n=2,...o})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",suffix:"%",className:"form-control",decimalScale:n,allowNegative:r,onValueChange:r=>nc(r,t,e),...o}),sc=({name:t,onChange:e,...r})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:0,allowNegative:!1,onValueChange:r=>nc(r,t,e),...r}),cc=t=>Jt.jsx(u,{name:t.name,mask:"99:99",value:t.value,onChange:t.onChange,className:"form-control",...t}),uc=t=>Jt.jsx(u,{name:t.name,mask:"999.999.999-99",value:t.value,onChange:t.onChange,className:"form-control",...t}),lc=t=>Jt.jsx(u,{name:t.name,mask:"99.999.999/9999-99",value:t.value,onChange:t.onChange,className:"form-control",...t}),fc=t=>Jt.jsxs("select",{className:"form-select",name:t.name,value:t.value,onChange:t.onChange,...t,children:[Jt.jsx("option",{value:"",children:"- Selecione o estado -"}),Jt.jsx("option",{value:"AC",children:"Acre"}),Jt.jsx("option",{value:"AL",children:"Alagoas"}),Jt.jsx("option",{value:"AP",children:"Amapá"}),Jt.jsx("option",{value:"AM",children:"Amazonas"}),Jt.jsx("option",{value:"BA",children:"Bahia"}),Jt.jsx("option",{value:"CE",children:"Ceará"}),Jt.jsx("option",{value:"DF",children:"Distrito Federal"}),Jt.jsx("option",{value:"ES",children:"Espírito Santo"}),Jt.jsx("option",{value:"GO",children:"Goiás"}),Jt.jsx("option",{value:"MA",children:"Maranhão"}),Jt.jsx("option",{value:"MT",children:"Mato Grosso"}),Jt.jsx("option",{value:"MS",children:"Mato Grosso do Sul"}),Jt.jsx("option",{value:"MG",children:"Minas Gerais"}),Jt.jsx("option",{value:"PA",children:"Pará"}),Jt.jsx("option",{value:"PB",children:"Paraíba"}),Jt.jsx("option",{value:"PR",children:"Paraná"}),Jt.jsx("option",{value:"PE",children:"Pernambuco"}),Jt.jsx("option",{value:"PI",children:"Piauí"}),Jt.jsx("option",{value:"RJ",children:"Rio de Janeiro"}),Jt.jsx("option",{value:"RN",children:"Rio Grande do Norte"}),Jt.jsx("option",{value:"RS",children:"Rio Grande do Sul"}),Jt.jsx("option",{value:"RO",children:"Rondônia"}),Jt.jsx("option",{value:"RR",children:"Roraima"}),Jt.jsx("option",{value:"SC",children:"Santa Catarina"}),Jt.jsx("option",{value:"SP",children:"São Paulo"}),Jt.jsx("option",{value:"SE",children:"Sergipe"}),Jt.jsx("option",{value:"TO",children:"Tocantins"}),Jt.jsx("option",{value:"EX",children:"Estrangeiro"})]});function dc({isOpen:t,setOpen:n,title:o="Pesquisar",placeHolder:i="Digite o que deseja pesquisar",route:a,keyField:s,fields:c,renderLine:u,onClick:l}){var f;const[d,h]=e.useState(null),[p,g]=e.useState(""),[m,y]=e.useState(""),[v,_]=Er({url:a,params:{q:m},onTerminated:t=>{t.error?g(t.error):h(t.data)}});function w(){if(!m)return g("Informe o que deseja pesquisar!");h(null),v()}return t?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(Js,{visible:_.loading}),Jt.jsxs(Rr,{title:o,maxWidth:800,visible:!0,setVisible:n,children:[Jt.jsx("div",{className:"my-2",children:Jt.jsx(Or,{search:m,setSearch:y,fnSearch:w,placeHolder:i,onKeyDown:function(t){13===t.keyCode&&(t.preventDefault(),w())},autoFocus:r.isDesktop()})}),Jt.jsxs("div",{className:"box-search--data-container",children:[0===(null==(f=_.data)?void 0:f.length)&&Jt.jsx("div",{className:"alert alert-info text-center bold",children:"Nenhum registro encontrado!"}),d&&Jt.jsx("table",{children:Jt.jsx("tbody",{children:null==d?void 0:d.map(((t,e)=>Jt.jsx("tr",{onClick:()=>l(t[s],t),children:u?u(t):c.map(((e,r)=>{let n;return n=0==r?{width:60,textAlign:"center",fontWeight:"bold"}:{width:"auto",textAlign:"left",fontWeight:"normal"},Jt.jsx("td",{style:n,children:t[e]},r)}))},e)))})})]})]}),p&&Jt.jsx(ae,{onConfirm:()=>g(),children:p})]}):null}function hc({children:t,findTitle:r,findPlaceHolder:n,findRoute:o,findKeyField:i,findFields:a,findRenderLine:s,findOnSelect:c,...u}){const[l,f]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("div",{className:"input-group",children:[Jt.jsxs("select",{className:"form-select",...u,children:[Jt.jsxs("option",{value:0,children:["- ",r," -"]}),t]}),Jt.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:()=>f(!0),children:Jt.jsx(Ye,{})})]}),l&&Jt.jsx(dc,{title:r,placeHolder:n,fields:a,keyField:i,route:o,isOpen:!0,setOpen:f,renderLine:s,onClick:(t,e)=>{c(t,e),f(!1)}})]})}const pc=o.div`
497
+ `;function Qs({visible:t}){const[r,n]=e.useState([0,0]);return t?(setTimeout((()=>{let[t,e]=r;e<100?e++:e>50&&t++,100==t&&(t=0,e=0),n([t,e])}),5),Jt.jsx(Ks,{position:r,children:Jt.jsx("div",{className:"floating-bar",children:Jt.jsx("span",{className:"d-none",children:"Carregando..."})})})):null}function Js({visible:t,message:e="Aguarde...",isbar:r=!1}){return t?r?Jt.jsx(Qs,{visible:t}):Jt.jsx("div",{className:"loading--container",children:Jt.jsxs("div",{className:"loading-body",children:[Jt.jsx("span",{className:"loading-spinner"}),Jt.jsx("span",{children:e})]})}):null}const tc=async(t,e)=>{let r={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((t=t.replace(/\D+/g,""))&&8===t.length){const n=`https://viacep.com.br/ws/${t}/json`;try{r=await(await fetch(n,{mode:"cors"})).json()}catch{r={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{e&&e(r)}}return r};function ec({dados:t,setDados:r,onSearch:n,...o}){const[i,a]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(Js,{visible:i,message:"Buscando CEP..."}),Jt.jsxs("div",{className:"input-group",children:[Jt.jsx(u,{name:o.name,mask:"99.999-999",value:o.value,onChange:o.onChange,className:"form-control",...o}),Jt.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>(async e=>{a(!0);const o=await tc(e,n);!o.erro&&t&&r&&r({...t,ende:o.logradouro,bairro:o.bairro,cida:o.localidade,uf:o.uf,cep:o.cep}),a(!1)})(o.value),children:Jt.jsx("i",{className:"fas fa-search"})})]})]})}function rc({name:t,value:e,onChange:r,...n}){return Jt.jsx(u,{placeholder:"Informe o telefone",className:"form-control",mask:"(99) 9 9999-9999",name:t,value:e,onChange:r,...n})}function nc(t,e,r){if(r){r({target:{name:e,value:(n=t.floatValue,!n||null==n||isNaN(n)?0:Number(n))}})}var n}const oc=({name:t,onChange:e,allowNegative:r=!1,...n})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,prefix:"R$ ",className:"form-control",allowNegative:r,onValueChange:r=>nc(r,t,e),...n}),ic=({name:t,onChange:e,allowNegative:r=!0,decimalScale:n=2,...o})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:n,allowNegative:r,onValueChange:r=>nc(r,t,e),...o}),ac=({name:t,onChange:e,allowNegative:r=!0,decimalScale:n=2,...o})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",suffix:"%",className:"form-control",decimalScale:n,allowNegative:r,onValueChange:r=>nc(r,t,e),...o}),sc=({name:t,onChange:e,...r})=>Jt.jsx(l,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:0,allowNegative:!1,onValueChange:r=>nc(r,t,e),...r}),cc=t=>Jt.jsx(u,{name:t.name,mask:"99:99",value:t.value,onChange:t.onChange,className:"form-control",...t}),uc=t=>Jt.jsx(u,{name:t.name,mask:"999.999.999-99",value:t.value,onChange:t.onChange,className:"form-control",...t}),lc=t=>Jt.jsx(u,{name:t.name,mask:"99.999.999/9999-99",value:t.value,onChange:t.onChange,className:"form-control",...t}),fc=t=>Jt.jsxs("select",{className:"form-select",name:t.name,value:t.value,onChange:t.onChange,...t,children:[Jt.jsx("option",{value:"",children:"- Selecione o estado -"}),Jt.jsx("option",{value:"AC",children:"Acre"}),Jt.jsx("option",{value:"AL",children:"Alagoas"}),Jt.jsx("option",{value:"AP",children:"Amapá"}),Jt.jsx("option",{value:"AM",children:"Amazonas"}),Jt.jsx("option",{value:"BA",children:"Bahia"}),Jt.jsx("option",{value:"CE",children:"Ceará"}),Jt.jsx("option",{value:"DF",children:"Distrito Federal"}),Jt.jsx("option",{value:"ES",children:"Espírito Santo"}),Jt.jsx("option",{value:"GO",children:"Goiás"}),Jt.jsx("option",{value:"MA",children:"Maranhão"}),Jt.jsx("option",{value:"MT",children:"Mato Grosso"}),Jt.jsx("option",{value:"MS",children:"Mato Grosso do Sul"}),Jt.jsx("option",{value:"MG",children:"Minas Gerais"}),Jt.jsx("option",{value:"PA",children:"Pará"}),Jt.jsx("option",{value:"PB",children:"Paraíba"}),Jt.jsx("option",{value:"PR",children:"Paraná"}),Jt.jsx("option",{value:"PE",children:"Pernambuco"}),Jt.jsx("option",{value:"PI",children:"Piauí"}),Jt.jsx("option",{value:"RJ",children:"Rio de Janeiro"}),Jt.jsx("option",{value:"RN",children:"Rio Grande do Norte"}),Jt.jsx("option",{value:"RS",children:"Rio Grande do Sul"}),Jt.jsx("option",{value:"RO",children:"Rondônia"}),Jt.jsx("option",{value:"RR",children:"Roraima"}),Jt.jsx("option",{value:"SC",children:"Santa Catarina"}),Jt.jsx("option",{value:"SP",children:"São Paulo"}),Jt.jsx("option",{value:"SE",children:"Sergipe"}),Jt.jsx("option",{value:"TO",children:"Tocantins"}),Jt.jsx("option",{value:"EX",children:"Estrangeiro"})]});function dc({isOpen:t,setOpen:n,title:o="Pesquisar",placeHolder:i="Digite o que deseja pesquisar",route:a,keyField:s,fields:c,renderLine:u,onClick:l}){var f;const[d,h]=e.useState(null),[p,g]=e.useState(""),[m,v]=e.useState(""),[y,_]=Er({url:a,params:{q:m},onTerminated:t=>{t.error?g(t.error):h(t.data)}});function w(){if(!m)return g("Informe o que deseja pesquisar!");h(null),y()}return t?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(Js,{visible:_.loading}),Jt.jsxs(Rr,{title:o,maxWidth:800,visible:!0,setVisible:n,children:[Jt.jsx("div",{className:"my-2",children:Jt.jsx(Or,{search:m,setSearch:v,fnSearch:w,placeHolder:i,onKeyDown:function(t){13===t.keyCode&&(t.preventDefault(),w())},autoFocus:r.isDesktop()})}),Jt.jsxs("div",{className:"box-search--data-container",children:[0===(null==(f=_.data)?void 0:f.length)&&Jt.jsx("div",{className:"alert alert-info text-center bold",children:"Nenhum registro encontrado!"}),d&&Jt.jsx("table",{children:Jt.jsx("tbody",{children:null==d?void 0:d.map(((t,e)=>Jt.jsx("tr",{onClick:()=>l(t[s],t),children:u?u(t):c.map(((e,r)=>{let n;return n=0==r?{width:60,textAlign:"center",fontWeight:"bold"}:{width:"auto",textAlign:"left",fontWeight:"normal"},Jt.jsx("td",{style:n,children:t[e]},r)}))},e)))})})]})]}),p&&Jt.jsx(ae,{onConfirm:()=>g(),children:p})]}):null}function hc({children:t,findTitle:r,findPlaceHolder:n,findRoute:o,findKeyField:i,findFields:a,findRenderLine:s,findOnSelect:c,...u}){const[l,f]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("div",{className:"input-group",children:[Jt.jsxs("select",{className:"form-select",...u,children:[Jt.jsxs("option",{value:0,children:["- ",r," -"]}),t]}),Jt.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:()=>f(!0),children:Jt.jsx(Ye,{})})]}),l&&Jt.jsx(dc,{title:r,placeHolder:n,fields:a,keyField:i,route:o,isOpen:!0,setOpen:f,renderLine:s,onClick:(t,e)=>{c(t,e),f(!1)}})]})}const pc=o.div`
498
498
  display: inline-block;
499
499
  `,gc=o.span`
500
500
  color: ${t=>t.disabled?"silver":"#333"};
@@ -531,7 +531,7 @@
531
531
  color: ${({disabled:t})=>t?"currentColor":"var(--bs-primary)"};
532
532
  }
533
533
  }
534
- `;const yc=o(n.motion.div)`
534
+ `;const vc=o(n.motion.div)`
535
535
  position: fixed;
536
536
  inset: 0 0 0;
537
537
  background-color: var(--jc-overlay-bg);
@@ -563,7 +563,7 @@
563
563
  padding: 10px 15px;
564
564
  }
565
565
  }
566
- `,vc="modal-drag-hide-sb";const _c=o.div`
566
+ `,yc="modal-drag-hide-sb";const _c=o.div`
567
567
  color: var(--bs-body-color);
568
568
  background-color: ${({backColor:t})=>t||"var(--bs-body-bg)"};
569
569
  border: 2px solid ${({color:t})=>t||"var(--bs-border-color)"};
@@ -836,5 +836,5 @@
836
836
  }
837
837
  `,Sc=o.hr`
838
838
  margin: 4px 12px;
839
- `;function Oc({opc:t,closeMenu:e,clickGroup:r,clickFavorite:n,isFavorite:o,enabledFavorite:i}){var a;const{versionApp:s}=re();if((null==(a=t.menus)?void 0:a.length)>0)return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(Ac,{onClick:()=>r(t),isOpen:t.open,children:[Jt.jsx("span",{className:"opc",style:{color:t.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:t.caption}),Jt.jsx("span",{className:"icon",children:Jt.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),Jt.jsx("div",{className:"opt-group "+(t.open?"opt--open":"opt--close"),children:t.menus.map(((t,a)=>Jt.jsx(Oc,{opc:t,closeMenu:e,clickGroup:r,clickFavorite:n,isFavorite:o,enabledFavorite:i},a)))})]});if(t.route){let r=o(t.route),a=null==t?void 0:t.version;return a&&(a=Boolean(s.substring(0,a.length)===a)),Jt.jsxs(Ic,{to:t.route,onClick:e,children:[Jt.jsx("span",{className:"menu-icon",children:t.icon}),Jt.jsx("span",{className:"menu-caption",children:t.caption}),Jt.jsxs("span",{className:"menu-fav-new",children:[a&&Jt.jsx("span",{className:"menu-new",children:"novo"}),i&&Jt.jsx("span",{className:"menu-fav",onClick:e=>n(e,t),children:Jt.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(r?"solid":"regular")+" fa-heart",style:{color:r?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==t?void 0:t.isLine)?Jt.jsx(Sc,{}):null}const Tc="sys/nav/closed";const Nc=({routes:t,closeMenu:e,brand:r})=>Jt.jsx("div",{className:"navbar-mu--brand",children:Jt.jsx(a.Link,{to:t.home,onClick:e,className:"brand",title:"Voltar para tela inicial",children:r})});function xc({isOpen:t,setIsOpen:e,menuClose:r}){return Jt.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>e(!t),children:r?Jt.jsx("i",{className:"fa-solid fa-xmark icon-close"}):Jt.jsxs("div",{className:"icon-desk",children:[Jt.jsx("span",{}),Jt.jsx("span",{}),Jt.jsx("span",{})]})})}const Rc="sys/nav/closed";t.Alerta=ae,t.Aviso=function({onConfirm:t,text:e="",children:r}){return Jt.jsx(ie,{type:ne.Aviso,title:"Aviso!",text:e,onConfirm:t,children:r})},t.BotaoClonar=function(){return Jt.jsx(i.Button,{size:"sm",color:"warning",title:"Clonar o registro",children:Jt.jsx(qe,{})})},t.BotaoEditar=function(){return Jt.jsx(i.Button,{size:"sm",color:"primary",title:"Alterar o registro",children:Jt.jsx(Je,{})})},t.BotaoExcluir=function(){return Jt.jsx(i.Button,{size:"sm",color:"danger",title:"Excluir o registro",children:Jt.jsx(tr,{})})},t.BotaoIncluir=function({caption:t="Incluir",onClick:e,...r}){return Jt.jsxs(i.Button,{color:"success",title:"Incluir um novo registro",onClick:e,...r,children:[Jt.jsx(Qe,{})," ",t]})},t.BotaoSalvar=function({loading:t,saveInfo:e,link:r,fixed:n,onCancel:o,onConfirm:s}){const c=a.useHistory();return Jt.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(n),children:[Jt.jsxs(i.Button,{type:s?"button":"submit",color:"primary",onClick:s,children:[Jt.jsx("i",{className:"fas fa-cloud-upload-alt"}),t||(null==e?void 0:e.loading)?"Salvando...":"Salvar"]}),Jt.jsxs(i.Button,{type:"button",color:"outline-danger",onClick:()=>{o?o():r?c.push(r):c.goBack()},children:[Jt.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},t.BoxColor=function({corFonte:t,setCorFonte:e,corFundo:r,setCorFundo:n}){return Jt.jsxs("div",{className:"box-color--container",children:[Jt.jsx(ir,{label:"Cor da fonte",value:t,onChange:t=>e(t.target.value)}),Jt.jsx(ir,{label:"Cor de fundo",value:r,onChange:t=>n(t.target.value)}),Jt.jsx("div",{className:"box-color-texto",style:{color:t,backgroundColor:r},children:"Texto de exemplo"})]})},t.BoxInfo=function({id:t,title:r,isOpen:n=!1,isVisible:o=!0,onChange:i,noMargin:a,children:s,...c}){const[u,l]=e.useState(n);return e.useEffect((()=>{t&&i&&i(t,u)}),[u]),o?Jt.jsxs(ar,{open:u,noMargin:a,...c,children:[Jt.jsx("div",{className:"bi-btn-area",children:Jt.jsxs("button",{type:"button",onClick:()=>l(!u),children:[r," ",Jt.jsx("i",{className:"fas fa-chevron-down"})]})}),Jt.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},t.BoxSearch=dc,t.ButtonBack=ur,t.ButtonClose=cr,t.ButtonOptions=function({value:t,setValue:e,options:r=[],...n}){return Jt.jsx("div",{className:"btn-opts--container btn-group",...n,children:r.map(((r,n)=>Jt.jsx(i.Button,{active:n===t,color:"outline-info",onClick:()=>e(n),children:r},n)))})},t.ButtonTop=fr,t.CheckBox=function({enabled:t=!0,onChange:e,children:r,...n}){const o=n.disabled||!t;return Jt.jsx(Zs,{disabled:o,children:Jt.jsxs("label",{children:[Jt.jsx(i.Input,{type:"checkbox",disabled:o,onChange:t=>{if(e){let r={...t,target:{...t.target,name:t.target.name,value:t.target.checked}};e(r)}},checked:"boolean"==typeof n.value?n.value:n.checked,...n}),r]})})},t.CheckUpdates=function(){const t=e.useRef();function r(e){var r,n;(null==t?void 0:t.current)?e?null==(r=t.current)||r.classList.add("update-show"):null==(n=t.current)||n.classList.remove("update-show"):console.info("Não encontrou box update!")}return e.useLayoutEffect((()=>{console.info("App:",window.location.origin),"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&(console.log("Procurando atualizações..."),navigator.serviceWorker.getRegistration().then((t=>{t?(console.info("=> Service Worker encontrado:",t),t.addEventListener("updatefound",(()=>{r(!0);const e=t.installing;e.addEventListener("statechange",(()=>{"installed"===e.state&&navigator.serviceWorker.controller&&setTimeout((()=>window.location.reload(!0)),1e3),"activated"===e.state&&r(!1)}))}))):console.info("Sem Service Worker!")})).catch((t=>{console.error("=> Service Worker não encontrado:",t)})))}),[]),Jt.jsx(bc,{onClick:function(){console.info("Atualizando em segundo plano!"),r(!1)},children:Jt.jsxs("div",{ref:t,className:"update-box",children:[Jt.jsx("div",{className:"update-line"}),Jt.jsx("i",{className:"fas fa-info-circle"}),"Nova versão disponível, atualizando..."]})})},t.ClipboardArea=function({title:t,url:r,timerInMilliSeconds:n=5e3}){const[o,i]=e.useState(!1);return e.useEffect((()=>()=>{dr&&clearTimeout(dr)}),[]),Jt.jsxs("div",{className:`clipboard-area--container ${o&&" clip-active"}`,children:[Jt.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:t||r}),Jt.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(r),i(!0),dr=setTimeout((()=>i(!1)),n)},children:o?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},t.Confirma=function({onConfirm:t,onCancel:e,text:r="",children:n,defaultBtn:o}){return Jt.jsx(ie,{type:ne.Confirmacao,title:"Confirmação!",text:r,onConfirm:t,onCancel:e,defaultBtn:o,children:n})},t.DataItem=function({caption:t,colored:e,children:r,className:n,...o}){return Jt.jsxs("div",{className:"di-box "+n,...o,children:[t&&Jt.jsx("label",{children:t}),Jt.jsx("div",{style:{color:e?"var(--data-item-destaque)":"var(--body-color)"},children:r})]})},t.DropDownButton=Fe,t.DynamicCounter=Sr,t.FormEdit=function({title:t,count:r,maxWidth:n=1200,goBack:o,goHome:i,onClose:a,children:s}){return e.useEffect((()=>{var t;null==(t=document.querySelector("main"))||t.scrollTo(0,0)}),[]),Jt.jsx("div",{className:"mx-auto",style:{maxWidth:n},children:Jt.jsx(mr,{title:t,count:r,goBack:o,goHome:i,onClose:a,children:s})})},t.FormEnter=function({children:t}){const r=e.useRef(),n=(t,e)=>{let r=t[e];for(;e<t.length-1&&(r=t[++e],r.disabled););return r};return Jt.jsx("form",{onSubmit:function(t){t.preventDefault()},ref:r,onKeyDown:function(t){var e,o;if("Enter"===t.key){const i=null==(e=null==r?void 0:r.current)?void 0:e.querySelector(".form-item:focus,.btn-primary"),a=null==(o=null==r?void 0:r.current)?void 0:o.querySelectorAll(".form-item,.btn-primary");for(let e=0;e<a.length;e++)if(a[e]===i&&e<a.length-1){t.preventDefault();const r=n(a,e);(null==r?void 0:r.select)&&r.select(),r.focus()}}},children:t})},t.FormatData=({value:t,incHour:e=!0})=>{let r="";if(t){let n,o;-1!==t.indexOf("T")?(n=t.split("T"),o=n[1],n=n[0]):(n=t.split(" "),n.length>1&&(o=n[1]),n=n[0]),-1!==n.indexOf("-")&&(n=n.split("-").reverse().join("/")),o&&e&&(n=n+" "+o),r=n}return r},t.FormatPercent=he,t.FormatQuant=de,t.FormatValor=fe,t.GroupBox=function({label:t,className:e="",children:r}){return Jt.jsxs("div",{className:`group-box--container ${e}`,children:[Jt.jsx("div",{className:"group-box--label",children:t}),Jt.jsx("div",{className:"group-box--body",children:r})]})},t.Hint=function({title:t="Ajuda",children:e}){return Jt.jsxs("div",{className:"hint--container",children:[Jt.jsx("i",{className:"fas fa-question"}),Jt.jsxs("div",{className:"hint-content",children:[Jt.jsx("div",{className:"title",children:t}),e]})]})},t.IconClose=hr,t.IconExitOutline=function(t){return Jt.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...t,children:Jt.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},t.IconMenu=pr,t.IconUserGear=function(t){return Jt.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...t,children:Jt.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},t.IconeChevron=()=>Jt.jsx("i",{className:"fas fa-chevron-down"}),t.IconeClonar=()=>Jt.jsx("i",{className:"fa-solid fa-copy"}),t.IconeConfig=()=>Jt.jsx("i",{className:"fas fa-cogs"}),t.IconeEditar=Je,t.IconeEmail=()=>Jt.jsx("i",{className:"fas fa-envelope"}),t.IconeEncerrarAno=()=>Jt.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Jt.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),t.IconeExcluir=tr,t.IconeFechar=rr,t.IconeFecharCircle=()=>Jt.jsx("i",{className:"fas fa-times-circle"}),t.IconeIncluir=Qe,t.IconeLogin=()=>Jt.jsx("i",{className:"fas fa-sign-in-alt"}),t.IconeLogout=Ke,t.IconeMostrarSenha=({display:t})=>Jt.jsx("i",{className:"fas fa-eye"+(t?"-slash":"")}),t.IconeOpenLink=nr,t.IconePassword=()=>Jt.jsx("i",{className:"fas fa-key"}),t.IconePin=()=>Jt.jsx("i",{className:"fas fa-map-marker-alt"}),t.IconePrint=()=>Jt.jsx("i",{className:"fas fa-print"}),t.IconeQRCode=or,t.IconeSalvar=()=>Jt.jsx("i",{className:"fas fa-cloud-upload-alt"}),t.IconeSearchPlus=()=>Jt.jsx("i",{className:"fas fa-search-plus"}),t.IconeSoma=()=>Jt.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Jt.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),t.IconeUsers=()=>Jt.jsx("i",{className:"fas fa-user-cog"}),t.IconeVisualizar=er,t.Input=function(t){switch(t.type){case"cep":return Jt.jsx(ec,{...t});case"cpf":return Jt.jsx(uc,{...t});case"cnpj":return Jt.jsx(lc,{...t});case"codigo":return Jt.jsx(sc,{name:t.name,onChange:t.onChange,...t});case"fone":return Jt.jsx(rc,{name:t.name,onChange:t.onChange,value:t.value,...t});case"uf":return Jt.jsx(fc,{...t});case"hora":return Jt.jsx(cc,{...t});case"percent":return Jt.jsx(ac,{name:t.name,onChange:t.onChange,...t});case"quant":return Jt.jsx(ic,{name:t.name,onChange:t.onChange,...t});case"real":return Jt.jsx(oc,{name:t.name,onChange:t.onChange,...t});case"finder":return Jt.jsx(hc,{...t});default:return Jt.jsx("input",{className:"form-control",...t})}},t.InputCep=ec,t.InputCheckBox=({disabled:t,children:e,name:r,checked:n,onChange:o})=>Jt.jsx(pc,{children:Jt.jsxs(gc,{disabled:t,onClick:function(){if(!t&&o){o({target:{name:r,checked:!n}})}},children:[Jt.jsxs("span",{children:[n&&Jt.jsx(Ge,{color:t&&"silver"}),!n&&Jt.jsx(Xe,{color:t&&"silver"})]})," ",e]})}),t.InputCnpj=lc,t.InputCodigo=sc,t.InputColor=ir,t.InputCpf=uc,t.InputEstado=fc,t.InputFinder=({title:t,onFind:e,children:r,...n})=>Jt.jsxs("div",{className:"input-group",children:[Jt.jsxs("select",{className:"form-select",...n,children:[Jt.jsxs("option",{value:0,children:["- ",t," -"]}),r]}),Jt.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:e,children:Jt.jsx(Ye,{})})]}),t.InputFone=rc,t.InputHora=cc,t.InputPassword=function({disabled:t,...r}){const[n,o]=e.useState(!1);return Jt.jsxs(mc,{disabled:t,children:[Jt.jsx("input",{type:n?"text":"password",disabled:t,...r}),Jt.jsx("i",{className:n?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{t||o(!n)},title:t?"":(n?"Ocultar":"Exibir")+" a senha"})]})},t.InputPercent=ac,t.InputPesquisa=Or,t.InputQRCode=function({value:t,setValue:r}){const[n,o]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("div",{className:"input-group",children:[Jt.jsx(i.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:t}),Jt.jsx(i.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>r(""),children:Jt.jsx(Ze,{})}),Jt.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>o(!0),children:Jt.jsx(or,{})}),t?Jt.jsx(Tr,{className:"btn btn-info",title:"Abrir o link do documento",to:t,children:Jt.jsx(nr,{})}):Jt.jsx(i.Button,{color:"info",disabled:!0,children:Jt.jsx(nr,{})})]}),n&&Jt.jsx(qs,{setVisible:o,title:"Ler QRCode do documento",onResult:t=>r(null==t?void 0:t.text)})]})},t.InputQuant=ic,t.InputSearch=({title:t="Selecione",options:e=[],fields:r=[],btnClick:n=null,...o})=>Jt.jsxs("div",{className:"input-group",children:[Jt.jsxs("select",{className:"form-select",...o,children:[Jt.jsxs("option",{value:0,children:["- ",t," -"]}),null==e?void 0:e.map(((t,e)=>Jt.jsx("option",{value:t[r[0]],children:t[r[1]]},e)))]}),Jt.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:n,children:Jt.jsx(Ye,{})})]}),t.InputValor=oc,t.LabelHint=function({label:t,hint:e}){return Jt.jsxs("div",{className:"label-hint--container",children:[Jt.jsx("label",{children:t}),Jt.jsx("div",{className:"label-hint--icon",children:Jt.jsx("i",{className:"fas fa-question"})}),Jt.jsxs("div",{className:"label-hint--box",children:[Jt.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),e]})]})},t.LibProvider=({apiConfig:t,children:n,versionApp:o,useTheme:i})=>{const a=!(!i||"boolean"!=typeof i)&&i,[s,c]=e.useState((()=>{let t="light";if(a){let e=localStorage.getItem(ee);t=e||(r.isDarkMode()?"dark":"light")}return t})),[u,l]=e.useState([]),[f,d]=e.useState(!1),h=t=>{let e=u.find((e=>e.modalId===t));e&&e.setVisible(!1),l((e=>e.filter((e=>e.modalId!==t))))},p=e.useCallback((t=>{if("Escape"===t.key){if(0===u.length)return;h(u[u.length-1].modalId)}}),[u]);return e.useEffect((()=>{a&&(localStorage.setItem(ee,s),document.body.dataset.bsTheme=s)}),[s,a]),e.useEffect((()=>(window.addEventListener("keydown",p,!1),()=>window.removeEventListener("keydown",p,!1))),[u]),Jt.jsx(te.Provider,{value:{versionApp:o,addModal:(t,e)=>{let r=[...u],n=r.findIndex((e=>e.modalId===t));n>=0?r[n]={modalId:t,setVisible:e}:r.push({modalId:t,setVisible:e}),l(r)},removeModal:h,clearModals:()=>{u.forEach((t=>{h(t.modalId)}))},showBtnTop:f,setShowBtnTop:d,globalApiConfig:t,theme:s,setTheme:c,canChangeTheme:a},children:n})},t.LinkToEmail=function({href:t,title:e,children:r,...n}){return Jt.jsx("a",{href:`mailto:${t||r}`,title:e||"Enviar um e-mail para este endereço",...n,children:r||t})},t.LinkToFone=function({href:t,children:e,...r}){return Jt.jsx("a",{href:`tel:+55${t||e}`,title:"Ligar para este número",...r,children:e||t})},t.LinkToMaps=function({href:t,children:e,...r}){let n=`https://google.com/maps/place/${null==t?void 0:t.replace(" ","+")}`;return(null==t?void 0:t.includes("/maps/place/"))&&(null==t?void 0:t.startsWith("https"))&&(n=t),Jt.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...r,children:e})},t.LinkToNewPage=Tr,t.LinkToWhatsApp=function({href:t,children:e,text:r="",title:n,...o}){let i;return i=t?t.replace(/\D/g,""):null==e?void 0:e.replace(/\D/g,""),Jt.jsx("a",{href:`https://wa.me/${i}?text=${encodeURI(r)}`,target:"_blank",rel:"noreferrer",title:n||"Enviar mensagem para este número usando o WhatsApp",...o,children:e||t})},t.Loading=Js,t.LoadingReport=function({url:t,file:e,fileTo:r,loading:n=!0,setLoading:o}){return n?Jt.jsx(Ir,{url:t,file:e,fileTo:r,setLoading:o}):null},t.ModalBox=Rr,t.ModalBoxDrag=function({maxWidth:t,visible:o,setVisible:i,title:a,children:s,hideScrollBar:c=!0,id:u}){const{addModal:l,removeModal:f}=re(),[d]=e.useState(u||"modal-"+r.random()),h=e.useRef(null),p=n.useDragControls();return e.useEffect((()=>(o?c&&document.body.classList.add(vc):(f(d),c&&document.body.classList.remove(vc)),()=>{f(d),c&&document.body.classList.remove(vc)})),[o,c]),e.useEffect((()=>{l(d,i)}),[d]),o?Jt.jsx(yc,{maxWidth:t,ref:h,children:Jt.jsxs(n.motion.div,{className:"mod-panel",drag:!0,dragListener:!1,dragControls:p,dragConstraints:h,dragMomentum:!1,dragElastic:.1,initial:{scale:0},animate:{scale:1},transition:{duration:.2},children:[Jt.jsxs(gr,{className:"mod-header",onPointerDown:function(t){p.start(t)},children:[Jt.jsx("div",{children:a}),Jt.jsx(cr,{type:"button",onClick:()=>i(!1)})]}),Jt.jsx("div",{className:"mod-body",children:s})]})}):null},t.ModalFilter=function({setVisible:t,maxWidth:e,fnApplyFilter:r,children:n}){return Jt.jsxs(Rr,{title:"Filtros",maxWidth:e,setVisible:t,visible:!0,children:[n,Jt.jsx("hr",{}),Jt.jsxs("div",{className:"mod-filter--btn-area",children:[Jt.jsxs(i.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[Jt.jsx($e,{})," Aplicar filtros"]}),Jt.jsxs(i.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[Jt.jsx(rr,{})," Cancelar filtros"]})]})]})},t.Navbar=function({menusConfig:{brand:t,company:n,menus:o,routes:i,user:s,validatePermis:c}}){const u=e.useRef(),l=e.useRef(),{theme:f,setTheme:d,canChangeTheme:h}=re(),[p,g]=e.useState(!1),[m,y]=e.useState(""),[v,_]=e.useState([]),[w,b]=e.useState([]);let C=[];const E=localStorage.getItem(Tc);E&&(C=JSON.parse(E));const[A]=Er({url:i.apiFavorites,onTerminated:t=>{t.error?console.info("Erro ao obter lista de favoritos!",t.error):b(t.data)}}),[I]=Er({url:i.apiFavorites,method:"patch",onTerminated:t=>{t.error&&console.info("Erro ao salvar favoritos!",t.error)}});function S(){g(!1),y("")}function O(t){let e=[...v],r=[];e.forEach((e=>{e===t&&(e.open=!e.open),e.open||r.push(e.caption)})),localStorage.setItem(Tc,JSON.stringify(r)),_(e)}function T(t){let e=[...v];e.forEach((e=>{(null==e?void 0:e.menus)&&((null==e?void 0:e.stayOpen)?e.open=e.stayOpen:e.open=t)})),_(e),O(null)}function N(t,e){t.stopPropagation(),t.preventDefault();const r=w.filter((t=>t.route!==e.route));var n;r.length===w.length&&r.push({caption:((null==e?void 0:e.prefix)?e.prefix+" / ":"")+e.caption,route:e.route}),n=r,i.apiFavorites&&(I({data:n}),b(n))}function x(t){return w.some((e=>e.route===t))}return e.useEffect((()=>{i.apiFavorites&&A()}),[]),e.useEffect((()=>{let t=[];null==w||w.forEach((e=>{o.forEach(((r,n)=>{var o;if(n>0&&0!==(null==(o=null==r?void 0:r.menus)?void 0:o.length)){let o=r.menus.findIndex((t=>t.route===e.route));if(o>=0){let i=r.menus[o];t.push({...i,caption:e.caption,index:String(n).padStart(2,"0")+String(o).padStart(2,0)})}}}))})),"Favoritos"===o[0].caption&&(o[0].menus=t.sort(((t,e)=>t.index>e.index?1:t.index<e.index?-1:0))),_(function(t){let e=[];return t.forEach((t=>{let r={caption:t.caption,open:!C.includes(t.caption)||t.stayOpen,stayOpen:t.stayOpen,isFavorite:null==t?void 0:t.isFavorite,prefix:null==t?void 0:t.prefix,menus:[]};t.menus&&t.menus.length>0&&t.menus.filter((t=>{var e;return(null==t?void 0:t.isLine)||!(null==t?void 0:t.isLine)&&(t.caption.toLowerCase().includes(m.toLowerCase())||(null==(e=t.shortcut)?void 0:e.toLowerCase().includes(m.toLowerCase())))})).forEach((t=>{c(null==t?void 0:t.permis,null==t?void 0:t.acesso)&&r.menus.push({...t,prefix:null==r?void 0:r.prefix})})),m&&(r.open=!0),e.push(r)})),e.forEach((t=>{var e;t.menus&&((null==(e=t.menus[0])?void 0:e.isLine)&&(t.menus=t.menus.filter((t=>!(null==t?void 0:t.isLine)))),t.menus=t.menus.filter(((t,e,r)=>{var n;return!(e>0&&(null==(n=r[e-1])?void 0:n.isLine)&&t.isLine)})),t.menus=t.menus.filter(((t,e,r)=>!(e===r.length-1&&(null==t?void 0:t.isLine)))))})),e}(o))}),[m,w]),e.useEffect((()=>{var t;r.isDesktop()&&(null==(t=null==u?void 0:u.current)||t.focus())}),[p]),Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("div",{className:"navbar--area",children:Jt.jsxs("div",{className:"navbar-content",children:[Jt.jsx("button",{className:"btn-menu"+(p?" opened":""),title:"Abrir menu de opções",onClick:()=>g(!p),children:p?Jt.jsx(hr,{width:20,height:20}):Jt.jsx(pr,{width:20,height:20})}),Jt.jsxs("div",{className:"content",children:[Jt.jsx(a.Link,{to:i.home,className:"brand",onClick:S,title:"Voltar para tela inicial",children:t}),Jt.jsxs("div",{className:"company",children:[Jt.jsx("div",{className:"name",children:n}),Jt.jsxs("div",{className:"doc",children:[Jt.jsxs("span",{children:[null==s?void 0:s.title," "]}),Jt.jsx("strong",{children:null==s?void 0:s.name})]})]}),Jt.jsxs("div",{className:"nav-btn-area",children:[Jt.jsx("div",{className:"btn-theme",children:h&&Jt.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const t="light"==f?"dark":"light";d(t),document.body.dataset.bsTheme=t},children:"light"==f?Jt.jsx("i",{className:"fa-solid fa-moon"}):Jt.jsx("i",{className:"bi bi-brightness-high-fill"})})}),Jt.jsxs("div",{className:"btn-atalho",children:[Jt.jsx(a.Link,{to:i.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-user-gear"})}),Jt.jsx(a.Link,{to:i.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),p&&Jt.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(t){"menu-background"===t.target.id&&S()},children:Jt.jsxs("div",{className:"menu-content",children:[Jt.jsxs("div",{className:"search-area",children:[Jt.jsx("i",{className:"fas fa-search"}),Jt.jsx("input",{ref:u,placeholder:"Pesquisar...",value:m,onChange:t=>y(t.target.value)}),m&&Jt.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>y(""),children:Jt.jsx("i",{className:"fas fa-times"})}),Jt.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>T(!1),children:Jt.jsx("i",{className:"fas fa-minus"})}),Jt.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:Jt.jsx("i",{className:"fas fa-plus"})})]}),Jt.jsx("div",{className:"navbar--menu-area",ref:l,children:v.map(((t,e)=>Jt.jsx(Oc,{opc:t,closeMenu:S,clickGroup:O,clickFavorite:N,isFavorite:x,enabledFavorite:i.apiFavorites},e)))}),Jt.jsx("div",{className:"menu-footer",children:Jt.jsx(a.Link,{to:i.exit,onClick:S,children:Jt.jsxs("div",{className:"user",children:[Jt.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),Jt.jsxs("span",{className:"sair",children:["Sair ",Jt.jsx(Ke,{})]})]})})})]})})]})},t.NavbarMU=function({menusConfig:{brand:t,company:n,menus:o,routes:i,user:s,validatePermis:c}}){const u=e.useRef(),l=e.useRef(),{theme:f,setTheme:d,canChangeTheme:h}=re(),[p,g]=e.useState(!1),[m,y]=e.useState(""),[v,_]=e.useState([]),[w,b]=e.useState([]);let C=[];const E=localStorage.getItem(Rc);E&&(C=JSON.parse(E));const[A]=Er({url:i.apiFavorites,onTerminated:t=>{t.error?console.info("Erro ao obter lista de favoritos!",t.error):b(t.data)}}),[I]=Er({url:i.apiFavorites,method:"patch",onTerminated:t=>{t.error&&console.info("Erro ao salvar favoritos!",t.error)}});function S(){g(!1)}function O(t){let e=[...v],r=[];e.forEach((e=>{e===t&&(e.open=!e.open),e.open||r.push(e.caption)})),localStorage.setItem(Rc,JSON.stringify(r)),_(e)}function T(t){let e=[...v];e.forEach((e=>{(null==e?void 0:e.menus)&&((null==e?void 0:e.stayOpen)?e.open=e.stayOpen:e.open=t)})),_(e),O(null)}function N(t,e){t.stopPropagation(),t.preventDefault();const r=w.filter((t=>t.route!==e.route));var n;r.length===w.length&&r.push({caption:((null==e?void 0:e.prefix)?e.prefix+" / ":"")+e.caption,route:e.route}),n=r,i.apiFavorites&&(I({data:n}),b(n))}function x(t){return w.some((e=>e.route===t))}return e.useEffect((()=>{i.apiFavorites&&A()}),[]),e.useEffect((()=>{let t=[];null==w||w.forEach((e=>{o.forEach(((r,n)=>{var o;if(n>0&&0!==(null==(o=null==r?void 0:r.menus)?void 0:o.length)){let o=r.menus.findIndex((t=>t.route===e.route));if(o>=0){let i=r.menus[o];t.push({...i,caption:e.caption,index:String(n).padStart(2,"0")+String(o).padStart(2,0)})}}}))})),"Favoritos"===o[0].caption&&(o[0].menus=t.sort(((t,e)=>t.index>e.index?1:t.index<e.index?-1:0))),_(function(t){let e=[];return t.forEach((t=>{let r={caption:t.caption,open:!C.includes(t.caption)||t.stayOpen,stayOpen:t.stayOpen,isFavorite:null==t?void 0:t.isFavorite,prefix:null==t?void 0:t.prefix,menus:[]};t.menus&&t.menus.length>0&&t.menus.filter((t=>{var e;return(null==t?void 0:t.isLine)||!(null==t?void 0:t.isLine)&&(t.caption.toLowerCase().includes(m.toLowerCase())||(null==(e=t.shortcut)?void 0:e.toLowerCase().includes(m.toLowerCase())))})).forEach((t=>{c(null==t?void 0:t.permis,null==t?void 0:t.acesso)&&r.menus.push({...t,prefix:null==r?void 0:r.prefix})})),m&&(r.open=!0),e.push(r)})),e.forEach((t=>{var e;t.menus&&((null==(e=t.menus[0])?void 0:e.isLine)&&(t.menus=t.menus.filter((t=>!(null==t?void 0:t.isLine)))),t.menus=t.menus.filter(((t,e,r)=>{var n;return!(e>0&&(null==(n=r[e-1])?void 0:n.isLine)&&t.isLine)})),t.menus=t.menus.filter(((t,e,r)=>!(e===r.length-1&&(null==t?void 0:t.isLine)))))})),e}(o))}),[m,w]),e.useEffect((()=>{var t;r.isDesktop()&&(null==(t=null==u?void 0:u.current)||t.focus())}),[p]),Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("div",{className:"navbar-mu-area",children:Jt.jsxs("div",{className:"mu--container",children:[Jt.jsx(xc,{isOpen:p,setIsOpen:g}),Jt.jsxs("div",{className:"mu--content",children:[Jt.jsx(Nc,{isOpen:p,setIsOpen:g,brand:t,closeMenu:S,routes:i}),Jt.jsxs("div",{className:"mu--info",children:[Jt.jsx("div",{className:"info-line-1",children:n}),Jt.jsx("div",{className:"info-line-2",children:Jt.jsxs("span",{children:[null==s?void 0:s.title," ",Jt.jsx("strong",{children:null==s?void 0:s.name})]})})]}),Jt.jsxs("div",{className:"mu--buttons",children:[h&&Jt.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const t="light"==f?"dark":"light";d(t),document.body.dataset.bsTheme=t},children:"light"==f?Jt.jsx("i",{className:"fa-solid fa-moon"}):Jt.jsx("i",{className:"bi bi-brightness-high-fill"})}),Jt.jsx(a.Link,{to:i.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-user-gear"})}),Jt.jsx(a.Link,{to:i.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),Jt.jsx("div",{"data-open":p,id:"menu-background",className:"nv-menu--background",onClick:function(t){"menu-background"===t.target.id&&S()},children:Jt.jsxs("div",{className:"nv-menu--content","data-open":p,children:[Jt.jsxs("div",{className:"nv-menu--brand",children:[Jt.jsx(xc,{isOpen:p,setIsOpen:g,menuClose:r.isMobile()}),Jt.jsx(Nc,{isOpen:p,setIsOpen:g,brand:t,closeMenu:S,routes:i,showButtonClose:!0})]}),Jt.jsxs("div",{className:"nv-menu--search",children:[Jt.jsx("i",{className:"fas fa-search"}),Jt.jsx("input",{ref:u,placeholder:"Pesquisar...",value:m,onChange:t=>y(t.target.value)}),m&&Jt.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var t;y(""),null==(t=null==u?void 0:u.current)||t.focus()},children:Jt.jsx("i",{className:"fas fa-times"})}),Jt.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>T(!1),children:Jt.jsx("i",{className:"fas fa-minus"})}),Jt.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:Jt.jsx("i",{className:"fas fa-plus"})})]}),Jt.jsx("div",{className:"nv-menu--opcoes",ref:l,children:v.map(((t,e)=>Jt.jsx(Oc,{opc:t,closeMenu:S,clickGroup:O,clickFavorite:N,isFavorite:x,enabledFavorite:i.apiFavorites},e)))}),Jt.jsx("div",{className:"nv-menu--footer",children:Jt.jsx(a.Link,{to:i.exit,onClick:S,children:Jt.jsxs("div",{className:"foo-user",children:[Jt.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),Jt.jsxs("span",{className:"foo-sair",children:["Sair ",Jt.jsx(Ke,{})]})]})})}),Jt.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},t.Paginacao=function({pages:t,page:e,setPage:r}){function n(n){var o;n!==e&&n>=1&&n<=t&&(null==(o=document.querySelector("main"))||o.scrollTo(0,0),r(n))}return Jt.jsxs("div",{className:"paginacao--container",children:[Jt.jsxs("div",{className:"btn-group",role:"group","aria-label":"Basic example",children:[Jt.jsx("button",{className:"btn btn-outline-"+(e<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>n(1),disabled:e<=1,children:Jt.jsx("i",{className:"fas fa-angle-double-left"})}),Jt.jsx("button",{className:"btn btn-outline-"+(e<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>n(Number(e)-1),disabled:e<=1,children:Jt.jsx("i",{className:"fas fa-angle-left"})}),Jt.jsxs("span",{className:"paginas btn btn-outline-info text-body",children:[Jt.jsx("span",{className:"fw-bold",children:e})," / ",Jt.jsx("span",{children:t})]}),Jt.jsx("button",{className:"btn btn-outline-"+(e>=t?"secondary":"info"),title:"Ir para próxima página",onClick:()=>n(Number(e)+1),disabled:e>=t,children:Jt.jsx("i",{className:"fas fa-angle-right"})}),Jt.jsx("button",{className:"btn btn-outline-"+(e>=t?"secondary":"info"),title:"Ir para a última página",onClick:()=>n(t),disabled:e>=t,children:Jt.jsx("i",{className:"fas fa-angle-double-right"})})]})," "]})},t.Panel=mr,t.PanelDashboard=function({title:t,color:e="var(--dash-border)",backColor:r="var(--dash-bg)",minHeight:n,children:o,marginBottom:i=0,...a}){return Jt.jsxs(_c,{color:e,backColor:r,style:{minHeight:n,marginBottom:i},...a,children:[t&&Jt.jsx("h3",{className:"title",children:t}),o]})},t.PanelHeader=gr,t.PrintButtons=function({onClose:t}){return Jt.jsxs("div",{className:"print-btn--container",children:[Jt.jsxs("button",{className:"btn btn-primary",type:"submit",children:[Jt.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),Jt.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:t,children:[Jt.jsx("i",{className:"fas fa-times"})," Fechar"]})]})},t.QRCodeReader=qs,t.RadioGroup=function({className:t="",label:e,name:r,value:n,setValue:o,options:a=[],disabled:s}){return Jt.jsxs("div",{className:"rad-group--container "+t,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[Jt.jsx("div",{className:"group-radio--label",children:e}),Jt.jsx("div",{className:"group-radio--body",children:a.map(((t,e)=>Jt.jsxs("label",{children:[Jt.jsx(i.Input,{type:"radio",name:r,checked:Number(n)===e,onChange:()=>o(e),disabled:s}),t]},e)))})]})},t.ScrollContainer=function({children:t,hasMaxWidth:e=!0}){return Jt.jsx(Cc,{hasMaxWidth:e,children:Jt.jsx("div",{className:"scroll--content",children:t})})},t.Table=function({colunas:t,acoes:e,opcoes:r,dados:n,alignTop:o,colorir:a=!0,border:s=!0,sizeBreak:c=767}){return t&&t.forEach((t=>{!t.tipo||"float"!==t.tipo&&"currency"!==t.tipo||(t.money=!0)})),n&&0!==n.length?Jt.jsx(ce,{children:Jt.jsxs(ue,{alignTop:o,sizeBreak:c,hasBorder:s,children:[Jt.jsx(Ve,{colunas:t,incColActions:!!e}),Jt.jsx(He,{colunas:t,acoes:e,dados:n,opcoes:r,colorir:a})]})}):Jt.jsx(i.Alert,{color:"secondary",children:"Nenhum registro encontrado!"})},t.TextHtml=function({value:t}){return t&&"string"==typeof t&&t.replaceAll("\n","<br/>"),Jt.jsx("span",{dangerouslySetInnerHTML:{__html:t}})},t.Toggle=function({name:t,checked:e,disabled:r,onChange:n,children:o,toRight:i,className:a="",...s}){return Jt.jsx(wc,{checked:e,disabled:r,className:`form-switch ${a}`,...s,children:Jt.jsxs("label",{className:"toggle",style:{flexDirection:i?"row-reverse":"row",justifyContent:i?"space-between":"flex-start",alignItems:i?"flex-start":"center"},children:[Jt.jsx("input",{disabled:r,type:"checkbox",className:"form-check-input",checked:e,onChange:function(){!r&&n&&n({target:{name:t,checked:!e,value:!e}})}}),o&&Jt.jsx("span",{className:"title",children:o})]})})},t.cache=br,t.createApiConfig=function(t=se){const e={...se,...t};return e.auth={...se.auth,...t.auth},e},t.createDropdownItems=function(t){return t},t.createMenuOptions=function(t){return t},t.createTableActions=t=>t,t.createTableCols=t=>t,t.createTableOptions=t=>t,t.useApi=Er,t.useLibContext=re,t.useLocalForage=function(t,r,n=1){const[o,i]=e.useState(r);return e.useEffect((()=>{Ec.getItem(t).then((e=>{e&&(e.versao===n?i(e.data):Ec.removeItem(t))}))}),[]),e.useEffect((()=>{Ec.setItem(t,{versao:n,data:o})}),[o]),[o,i]},t.useLocalStorage=function(t,r){const[n,o]=e.useState((()=>{const e=localStorage.getItem(t);return e&&"undefined"!==e&&"null"!==e&&""!==e?JSON.parse(e):r}));return e.useEffect((()=>{localStorage.setItem(t,JSON.stringify(n))}),[n]),[n,o]},t.useParamId=function(){let t=0;const e=a.useParams();return e&&e.id&&(t=parseInt(e.id)),t},t.useQuery=function(){const{search:t}=a.useLocation();return e.useMemo((()=>new URLSearchParams(t)),[t])},t.useSessionStorage=function(t,r){const[n,o]=e.useState((()=>{const e=sessionStorage.getItem(t);return e&&"undefined"!==e&&"null"!==e&&""!==e?JSON.parse(e):r}));return e.useEffect((()=>{sessionStorage.setItem(t,JSON.stringify(n))}),[n]),[n,o]},Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
839
+ `;function Oc({opc:t,closeMenu:e,clickGroup:r,clickFavorite:n,isFavorite:o,enabledFavorite:i}){var a;const{versionApp:s}=re();if((null==(a=t.menus)?void 0:a.length)>0)return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(Ac,{onClick:()=>r(t),isOpen:t.open,children:[Jt.jsx("span",{className:"opc",style:{color:t.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:t.caption}),Jt.jsx("span",{className:"icon",children:Jt.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),Jt.jsx("div",{className:"opt-group "+(t.open?"opt--open":"opt--close"),children:t.menus.map(((t,a)=>Jt.jsx(Oc,{opc:t,closeMenu:e,clickGroup:r,clickFavorite:n,isFavorite:o,enabledFavorite:i},a)))})]});if(t.route){let r=o(t.route),a=null==t?void 0:t.version;return a&&(a=Boolean(s.substring(0,a.length)===a)),Jt.jsxs(Ic,{to:t.route,onClick:e,children:[Jt.jsx("span",{className:"menu-icon",children:t.icon}),Jt.jsx("span",{className:"menu-caption",children:t.caption}),Jt.jsxs("span",{className:"menu-fav-new",children:[a&&Jt.jsx("span",{className:"menu-new",children:"novo"}),i&&Jt.jsx("span",{className:"menu-fav",onClick:e=>n(e,t),children:Jt.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(r?"solid":"regular")+" fa-heart",style:{color:r?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==t?void 0:t.isLine)?Jt.jsx(Sc,{}):null}const Tc="sys/nav/closed";const Nc=({routes:t,closeMenu:e,brand:r})=>Jt.jsx("div",{className:"navbar-mu--brand",children:Jt.jsx(a.Link,{to:t.home,onClick:e,className:"brand",title:"Voltar para tela inicial",children:r})});function xc({isOpen:t,setIsOpen:e,menuClose:r}){return Jt.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>e(!t),children:r?Jt.jsx("i",{className:"fa-solid fa-xmark icon-close"}):Jt.jsxs("div",{className:"icon-desk",children:[Jt.jsx("span",{}),Jt.jsx("span",{}),Jt.jsx("span",{})]})})}const Rc="sys/nav/closed";t.Alerta=ae,t.Aviso=function({onConfirm:t,text:e="",children:r}){return Jt.jsx(ie,{type:ne.Aviso,title:"Aviso!",text:e,onConfirm:t,children:r})},t.BotaoClonar=function(){return Jt.jsx(i.Button,{size:"sm",color:"warning",title:"Clonar o registro",children:Jt.jsx(qe,{})})},t.BotaoEditar=function(){return Jt.jsx(i.Button,{size:"sm",color:"primary",title:"Alterar o registro",children:Jt.jsx(Je,{})})},t.BotaoExcluir=function(){return Jt.jsx(i.Button,{size:"sm",color:"danger",title:"Excluir o registro",children:Jt.jsx(tr,{})})},t.BotaoIncluir=function({caption:t="Incluir",onClick:e,...r}){return Jt.jsxs(i.Button,{color:"success",title:"Incluir um novo registro",onClick:e,...r,children:[Jt.jsx(Qe,{})," ",t]})},t.BotaoSalvar=function({loading:t,saveInfo:e,link:r,fixed:n,onCancel:o,onConfirm:s}){const c=a.useHistory();return Jt.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(n),children:[Jt.jsxs(i.Button,{type:s?"button":"submit",color:"primary",onClick:s,children:[Jt.jsx("i",{className:"fas fa-cloud-upload-alt"}),t||(null==e?void 0:e.loading)?"Salvando...":"Salvar"]}),Jt.jsxs(i.Button,{type:"button",color:"outline-danger",onClick:()=>{o?o():r?c.push(r):c.goBack()},children:[Jt.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},t.BoxColor=function({corFonte:t,setCorFonte:e,corFundo:r,setCorFundo:n}){return Jt.jsxs("div",{className:"box-color--container",children:[Jt.jsx(ir,{label:"Cor da fonte",value:t,onChange:t=>e(t.target.value)}),Jt.jsx(ir,{label:"Cor de fundo",value:r,onChange:t=>n(t.target.value)}),Jt.jsx("div",{className:"box-color-texto",style:{color:t,backgroundColor:r},children:"Texto de exemplo"})]})},t.BoxInfo=function({id:t,title:r,isOpen:n=!1,isVisible:o=!0,onChange:i,noMargin:a,children:s,...c}){const[u,l]=e.useState(n);return e.useEffect((()=>{t&&i&&i(t,u)}),[u]),o?Jt.jsxs(ar,{open:u,noMargin:a,...c,children:[Jt.jsx("div",{className:"bi-btn-area",children:Jt.jsxs("button",{type:"button",onClick:()=>l(!u),children:[r," ",Jt.jsx("i",{className:"fas fa-chevron-down"})]})}),Jt.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},t.BoxSearch=dc,t.ButtonBack=ur,t.ButtonClose=cr,t.ButtonOptions=function({value:t,setValue:e,options:r=[],...n}){return Jt.jsx("div",{className:"btn-opts--container btn-group",...n,children:r.map(((r,n)=>Jt.jsx(i.Button,{active:n===t,color:"outline-info",onClick:()=>e(n),children:r},n)))})},t.ButtonTop=fr,t.CheckBox=function({enabled:t=!0,onChange:e,children:r,...n}){const o=n.disabled||!t;return Jt.jsx(Zs,{disabled:o,children:Jt.jsxs("label",{children:[Jt.jsx(i.Input,{type:"checkbox",disabled:o,onChange:t=>{if(e){let r={...t,target:{...t.target,name:t.target.name,value:t.target.checked}};e(r)}},checked:"boolean"==typeof n.value?n.value:n.checked,...n}),r]})})},t.CheckUpdates=function(){const t=e.useRef();function r(e){var r,n;(null==t?void 0:t.current)?e?null==(r=t.current)||r.classList.add("update-show"):null==(n=t.current)||n.classList.remove("update-show"):console.info("Não encontrou box update!")}return e.useLayoutEffect((()=>{console.info("App:",window.location.origin),"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&(console.log("Procurando atualizações..."),navigator.serviceWorker.getRegistration().then((t=>{t?(console.info("=> Service Worker encontrado:",t),t.addEventListener("updatefound",(()=>{r(!0);const e=t.installing;e.addEventListener("statechange",(()=>{"installed"===e.state&&navigator.serviceWorker.controller&&setTimeout((()=>window.location.reload(!0)),1e3),"activated"===e.state&&r(!1)}))}))):console.info("Sem Service Worker!")})).catch((t=>{console.error("=> Service Worker não encontrado:",t)})))}),[]),Jt.jsx(bc,{onClick:function(){console.info("Atualizando em segundo plano!"),r(!1)},children:Jt.jsxs("div",{ref:t,className:"update-box",children:[Jt.jsx("div",{className:"update-line"}),Jt.jsx("i",{className:"fas fa-info-circle"}),"Nova versão disponível, atualizando..."]})})},t.ClipboardArea=function({title:t,url:r,timerInMilliSeconds:n=5e3}){const[o,i]=e.useState(!1);return e.useEffect((()=>()=>{dr&&clearTimeout(dr)}),[]),Jt.jsxs("div",{className:`clipboard-area--container ${o&&" clip-active"}`,children:[Jt.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:t||r}),Jt.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(r),i(!0),dr=setTimeout((()=>i(!1)),n)},children:o?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},t.Confirma=function({onConfirm:t,onCancel:e,text:r="",children:n,defaultBtn:o}){return Jt.jsx(ie,{type:ne.Confirmacao,title:"Confirmação!",text:r,onConfirm:t,onCancel:e,defaultBtn:o,children:n})},t.DataItem=function({caption:t,colored:e,children:r,className:n,...o}){return Jt.jsxs("div",{className:"di-box "+n,...o,children:[t&&Jt.jsx("label",{children:t}),Jt.jsx("div",{style:{color:e?"var(--data-item-destaque)":"var(--body-color)"},children:r})]})},t.DropDownButton=Fe,t.DynamicCounter=Sr,t.FormEdit=function({title:t,count:r,maxWidth:n=1200,goBack:o,goHome:i,onClose:a,children:s}){return e.useEffect((()=>{var t;null==(t=document.querySelector("main"))||t.scrollTo(0,0)}),[]),Jt.jsx("div",{className:"mx-auto",style:{maxWidth:n},children:Jt.jsx(mr,{title:t,count:r,goBack:o,goHome:i,onClose:a,children:s})})},t.FormEnter=function({children:t}){const r=e.useRef(),n=(t,e)=>{let r=t[e];for(;e<t.length-1&&(r=t[++e],r.disabled););return r};return Jt.jsx("form",{onSubmit:function(t){t.preventDefault()},ref:r,onKeyDown:function(t){var e,o;if("Enter"===t.key){const i=null==(e=null==r?void 0:r.current)?void 0:e.querySelector(".form-item:focus,.btn-primary"),a=null==(o=null==r?void 0:r.current)?void 0:o.querySelectorAll(".form-item,.btn-primary");for(let e=0;e<a.length;e++)if(a[e]===i&&e<a.length-1){t.preventDefault();const r=n(a,e);(null==r?void 0:r.select)&&r.select(),r.focus()}}},children:t})},t.FormatData=({value:t,incHour:e=!0})=>{let r="";if(t){let n,o;-1!==t.indexOf("T")?(n=t.split("T"),o=n[1],n=n[0]):(n=t.split(" "),n.length>1&&(o=n[1]),n=n[0]),-1!==n.indexOf("-")&&(n=n.split("-").reverse().join("/")),o&&e&&(n=n+" "+o),r=n}return r},t.FormatPercent=he,t.FormatQuant=de,t.FormatValor=fe,t.GroupBox=function({label:t,className:e="",children:r}){return Jt.jsxs("div",{className:`group-box--container ${e}`,children:[Jt.jsx("div",{className:"group-box--label",children:t}),Jt.jsx("div",{className:"group-box--body",children:r})]})},t.Hint=function({title:t="Ajuda",children:e}){return Jt.jsxs("div",{className:"hint--container",children:[Jt.jsx("i",{className:"fas fa-question"}),Jt.jsxs("div",{className:"hint-content",children:[Jt.jsx("div",{className:"title",children:t}),e]})]})},t.IconClose=hr,t.IconExitOutline=function(t){return Jt.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...t,children:Jt.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},t.IconMenu=pr,t.IconUserGear=function(t){return Jt.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...t,children:Jt.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},t.IconeChevron=()=>Jt.jsx("i",{className:"fas fa-chevron-down"}),t.IconeClonar=()=>Jt.jsx("i",{className:"fa-solid fa-copy"}),t.IconeConfig=()=>Jt.jsx("i",{className:"fas fa-cogs"}),t.IconeEditar=Je,t.IconeEmail=()=>Jt.jsx("i",{className:"fas fa-envelope"}),t.IconeEncerrarAno=()=>Jt.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Jt.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),t.IconeExcluir=tr,t.IconeFechar=rr,t.IconeFecharCircle=()=>Jt.jsx("i",{className:"fas fa-times-circle"}),t.IconeIncluir=Qe,t.IconeLogin=()=>Jt.jsx("i",{className:"fas fa-sign-in-alt"}),t.IconeLogout=Ke,t.IconeMostrarSenha=({display:t})=>Jt.jsx("i",{className:"fas fa-eye"+(t?"-slash":"")}),t.IconeOpenLink=nr,t.IconePassword=()=>Jt.jsx("i",{className:"fas fa-key"}),t.IconePin=()=>Jt.jsx("i",{className:"fas fa-map-marker-alt"}),t.IconePrint=()=>Jt.jsx("i",{className:"fas fa-print"}),t.IconeQRCode=or,t.IconeSalvar=()=>Jt.jsx("i",{className:"fas fa-cloud-upload-alt"}),t.IconeSearchPlus=()=>Jt.jsx("i",{className:"fas fa-search-plus"}),t.IconeSoma=()=>Jt.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Jt.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),t.IconeUsers=()=>Jt.jsx("i",{className:"fas fa-user-cog"}),t.IconeVisualizar=er,t.Input=function(t){switch(t.type){case"cep":return Jt.jsx(ec,{...t});case"cpf":return Jt.jsx(uc,{...t});case"cnpj":return Jt.jsx(lc,{...t});case"codigo":return Jt.jsx(sc,{name:t.name,onChange:t.onChange,...t});case"fone":return Jt.jsx(rc,{name:t.name,onChange:t.onChange,value:t.value,...t});case"uf":return Jt.jsx(fc,{...t});case"hora":return Jt.jsx(cc,{...t});case"percent":return Jt.jsx(ac,{name:t.name,onChange:t.onChange,...t});case"quant":return Jt.jsx(ic,{name:t.name,onChange:t.onChange,...t});case"real":return Jt.jsx(oc,{name:t.name,onChange:t.onChange,...t});case"finder":return Jt.jsx(hc,{...t});default:return Jt.jsx("input",{className:"form-control",...t})}},t.InputCep=ec,t.InputCheckBox=({disabled:t,children:e,name:r,checked:n,onChange:o})=>Jt.jsx(pc,{children:Jt.jsxs(gc,{disabled:t,onClick:function(){if(!t&&o){o({target:{name:r,checked:!n}})}},children:[Jt.jsxs("span",{children:[n&&Jt.jsx(Ge,{color:t&&"silver"}),!n&&Jt.jsx(Xe,{color:t&&"silver"})]})," ",e]})}),t.InputCnpj=lc,t.InputCodigo=sc,t.InputColor=ir,t.InputCpf=uc,t.InputEstado=fc,t.InputFinder=({title:t,onFind:e,children:r,...n})=>Jt.jsxs("div",{className:"input-group",children:[Jt.jsxs("select",{className:"form-select",...n,children:[Jt.jsxs("option",{value:0,children:["- ",t," -"]}),r]}),Jt.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:e,children:Jt.jsx(Ye,{})})]}),t.InputFone=rc,t.InputHora=cc,t.InputPassword=function({disabled:t,...r}){const[n,o]=e.useState(!1);return Jt.jsxs(mc,{disabled:t,children:[Jt.jsx("input",{type:n?"text":"password",disabled:t,...r}),Jt.jsx("i",{className:n?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{t||o(!n)},title:t?"":(n?"Ocultar":"Exibir")+" a senha"})]})},t.InputPercent=ac,t.InputPesquisa=Or,t.InputQRCode=function({value:t,setValue:r}){const[n,o]=e.useState(!1);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs("div",{className:"input-group",children:[Jt.jsx(i.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:t}),Jt.jsx(i.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>r(""),children:Jt.jsx(Ze,{})}),Jt.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>o(!0),children:Jt.jsx(or,{})}),t?Jt.jsx(Tr,{className:"btn btn-info",title:"Abrir o link do documento",to:t,children:Jt.jsx(nr,{})}):Jt.jsx(i.Button,{color:"info",disabled:!0,children:Jt.jsx(nr,{})})]}),n&&Jt.jsx(qs,{setVisible:o,title:"Ler QRCode do documento",onResult:t=>r(null==t?void 0:t.text)})]})},t.InputQuant=ic,t.InputSearch=({title:t="Selecione",options:e=[],fields:r=[],btnClick:n=null,...o})=>Jt.jsxs("div",{className:"input-group",children:[Jt.jsxs("select",{className:"form-select",...o,children:[Jt.jsxs("option",{value:0,children:["- ",t," -"]}),null==e?void 0:e.map(((t,e)=>Jt.jsx("option",{value:t[r[0]],children:t[r[1]]},e)))]}),Jt.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:n,children:Jt.jsx(Ye,{})})]}),t.InputValor=oc,t.LabelHint=function({label:t,hint:e}){return Jt.jsxs("div",{className:"label-hint--container",children:[Jt.jsx("label",{children:t}),Jt.jsx("div",{className:"label-hint--icon",children:Jt.jsx("i",{className:"fas fa-question"})}),Jt.jsxs("div",{className:"label-hint--box",children:[Jt.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),e]})]})},t.LibProvider=({apiConfig:t,children:n,versionApp:o,useTheme:i})=>{const a=!(!i||"boolean"!=typeof i)&&i,[s,c]=e.useState((()=>{let t="light";if(a){let e=localStorage.getItem(ee);t=e||(r.isDarkMode()?"dark":"light")}return t})),[u,l]=e.useState([]),[f,d]=e.useState(!1),h=t=>{let e=u.find((e=>e.modalId===t));e&&e.setVisible(!1),l((e=>e.filter((e=>e.modalId!==t))))},p=e.useCallback((t=>{if("Escape"===t.key){if(0===u.length)return;h(u[u.length-1].modalId)}}),[u]);return e.useEffect((()=>{a&&(localStorage.setItem(ee,s),document.body.dataset.bsTheme=s)}),[s,a]),e.useEffect((()=>(window.addEventListener("keydown",p,!1),()=>window.removeEventListener("keydown",p,!1))),[u]),Jt.jsx(te.Provider,{value:{versionApp:o,addModal:(t,e)=>{let r=[...u],n=r.findIndex((e=>e.modalId===t));n>=0?r[n]={modalId:t,setVisible:e}:r.push({modalId:t,setVisible:e}),l(r)},removeModal:h,clearModals:()=>{u.forEach((t=>{h(t.modalId)}))},showBtnTop:f,setShowBtnTop:d,globalApiConfig:t,theme:s,setTheme:c,canChangeTheme:a},children:n})},t.LinkToEmail=function({href:t,title:e,children:r,...n}){return Jt.jsx("a",{href:`mailto:${t||r}`,title:e||"Enviar um e-mail para este endereço",...n,children:r||t})},t.LinkToFone=function({href:t,children:e,...r}){return Jt.jsx("a",{href:`tel:+55${t||e}`,title:"Ligar para este número",...r,children:e||t})},t.LinkToMaps=function({href:t,children:e,...r}){let n=`https://google.com/maps/place/${null==t?void 0:t.replace(" ","+")}`;return(null==t?void 0:t.includes("/maps/place/"))&&(null==t?void 0:t.startsWith("https"))&&(n=t),Jt.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...r,children:e})},t.LinkToNewPage=Tr,t.LinkToWhatsApp=function({href:t,children:e,text:r="",title:n,...o}){let i;return i=t?t.replace(/\D/g,""):null==e?void 0:e.replace(/\D/g,""),Jt.jsx("a",{href:`https://wa.me/${i}?text=${encodeURI(r)}`,target:"_blank",rel:"noreferrer",title:n||"Enviar mensagem para este número usando o WhatsApp",...o,children:e||t})},t.Loading=Js,t.LoadingReport=function({url:t,file:e,fileTo:r,loading:n=!0,setLoading:o}){return n?Jt.jsx(Ir,{url:t,file:e,fileTo:r,setLoading:o}):null},t.ModalBox=Rr,t.ModalBoxDrag=function({maxWidth:t,visible:o,setVisible:i,title:a,children:s,hideScrollBar:c=!0,id:u}){const{addModal:l,removeModal:f}=re(),[d]=e.useState(u||"modal-"+r.random()),h=e.useRef(null),p=n.useDragControls();return e.useEffect((()=>(o?c&&document.body.classList.add(yc):(f(d),c&&document.body.classList.remove(yc)),()=>{f(d),c&&document.body.classList.remove(yc)})),[o,c]),e.useEffect((()=>{l(d,i)}),[d]),o?Jt.jsx(vc,{maxWidth:t,ref:h,children:Jt.jsxs(n.motion.div,{className:"mod-panel",drag:!0,dragListener:!1,dragControls:p,dragConstraints:h,dragMomentum:!1,dragElastic:.1,initial:{scale:0},animate:{scale:1},transition:{duration:.2},children:[Jt.jsxs(gr,{className:"mod-header",onPointerDown:function(t){p.start(t)},children:[Jt.jsx("div",{children:a}),Jt.jsx(cr,{type:"button",onClick:()=>i(!1)})]}),Jt.jsx("div",{className:"mod-body",children:s})]})}):null},t.ModalFilter=function({setVisible:t,maxWidth:e,fnApplyFilter:r,children:n}){return Jt.jsxs(Rr,{title:"Filtros",maxWidth:e,setVisible:t,visible:!0,children:[n,Jt.jsx("hr",{}),Jt.jsxs("div",{className:"mod-filter--btn-area",children:[Jt.jsxs(i.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[Jt.jsx($e,{})," Aplicar filtros"]}),Jt.jsxs(i.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[Jt.jsx(rr,{})," Cancelar filtros"]})]})]})},t.Navbar=function({menusConfig:{brand:t,company:n,menus:o,routes:i,user:s,validatePermis:c}}){const u=e.useRef(),l=e.useRef(),{theme:f,setTheme:d,canChangeTheme:h}=re(),[p,g]=e.useState(!1),[m,v]=e.useState(""),[y,_]=e.useState([]),[w,b]=e.useState([]);let C=[];const E=localStorage.getItem(Tc);E&&(C=JSON.parse(E));const[A]=Er({url:i.apiFavorites,onTerminated:t=>{t.error?console.info("Erro ao obter lista de favoritos!",t.error):b(t.data)}}),[I]=Er({url:i.apiFavorites,method:"patch",onTerminated:t=>{t.error&&console.info("Erro ao salvar favoritos!",t.error)}});function S(){g(!1),v("")}function O(t){let e=[...y],r=[];e.forEach((e=>{e===t&&(e.open=!e.open),e.open||r.push(e.caption)})),localStorage.setItem(Tc,JSON.stringify(r)),_(e)}function T(t){let e=[...y];e.forEach((e=>{(null==e?void 0:e.menus)&&((null==e?void 0:e.stayOpen)?e.open=e.stayOpen:e.open=t)})),_(e),O(null)}function N(t,e){t.stopPropagation(),t.preventDefault();const r=w.filter((t=>t.route!==e.route));var n;r.length===w.length&&r.push({caption:((null==e?void 0:e.prefix)?e.prefix+" / ":"")+e.caption,route:e.route}),n=r,i.apiFavorites&&(I({data:n}),b(n))}function x(t){return w.some((e=>e.route===t))}return e.useEffect((()=>{i.apiFavorites&&A()}),[]),e.useEffect((()=>{let t=[];null==w||w.forEach((e=>{o.forEach(((r,n)=>{var o;if(n>0&&0!==(null==(o=null==r?void 0:r.menus)?void 0:o.length)){let o=r.menus.findIndex((t=>t.route===e.route));if(o>=0){let i=r.menus[o];t.push({...i,caption:e.caption,index:String(n).padStart(2,"0")+String(o).padStart(2,0)})}}}))})),"Favoritos"===o[0].caption&&(o[0].menus=t.sort(((t,e)=>t.index>e.index?1:t.index<e.index?-1:0))),_(function(t){let e=[];return t.forEach((t=>{let r={caption:t.caption,open:!C.includes(t.caption)||t.stayOpen,stayOpen:t.stayOpen,isFavorite:null==t?void 0:t.isFavorite,prefix:null==t?void 0:t.prefix,menus:[]};t.menus&&t.menus.length>0&&t.menus.filter((t=>{var e;return(null==t?void 0:t.isLine)||!(null==t?void 0:t.isLine)&&(t.caption.toLowerCase().includes(m.toLowerCase())||(null==(e=t.shortcut)?void 0:e.toLowerCase().includes(m.toLowerCase())))})).forEach((t=>{c(null==t?void 0:t.permis,null==t?void 0:t.acesso)&&r.menus.push({...t,prefix:null==r?void 0:r.prefix})})),m&&(r.open=!0),e.push(r)})),e.forEach((t=>{var e;t.menus&&((null==(e=t.menus[0])?void 0:e.isLine)&&(t.menus=t.menus.filter((t=>!(null==t?void 0:t.isLine)))),t.menus=t.menus.filter(((t,e,r)=>{var n;return!(e>0&&(null==(n=r[e-1])?void 0:n.isLine)&&t.isLine)})),t.menus=t.menus.filter(((t,e,r)=>!(e===r.length-1&&(null==t?void 0:t.isLine)))))})),e}(o))}),[m,w]),e.useEffect((()=>{var t;r.isDesktop()&&(null==(t=null==u?void 0:u.current)||t.focus())}),[p]),Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("div",{className:"navbar--area",children:Jt.jsxs("div",{className:"navbar-content",children:[Jt.jsx("button",{className:"btn-menu"+(p?" opened":""),title:"Abrir menu de opções",onClick:()=>g(!p),children:p?Jt.jsx(hr,{width:20,height:20}):Jt.jsx(pr,{width:20,height:20})}),Jt.jsxs("div",{className:"content",children:[Jt.jsx(a.Link,{to:i.home,className:"brand",onClick:S,title:"Voltar para tela inicial",children:t}),Jt.jsxs("div",{className:"company",children:[Jt.jsx("div",{className:"name",children:n}),Jt.jsxs("div",{className:"doc",children:[Jt.jsxs("span",{children:[null==s?void 0:s.title," "]}),Jt.jsx("strong",{children:null==s?void 0:s.name})]})]}),Jt.jsxs("div",{className:"nav-btn-area",children:[Jt.jsx("div",{className:"btn-theme",children:h&&Jt.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const t="light"==f?"dark":"light";d(t),document.body.dataset.bsTheme=t},children:"light"==f?Jt.jsx("i",{className:"fa-solid fa-moon"}):Jt.jsx("i",{className:"bi bi-brightness-high-fill"})})}),Jt.jsxs("div",{className:"btn-atalho",children:[Jt.jsx(a.Link,{to:i.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-user-gear"})}),Jt.jsx(a.Link,{to:i.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),p&&Jt.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(t){"menu-background"===t.target.id&&S()},children:Jt.jsxs("div",{className:"menu-content",children:[Jt.jsxs("div",{className:"search-area",children:[Jt.jsx("i",{className:"fas fa-search"}),Jt.jsx("input",{ref:u,placeholder:"Pesquisar...",value:m,onChange:t=>v(t.target.value)}),m&&Jt.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>v(""),children:Jt.jsx("i",{className:"fas fa-times"})}),Jt.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>T(!1),children:Jt.jsx("i",{className:"fas fa-minus"})}),Jt.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:Jt.jsx("i",{className:"fas fa-plus"})})]}),Jt.jsx("div",{className:"navbar--menu-area",ref:l,children:y.map(((t,e)=>Jt.jsx(Oc,{opc:t,closeMenu:S,clickGroup:O,clickFavorite:N,isFavorite:x,enabledFavorite:i.apiFavorites},e)))}),Jt.jsx("div",{className:"menu-footer",children:Jt.jsx(a.Link,{to:i.exit,onClick:S,children:Jt.jsxs("div",{className:"user",children:[Jt.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),Jt.jsxs("span",{className:"sair",children:["Sair ",Jt.jsx(Ke,{})]})]})})})]})})]})},t.NavbarMU=function({menusConfig:{brand:t,company:n,menus:o,routes:i,user:s,validatePermis:c}}){const u=e.useRef(),l=e.useRef(),{theme:f,setTheme:d,canChangeTheme:h}=re(),[p,g]=e.useState(!1),[m,v]=e.useState(""),[y,_]=e.useState([]),[w,b]=e.useState([]);let C=[];const E=localStorage.getItem(Rc);E&&(C=JSON.parse(E));const[A]=Er({url:i.apiFavorites,onTerminated:t=>{t.error?console.info("Erro ao obter lista de favoritos!",t.error):b(t.data)}}),[I]=Er({url:i.apiFavorites,method:"patch",onTerminated:t=>{t.error&&console.info("Erro ao salvar favoritos!",t.error)}});function S(){g(!1)}function O(t){let e=[...y],r=[];e.forEach((e=>{e===t&&(e.open=!e.open),e.open||r.push(e.caption)})),localStorage.setItem(Rc,JSON.stringify(r)),_(e)}function T(t){let e=[...y];e.forEach((e=>{(null==e?void 0:e.menus)&&((null==e?void 0:e.stayOpen)?e.open=e.stayOpen:e.open=t)})),_(e),O(null)}function N(t,e){t.stopPropagation(),t.preventDefault();const r=w.filter((t=>t.route!==e.route));var n;r.length===w.length&&r.push({caption:((null==e?void 0:e.prefix)?e.prefix+" / ":"")+e.caption,route:e.route}),n=r,i.apiFavorites&&(I({data:n}),b(n))}function x(t){return w.some((e=>e.route===t))}return e.useEffect((()=>{i.apiFavorites&&A()}),[]),e.useEffect((()=>{let t=[];null==w||w.forEach((e=>{o.forEach(((r,n)=>{var o;if(n>0&&0!==(null==(o=null==r?void 0:r.menus)?void 0:o.length)){let o=r.menus.findIndex((t=>t.route===e.route));if(o>=0){let i=r.menus[o];t.push({...i,caption:e.caption,index:String(n).padStart(2,"0")+String(o).padStart(2,0)})}}}))})),"Favoritos"===o[0].caption&&(o[0].menus=t.sort(((t,e)=>t.index>e.index?1:t.index<e.index?-1:0))),_(function(t){let e=[];return t.forEach((t=>{let r={caption:t.caption,open:!C.includes(t.caption)||t.stayOpen,stayOpen:t.stayOpen,isFavorite:null==t?void 0:t.isFavorite,prefix:null==t?void 0:t.prefix,menus:[]};t.menus&&t.menus.length>0&&t.menus.filter((t=>{var e;return(null==t?void 0:t.isLine)||!(null==t?void 0:t.isLine)&&(t.caption.toLowerCase().includes(m.toLowerCase())||(null==(e=t.shortcut)?void 0:e.toLowerCase().includes(m.toLowerCase())))})).forEach((t=>{c(null==t?void 0:t.permis,null==t?void 0:t.acesso)&&r.menus.push({...t,prefix:null==r?void 0:r.prefix})})),m&&(r.open=!0),e.push(r)})),e.forEach((t=>{var e;t.menus&&((null==(e=t.menus[0])?void 0:e.isLine)&&(t.menus=t.menus.filter((t=>!(null==t?void 0:t.isLine)))),t.menus=t.menus.filter(((t,e,r)=>{var n;return!(e>0&&(null==(n=r[e-1])?void 0:n.isLine)&&t.isLine)})),t.menus=t.menus.filter(((t,e,r)=>!(e===r.length-1&&(null==t?void 0:t.isLine)))))})),e}(o))}),[m,w]),e.useEffect((()=>{var t;r.isDesktop()&&(null==(t=null==u?void 0:u.current)||t.focus())}),[p]),Jt.jsxs(Jt.Fragment,{children:[Jt.jsx("div",{className:"navbar-mu-area",children:Jt.jsxs("div",{className:"mu--container",children:[Jt.jsx(xc,{isOpen:p,setIsOpen:g}),Jt.jsxs("div",{className:"mu--content",children:[Jt.jsx(Nc,{isOpen:p,setIsOpen:g,brand:t,closeMenu:S,routes:i}),Jt.jsxs("div",{className:"mu--info",children:[Jt.jsx("div",{className:"info-line-1",children:n}),Jt.jsx("div",{className:"info-line-2",children:Jt.jsxs("span",{children:[null==s?void 0:s.title," ",Jt.jsx("strong",{children:null==s?void 0:s.name})]})})]}),Jt.jsxs("div",{className:"mu--buttons",children:[h&&Jt.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const t="light"==f?"dark":"light";d(t),document.body.dataset.bsTheme=t},children:"light"==f?Jt.jsx("i",{className:"fa-solid fa-moon"}):Jt.jsx("i",{className:"bi bi-brightness-high-fill"})}),Jt.jsx(a.Link,{to:i.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-user-gear"})}),Jt.jsx(a.Link,{to:i.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:Jt.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),Jt.jsx("div",{"data-open":p,id:"menu-background",className:"nv-menu--background",onClick:function(t){"menu-background"===t.target.id&&S()},children:Jt.jsxs("div",{className:"nv-menu--content","data-open":p,children:[Jt.jsxs("div",{className:"nv-menu--brand",children:[Jt.jsx(xc,{isOpen:p,setIsOpen:g,menuClose:r.isMobile()}),Jt.jsx(Nc,{isOpen:p,setIsOpen:g,brand:t,closeMenu:S,routes:i,showButtonClose:!0})]}),Jt.jsxs("div",{className:"nv-menu--search",children:[Jt.jsx("i",{className:"fas fa-search"}),Jt.jsx("input",{ref:u,placeholder:"Pesquisar...",value:m,onChange:t=>v(t.target.value)}),m&&Jt.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var t;v(""),null==(t=null==u?void 0:u.current)||t.focus()},children:Jt.jsx("i",{className:"fas fa-times"})}),Jt.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>T(!1),children:Jt.jsx("i",{className:"fas fa-minus"})}),Jt.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:Jt.jsx("i",{className:"fas fa-plus"})})]}),Jt.jsx("div",{className:"nv-menu--opcoes",ref:l,children:y.map(((t,e)=>Jt.jsx(Oc,{opc:t,closeMenu:S,clickGroup:O,clickFavorite:N,isFavorite:x,enabledFavorite:i.apiFavorites},e)))}),Jt.jsx("div",{className:"nv-menu--footer",children:Jt.jsx(a.Link,{to:i.exit,onClick:S,children:Jt.jsxs("div",{className:"foo-user",children:[Jt.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),Jt.jsxs("span",{className:"foo-sair",children:["Sair ",Jt.jsx(Ke,{})]})]})})}),Jt.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},t.Paginacao=function({pages:t,page:e,setPage:r}){function n(n){var o;n!==e&&n>=1&&n<=t&&(null==(o=document.querySelector("main"))||o.scrollTo(0,0),r(n))}return Jt.jsxs("div",{className:"paginacao--container",children:[Jt.jsxs("div",{className:"btn-group",role:"group","aria-label":"Basic example",children:[Jt.jsx("button",{className:"btn btn-outline-"+(e<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>n(1),disabled:e<=1,children:Jt.jsx("i",{className:"fas fa-angle-double-left"})}),Jt.jsx("button",{className:"btn btn-outline-"+(e<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>n(Number(e)-1),disabled:e<=1,children:Jt.jsx("i",{className:"fas fa-angle-left"})}),Jt.jsxs("span",{className:"paginas btn btn-outline-info text-body",children:[Jt.jsx("span",{className:"fw-bold",children:e})," / ",Jt.jsx("span",{children:t})]}),Jt.jsx("button",{className:"btn btn-outline-"+(e>=t?"secondary":"info"),title:"Ir para próxima página",onClick:()=>n(Number(e)+1),disabled:e>=t,children:Jt.jsx("i",{className:"fas fa-angle-right"})}),Jt.jsx("button",{className:"btn btn-outline-"+(e>=t?"secondary":"info"),title:"Ir para a última página",onClick:()=>n(t),disabled:e>=t,children:Jt.jsx("i",{className:"fas fa-angle-double-right"})})]})," "]})},t.Panel=mr,t.PanelDashboard=function({title:t,color:e="var(--dash-border)",backColor:r="var(--dash-bg)",minHeight:n,children:o,marginBottom:i=0,...a}){return Jt.jsxs(_c,{color:e,backColor:r,style:{minHeight:n,marginBottom:i},...a,children:[t&&Jt.jsx("h3",{className:"title",children:t}),o]})},t.PanelHeader=gr,t.PrintButtons=function({onClose:t}){return Jt.jsxs("div",{className:"print-btn--container",children:[Jt.jsxs("button",{className:"btn btn-primary",type:"submit",children:[Jt.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),Jt.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:t,children:[Jt.jsx("i",{className:"fas fa-times"})," Fechar"]})]})},t.QRCodeReader=qs,t.RadioGroup=function({className:t="",label:e,name:r,value:n,setValue:o,options:a=[],disabled:s}){return Jt.jsxs("div",{className:"rad-group--container "+t,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[Jt.jsx("div",{className:"group-radio--label",children:e}),Jt.jsx("div",{className:"group-radio--body",children:a.map(((t,e)=>Jt.jsxs("label",{children:[Jt.jsx(i.Input,{type:"radio",name:r,checked:Number(n)===e,onChange:()=>o(e),disabled:s}),t]},e)))})]})},t.ScrollContainer=function({children:t,hasMaxWidth:e=!0}){return Jt.jsx(Cc,{hasMaxWidth:e,children:Jt.jsx("div",{className:"scroll--content",children:t})})},t.Table=function({colunas:t,acoes:e,opcoes:r,dados:n,alignTop:o,colorir:a=!0,border:s=!0,sizeBreak:c=767}){return t&&t.forEach((t=>{!t.tipo||"float"!==t.tipo&&"currency"!==t.tipo||(t.money=!0)})),n&&0!==n.length?Jt.jsx(ce,{children:Jt.jsxs(ue,{alignTop:o,sizeBreak:c,hasBorder:s,children:[Jt.jsx(Ve,{colunas:t,incColActions:!!e}),Jt.jsx(He,{colunas:t,acoes:e,dados:n,opcoes:r,colorir:a})]})}):Jt.jsx(i.Alert,{color:"secondary",children:"Nenhum registro encontrado!"})},t.TextHtml=function({value:t}){return t&&"string"==typeof t&&t.replaceAll("\n","<br/>"),Jt.jsx("span",{dangerouslySetInnerHTML:{__html:t}})},t.Toggle=function({name:t,checked:e,disabled:r,onChange:n,children:o,toRight:i,className:a="",...s}){return Jt.jsx(wc,{checked:e,disabled:r,className:`form-switch ${a}`,...s,children:Jt.jsxs("label",{className:"toggle",style:{flexDirection:i?"row-reverse":"row",justifyContent:i?"space-between":"flex-start",alignItems:i?"flex-start":"center"},children:[Jt.jsx("input",{disabled:r,type:"checkbox",className:"form-check-input",checked:e,onChange:function(){!r&&n&&n({target:{name:t,checked:!e,value:!e}})}}),o&&Jt.jsx("span",{className:"title",children:o})]})})},t.cache=br,t.createApiConfig=function(t=se){const e={...se,...t};return e.auth={...se.auth,...t.auth},e},t.createDropdownItems=function(t){return t},t.createMenuOptions=function(t){return t},t.createTableActions=t=>t,t.createTableCols=t=>t,t.createTableOptions=t=>t,t.useApi=Er,t.useLibContext=re,t.useLocalForage=function(t,r,n=1){const[o,i]=e.useState(r);return e.useEffect((()=>{Ec.getItem(t).then((e=>{e&&(e.versao===n?i(e.data):Ec.removeItem(t))}))}),[]),e.useEffect((()=>{Ec.setItem(t,{versao:n,data:o})}),[o]),[o,i]},t.useLocalStorage=function(t,r){const[n,o]=e.useState((()=>{const e=localStorage.getItem(t);return e&&"undefined"!==e&&"null"!==e&&""!==e?JSON.parse(e):r}));return e.useEffect((()=>{localStorage.setItem(t,JSON.stringify(n))}),[n]),[n,o]},t.useParamId=function(){let t=0;const e=a.useParams();return e&&e.id&&(t=parseInt(e.id)),t},t.useQuery=function(){const{search:t}=a.useLocation();return e.useMemo((()=>new URLSearchParams(t)),[t])},t.useSessionStorage=function(t,r){const[n,o]=e.useState((()=>{const e=sessionStorage.getItem(t);return e&&"undefined"!==e&&"null"!==e&&""!==e?JSON.parse(e):r}));return e.useEffect((()=>{sessionStorage.setItem(t,JSON.stringify(n))}),[n]),[n,o]},Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
840
840
  //# sourceMappingURL=jclib-ui.umd.js.map