text: /*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
  !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
  
  /*!
    * Bootstrap v5.1.0 (https://getbootstrap.com/)
    * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
    */
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#"+i.split("#")[1]),e=i&&"#"!==i?i.trim():null}return e},e=e=>{const i=t(e);return i&&document.querySelector(i)?i:null},i=e=>{const i=t(e);return i?document.querySelector(i):null},n=t=>{t.dispatchEvent(new Event("transitionend"))},s=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),o=t=>s(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,r=(t,e,i)=>{Object.keys(i).forEach(n=>{const o=i[n],r=e[n],a=r&&s(r)?"element":null==(l=r)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(o).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${o}".`)})},a=t=>!(!s(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=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?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},f=[],p=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",()=>{f.forEach(t=>t())}),f.push(e)):e()},g=t=>{"function"==typeof t&&t()},_=(t,e,i=!0)=>{if(!i)return void g(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let o=!1;const r=({target:i})=>{i===e&&(o=!0,e.removeEventListener("transitionend",r),g(t))};e.addEventListener("transitionend",r),setTimeout(()=>{o||n(e)},s)},b=(t,e,i,n)=>{let s=t.indexOf(e);if(-1===s)return t[!i&&n?t.length-1:0];const o=t.length;return s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))]},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,E={};let A=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},O=/^(mouseenter|mouseleave)/i,C=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 k(t,e){return e&&`${e}::${A++}`||t.uidEvent||A++}function L(t){const e=k(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function x(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function D(t,e,i){const n="string"==typeof e,s=n?i:e;let o=I(t);return C.has(o)||(o=t),[n,s,o]}function S(t,e,i,n,s){if("string"!=typeof e||!t)return;if(i||(i=n,n=null),O.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[o,r,a]=D(e,i,n),l=L(t),c=l[a]||(l[a]={}),h=x(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=k(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s]);return null}}(t,i,n):function(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function N(t,e,i,n,s){const o=x(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t){return t=t.replace(y,""),T[t]||t}const P={on(t,e,i,n){S(t,e,i,n,!1)},one(t,e,i,n){S(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=D(e,i,n),a=r!==e,l=L(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void N(t,l,r,o,s?i:null)}c&&Object.keys(l).forEach(i=>{!function(t,e,i,n){const s=e[i]||{};Object.keys(s).forEach(o=>{if(o.includes(n)){const n=s[o];N(t,e,i,n.originalHandler,n.delegationSelector)}})}(t,l,i,e.slice(1))});const h=l[r]||{};Object.keys(h).forEach(i=>{const n=i.replace(w,"");if(!a||e.includes(n)){const e=h[i];N(t,l,r,e.originalHandler,e.delegationSelector)}})},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=u(),s=I(e),o=e!==s,r=C.has(s);let a,l=!0,c=!0,h=!1,d=null;return o&&n&&(a=n.Event(e,i),n(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(s,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach(t=>{Object.defineProperty(d,t,{get:()=>i[t]})}),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},j=new Map;var M={set(t,e,i){j.has(t)||j.set(t,new Map);const n=j.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>j.has(t)&&j.get(t).get(e)||null,remove(t,e){if(!j.has(t))return;const i=j.get(t);i.delete(e),0===i.size&&j.delete(t)}};class H{constructor(t){(t=o(t))&&(this._element=t,M.set(this._element,this.constructor.DATA_KEY,this))}dispose(){M.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,i=!0){_(t,e,i)}static getInstance(t){return M.get(o(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.1.0"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return"bs."+this.NAME}static get EVENT_KEY(){return"."+this.DATA_KEY}}const B=(t,e="hide")=>{const n="click.dismiss"+t.EVENT_KEY,s=t.NAME;P.on(document,n,`[data-bs-dismiss="${s}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),l(this))return;const o=i(this)||this.closest("."+s);t.getOrCreateInstance(o)[e]()}))};class R extends H{static get NAME(){return"alert"}close(){if(P.trigger(this._element,"close.bs.alert").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(),P.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=R.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)}}))}}B(R,"close"),m(R);class W extends H{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=W.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function z(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function q(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}P.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',t=>{t.preventDefault();const e=t.target.closest('[data-bs-toggle="button"]');W.getOrCreateInstance(e).toggle()}),m(W);const F={setDataAttribute(t,e,i){t.setAttribute("data-bs-"+q(e),i)},removeDataAttribute(t,e){t.removeAttribute("data-bs-"+q(e))},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=z(t.dataset[i])}),e},getDataAttribute:(t,e)=>z(t.getAttribute("data-bs-"+q(e))),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},U={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 i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.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=>!l(t)&&a(t))}},$={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},V={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},K="next",X="prev",Y="left",Q="right",G={ArrowLeft:Q,ArrowRight:Y};class Z extends H{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=U.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return $}static get NAME(){return"carousel"}next(){this._slide(K)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(X)}pause(t){t||(this._isPaused=!0),U.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(n(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=U.findOne(".active.carousel-item",this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void P.one(this._element,"slid.bs.carousel",()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const i=t>e?K:X;this._slide(i,this._items[t])}_getConfig(t){return t={...$,...F.getDataAttributes(this._element),..."object"==typeof t?t:{}},r("carousel",t,V),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?Q:Y)}_addEventListeners(){this._config.keyboard&&P.on(this._element,"keydown.bs.carousel",t=>this._keydown(t)),"hover"===this._config.pause&&(P.on(this._element,"mouseenter.bs.carousel",t=>this.pause(t)),P.on(this._element,"mouseleave.bs.carousel",t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType?this._pointerEvent||(this.touchStartX=t.touches[0].clientX):this.touchStartX=t.clientX},e=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},i=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.touchDeltaX=t.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),500+this._config.interval))};U.find(".carousel-item img",this._element).forEach(t=>{P.on(t,"dragstart.bs.carousel",t=>t.preventDefault())}),this._pointerEvent?(P.on(this._element,"pointerdown.bs.carousel",e=>t(e)),P.on(this._element,"pointerup.bs.carousel",t=>i(t)),this._element.classList.add("pointer-event")):(P.on(this._element,"touchstart.bs.carousel",e=>t(e)),P.on(this._element,"touchmove.bs.carousel",t=>e(t)),P.on(this._element,"touchend.bs.carousel",t=>i(t)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=G[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?U.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===K;return b(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),n=this._getItemIndex(U.findOne(".active.carousel-item",this._element));return P.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:n,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=U.findOne(".active",this._indicatorsElement);e.classList.remove("active"),e.removeAttribute("aria-current");const i=U.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e<i.length;e++)if(Number.parseInt(i[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[e].classList.add("active"),i[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||U.findOne(".active.carousel-item",this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const i=this._directionToOrder(t),n=U.findOne(".active.carousel-item",this._element),s=this._getItemIndex(n),o=e||this._getItemByOrder(i,n),r=this._getItemIndex(o),a=Boolean(this._interval),l=i===K,c=l?"carousel-item-start":"carousel-item-end",h=l?"carousel-item-next":"carousel-item-prev",u=this._orderToDirection(i);if(o&&o.classList.contains("active"))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,u).defaultPrevented)return;if(!n||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const f=()=>{P.trigger(this._element,"slid.bs.carousel",{relatedTarget:o,direction:u,from:s,to:r})};if(this._element.classList.contains("slide")){o.classList.add(h),d(o),n.classList.add(c),o.classList.add(c);const t=()=>{o.classList.remove(c,h),o.classList.add("active"),n.classList.remove("active",h,c),this._isSliding=!1,setTimeout(f,0)};this._queueCallback(t,n,!0)}else n.classList.remove("active"),o.classList.add("active"),this._isSliding=!1,f();a&&this.cycle()}_directionToOrder(t){return[Q,Y].includes(t)?p()?t===Y?X:K:t===Y?K:X:t}_orderToDirection(t){return[K,X].includes(t)?p()?t===X?Y:Q:t===X?Q:Y:t}static carouselInterface(t,e){const i=Z.getOrCreateInstance(t,e);let{_config:n}=i;"object"==typeof e&&(n={...n,...e});const s="string"==typeof e?e:n.slide;if("number"==typeof e)i.to(e);else if("string"==typeof s){if(void 0===i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){Z.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=i(this);if(!e||!e.classList.contains("carousel"))return;const n={...F.getDataAttributes(e),...F.getDataAttributes(this)},s=this.getAttribute("data-bs-slide-to");s&&(n.interval=!1),Z.carouselInterface(e,n),s&&Z.getInstance(e).to(s),t.preventDefault()}}P.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",Z.dataApiClickHandler),P.on(window,"load.bs.carousel.data-api",()=>{const t=U.find('[data-bs-ride="carousel"]');for(let e=0,i=t.length;e<i;e++)Z.carouselInterface(t[e],Z.getInstance(t[e]))}),m(Z);const J={toggle:!0,parent:null},tt={toggle:"boolean",parent:"(null|element)"};class et extends H{constructor(t,i){super(t),this._isTransitioning=!1,this._config=this._getConfig(i),this._triggerArray=[];const n=U.find('[data-bs-toggle="collapse"]');for(let t=0,i=n.length;t<i;t++){const i=n[t],s=e(i),o=U.find(s).filter(t=>t===this._element);null!==s&&o.length&&(this._selector=s,this._triggerArray.push(i))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return J}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=U.find(".collapse .collapse",this._config.parent);e=U.find(".show, .collapsing",this._config.parent).filter(e=>!t.includes(e))}const i=U.findOne(this._selector);if(e.length){const n=e.find(t=>i!==t);if(t=n?et.getInstance(n):null,t&&t._isTransitioning)return}if(P.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach(e=>{i!==e&&et.getOrCreateInstance(e,{toggle:!1}).hide(),t||M.set(e,"bs.collapse",null)});const n=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s="scroll"+(n[0].toUpperCase()+n.slice(1));this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove("collapsing"),this._element.classList.add("collapse","show"),this._element.style[n]="",P.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[n]=this._element[s]+"px"}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=this._element.getBoundingClientRect()[t]+"px",d(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],n=i(e);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove("collapsing"),this._element.classList.add("collapse"),P.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}_isShown(t=this._element){return t.classList.contains("show")}_getConfig(t){return(t={...J,...F.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=o(t.parent),r("collapse",t,tt),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=U.find(".collapse .collapse",this._config.parent);U.find('[data-bs-toggle="collapse"]',this._config.parent).filter(e=>!t.includes(e)).forEach(t=>{const e=i(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))})}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach(t=>{e?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=et.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}P.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const i=e(this);U.find(i).forEach(t=>{et.getOrCreateInstance(t,{toggle:!1}).toggle()})})),m(et);var it="top",nt="bottom",st="right",ot="left",rt=[it,nt,st,ot],at=rt.reduce((function(t,e){return t.concat([e+"-start",e+"-end"])}),[]),lt=[].concat(rt,["auto"]).reduce((function(t,e){return t.concat([e,e+"-start",e+"-end"])}),[]),ct=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ht(t){return t?(t.nodeName||"").toLowerCase():null}function dt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ut(t){return t instanceof dt(t).Element||t instanceof Element}function ft(t){return t instanceof dt(t).HTMLElement||t instanceof HTMLElement}function pt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof dt(t).ShadowRoot||t instanceof ShadowRoot)}var mt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];ft(s)&&ht(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});ft(n)&&ht(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function gt(t){return t.split("-")[0]}var _t=Math.round;function bt(t,e){void 0===e&&(e=!1);var i=t.getBoundingClientRect(),n=1,s=1;return ft(t)&&e&&(n=i.width/t.offsetWidth||1,s=i.height/t.offsetHeight||1),{width:_t(i.width/n),height:_t(i.height/s),top:_t(i.top/s),right:_t(i.right/n),bottom:_t(i.bottom/s),left:_t(i.left/n),x:_t(i.left/n),y:_t(i.top/s)}}function vt(t){var e=bt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function yt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&pt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function wt(t){return dt(t).getComputedStyle(t)}function Et(t){return["table","td","th"].indexOf(ht(t))>=0}function At(t){return((ut(t)?t.ownerDocument:t.document)||window.document).documentElement}function Tt(t){return"html"===ht(t)?t:t.assignedSlot||t.parentNode||(pt(t)?t.host:null)||At(t)}function Ot(t){return ft(t)&&"fixed"!==wt(t).position?t.offsetParent:null}function Ct(t){for(var e=dt(t),i=Ot(t);i&&Et(i)&&"static"===wt(i).position;)i=Ot(i);return i&&("html"===ht(i)||"body"===ht(i)&&"static"===wt(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ft(t)&&"fixed"===wt(t).position)return null;for(var i=Tt(t);ft(i)&&["html","body"].indexOf(ht(i))<0;){var n=wt(i);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 i;i=i.parentNode}return null}(t)||e}function kt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Lt=Math.max,xt=Math.min,Dt=Math.round;function St(t,e,i){return Lt(t,xt(e,i))}function Nt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function It(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Pt={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=gt(i.placement),l=kt(a),c=[ot,st].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Nt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:It(t,rt))}(s.padding,i),d=vt(o),u="y"===l?it:ot,f="y"===l?nt:st,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=Ct(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,E=St(v,w,y),A=l;i.modifiersData[n]=((e={})[A]=E,e.centerOffset=E-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&yt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},jt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mt(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.offsets,r=t.position,a=t.gpuAcceleration,l=t.adaptive,c=t.roundOffsets,h=!0===c?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:Dt(Dt(e*n)/n)||0,y:Dt(Dt(i*n)/n)||0}}(o):"function"==typeof c?c(o):o,d=h.x,u=void 0===d?0:d,f=h.y,p=void 0===f?0:f,m=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),_=ot,b=it,v=window;if(l){var y=Ct(i),w="clientHeight",E="clientWidth";y===dt(i)&&"static"!==wt(y=At(i)).position&&(w="scrollHeight",E="scrollWidth"),y=y,s===it&&(b=nt,p-=y[w]-n.height,p*=a?1:-1),s===ot&&(_=st,u-=y[E]-n.width,u*=a?1:-1)}var A,T=Object.assign({position:r},l&&jt);return a?Object.assign({},T,((A={})[b]=g?"0":"",A[_]=m?"0":"",A.transform=(v.devicePixelRatio||1)<2?"translate("+u+"px, "+p+"px)":"translate3d("+u+"px, "+p+"px, 0)",A)):Object.assign({},T,((e={})[b]=g?p+"px":"",e[_]=m?u+"px":"",e.transform="",e))}var Ht={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:gt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Mt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Mt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Bt={passive:!0},Rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=dt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,Bt)})),a&&l.addEventListener("resize",i.update,Bt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Bt)})),a&&l.removeEventListener("resize",i.update,Bt)}},data:{}},Wt={left:"right",right:"left",bottom:"top",top:"bottom"};function zt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Wt[t]}))}var qt={start:"end",end:"start"};function Ft(t){return t.replace(/start|end/g,(function(t){return qt[t]}))}function Ut(t){var e=dt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $t(t){return bt(At(t)).left+Ut(t).scrollLeft}function Vt(t){var e=wt(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Kt(t,e){var i;void 0===e&&(e=[]);var n=function t(e){return["html","body","#document"].indexOf(ht(e))>=0?e.ownerDocument.body:ft(e)&&Vt(e)?e:t(Tt(e))}(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=dt(n),r=s?[o].concat(o.visualViewport||[],Vt(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Kt(Tt(r)))}function Xt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Yt(t,e){return"viewport"===e?Xt(function(t){var e=dt(t),i=At(t),n=e.visualViewport,s=i.clientWidth,o=i.clientHeight,r=0,a=0;return n&&(s=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=n.offsetLeft,a=n.offsetTop)),{width:s,height:o,x:r+$t(t),y:a}}(t)):ft(e)?function(t){var e=bt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Xt(function(t){var e,i=At(t),n=Ut(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Lt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Lt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+$t(t),l=-n.scrollTop;return"rtl"===wt(s||i).direction&&(a+=Lt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(At(t)))}function Qt(t){return t.split("-")[1]}function Gt(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?gt(s):null,r=s?Qt(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case it:e={x:a,y:i.y-n.height};break;case nt:e={x:a,y:i.y+i.height};break;case st:e={x:i.x+i.width,y:l};break;case ot:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?kt(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case"start":e[c]=e[c]-(i[h]/2-n[h]/2);break;case"end":e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function Zt(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.boundary,r=void 0===o?"clippingParents":o,a=i.rootBoundary,l=void 0===a?"viewport":a,c=i.elementContext,h=void 0===c?"popper":c,d=i.altBoundary,u=void 0!==d&&d,f=i.padding,p=void 0===f?0:f,m=Nt("number"!=typeof p?p:It(p,rt)),g="popper"===h?"reference":"popper",_=t.elements.reference,b=t.rects.popper,v=t.elements[u?g:h],y=function(t,e,i){var n="clippingParents"===e?function(t){var e=Kt(Tt(t)),i=["absolute","fixed"].indexOf(wt(t).position)>=0&&ft(t)?Ct(t):t;return ut(i)?e.filter((function(t){return ut(t)&&yt(t,i)&&"body"!==ht(t)})):[]}(t):[].concat(e),s=[].concat(n,[i]),o=s[0],r=s.reduce((function(e,i){var n=Yt(t,i);return e.top=Lt(n.top,e.top),e.right=xt(n.right,e.right),e.bottom=xt(n.bottom,e.bottom),e.left=Lt(n.left,e.left),e}),Yt(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(ut(v)?v:v.contextElement||At(t.elements.popper),r,l),w=bt(_),E=Gt({reference:w,element:b,strategy:"absolute",placement:s}),A=Xt(Object.assign({},b,E)),T="popper"===h?A:w,O={top:y.top-T.top+m.top,bottom:T.bottom-y.bottom+m.bottom,left:y.left-T.left+m.left,right:T.right-y.right+m.right},C=t.modifiersData.offset;if("popper"===h&&C){var k=C[s];Object.keys(O).forEach((function(t){var e=[st,nt].indexOf(t)>=0?1:-1,i=[it,nt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e}))}return O}function Jt(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?lt:l,h=Qt(n),d=h?a?at:at.filter((function(t){return Qt(t)===h})):rt,u=d.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=d);var f=u.reduce((function(e,i){return e[i]=Zt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[gt(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}var te={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=gt(g),b=l||(_!==g&&p?function(t){if("auto"===gt(t))return[];var e=zt(t);return[Ft(t),e,Ft(e)]}(g):[zt(g)]),v=[g].concat(b).reduce((function(t,i){return t.concat("auto"===gt(i)?Jt(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),y=e.rects.reference,w=e.rects.popper,E=new Map,A=!0,T=v[0],O=0;O<v.length;O++){var C=v[O],k=gt(C),L="start"===Qt(C),x=[it,nt].indexOf(k)>=0,D=x?"width":"height",S=Zt(e,{placement:C,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),N=x?L?st:ot:L?nt:it;y[D]>w[D]&&(N=zt(N));var I=zt(N),P=[];if(o&&P.push(S[k]<=0),a&&P.push(S[N]<=0,S[I]<=0),P.every((function(t){return t}))){T=C,A=!1;break}E.set(C,P)}if(A)for(var j=function(t){var e=v.find((function(e){var i=E.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},M=p?3:1;M>0&&"break"!==j(M);M--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ee(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ie(t){return[it,st,nt,ot].some((function(e){return t[e]>=0}))}var ne={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Zt(e,{elementContext:"reference"}),a=Zt(e,{altBoundary:!0}),l=ee(r,n),c=ee(a,s,o),h=ie(l),d=ie(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},se={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=lt.reduce((function(t,i){return t[i]=function(t,e,i){var n=gt(t),s=[ot,it].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[ot,st].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},oe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=Gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},re={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=Zt(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=gt(e.placement),b=Qt(e.placement),v=!b,y=kt(_),w="x"===y?"y":"x",E=e.modifiersData.popperOffsets,A=e.rects.reference,T=e.rects.popper,O="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C={x:0,y:0};if(E){if(o||a){var k="y"===y?it:ot,L="y"===y?nt:st,x="y"===y?"height":"width",D=E[y],S=E[y]+g[k],N=E[y]-g[L],I=f?-T[x]/2:0,P="start"===b?A[x]:T[x],j="start"===b?-T[x]:-A[x],M=e.elements.arrow,H=f&&M?vt(M):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},R=B[k],W=B[L],z=St(0,A[x],H[x]),q=v?A[x]/2-I-z-R-O:P-z-R-O,F=v?-A[x]/2+I+z+W+O:j+z+W+O,U=e.elements.arrow&&Ct(e.elements.arrow),$=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,V=e.modifiersData.offset?e.modifiersData.offset[e.placement][y]:0,K=E[y]+q-V-$,X=E[y]+F-V;if(o){var Y=St(f?xt(S,K):S,D,f?Lt(N,X):N);E[y]=Y,C[y]=Y-D}if(a){var Q="x"===y?it:ot,G="x"===y?nt:st,Z=E[w],J=Z+g[Q],tt=Z-g[G],et=St(f?xt(J,K):J,Z,f?Lt(tt,X):tt);E[w]=et,C[w]=et-Z}}e.modifiersData[n]=C}},requiresIfExists:["offset"]};function ae(t,e,i){void 0===i&&(i=!1);var n,s,o=ft(e),r=ft(e)&&function(t){var e=t.getBoundingClientRect(),i=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return 1!==i||1!==n}(e),a=At(e),l=bt(t,r),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==ht(e)||Vt(a))&&(c=(n=e)!==dt(n)&&ft(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ut(n)),ft(e)?((h=bt(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=$t(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}var le={placement:"bottom",modifiers:[],strategy:"absolute"};function ce(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function he(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?le:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},le,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){d(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:ut(t)?Kt(t):t.contextElement?Kt(t.contextElement):[],popper:Kt(e)};var s,r,c=function(t){var e=function(t){var e=new Map,i=new Set,n=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||function t(s){i.add(s.name),[].concat(s.requires||[],s.requiresIfExists||[]).forEach((function(n){if(!i.has(n)){var s=e.get(n);s&&t(s)}})),n.push(s)}(t)})),n}(t);return ct.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((s=[].concat(n,a.options.modifiers),r=s.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(r).map((function(t){return r[t]}))));return a.orderedModifiers=c.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(ce(e,i)){a.rects={reference:ae(e,Ct(i),"fixed"===a.options.strategy),popper:vt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(s())}))}))),r}),destroy:function(){d(),c=!0}};if(!ce(t,e))return h;function d(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var de=he(),ue=he({defaultModifiers:[Rt,oe,Ht,mt]}),fe=he({defaultModifiers:[Rt,oe,Ht,mt,se,te,re,Pt,ne]}),pe=Object.freeze({__proto__:null,popperGenerator:he,detectOverflow:Zt,createPopperBase:de,createPopper:fe,createPopperLite:ue,top:it,bottom:nt,right:st,left:ot,auto:"auto",basePlacements:rt,start:"start",end:"end",clippingParents:"clippingParents",viewport:"viewport",popper:"popper",reference:"reference",variationPlacements:at,placements:lt,beforeRead:"beforeRead",read:"read",afterRead:"afterRead",beforeMain:"beforeMain",main:"main",afterMain:"afterMain",beforeWrite:"beforeWrite",write:"write",afterWrite:"afterWrite",modifierPhases:ct,applyStyles:mt,arrow:Pt,computeStyles:Ht,eventListeners:Rt,flip:te,hide:ne,offset:se,popperOffsets:oe,preventOverflow:re});const me=new RegExp("ArrowUp|ArrowDown|Escape"),ge=p()?"top-end":"top-start",_e=p()?"top-start":"top-end",be=p()?"bottom-end":"bottom-start",ve=p()?"bottom-start":"bottom-end",ye=p()?"left-start":"right-start",we=p()?"right-start":"left-start",Ee={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},Ae={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Te extends H{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Ee}static get DefaultType(){return Ae}static get NAME(){return"dropdown"}toggle(){return this._isShown()?this.hide():this.show()}show(){if(l(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(P.trigger(this._element,"show.bs.dropdown",t).defaultPrevented)return;const e=Te.getParentFromElement(this._element);this._inNavbar?F.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(t=>P.on(t,"mouseover",h)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add("show"),this._element.classList.add("show"),P.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(l(this._element)||!this._isShown(this._menu))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){P.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>P.off(t,"mouseover",h)),this._popper&&this._popper.destroy(),this._menu.classList.remove("show"),this._element.classList.remove("show"),this._element.setAttribute("aria-expanded","false"),F.removeDataAttribute(this._menu,"popper"),P.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...F.getDataAttributes(this._element),...t},r("dropdown",t,this.constructor.DefaultType),"object"==typeof t.reference&&!s(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError("dropdown".toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t}_createPopper(t){if(void 0===pe)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:s(this._config.reference)?e=o(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find(t=>"applyStyles"===t.name&&!1===t.enabled);this._popper=fe(e,this._menu,i),n&&F.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains("show")}_getMenuElement(){return U.next(this._element,".dropdown-menu")[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return ye;if(t.classList.contains("dropstart"))return we;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?_e:ge:e?ve:be}_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"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(a);i.length&&b(i,e,"ArrowDown"===t,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Te.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(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=U.find('[data-bs-toggle="dropdown"]');for(let i=0,n=e.length;i<n;i++){const n=Te.getInstance(e[i]);if(!n||!1===n._config.autoClose)continue;if(!n._isShown())continue;const s={relatedTarget:n._element};if(t){const e=t.composedPath(),i=e.includes(n._menu);if(e.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;if(n._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(s.clickEvent=t)}n._completeHide(s)}}static getParentFromElement(t){return i(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!me.test(t.key))return;const e=this.classList.contains("show");if(!e&&"Escape"===t.key)return;if(t.preventDefault(),t.stopPropagation(),l(this))return;const i=this.matches('[data-bs-toggle="dropdown"]')?this:U.prev(this,'[data-bs-toggle="dropdown"]')[0],n=Te.getOrCreateInstance(i);if("Escape"!==t.key)return"ArrowUp"===t.key||"ArrowDown"===t.key?(e||n.show(),void n._selectMenuItem(t)):void(e&&"Space"!==t.key||Te.clearMenus());n.hide()}}P.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',Te.dataApiKeydownHandler),P.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",Te.dataApiKeydownHandler),P.on(document,"click.bs.dropdown.data-api",Te.clearMenus),P.on(document,"keyup.bs.dropdown.data-api",Te.clearMenus),P.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),Te.getOrCreateInstance(this).toggle()})),m(Te);class Oe{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,"paddingRight",e=>e+t),this._setElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight",e=>e+t),this._setElementAttributes(".sticky-top","marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t)[e];t.style[e]=i(Number.parseFloat(s))+"px"})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),this._resetElementAttributes(".sticky-top","marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&F.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=F.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(F.removeDataAttribute(t,e),t.style[e]=i)})}_applyManipulationCallback(t,e){s(t)?e(t):U.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const Ce={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},ke={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"};class Le{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&d(this._getElement()),this._getElement().classList.add("show"),this._emulateAnimation(()=>{g(t)})):g(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),g(t)})):g(t)}_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}_getConfig(t){return(t={...Ce,..."object"==typeof t?t:{}}).rootElement=o(t.rootElement),r("backdrop",t,ke),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),P.on(this._getElement(),"mousedown.bs.backdrop",()=>{g(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(P.off(this._element,"mousedown.bs.backdrop"),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){_(t,this._getElement(),this._config.isAnimated)}}const xe={trapElement:null,autofocus:!0},De={trapElement:"element",autofocus:"boolean"};class Se{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),P.off(document,".bs.focustrap"),P.on(document,"focusin.bs.focustrap",t=>this._handleFocusin(t)),P.on(document,"keydown.tab.bs.focustrap",t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,".bs.focustrap"))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const n=U.focusableChildren(i);0===n.length?i.focus():"backward"===this._lastTabNavDirection?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?"backward":"forward")}_getConfig(t){return t={...xe,..."object"==typeof t?t:{}},r("focustrap",t,De),t}}const Ne={backdrop:!0,keyboard:!0,focus:!0},Ie={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"};class Pe extends H{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=U.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Oe}static get Default(){return Ne}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||P.trigger(this._element,"show.bs.modal",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add("modal-open"),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),P.on(this._dialog,"mousedown.dismiss.bs.modal",()=>{P.one(this._element,"mouseup.dismiss.bs.modal",t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;if(P.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove("show"),P.off(this._element,"click.dismiss.bs.modal"),P.off(this._dialog,"mousedown.dismiss.bs.modal"),this._queueCallback(()=>this._hideModal(),this._element,t)}dispose(){[window,this._dialog].forEach(t=>P.off(t,".bs.modal")),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Le({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_getConfig(t){return t={...Ne,...F.getDataAttributes(this._element),..."object"==typeof t?t:{}},r("modal",t,Ie),t}_showElement(t){const e=this._isAnimated(),i=U.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||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,i&&(i.scrollTop=0),e&&d(this._element),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,"shown.bs.modal",{relatedTarget:t})},this._dialog,e)}_setEscapeEvent(){this._isShown?P.on(this._element,"keydown.dismiss.bs.modal",t=>{this._config.keyboard&&"Escape"===t.key?(t.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==t.key||this._triggerBackdropTransition()}):P.off(this._element,"keydown.dismiss.bs.modal")}_setResizeEvent(){this._isShown?P.on(window,"resize.bs.modal",()=>this._adjustDialog()):P.off(window,"resize.bs.modal")}_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("modal-open"),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,"hidden.bs.modal")})}_showBackdrop(t){P.on(this._element,"click.dismiss.bs.modal",t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(P.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,n=e>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||t.contains("modal-static")||(n||(i.overflowY="hidden"),t.add("modal-static"),this._queueCallback(()=>{t.remove("modal-static"),n||this._queueCallback(()=>{i.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!p()||i&&!t&&p())&&(this._element.style.paddingLeft=e+"px"),(i&&!t&&!p()||!i&&t&&p())&&(this._element.style.paddingRight=e+"px")}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Pe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}P.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=i(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),P.one(e,"show.bs.modal",t=>{t.defaultPrevented||P.one(e,"hidden.bs.modal",()=>{a(this)&&this.focus()})}),Pe.getOrCreateInstance(e).toggle(this)})),B(Pe),m(Pe);const je={backdrop:!0,keyboard:!0,scroll:!1},Me={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"};class He extends H{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return"offcanvas"}static get Default(){return je}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||P.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new Oe).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{this._config.scroll||this._focustrap.activate(),P.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new Oe).reset(),P.trigger(this._element,"hidden.bs.offcanvas")},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...je,...F.getDataAttributes(this._element),..."object"==typeof t?t:{}},r("offcanvas",t,Me),t}_initializeBackDrop(){return new Le({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_addEventListeners(){P.on(this._element,"keydown.dismiss.bs.offcanvas",t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()})}static jQueryInterface(t){return this.each((function(){const e=He.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)}}))}}P.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=i(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this))return;P.one(e,"hidden.bs.offcanvas",()=>{a(this)&&this.focus()});const n=U.findOne(".offcanvas.show");n&&n!==e&&He.getInstance(n).hide(),He.getOrCreateInstance(e).toggle(this)})),P.on(window,"load.bs.offcanvas.data-api",()=>U.find(".offcanvas.show").forEach(t=>He.getOrCreateInstance(t).show())),B(He),m(He);const Be=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Re=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,We=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,ze=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!Be.has(i)||Boolean(Re.test(t.nodeValue)||We.test(t.nodeValue));const n=e.filter(t=>t instanceof RegExp);for(let t=0,e=n.length;t<e;t++)if(n[t].test(i))return!0;return!1};function qe(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),o=[].concat(...n.body.querySelectorAll("*"));for(let t=0,i=o.length;t<i;t++){const i=o[t],n=i.nodeName.toLowerCase();if(!s.includes(n)){i.remove();continue}const r=[].concat(...i.attributes),a=[].concat(e["*"]||[],e[n]||[]);r.forEach(t=>{ze(t,a)||i.removeAttribute(t.nodeName)})}return n.body.innerHTML}const Fe=new Set(["sanitize","allowList","sanitizeFn"]),Ue={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},$e={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},Ve={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["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:[]},popperConfig:null},Ke={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"};class Xe extends H{constructor(t,e){if(void 0===pe)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Ve}static get NAME(){return"tooltip"}static get Event(){return Ke}static get DefaultType(){return Ue}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),P.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.remove(),this._popper&&this._popper.destroy(),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=P.trigger(this._element,this.constructor.Event.SHOW),e=c(this._element),i=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!i)return;const n=this.getTipElement(),s=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);n.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&n.classList.add("fade");const o="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,r=this._getAttachment(o);this._addAttachmentClass(r);const{container:a}=this._config;M.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(a.append(n),P.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=fe(this._element,n,this._getPopperConfig(r)),n.classList.add("show");const l=this._resolvePossibleFunction(this._config.customClass);l&&n.classList.add(...l.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>{P.on(t,"mouseover",h)});const d=this.tip.classList.contains("fade");this._queueCallback(()=>{const t=this._hoverState;this._hoverState=null,P.trigger(this._element,this.constructor.Event.SHOWN),"out"===t&&this._leave(null,this)},this.tip,d)}hide(){if(!this._popper)return;const t=this.getTipElement();if(P.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove("show"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>P.off(t,"mouseover",h)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains("fade");this._queueCallback(()=>{this._isWithActiveTrigger()||("show"!==this._hoverState&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),P.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))},this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove("fade","show"),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".tooltip-inner")}_sanitizeAndSetContent(t,e,i){const n=U.findOne(i,t);e||!n?this.setElementContent(n,e):n.remove()}setElementContent(t,e){if(null!==t)return s(e)?(e=o(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=qe(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_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"function"==typeof t?t.call(this._element):t}_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:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return $e[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(t=>{if("click"===t)P.on(this._element,this.constructor.Event.CLICK,this._config.selector,t=>this.toggle(t));else if("manual"!==t){const e="hover"===t?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i="hover"===t?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;P.on(this._element,e,this._config.selector,t=>this._enter(t)),P.on(this._element,i,this._config.selector,t=>this._leave(t))}}),this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e._config.delay&&e._config.delay.show?e._timeout=setTimeout(()=>{"show"===e._hoverState&&e.show()},e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e._config.delay&&e._config.delay.hide?e._timeout=setTimeout(()=>{"out"===e._hoverState&&e.hide()},e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=F.getDataAttributes(this._element);return Object.keys(e).forEach(t=>{Fe.has(t)&&delete e[t]}),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:o(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()),r("tooltip",t,this.constructor.DefaultType),t.sanitize&&(t.template=qe(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}static jQueryInterface(t){return this.each((function(){const e=Xe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(Xe);const Ye={...Xe.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Qe={...Xe.DefaultType,content:"(string|element|function)"},Ge={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Ze extends Xe{static get Default(){return Ye}static get NAME(){return"popover"}static get Event(){return Ge}static get DefaultType(){return Qe}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=Ze.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(Ze);const Je={offset:10,method:"auto",target:""},ti={offset:"number",method:"string",target:"(string|element)"},ei=".nav-link, .list-group-item, .dropdown-item";class ii extends H{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,P.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return Je}static get NAME(){return"scrollspy"}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?t:this._config.method,n="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),U.find(ei,this._config.target).map(t=>{const s=e(t),o=s?U.findOne(s):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[F[i](o).top+n,s]}return null}).filter(t=>t).sort((t,e)=>t[0]-e[0]).forEach(t=>{this._offsets.push(t[0]),this._targets.push(t[1])})}dispose(){P.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...Je,...F.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=o(t.target)||document.documentElement,r("scrollspy",t,ti),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=ei.split(",").map(e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`),i=U.findOne(e.join(","),this._config.target);i.classList.add("active"),i.classList.contains("dropdown-item")?U.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add("active"):U.parents(i,".nav, .list-group").forEach(t=>{U.prev(t,".nav-link, .list-group-item").forEach(t=>t.classList.add("active")),U.prev(t,".nav-item").forEach(t=>{U.children(t,".nav-link").forEach(t=>t.classList.add("active"))})}),P.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){U.find(ei,this._config.target).filter(t=>t.classList.contains("active")).forEach(t=>t.classList.remove("active"))}static jQueryInterface(t){return this.each((function(){const e=ii.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}P.on(window,"load.bs.scrollspy.data-api",()=>{U.find('[data-bs-spy="scroll"]').forEach(t=>new ii(t))}),m(ii);class ni extends H{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active"))return;let t;const e=i(this._element),n=this._element.closest(".nav, .list-group");if(n){const e="UL"===n.nodeName||"OL"===n.nodeName?":scope > li > .active":".active";t=U.find(e,n),t=t[t.length-1]}const s=t?P.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if(P.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,n);const o=()=>{P.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),P.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,i){const n=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?U.children(e,".active"):U.find(":scope > li > .active",e))[0],s=i&&n&&n.classList.contains("fade"),o=()=>this._transitionComplete(t,n,i);n&&s?(n.classList.remove("show"),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,i){if(e){e.classList.remove("active");const t=U.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d(t),t.classList.contains("fade")&&t.classList.add("show");let n=t.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&U.find(".dropdown-toggle",e).forEach(t=>t.classList.add("active")),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each((function(){const e=ni.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}P.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this)||ni.getOrCreateInstance(this).show()})),m(ni);const si={animation:"boolean",autohide:"boolean",delay:"number"},oi={animation:!0,autohide:!0,delay:5e3};class ri extends H{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return si}static get Default(){return oi}static get NAME(){return"toast"}show(){P.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),d(this._element),this._element.classList.add("show"),this._element.classList.add("showing"),this._queueCallback(()=>{this._element.classList.remove("showing"),P.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains("show")&&(P.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add("showing"),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove("showing"),this._element.classList.remove("show"),P.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),super.dispose()}_getConfig(t){return t={...oi,...F.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},r("toast",t,this.constructor.DefaultType),t}_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 i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){P.on(this._element,"mouseover.bs.toast",t=>this._onInteraction(t,!0)),P.on(this._element,"mouseout.bs.toast",t=>this._onInteraction(t,!1)),P.on(this._element,"focusin.bs.toast",t=>this._onInteraction(t,!0)),P.on(this._element,"focusout.bs.toast",t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ri.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return B(ri),m(ri),{Alert:R,Button:W,Carousel:Z,Collapse:et,Dropdown:Te,Modal:Pe,Offcanvas:He,Popover:Ze,ScrollSpy:ii,Tab:ni,Toast:ri,Tooltip:Xe}}));
  
  var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function j(a,b){this.totalCount=a,this.dataCount=b}function k(){this.buffer=[],this.length=0}function m(){return"undefined"!=typeof CanvasRenderingContext2D}function n(){var a=!1,b=navigator.userAgent;return/android/i.test(b)&&(a=!0,aMat=b.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(a=parseFloat(aMat[1]))),a}function r(a,b){for(var c=1,e=s(a),f=0,g=l.length;g>=f;f++){var h=0;switch(b){case d.L:h=l[f][0];break;case d.M:h=l[f][1];break;case d.Q:h=l[f][2];break;case d.H:h=l[f][3]}if(h>=e)break;c++}if(c>l.length)throw new Error("Too long data");return c}function s(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=f.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=0==b%2)},setupPositionAdjustPattern:function(){for(var a=f.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var g=-2;2>=g;g++)for(var h=-2;2>=h;h++)this.modules[d+g][e+h]=-2==g||2==g||-2==h||2==h||0==g&&0==h?!0:!1}},setupTypeNumber:function(a){for(var b=f.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=f.getBCHTypeInfo(c),e=0;15>e;e++){var g=!a&&1==(1&d>>e);6>e?this.modules[e][8]=g:8>e?this.modules[e+1][8]=g:this.modules[this.moduleCount-15+e][8]=g}for(var e=0;15>e;e++){var g=!a&&1==(1&d>>e);8>e?this.modules[8][this.moduleCount-e-1]=g:9>e?this.modules[8][15-e-1+1]=g:this.modules[8][15-e-1]=g}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,g=0,h=this.moduleCount-1;h>0;h-=2)for(6==h&&h--;;){for(var i=0;2>i;i++)if(null==this.modules[d][h-i]){var j=!1;g<a.length&&(j=1==(1&a[g]>>>e));var k=f.getMask(b,d,h-i);k&&(j=!j),this.modules[d][h-i]=j,e--,-1==e&&(g++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,d){for(var e=j.getRSBlocks(a,c),g=new k,h=0;h<d.length;h++){var i=d[h];g.put(i.mode,4),g.put(i.getLength(),f.getLengthInBits(i.mode,a)),i.write(g)}for(var l=0,h=0;h<e.length;h++)l+=e[h].dataCount;if(g.getLengthInBits()>8*l)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+8*l+")");for(g.getLengthInBits()+4<=8*l&&g.put(0,4);0!=g.getLengthInBits()%8;)g.putBit(!1);for(;;){if(g.getLengthInBits()>=8*l)break;if(g.put(b.PAD0,8),g.getLengthInBits()>=8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e)},b.createBytes=function(a,b){for(var c=0,d=0,e=0,g=new Array(b.length),h=new Array(b.length),j=0;j<b.length;j++){var k=b[j].dataCount,l=b[j].totalCount-k;d=Math.max(d,k),e=Math.max(e,l),g[j]=new Array(k);for(var m=0;m<g[j].length;m++)g[j][m]=255&a.buffer[m+c];c+=k;var n=f.getErrorCorrectPolynomial(l),o=new i(g[j],n.getLength()-1),p=o.mod(n);h[j]=new Array(n.getLength()-1);for(var m=0;m<h[j].length;m++){var q=m+p.getLength()-h[j].length;h[j][m]=q>=0?p.get(q):0}}for(var r=0,m=0;m<b.length;m++)r+=b[m].totalCount;for(var s=new Array(r),t=0,m=0;d>m;m++)for(var j=0;j<b.length;j++)m<g[j].length&&(s[t++]=g[j][m]);for(var m=0;e>m;m++)for(var j=0;j<b.length;j++)m<h[j].length&&(s[t++]=h[j][m]);return s};for(var c={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},d={L:1,M:0,Q:3,H:2},e={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;f.getBCHDigit(b)-f.getBCHDigit(f.G15)>=0;)b^=f.G15<<f.getBCHDigit(b)-f.getBCHDigit(f.G15);return(a<<10|b)^f.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;f.getBCHDigit(b)-f.getBCHDigit(f.G18)>=0;)b^=f.G18<<f.getBCHDigit(b)-f.getBCHDigit(f.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return f.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return 0==(b+c)%2;case e.PATTERN001:return 0==b%2;case e.PATTERN010:return 0==c%3;case e.PATTERN011:return 0==(b+c)%3;case e.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0==b*c%2+b*c%3;case e.PATTERN110:return 0==(b*c%2+b*c%3)%2;case e.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new i([1],0),c=0;a>c;c++)b=b.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case c.MODE_NUMBER:return 10;case c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case c.MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case c.MODE_NUMBER:return 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},g={glog:function(a){if(1>a)throw new Error("glog("+a+")");return g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<<h;for(var h=8;256>h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;c<this.getLength();c++)for(var d=0;d<a.getLength();d++)b[c+d]^=g.gexp(g.glog(this.get(c))+g.glog(a.get(d)));return new i(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=g.glog(this.get(0))-g.glog(a.get(0)),c=new Array(this.getLength()),d=0;d<this.getLength();d++)c[d]=this.get(d);for(var d=0;d<a.getLength();d++)c[d]^=g.gexp(g.glog(a.get(d))+b);return new i(c,0).mod(a)}},j.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],j.getRSBlocks=function(a,b){var c=j.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var d=c.length/3,e=[],f=0;d>f;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"template"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p="svg"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else"undefined"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=['<table style="border:0;border-collapse:collapse;">'],h=0;d>h;h++){g.push("<tr>");for(var i=0;d>i;i++)g.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+e+"px;height:"+f+"px;background-color:"+(a.isDark(h,i)?b.colorDark:b.colorLight)+';"></td>');g.push("</tr>")}g.push("</table>"),c.innerHTML=g.join("");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+"px "+k+"px")},a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}();
  !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("ZXing",[],e):"object"==typeof exports?exports.ZXing=e():t.ZXing=e()}(window,function(){return r={},t.m=e=[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s.getNotFoundInstance=function(){return new s},s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s.getFormatInstance=function(){return new s},s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.AZTEC=0]="AZTEC",o[o.CODABAR=1]="CODABAR",o[o.CODE_39=2]="CODE_39",o[o.CODE_93=3]="CODE_93",o[o.CODE_128=4]="CODE_128",o[o.DATA_MATRIX=5]="DATA_MATRIX",o[o.EAN_8=6]="EAN_8",o[o.EAN_13=7]="EAN_13",o[o.ITF=8]="ITF",o[o.MAXICODE=9]="MAXICODE",o[o.PDF_417=10]="PDF_417",o[o.QR_CODE=11]="QR_CODE",o[o.RSS_14=12]="RSS_14",o[o.RSS_EXPANDED=13]="RSS_EXPANDED",o[o.UPC_A=14]="UPC_A",o[o.UPC_E=15]="UPC_E",o[o.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION",e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(21),o=(i.prototype.enableDecoding=function(t){return this.encoding=t,this},i.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=n.default.decode(new Uint8Array([t]),this.encoding):this.value+=String.fromCharCode(t),this},i.prototype.length=function(){return this.value.length},i.prototype.charAt=function(t){return this.value.charAt(t)},i.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},i.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},i.prototype.substring=function(t,e){return this.value.substring(t,e)},i.prototype.setLengthToZero=function(){this.value=""},i.prototype.toString=function(){return this.value},i.prototype.insert=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)},i);function i(t){void 0===t&&(t=""),this.value=t}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(10),o=r(59),i=(a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.equals=function(t){if(t instanceof a){var e=t;return this.x===e.x&&this.y===e.y}return!1},a.prototype.hashCode=function(){return 31*o.default.floatToIntBits(this.x)+o.default.floatToIntBits(this.y)},a.prototype.toString=function(){return"("+this.x+","+this.y+")"},a.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(n=o<=i&&a<=i?(r=t[0],e=t[1],t[2]):i<=a&&o<=a?(r=t[1],e=t[0],t[2]):(r=t[2],e=t[0],t[1]),this.crossProductZ(e,r,n)<0){var u=e;e=n,n=u}t[0]=e,t[1]=r,t[2]=n},a.distance=function(t,e){return n.default.distance(t.x,t.y,e.x,e.y)},a.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)},a);function a(t,e){this.x=t,this.y=e}e.default=i},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(94),u=(o(s,i=a.CustomError),s);function s(t){void 0===t&&(t=void 0);var e=i.call(this,t)||this;return e.message=t,e}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},o.currentTimeMillis=function(){return Date.now()},o);function o(){}e.default=n},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.OTHER=0]="OTHER",o[o.PURE_BARCODE=1]="PURE_BARCODE",o[o.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",o[o.TRY_HARDER=3]="TRY_HARDER",o[o.CHARACTER_SET=4]="CHARACTER_SET",o[o.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",o[o.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",o[o.ASSUME_GS1=7]="ASSUME_GS1",o[o.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",o[o.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",o[o.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS",e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=(i.prototype.getText=function(){return this.text},i.prototype.getRawBytes=function(){return this.rawBytes},i.prototype.getNumBits=function(){return this.numBits},i.prototype.getResultPoints=function(){return this.resultPoints},i.prototype.getBarcodeFormat=function(){return this.format},i.prototype.getResultMetadata=function(){return this.resultMetadata},i.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},i.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},i.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&0<t.length){var r=new Array(e.length+t.length);n.default.arraycopy(e,0,r,0,e.length),n.default.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},i.prototype.getTimestamp=function(){return this.timestamp},i.prototype.toString=function(){return this.text},i);function i(t,e,r,o,i,a){void 0===r&&(r=null==e?0:8*e.length),void 0===a&&(a=n.default.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=o,this.format=i,this.timestamp=a,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=o,this.format=i,this.resultMetadata=null,this.timestamp=null==a?n.default.currentTimeMillis():a}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.MathUtils=function(){},o.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},o.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},o.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++)e+=t[r];return e},o);function o(){}e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s.getChecksumInstance=function(){return new s},s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=r(7),i=r(17),a=r(4),u=r(1),s=(f.parseFromBooleanArray=function(t){for(var e=t.length,r=t[0].length,n=new f(r,e),o=0;o<e;o++)for(var i=t[o],a=0;a<r;a++)i[a]&&n.set(a,o);return n},f.parseFromString=function(t,e,r){if(null===t)throw new u.default("stringRepresentation cannot be null");for(var n=new Array(t.length),o=0,i=0,a=-1,s=0,l=0;l<t.length;)if("\n"===t.charAt(l)||"\r"===t.charAt(l)){if(i<o){if(-1===a)a=o-i;else if(o-i!==a)throw new u.default("row lengths do not match");i=o,s++}l++}else if(t.substring(l,l+e.length)===e)l+=e.length,n[o]=!0,o++;else{if(t.substring(l,l+r.length)!==r)throw new u.default("illegal character encountered: "+t.substring(l));l+=r.length,n[o]=!1,o++}if(i<o){if(-1===a)a=o-i;else if(o-i!==a)throw new u.default("row lengths do not match");s++}for(var d=new f(a,s),c=0;c<o;c++)n[c]&&d.set(Math.floor(c%a),Math.floor(c/a));return d},f.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return 0!=(this.bits[r]>>>(31&t)&1)},f.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},f.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},f.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},f.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new u.default("input matrix dimensions do not match");for(var e=new n.default(Math.floor(this.width/32)+1),r=this.rowSize,o=this.bits,i=0,a=this.height;i<a;i++)for(var s=i*r,f=t.getRow(i,e).getBitArray(),l=0;l<r;l++)o[s+l]^=f[l]},f.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},f.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new u.default("Left and top must be nonnegative");if(n<1||r<1)throw new u.default("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new u.default("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,f=e;f<i;f++)for(var l=f*a,d=t;d<o;d++)s[l+Math.floor(d/32)]|=1<<(31&d)&4294967295},f.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new n.default(this.width):e.clear();for(var r=this.rowSize,o=this.bits,i=t*r,a=0;a<r;a++)e.setBulk(32*a,o[i+a]);return e},f.prototype.setRow=function(t,e){o.default.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},f.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new n.default(t),o=new n.default(t),i=0,a=Math.floor((e+1)/2);i<a;i++)r=this.getRow(i,r),o=this.getRow(e-1-i,o),r.reverse(),o.reverse(),this.setRow(i,o),this.setRow(e-1-i,r)},f.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,u=-1,s=0;s<e;s++)for(var f=0;f<r;f++){var l=n[s*r+f];if(0!==l){if(s<i&&(i=s),u<s&&(u=s),32*f<o){for(var d=0;0==(l<<31-d&4294967295);)d++;32*f+d<o&&(o=32*f+d)}if(a<32*f+31){for(d=31;l>>>d==0;)d--;a<32*f+d&&(a=32*f+d)}}}return a<o||u<i?null:Int32Array.from([o,i,a-o+1,u-i+1])},f.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])},f.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;0<=r&&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])},f.prototype.getWidth=function(){return this.width},f.prototype.getHeight=function(){return this.height},f.prototype.getRowSize=function(){return this.rowSize},f.prototype.equals=function(t){if(!(t instanceof f))return!1;var e=t;return this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&i.default.equals(this.bits,e.bits)},f.prototype.hashCode=function(){var t=this.width;return 31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+i.default.hashCode(this.bits)},f.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)},f.prototype.buildToString=function(t,e,r){var n=new a.default;n.append(r);for(var o=0,i=this.height;o<i;o++){for(var u=0,s=this.width;u<s;u++)n.append(this.get(u,o)?t:e);n.append(r)}return n.toString()},f.prototype.clone=function(){return new f(this.width,this.height,this.rowSize,this.bits.slice())},f);function f(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 u.default("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))}e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=r(8),i=r(14),a=r(5),u=r(0),s=(f.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(h){if(e&&!0===e.get(o.default.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),s=n.getResultMetadata(),f=270;null!==s&&!0===s.get(i.default.ORIENTATION)&&(f+=s.get(i.default.ORIENTATION)%360),n.putMetadata(i.default.ORIENTATION,f);var l=n.getResultPoints();if(null!==l)for(var d=r.getHeight(),c=0;c<l.length;c++)l[c]=new a.default(d-l[c].getY()-1,l[c].getX());return n}throw new u.default}},f.prototype.reset=function(){},f.prototype.doDecode=function(t,e){var r,s=t.getWidth(),f=t.getHeight(),l=new n.default(s),d=e&&!0===e.get(o.default.TRY_HARDER),c=Math.max(1,f>>(d?8:5));r=d?f:15;for(var h=Math.trunc(f/2),p=0;p<r;p++){var _=Math.trunc((p+1)/2),g=h+c*(0==(1&p)?_:-_);if(g<0||f<=g)break;try{l=t.getBlackRow(g,l)}catch(t){continue}for(var v=function(t){if(1===t&&(l.reverse(),e&&!0===e.get(o.default.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach(function(t,e){return r.set(e,t)}),r.delete(o.default.NEED_RESULT_POINT_CALLBACK),e=r}try{var n=w.decodeRow(g,l,e);if(1===t){n.putMetadata(i.default.ORIENTATION,180);var u=n.getResultPoints();null!==u&&(u[0]=new a.default(s-u[0].getX()-1,u[0].getY()),u[1]=new a.default(s-u[1].getX()-1,u[1].getY()))}return{value:n}}catch(t){}},w=this,y=0;y<2;y++){var A=v(y);if("object"==typeof A)return A.value}}throw new u.default},f.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(i<=e)throw new u.default;for(var a=!t.get(e),s=0,f=e;f<i;){if(t.get(f)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}f++}if(s!==n&&(s!==n-1||f!==i))throw new u.default},f.recordPatternInReverse=function(t,e,r){for(var n=r.length,o=t.get(e);0<e&&0<=n;)t.get(--e)!==o&&(n--,o=!o);if(0<=n)throw new u.default;f.recordPattern(t,e+1,r)},f.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 u=o/i;r*=u;for(var s=0,f=0;f<n;f++){var l=t[f],d=e[f]*u,c=d<l?l-d:d-l;if(r<c)return Number.POSITIVE_INFINITY;s+=c}return s/o},f);function f(){}e.default=s},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.OTHER=0]="OTHER",o[o.ORIENTATION=1]="ORIENTATION",o[o.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",o[o.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",o[o.ISSUE_NUMBER=4]="ISSUE_NUMBER",o[o.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",o[o.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",o[o.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",o[o.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",o[o.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",o[o.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY",e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(16),i=r(17),a=r(1),u=(s.prototype.getSize=function(){return this.size},s.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},s.prototype.ensureCapacity=function(t){if(t>32*this.bits.length){var e=s.makeArray(t);n.default.arraycopy(this.bits,0,e,0,this.bits.length),this.bits=e}},s.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},s.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},s.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},s.prototype.getNextSet=function(t){var e=this.size;if(e<=t)return e;var r=this.bits,n=Math.floor(t/32),i=r[n];i&=~((1<<(31&t))-1);for(var a=r.length;0===i;){if(++n===a)return e;i=r[n]}var u=32*n+o.default.numberOfTrailingZeros(i);return e<u?e:u},s.prototype.getNextUnset=function(t){var e=this.size;if(e<=t)return e;var r=this.bits,n=Math.floor(t/32),i=~r[n];i&=~((1<<(31&t))-1);for(var a=r.length;0===i;){if(++n===a)return e;i=~r[n]}var u=32*n+o.default.numberOfTrailingZeros(i);return e<u?e:u},s.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},s.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new a.default;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 u=(2<<(i<n?31:31&e))-(1<<(r<i?0:31&t));o[i]|=u}}},s.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},s.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new a.default;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,u=n;u<=o;u++){var s=(2<<(u<o?31:31&e))-(1<<(n<u?0:31&t))&4294967295;if((i[u]&s)!=(r?s:0))return!1}return!0},s.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},s.prototype.appendBits=function(t,e){if(e<0||32<e)throw new a.default("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e),this.appendBit;for(var r=e;0<r;r--)this.appendBit(1==(t>>r-1&1))},s.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e),this.appendBit;for(var r=0;r<e;r++)this.appendBit(t.get(r))},s.prototype.xor=function(t){if(this.size!==t.size)throw new a.default("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},s.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}},s.prototype.getBitArray=function(){return this.bits},s.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,u=t[0]>>>a;for(o=1;o<r;o++){var s=t[o];u|=s<<32-a,t[o-1]=u,u=s>>>a}t[r-1]=u}this.bits=t},s.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},s.prototype.equals=function(t){if(!(t instanceof s))return!1;var e=t;return this.size===e.size&&i.default.equals(this.bits,e.bits)},s.prototype.hashCode=function(){return 31*this.size+i.default.hashCode(this.bits)},s.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},s.prototype.clone=function(){return new s(this.size,this.bits.slice())},s);function s(t,e){void 0===t?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=null==e?s.makeArray(t):e)}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.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)},o.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)},o.toHexString=function(t){return t.toString(16)},o.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)},o.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},o.MIN_VALUE_32_BITS=-2147483648,o.MAX_VALUE=Number.MAX_SAFE_INTEGER,o);function o(){}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7),i=r(1),a=r(95),u=(s.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},s.fillWithin=function(t,e,r,n){s.rangeCheck(t.length,e,r);for(var o=e;o<r;o++)t[o]=n},s.rangeCheck=function(t,e,r){if(r<e)throw new i.default("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new a.default(e);if(t<r)throw new a.default(r)},s.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},s.create=function(t,e,r){return Array.from({length:t}).map(function(t){return Array.from({length:e}).fill(r)})},s.createInt32Array=function(t,e,r){return Array.from({length:t}).map(function(t){return Int32Array.from({length:e}).fill(r)})},s.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},s.hashCode=function(t){var e,r;if(null===t)return 0;var o=1;try{for(var i=n(t),a=i.next();!a.done;a=i.next())o=31*o+a.value}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o},s.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},s.copyOf=function(t,e){return t.slice(0,e)},s.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},s.copyOfRange=function(t,e,r){var n=r-e,i=new Int32Array(n);return o.default.arraycopy(t,e,i,0,n),i},s.binarySearch=function(t,e,r){void 0===r&&(r=s.numberComparator);for(var n=0,o=t.length-1;n<=o;){var i=o+n>>1,a=r(e,t[i]);if(0<a)n=1+i;else{if(!(a<0))return i;o=i-1}}return-n-1},s.numberComparator=function(t,e){return t-e},s);function s(){}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(17),i=r(10),a=(u.prototype.PDF417Common=function(){},u.getBitCountSum=function(t){return i.default.sum(t)},u.toIntArray=function(t){var e,r;if(null==t||!t.length)return u.EMPTY_INT_ARRAY;var o=new Int32Array(t.length),i=0;try{for(var a=n(t),s=a.next();!s.done;s=a.next()){var f=s.value;o[i++]=f}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return o},u.getCodeword=function(t){var e=o.default.binarySearch(u.SYMBOL_TABLE,262143&t);return e<0?-1:(u.CODEWORD_TABLE[e]-1)%u.NUMBER_OF_CODEWORDS},u.MAX_CODEWORDS_IN_BARCODE=(u.NUMBER_OF_CODEWORDS=929)-1,u.MIN_ROWS_IN_BARCODE=3,u.MAX_ROWS_IN_BARCODE=90,u.MODULES_IN_CODEWORD=17,u.MODULES_IN_STOP_PATTERN=18,u.BARS_IN_MODULE=8,u.EMPTY_INT_ARRAY=new Int32Array([]),u.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]),u.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]),u);function u(){}e.default=a},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r=r||Promise)(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})},o=this&&this.__generator||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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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=0<(o=a.trys).length&&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(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(32),u=r(52),s=r(11),f=r(53),l=r(2),d=r(0),c=r(56),h=r(57),p=(Object.defineProperty(_.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!0,configurable:!0}),_.prototype.listVideoInputDevices=function(){return n(this,void 0,void 0,function(){var t,e,r,n,a,u,s,f,l,d,c,h;return o(this,function(o){switch(o.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:r=o.sent(),n=[];try{for(a=i(r),u=a.next();!u.done;u=a.next())s=u.value,"videoinput"===(f="video"===s.kind?"videoinput":s.kind)&&(l=s.deviceId||s.id,d=s.label||"Video device "+(n.length+1),c=s.groupId,h={deviceId:l,label:d,kind:f,groupId:c},n.push(h))}catch(o){t={error:o}}finally{try{u&&!u.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return[2,n]}})})},_.prototype.getVideoInputDevices=function(){return n(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map(function(t){return new h.VideoInputDevice(t.deviceId,t.label)})]}})})},_.prototype.findDeviceById=function(t){return n(this,void 0,void 0,function(){var e;return o(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]}})})},_.prototype.decodeFromInputVideoDevice=function(t,e){return n(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}})})},_.prototype.decodeOnceFromVideoDevice=function(t,e){return n(this,void 0,void 0,function(){var r;return o(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()]}})})},_.prototype.decodeOnceFromConstraints=function(t,e){return n(this,void 0,void 0,function(){var r;return o(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()]}})})},_.prototype.decodeOnceFromStream=function(t,e){return n(this,void 0,void 0,function(){var r;return o(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()]}})})},_.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return n(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}})})},_.prototype.decodeFromVideoDevice=function(t,e,r){return n(this,void 0,void 0,function(){var n;return o(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()]}})})},_.prototype.decodeFromConstraints=function(t,e,r){return n(this,void 0,void 0,function(){var n;return o(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()]}})})},_.prototype.decodeFromStream=function(t,e,r){return n(this,void 0,void 0,function(){var n;return o(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()]}})})},_.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},_.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},_.prototype.attachStreamToVideo=function(t,e){return n(this,void 0,void 0,function(){var r;return o(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]}})})},_.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise(function(r,n){return e.playVideoOnLoad(t,function(){return r()})})},_.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)},_.prototype.isVideoPlaying=function(t){return 0<t.currentTime&&!t.paused&&!t.ended&&2<t.readyState},_.prototype.tryPlayVideo=function(t){return n(this,void 0,void 0,function(){return o(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]}})})},_.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new a.default("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new a.default("element with id '"+t+"' must be an "+e+" element");return r},_.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new a.default("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},_.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new a.default("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},_.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new a.default("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},_.prototype.decodeFromImageElement=function(t){if(!t)throw new a.default("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)},_.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},_.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},_.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new a.default("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e},_.prototype.decodeFromImageUrl=function(t){if(!t)throw new a.default("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},_.prototype.decodeFromVideoUrl=function(t){if(!t)throw new a.default("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},_.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new a.default("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},_.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)})},_.prototype._decodeOnLoadVideo=function(t){return n(this,void 0,void 0,function(){return o(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()]}})})},_.prototype._decodeOnLoadVideoContinuously=function(t,e){return n(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}})})},_.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},_.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},_.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},_.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 d.default("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{var u=n.decode(t);i(u)}catch(u){var f=e&&u instanceof d.default,c=u instanceof s.default||u instanceof l.default;if(f||c&&r)return setTimeout(function(){return o(i,a)},n._timeBetweenDecodingAttempts);a(u)}};return new Promise(function(t,e){return o(t,e)})},_.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(function(){return n()},r.timeBetweenScansMillis)}catch(o){e(null,o);var i=o instanceof s.default||o instanceof l.default,a=o instanceof d.default;(i||a)&&setTimeout(function(){return n()},r._timeBetweenDecodingAttempts)}};n()},_.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},_.prototype.createBinaryBitmap=function(t){var e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);var r=this.getCaptureCanvas(t),n=new c.HTMLCanvasElementLuminanceSource(r),o=new f.default(n);return new u.default(o)},_.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext},_.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},_.prototype.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},_.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},_.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},_.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()},_.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},_.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)},_.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)},_.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},_.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},_.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},_);function _(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}e.BrowserCodeReader=p},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(34),o=r(22),i=(a.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)},a.shouldDecodeOnFallback=function(t){return!a.isBrowser()&&"ISO-8859-1"===t},a.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)},a.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},a.encodingName=function(t){return"string"==typeof t?t:t.getName()},a.encodingCharacterSet=function(t){return t instanceof o.default?t:o.default.getCharacterSetECIByName(t)},a.decodeFallback=function(t,e){var r=this.encodingCharacterSet(e);if(a.isDecodeFallbackSupported(r)){for(var i="",u=0,s=t.length;u<s;u++){var f=t[u].toString(16);f.length<2&&(f="0"+f),i+="%"+f}return decodeURIComponent(i)}if(r.equals(o.default.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(t.buffer));throw new n.default("Encoding "+this.encodingName(e)+" not supported by fallback.")},a.isDecodeFallbackSupported=function(t){return t.equals(o.default.UTF8)||t.equals(o.default.ISO8859_1)||t.equals(o.default.ASCII)},a.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)},a);function a(){}e.default=i},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o,i,a=r(2);(i=o=e.CharacterSetValueIdentifiers||(e.CharacterSetValueIdentifiers={}))[i.Cp437=0]="Cp437",i[i.ISO8859_1=1]="ISO8859_1",i[i.ISO8859_2=2]="ISO8859_2",i[i.ISO8859_3=3]="ISO8859_3",i[i.ISO8859_4=4]="ISO8859_4",i[i.ISO8859_5=5]="ISO8859_5",i[i.ISO8859_6=6]="ISO8859_6",i[i.ISO8859_7=7]="ISO8859_7",i[i.ISO8859_8=8]="ISO8859_8",i[i.ISO8859_9=9]="ISO8859_9",i[i.ISO8859_10=10]="ISO8859_10",i[i.ISO8859_11=11]="ISO8859_11",i[i.ISO8859_13=12]="ISO8859_13",i[i.ISO8859_14=13]="ISO8859_14",i[i.ISO8859_15=14]="ISO8859_15",i[i.ISO8859_16=15]="ISO8859_16",i[i.SJIS=16]="SJIS",i[i.Cp1250=17]="Cp1250",i[i.Cp1251=18]="Cp1251",i[i.Cp1252=19]="Cp1252",i[i.Cp1256=20]="Cp1256",i[i.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",i[i.UTF8=22]="UTF8",i[i.ASCII=23]="ASCII",i[i.Big5=24]="Big5",i[i.GB18030=25]="GB18030",i[i.EUC_KR=26]="EUC_KR";var u=(s.prototype.getValueIdentifier=function(){return this.valueIdentifier},s.prototype.getName=function(){return this.name},s.prototype.getValue=function(){return this.values[0]},s.getCharacterSetECIByValue=function(t){if(t<0||900<=t)throw new a.default("incorect value");var e=s.VALUES_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},s.getCharacterSetECIByName=function(t){var e=s.NAME_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},s.prototype.equals=function(t){if(!(t instanceof s))return!1;var e=t;return this.getName()===e.getName()},s.VALUE_IDENTIFIER_TO_ECI=new Map,s.VALUES_TO_ECI=new Map,s.NAME_TO_ECI=new Map,s.Cp437=new s(o.Cp437,Int32Array.from([0,2]),"Cp437"),s.ISO8859_1=new s(o.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),s.ISO8859_2=new s(o.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),s.ISO8859_3=new s(o.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),s.ISO8859_4=new s(o.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),s.ISO8859_5=new s(o.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),s.ISO8859_6=new s(o.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),s.ISO8859_7=new s(o.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),s.ISO8859_8=new s(o.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),s.ISO8859_9=new s(o.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),s.ISO8859_10=new s(o.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),s.ISO8859_11=new s(o.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),s.ISO8859_13=new s(o.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),s.ISO8859_14=new s(o.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),s.ISO8859_15=new s(o.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),s.ISO8859_16=new s(o.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),s.SJIS=new s(o.SJIS,20,"SJIS","Shift_JIS"),s.Cp1250=new s(o.Cp1250,21,"Cp1250","windows-1250"),s.Cp1251=new s(o.Cp1251,22,"Cp1251","windows-1251"),s.Cp1252=new s(o.Cp1252,23,"Cp1252","windows-1252"),s.Cp1256=new s(o.Cp1256,24,"Cp1256","windows-1256"),s.UnicodeBigUnmarked=new s(o.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),s.UTF8=new s(o.UTF8,26,"UTF8","UTF-8"),s.ASCII=new s(o.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),s.Big5=new s(o.Big5,28,"Big5"),s.GB18030=new s(o.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),s.EUC_KR=new s(o.EUC_KR,30,"EUC_KR","EUC-KR"),s);function s(t,e,r){for(var o,i,a=[],u=3;u<arguments.length;u++)a[u-3]=arguments[u];this.valueIdentifier=t,this.name=r,this.values="number"==typeof e?Int32Array.from([e]):e,this.otherEncodingNames=a,s.VALUE_IDENTIFIER_TO_ECI.set(t,this),s.NAME_TO_ECI.set(r,this);for(var f=this.values,l=0,d=f.length;l!==d;l++){var c=f[l];s.VALUES_TO_ECI.set(c,this)}try{for(var h=n(a),p=h.next();!p.done;p=h.next()){var _=p.value;s.NAME_TO_ECI.set(_,this)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(24),u=(o(s,i=a.default),s.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},s.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},s.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},s.prototype.crop=function(t,e,r,n){return new s(this.delegate.crop(t,e,r,n))},s.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},s.prototype.invert=function(){return this.delegate},s.prototype.rotateCounterClockwise=function(){return new s(this.delegate.rotateCounterClockwise())},s.prototype.rotateCounterClockwise45=function(){return new s(this.delegate.rotateCounterClockwise45())},s);function s(t){var e=i.call(this,t.getWidth(),t.getHeight())||this;return e.delegate=t,e}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),o=r(34),i=(a.prototype.getWidth=function(){return this.width},a.prototype.getHeight=function(){return this.height},a.prototype.isCropSupported=function(){return!1},a.prototype.crop=function(t,e,r,n){throw new o.default("This luminance source does not support cropping.")},a.prototype.isRotateSupported=function(){return!1},a.prototype.rotateCounterClockwise=function(){throw new o.default("This luminance source does not support rotation by 90 degrees.")},a.prototype.rotateCounterClockwise45=function(){throw new o.default("This luminance source does not support rotation by 45 degrees.")},a.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new n.default,r=0;r<this.height;r++){for(var o=this.getRow(r,t),i=0;i<this.width;i++){var a,u=255&o[i];a=u<64?"#":u<128?"+":u<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},a);function a(t,e){this.width=t,this.height=e}e.default=i},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(27),u=r(68),s=r(16),f=r(1),l=r(39),d=(o(c,i=u.default),c.prototype.getZero=function(){return this.zero},c.prototype.getOne=function(){return this.one},c.prototype.buildMonomial=function(t,e){if(t<0)throw new f.default;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new a.default(this,r)},c.prototype.inverse=function(t){if(0===t)throw new l.default;return this.expTable[this.size-this.logTable[t]-1]},c.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},c.prototype.getSize=function(){return this.size},c.prototype.getGeneratorBase=function(){return this.generatorBase},c.prototype.toString=function(){return"GF(0x"+s.default.toHexString(this.primitive)+","+this.size+")"},c.prototype.equals=function(t){return t===this},c.AZTEC_DATA_12=new c(4201,4096,1),c.AZTEC_DATA_10=new c(1033,1024,1),c.AZTEC_DATA_6=new c(67,64,1),c.AZTEC_PARAM=new c(19,16,1),c.QR_CODE_FIELD_256=new c(285,256,0),c.DATA_MATRIX_FIELD_256=new c(301,256,1),c.AZTEC_DATA_8=c.DATA_MATRIX_FIELD_256,c.MAXICODE_FIELD_64=c.AZTEC_DATA_6,c);function c(t,e,r){var n=i.call(this)||this;n.primitive=t,n.size=e,n.generatorBase=r;for(var o=new Int32Array(e),u=1,s=0;s<e;s++)o[s]=u,e<=(u*=2)&&(u^=t,u&=e-1);n.expTable=o;var f=new Int32Array(e);for(s=0;s<e-1;s++)f[o[s]]=s;return n.logTable=f,n.zero=new a.default(n,Int32Array.from([0])),n.one=new a.default(n,Int32Array.from([1])),n}e.default=d},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(13),u=r(0),s=r(2),f=(o(l,i=a.default),l.findStartGuardPattern=function(t){for(var e=!1,r=null,n=0,o=[0,0,0];!e;){var i=(r=l.findGuardPattern(t,n,!(o=[0,0,0]),this.START_END_PATTERN,o))[0],a=i-((n=r[1])-i);0<=a&&(e=t.isRange(a,i,!1))}return r},l.checkChecksum=function(t){return l.checkStandardUPCEANChecksum(t)},l.checkStandardUPCEANChecksum=function(t){var e=t.length;if(0===e)return!1;var r=parseInt(t.charAt(e-1),10);return l.getStandardUPCEANChecksum(t.substring(0,e-1))===r},l.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;0<=n;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||9<o)throw new s.default;r+=o}for(r*=3,n=e-2;0<=n;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||9<o)throw new s.default;r+=o}return(1e3-r)%10},l.decodeEnd=function(t,e){return l.findGuardPattern(t,e,!1,l.START_END_PATTERN,new Array(l.START_END_PATTERN.length).fill(0))},l.findGuardPattern=function(t,e,r,n,o){for(var i=t.getSize(),s=0,f=e=r?t.getNextUnset(e):t.getNextSet(e),d=n.length,c=r,h=e;h<i;h++)if(t.get(h)!==c)o[s]++;else{if(s===d-1){if(a.default.patternMatchVariance(o,n,l.MAX_INDIVIDUAL_VARIANCE)<l.MAX_AVG_VARIANCE)return[f,h];f+=o[0]+o[1];for(var p=o.slice(2,o.length),_=0;_<s-1;_++)o[_]=p[_];o[s-1]=0,o[s]=0,s--}else s++;o[s]=1,c=!c}throw new u.default},l.decodeDigit=function(t,e,r,n){this.recordPattern(t,r,e);for(var o=this.MAX_AVG_VARIANCE,i=-1,s=n.length,f=0;f<s;f++){var d=n[f],c=a.default.patternMatchVariance(e,d,l.MAX_INDIVIDUAL_VARIANCE);c<o&&(o=c,i=f)}if(0<=i)return i;throw new u.default},l.MAX_AVG_VARIANCE=.48,l.MAX_INDIVIDUAL_VARIANCE=.7,l.START_END_PATTERN=[1,1,1],l.MIDDLE_PATTERN=[1,1,1,1,1],l.END_PATTERN=[1,1,1,1,1,1],l.L_PATTERNS=[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],l);function l(){var t=null!==i&&i.apply(this,arguments)||this;return t.decodeRowStringBuffer="",t}e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(68),o=r(7),i=r(1),a=(u.prototype.getCoefficients=function(){return this.coefficients},u.prototype.getDegree=function(){return this.coefficients.length-1},u.prototype.isZero=function(){return 0===this.coefficients[0]},u.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},u.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){for(var o=e=0,i=r.length;o!==i;o++){var a=r[o];e=n.default.addOrSubtract(e,a)}return e}e=r[0];var u=r.length,s=this.field;for(o=1;o<u;o++)e=n.default.addOrSubtract(s.multiply(t,e),r[o]);return e},u.prototype.addOrSubtract=function(t){if(!this.field.equals(t.field))throw new i.default("GenericGFPolys do not have same GenericGF field");if(this.isZero())return t;if(t.isZero())return this;var e=this.coefficients,r=t.coefficients;if(e.length>r.length){var a=e;e=r,r=a}var s=new Int32Array(r.length),f=r.length-e.length;o.default.arraycopy(r,0,s,0,f);for(var l=f;l<r.length;l++)s[l]=n.default.addOrSubtract(e[l-f],r[l]);return new u(this.field,s)},u.prototype.multiply=function(t){if(!this.field.equals(t.field))throw new i.default("GenericGFPolys do not have same GenericGF field");if(this.isZero()||t.isZero())return this.field.getZero();for(var e=this.coefficients,r=e.length,o=t.coefficients,a=o.length,s=new Int32Array(r+a-1),f=this.field,l=0;l<r;l++)for(var d=e[l],c=0;c<a;c++)s[l+c]=n.default.addOrSubtract(s[l+c],f.multiply(d,o[c]));return new u(f,s)},u.prototype.multiplyScalar=function(t){if(0===t)return this.field.getZero();if(1===t)return this;for(var e=this.coefficients.length,r=this.field,n=new Int32Array(e),o=this.coefficients,i=0;i<e;i++)n[i]=r.multiply(o[i],t);return new u(r,n)},u.prototype.multiplyByMonomial=function(t,e){if(t<0)throw new i.default;if(0===e)return this.field.getZero();for(var r=this.coefficients,n=r.length,o=new Int32Array(n+t),a=this.field,s=0;s<n;s++)o[s]=a.multiply(r[s],e);return new u(a,o)},u.prototype.divide=function(t){if(!this.field.equals(t.field))throw new i.default("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new i.default("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),a=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var u=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),a),f=t.multiplyByMonomial(u,s),l=e.buildMonomial(u,s);r=r.addOrSubtract(l),n=n.addOrSubtract(f)}return[r,n]},u.prototype.toString=function(){for(var t="",e=this.getDegree();0<=e;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):0<t.length&&(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},u);function u(t,e){if(0===e.length)throw new i.default;this.field=t;var r=e.length;if(1<r&&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),o.default.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getRawBytes=function(){return this.rawBytes},o.prototype.getNumBits=function(){return this.numBits},o.prototype.setNumBits=function(t){this.numBits=t},o.prototype.getText=function(){return this.text},o.prototype.getByteSegments=function(){return this.byteSegments},o.prototype.getECLevel=function(){return this.ecLevel},o.prototype.getErrorsCorrected=function(){return this.errorsCorrected},o.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},o.prototype.getErasures=function(){return this.erasures},o.prototype.setErasures=function(t){this.erasures=t},o.prototype.getOther=function(){return this.other},o.prototype.setOther=function(t){this.other=t},o.prototype.hasStructuredAppend=function(){return 0<=this.structuredAppendParity&&0<=this.structuredAppendSequenceNumber},o.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},o.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},o);function o(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}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,i=r(32),a=r(1);(o=n=e.ErrorCorrectionLevelValues||(e.ErrorCorrectionLevelValues={}))[o.L=0]="L",o[o.M=1]="M",o[o.Q=2]="Q",o[o.H=3]="H";var u=(s.prototype.getValue=function(){return this.value},s.prototype.getBits=function(){return this.bits},s.fromString=function(t){switch(t){case"L":return s.L;case"M":return s.M;case"Q":return s.Q;case"H":return s.H;default:throw new i.default(t+"not available")}},s.prototype.toString=function(){return this.stringValue},s.prototype.equals=function(t){if(!(t instanceof s))return!1;var e=t;return this.value===e.value},s.forBits=function(t){if(t<0||t>=s.FOR_BITS.size)throw new a.default;return s.FOR_BITS.get(t)},s.FOR_BITS=new Map,s.FOR_VALUE=new Map,s.L=new s(n.L,"L",1),s.M=new s(n.M,"M",0),s.Q=new s(n.Q,"Q",3),s.H=new s(n.H,"H",2),s);function s(t,e,r){this.value=t,this.stringValue=e,this.bits=r,s.FOR_BITS.set(r,this),s.FOR_VALUE.set(t,this)}e.default=u},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.ERROR_CORRECTION=0]="ERROR_CORRECTION",o[o.CHARACTER_SET=1]="CHARACTER_SET",o[o.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",o[o.MIN_SIZE=3]="MIN_SIZE",o[o.MAX_SIZE=4]="MAX_SIZE",o[o.MARGIN=5]="MARGIN",o[o.PDF417_COMPACT=6]="PDF417_COMPACT",o[o.PDF417_COMPACTION=7]="PDF417_COMPACTION",o[o.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",o[o.AZTEC_LAYERS=9]="AZTEC_LAYERS",o[o.QR_VERSION=10]="QR_VERSION",e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(87),u=(o(s,i=a.default),s.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},s.prototype.encodeCompressedGtinWithoutAI=function(t,e,r){for(var n=0;n<4;++n){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(e+10*n,10);o/100==0&&t.append("0"),o/10==0&&t.append("0"),t.append(o)}s.appendCheckDigit(t,r)},s.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)},s.GTIN_SIZE=40,s);function s(t){return i.call(this,t)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(3),u=r(58),s=r(60),f=r(61),l=r(8),d=r(65),c=r(97),h=r(0),p=r(13),_=(o(g,i=p.default),g.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(t){}throw new h.default},g.prototype.reset=function(){this.readers.forEach(function(t){return t.reset()})},g);function g(t){var e=i.call(this)||this;e.readers=[];var r=t?t.get(l.default.POSSIBLE_FORMATS):null,n=t&&void 0!==t.get(l.default.ASSUME_CODE_39_CHECK_DIGIT);return r&&((r.includes(a.default.EAN_13)||r.includes(a.default.EAN_8))&&e.readers.push(new c.default(t)),r.includes(a.default.CODE_39)&&e.readers.push(new u.default(n)),r.includes(a.default.CODE_128)&&e.readers.push(new s.default),r.includes(a.default.ITF)&&e.readers.push(new d.default),r.includes(a.default.RSS_14)&&e.readers.push(new f.default)),0===e.readers.length&&(e.readers.push(new u.default),e.readers.push(new c.default(t)),e.readers.push(new s.default),e.readers.push(new d.default),e.readers.push(new f.default)),e}e.default=_},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getValue=function(){return this.value},o.prototype.getChecksumPortion=function(){return this.checksumPortion},o.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},o.prototype.equals=function(t){if(!(t instanceof o))return!1;var e=t;return this.value===e.value&&this.checksumPortion===e.checksumPortion},o.prototype.hashCode=function(){return this.value^this.checksumPortion},o);function o(t,e){this.value=t,this.checksumPortion=e}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(103),o=r(9),i=r(3),a=r(8),u=r(14),s=r(12),f=r(108),l=r(7),d=r(0),c=(h.prototype.decode=function(t,e){var r,n;if(void 0===e&&(e=null),null!=e&&e.has(a.default.PURE_BARCODE)){var s=h.extractPureBits(t.getBlackMatrix());r=this.decoder.decode(s),n=h.NO_POINTS}else{var d=new f.default(t.getBlackMatrix()).detect();r=this.decoder.decode(d.getBits()),n=d.getPoints()}var c=r.getRawBytes(),p=new o.default(r.getText(),c,8*c.length,n,i.default.DATA_MATRIX,l.default.currentTimeMillis()),_=r.getByteSegments();null!=_&&p.putMetadata(u.default.BYTE_SEGMENTS,_);var g=r.getECLevel();return null!=g&&p.putMetadata(u.default.ERROR_CORRECTION_LEVEL,g),p},h.prototype.reset=function(){},h.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new d.default;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],u=(r[0]-a+1)/n,f=(i-o+1)/n;if(u<=0||f<=0)throw new d.default;var l=n/2;o+=l,a+=l;for(var c=new s.default(u,f),h=0;h<f;h++)for(var p=o+h*n,_=0;_<u;_++)t.get(a+_*n,p)&&c.set(_,h);return c},h.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 d.default;var i=n-t[0];if(0==i)throw new d.default;return i},h.NO_POINTS=[],h);function h(){this.decoder=new n.default}e.default=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(25),o=r(27),i=r(69),a=r(18),u=(s.prototype.decode=function(t,e){for(var r=this.field,a=new o.default(r,t),u=new Int32Array(e),s=!0,f=0;f<e;f++){var l=a.evaluateAt(r.exp(f+r.getGeneratorBase()));0!==(u[u.length-1-f]=l)&&(s=!1)}if(!s){var d=new o.default(r,u),c=this.runEuclideanAlgorithm(r.buildMonomial(e,1),d,e),h=c[0],p=c[1],_=this.findErrorLocations(h),g=this.findErrorMagnitudes(p,_);for(f=0;f<_.length;f++){var v=t.length-1-r.log(_[f]);if(v<0)throw new i.default("Bad error location");t[v]=n.default.addOrSubtract(t[v],g[f])}}},s.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,u=t,s=e,f=o.getZero(),l=o.getOne();s.getDegree()>=(r/2|0);){var d=u,c=f;if(f=l,(u=s).isZero())throw new i.default("r_{i-1} was zero");s=d;for(var h=o.getZero(),p=u.getCoefficient(u.getDegree()),_=o.inverse(p);s.getDegree()>=u.getDegree()&&!s.isZero();){var g=s.getDegree()-u.getDegree(),v=o.multiply(s.getCoefficient(s.getDegree()),_);h=h.addOrSubtract(o.buildMonomial(g,v)),s=s.addOrSubtract(u.multiplyByMonomial(g,v))}if(l=h.multiply(f).addOrSubtract(c),s.getDegree()>=u.getDegree())throw new a.default("Division algorithm failed to reduce polynomial?")}var w=l.getCoefficient(0);if(0===w)throw new i.default("sigmaTilde(0) was zero");var y=o.inverse(w);return[l.multiplyScalar(y),s.multiplyScalar(y)]},s.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,a=1;a<o.getSize()&&n<e;a++)0===t.evaluateAt(a)&&(r[n]=o.inverse(a),n++);if(n!==e)throw new i.default("Error locator degree does not match number of roots");return r},s.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]),u=1,s=0;s<r;s++)if(i!==s){var f=o.multiply(e[s],a),l=0==(1&f)?1|f:-2&f;u=o.multiply(u,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(u)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},s);function s(t){this.field=t}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=(i.prototype.getBitOffset=function(){return this.bitOffset},i.prototype.getByteOffset=function(){return this.byteOffset},i.prototype.readBits=function(t){if(t<1||32<t||t>this.available())throw new n.default(""+t);var e=0,r=this.bitOffset,o=this.byteOffset,i=this.bytes;if(0<r){var a=8-r,u=t<a?t:a,s=255>>8-u<<(f=a-u);e=(i[o]&s)>>f,t-=u,8===(r+=u)&&(r=0,o++)}if(0<t){for(;8<=t;)e=e<<8|255&i[o],o++,t-=8;var f;0<t&&(s=255>>(f=8-t)<<f,e=e<<t|(i[o]&s)>>f,r+=t)}return this.bitOffset=r,this.byteOffset=o,e},i.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},i);function i(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8),o=r(22),i=r(21),a=(u.guessEncoding=function(t,e){if(null!=e&&void 0!==e.get(n.default.CHARACTER_SET))return e.get(n.default.CHARACTER_SET).toString();for(var r=t.length,o=!0,i=!0,a=!0,s=0,f=0,l=0,d=0,c=0,h=0,p=0,_=0,g=0,v=0,w=0,y=3<t.length&&239===t[0]&&187===t[1]&&191===t[2],A=0;A<r&&(o||i||a);A++){var E=255&t[A];a&&(0<s?0==(128&E)?a=!1:s--:0!=(128&E)&&(0==(64&E)?a=!1:(s++,0==(32&E)?f++:(s++,0==(16&E)?l++:(s++,0==(8&E)?d++:a=!1))))),o&&(127<E&&E<160?o=!1:159<E&&(E<192||215==E||247==E)&&w++),i&&(0<c?E<64||127==E||252<E?i=!1:c--:128==E||160==E||239<E?i=!1:160<E&&E<224?(h++,_=0,g<++p&&(g=p)):127<E?(c++,p=0,v<++_&&(v=_)):_=p=0)}return a&&0<s&&(a=!1),i&&0<c&&(i=!1),a&&(y||0<f+l+d)?u.UTF8:i&&(u.ASSUME_SHIFT_JIS||3<=g||3<=v)?u.SHIFT_JIS:o&&i?2===g&&2===h||r<=10*w?u.SHIFT_JIS:u.ISO88591:o?u.ISO88591:i?u.SHIFT_JIS:a?u.UTF8:u.PLATFORM_DEFAULT_ENCODING},u.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,u){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var s,f=a?parseInt(a.substr(1)):void 0;switch(u){case"s":s=e[n];break;case"c":s=e[n][0];break;case"f":s=parseFloat(e[n]).toFixed(t);break;case"p":s=parseFloat(e[n]).toPrecision(t);break;case"e":s=parseFloat(e[n]).toExponential(t);break;case"x":s=parseInt(e[n]).toString(f||16);break;case"d":s=parseFloat(parseInt(e[n],f||10).toPrecision(t)).toFixed(0)}s="object"==typeof s?JSON.stringify(s):(+s).toString(f);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";s.length<l;)s=void 0!==r?s+d:d+s;return s}})},u.getBytes=function(t,e){return i.default.encode(t,e)},u.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},u.SHIFT_JIS=o.default.SJIS.getName(),u.GB2312="GB2312",u.ISO88591=o.default.ISO8859_1.getName(),u.EUC_JP="EUC_JP",u.UTF8=o.default.UTF8.getName(),u.PLATFORM_DEFAULT_ENCODING=u.UTF8,u.ASSUME_SHIFT_JIS=!1,u);function u(){}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getBits=function(){return this.bits},o.prototype.getPoints=function(){return this.points},o);function o(t,e){this.bits=t,this.points=e}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(70),o=(i.setGridSampler=function(t){i.gridSampler=t},i.getInstance=function(){return i.gridSampler},i.gridSampler=new n.default,i);function i(){}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.quadrilateralToQuadrilateral=function(t,e,r,n,i,a,u,s,f,l,d,c,h,p,_,g){var v=o.quadrilateralToSquare(t,e,r,n,i,a,u,s);return o.squareToQuadrilateral(f,l,d,c,h,p,_,g).times(v)},o.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,u=this.a23,s=this.a31,f=this.a32,l=this.a33,d=0;d<e;d+=2){var c=t[d],h=t[d+1],p=o*c+u*h+l;t[d]=(r*c+i*h+s)/p,t[d+1]=(n*c+a*h+f)/p}},o.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,u=this.a23,s=this.a31,f=this.a32,l=this.a33,d=t.length,c=0;c<d;c++){var h=t[c],p=e[c],_=o*h+u*p+l;t[c]=(r*h+i*p+s)/_,e[c]=(n*h+a*p+f)/_}},o.squareToQuadrilateral=function(t,e,r,n,i,a,u,s){var f=t-r+i-u,l=e-n+a-s;if(0==f&&0==l)return new o(r-t,i-r,t,n-e,a-n,e,0,0,1);var d=r-i,c=u-i,h=n-a,p=s-a,_=d*p-c*h,g=(f*p-c*l)/_,v=(d*l-f*h)/_;return new o(r-t+g*r,u-t+v*u,t,n-e+g*n,s-e+v*s,e,g,v,1)},o.quadrilateralToSquare=function(t,e,r,n,i,a,u,s){return o.squareToQuadrilateral(t,e,r,n,i,a,u,s).buildAdjoint()},o.prototype.buildAdjoint=function(){return new o(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)},o.prototype.times=function(t){return new o(this.a11*t.a11+this.a21*t.a12+this.a31*t.a13,this.a11*t.a21+this.a21*t.a22+this.a31*t.a23,this.a11*t.a31+this.a21*t.a32+this.a31*t.a33,this.a12*t.a11+this.a22*t.a12+this.a32*t.a13,this.a12*t.a21+this.a22*t.a22+this.a32*t.a23,this.a12*t.a31+this.a22*t.a32+this.a32*t.a33,this.a13*t.a11+this.a23*t.a12+this.a33*t.a13,this.a13*t.a21+this.a23*t.a22+this.a33*t.a23,this.a13*t.a31+this.a23*t.a32+this.a33*t.a33)},o);function o(t,e,r,n,o,i,a,u,s){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=u,this.a33=s}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),o=r(8),i=r(9),a=r(14),u=r(12),s=r(110),f=r(75),l=r(117),d=r(0),c=(h.prototype.getDecoder=function(){return this.decoder},h.prototype.decode=function(t,e){var r,u;if(null!=e&&void 0!==e.get(o.default.PURE_BARCODE)){var s=h.extractPureBits(t.getBlackMatrix());r=this.decoder.decodeBitMatrix(s,e),u=h.NO_POINTS}else{var d=new l.default(t.getBlackMatrix()).detect(e);r=this.decoder.decodeBitMatrix(d.getBits(),e),u=d.getPoints()}r.getOther()instanceof f.default&&r.getOther().applyMirroredCorrection(u);var c=new i.default(r.getText(),r.getRawBytes(),void 0,u,n.default.QR_CODE,void 0),p=r.getByteSegments();null!==p&&c.putMetadata(a.default.BYTE_SEGMENTS,p);var _=r.getECLevel();return null!==_&&c.putMetadata(a.default.ERROR_CORRECTION_LEVEL,_),r.hasStructuredAppend()&&(c.putMetadata(a.default.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),c.putMetadata(a.default.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),c},h.prototype.reset=function(){},h.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new d.default;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(s<=a||i<=o)throw new d.default;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new d.default;var f=Math.round((s-a+1)/n),l=Math.round((i-o+1)/n);if(f<=0||l<=0)throw new d.default;if(l!==f)throw new d.default;var c=Math.floor(n/2);o+=c;var h=(a+=c)+Math.floor((f-1)*n)-s;if(0<h){if(c<h)throw new d.default;a-=h}var p=o+Math.floor((l-1)*n)-i;if(0<p){if(c<p)throw new d.default;o-=p}for(var _=new u.default(f,l),g=0;g<l;g++)for(var v=o+Math.floor(g*n),w=0;w<f;w++)t.get(a+Math.floor(w*n),v)&&_.set(w,g);return _},h.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,u=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++u)break;a=!a}o++,i++}if(o===n||i===r)throw new d.default;return(o-t[0])/7},h.NO_POINTS=new Array,h);function h(){this.decoder=new s.default}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(12),i=r(74),a=r(112),u=r(113),s=r(2),f=r(1),l=(d.prototype.getVersionNumber=function(){return this.versionNumber},d.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},d.prototype.getTotalCodewords=function(){return this.totalCodewords},d.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},d.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},d.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new s.default;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new s.default}},d.getVersionForNumber=function(t){if(t<1||40<t)throw new f.default;return d.VERSIONS[t-1]},d.decodeVersionInformation=function(t){for(var e=Number.MAX_SAFE_INTEGER,r=0,n=0;n<d.VERSION_DECODE_INFO.length;n++){var o=d.VERSION_DECODE_INFO[n];if(o===t)return d.getVersionForNumber(n+7);var a=i.default.numBitsDiffering(t,o);a<e&&(r=n+7,e=a)}return e<=3?d.getVersionForNumber(r):null},d.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new o.default(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 i=this.alignmentPatternCenters[n]-2,a=0;a<r;a++)0===n&&(0===a||a===r-1)||n===r-1&&0===a||e.setRegion(this.alignmentPatternCenters[a]-2,i,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),6<this.versionNumber&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},d.prototype.toString=function(){return""+this.versionNumber},d.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]),d.VERSIONS=[new d(1,new Int32Array(0),new a.default(7,new u.default(1,19)),new a.default(10,new u.default(1,16)),new a.default(13,new u.default(1,13)),new a.default(17,new u.default(1,9))),new d(2,Int32Array.from([6,18]),new a.default(10,new u.default(1,34)),new a.default(16,new u.default(1,28)),new a.default(22,new u.default(1,22)),new a.default(28,new u.default(1,16))),new d(3,Int32Array.from([6,22]),new a.default(15,new u.default(1,55)),new a.default(26,new u.default(1,44)),new a.default(18,new u.default(2,17)),new a.default(22,new u.default(2,13))),new d(4,Int32Array.from([6,26]),new a.default(20,new u.default(1,80)),new a.default(18,new u.default(2,32)),new a.default(26,new u.default(2,24)),new a.default(16,new u.default(4,9))),new d(5,Int32Array.from([6,30]),new a.default(26,new u.default(1,108)),new a.default(24,new u.default(2,43)),new a.default(18,new u.default(2,15),new u.default(2,16)),new a.default(22,new u.default(2,11),new u.default(2,12))),new d(6,Int32Array.from([6,34]),new a.default(18,new u.default(2,68)),new a.default(16,new u.default(4,27)),new a.default(24,new u.default(4,19)),new a.default(28,new u.default(4,15))),new d(7,Int32Array.from([6,22,38]),new a.default(20,new u.default(2,78)),new a.default(18,new u.default(4,31)),new a.default(18,new u.default(2,14),new u.default(4,15)),new a.default(26,new u.default(4,13),new u.default(1,14))),new d(8,Int32Array.from([6,24,42]),new a.default(24,new u.default(2,97)),new a.default(22,new u.default(2,38),new u.default(2,39)),new a.default(22,new u.default(4,18),new u.default(2,19)),new a.default(26,new u.default(4,14),new u.default(2,15))),new d(9,Int32Array.from([6,26,46]),new a.default(30,new u.default(2,116)),new a.default(22,new u.default(3,36),new u.default(2,37)),new a.default(20,new u.default(4,16),new u.default(4,17)),new a.default(24,new u.default(4,12),new u.default(4,13))),new d(10,Int32Array.from([6,28,50]),new a.default(18,new u.default(2,68),new u.default(2,69)),new a.default(26,new u.default(4,43),new u.default(1,44)),new a.default(24,new u.default(6,19),new u.default(2,20)),new a.default(28,new u.default(6,15),new u.default(2,16))),new d(11,Int32Array.from([6,30,54]),new a.default(20,new u.default(4,81)),new a.default(30,new u.default(1,50),new u.default(4,51)),new a.default(28,new u.default(4,22),new u.default(4,23)),new a.default(24,new u.default(3,12),new u.default(8,13))),new d(12,Int32Array.from([6,32,58]),new a.default(24,new u.default(2,92),new u.default(2,93)),new a.default(22,new u.default(6,36),new u.default(2,37)),new a.default(26,new u.default(4,20),new u.default(6,21)),new a.default(28,new u.default(7,14),new u.default(4,15))),new d(13,Int32Array.from([6,34,62]),new a.default(26,new u.default(4,107)),new a.default(22,new u.default(8,37),new u.default(1,38)),new a.default(24,new u.default(8,20),new u.default(4,21)),new a.default(22,new u.default(12,11),new u.default(4,12))),new d(14,Int32Array.from([6,26,46,66]),new a.default(30,new u.default(3,115),new u.default(1,116)),new a.default(24,new u.default(4,40),new u.default(5,41)),new a.default(20,new u.default(11,16),new u.default(5,17)),new a.default(24,new u.default(11,12),new u.default(5,13))),new d(15,Int32Array.from([6,26,48,70]),new a.default(22,new u.default(5,87),new u.default(1,88)),new a.default(24,new u.default(5,41),new u.default(5,42)),new a.default(30,new u.default(5,24),new u.default(7,25)),new a.default(24,new u.default(11,12),new u.default(7,13))),new d(16,Int32Array.from([6,26,50,74]),new a.default(24,new u.default(5,98),new u.default(1,99)),new a.default(28,new u.default(7,45),new u.default(3,46)),new a.default(24,new u.default(15,19),new u.default(2,20)),new a.default(30,new u.default(3,15),new u.default(13,16))),new d(17,Int32Array.from([6,30,54,78]),new a.default(28,new u.default(1,107),new u.default(5,108)),new a.default(28,new u.default(10,46),new u.default(1,47)),new a.default(28,new u.default(1,22),new u.default(15,23)),new a.default(28,new u.default(2,14),new u.default(17,15))),new d(18,Int32Array.from([6,30,56,82]),new a.default(30,new u.default(5,120),new u.default(1,121)),new a.default(26,new u.default(9,43),new u.default(4,44)),new a.default(28,new u.default(17,22),new u.default(1,23)),new a.default(28,new u.default(2,14),new u.default(19,15))),new d(19,Int32Array.from([6,30,58,86]),new a.default(28,new u.default(3,113),new u.default(4,114)),new a.default(26,new u.default(3,44),new u.default(11,45)),new a.default(26,new u.default(17,21),new u.default(4,22)),new a.default(26,new u.default(9,13),new u.default(16,14))),new d(20,Int32Array.from([6,34,62,90]),new a.default(28,new u.default(3,107),new u.default(5,108)),new a.default(26,new u.default(3,41),new u.default(13,42)),new a.default(30,new u.default(15,24),new u.default(5,25)),new a.default(28,new u.default(15,15),new u.default(10,16))),new d(21,Int32Array.from([6,28,50,72,94]),new a.default(28,new u.default(4,116),new u.default(4,117)),new a.default(26,new u.default(17,42)),new a.default(28,new u.default(17,22),new u.default(6,23)),new a.default(30,new u.default(19,16),new u.default(6,17))),new d(22,Int32Array.from([6,26,50,74,98]),new a.default(28,new u.default(2,111),new u.default(7,112)),new a.default(28,new u.default(17,46)),new a.default(30,new u.default(7,24),new u.default(16,25)),new a.default(24,new u.default(34,13))),new d(23,Int32Array.from([6,30,54,78,102]),new a.default(30,new u.default(4,121),new u.default(5,122)),new a.default(28,new u.default(4,47),new u.default(14,48)),new a.default(30,new u.default(11,24),new u.default(14,25)),new a.default(30,new u.default(16,15),new u.default(14,16))),new d(24,Int32Array.from([6,28,54,80,106]),new a.default(30,new u.default(6,117),new u.default(4,118)),new a.default(28,new u.default(6,45),new u.default(14,46)),new a.default(30,new u.default(11,24),new u.default(16,25)),new a.default(30,new u.default(30,16),new u.default(2,17))),new d(25,Int32Array.from([6,32,58,84,110]),new a.default(26,new u.default(8,106),new u.default(4,107)),new a.default(28,new u.default(8,47),new u.default(13,48)),new a.default(30,new u.default(7,24),new u.default(22,25)),new a.default(30,new u.default(22,15),new u.default(13,16))),new d(26,Int32Array.from([6,30,58,86,114]),new a.default(28,new u.default(10,114),new u.default(2,115)),new a.default(28,new u.default(19,46),new u.default(4,47)),new a.default(28,new u.default(28,22),new u.default(6,23)),new a.default(30,new u.default(33,16),new u.default(4,17))),new d(27,Int32Array.from([6,34,62,90,118]),new a.default(30,new u.default(8,122),new u.default(4,123)),new a.default(28,new u.default(22,45),new u.default(3,46)),new a.default(30,new u.default(8,23),new u.default(26,24)),new a.default(30,new u.default(12,15),new u.default(28,16))),new d(28,Int32Array.from([6,26,50,74,98,122]),new a.default(30,new u.default(3,117),new u.default(10,118)),new a.default(28,new u.default(3,45),new u.default(23,46)),new a.default(30,new u.default(4,24),new u.default(31,25)),new a.default(30,new u.default(11,15),new u.default(31,16))),new d(29,Int32Array.from([6,30,54,78,102,126]),new a.default(30,new u.default(7,116),new u.default(7,117)),new a.default(28,new u.default(21,45),new u.default(7,46)),new a.default(30,new u.default(1,23),new u.default(37,24)),new a.default(30,new u.default(19,15),new u.default(26,16))),new d(30,Int32Array.from([6,26,52,78,104,130]),new a.default(30,new u.default(5,115),new u.default(10,116)),new a.default(28,new u.default(19,47),new u.default(10,48)),new a.default(30,new u.default(15,24),new u.default(25,25)),new a.default(30,new u.default(23,15),new u.default(25,16))),new d(31,Int32Array.from([6,30,56,82,108,134]),new a.default(30,new u.default(13,115),new u.default(3,116)),new a.default(28,new u.default(2,46),new u.default(29,47)),new a.default(30,new u.default(42,24),new u.default(1,25)),new a.default(30,new u.default(23,15),new u.default(28,16))),new d(32,Int32Array.from([6,34,60,86,112,138]),new a.default(30,new u.default(17,115)),new a.default(28,new u.default(10,46),new u.default(23,47)),new a.default(30,new u.default(10,24),new u.default(35,25)),new a.default(30,new u.default(19,15),new u.default(35,16))),new d(33,Int32Array.from([6,30,58,86,114,142]),new a.default(30,new u.default(17,115),new u.default(1,116)),new a.default(28,new u.default(14,46),new u.default(21,47)),new a.default(30,new u.default(29,24),new u.default(19,25)),new a.default(30,new u.default(11,15),new u.default(46,16))),new d(34,Int32Array.from([6,34,62,90,118,146]),new a.default(30,new u.default(13,115),new u.default(6,116)),new a.default(28,new u.default(14,46),new u.default(23,47)),new a.default(30,new u.default(44,24),new u.default(7,25)),new a.default(30,new u.default(59,16),new u.default(1,17))),new d(35,Int32Array.from([6,30,54,78,102,126,150]),new a.default(30,new u.default(12,121),new u.default(7,122)),new a.default(28,new u.default(12,47),new u.default(26,48)),new a.default(30,new u.default(39,24),new u.default(14,25)),new a.default(30,new u.default(22,15),new u.default(41,16))),new d(36,Int32Array.from([6,24,50,76,102,128,154]),new a.default(30,new u.default(6,121),new u.default(14,122)),new a.default(28,new u.default(6,47),new u.default(34,48)),new a.default(30,new u.default(46,24),new u.default(10,25)),new a.default(30,new u.default(2,15),new u.default(64,16))),new d(37,Int32Array.from([6,28,54,80,106,132,158]),new a.default(30,new u.default(17,122),new u.default(4,123)),new a.default(28,new u.default(29,46),new u.default(14,47)),new a.default(30,new u.default(49,24),new u.default(10,25)),new a.default(30,new u.default(24,15),new u.default(46,16))),new d(38,Int32Array.from([6,32,58,84,110,136,162]),new a.default(30,new u.default(4,122),new u.default(18,123)),new a.default(28,new u.default(13,46),new u.default(32,47)),new a.default(30,new u.default(48,24),new u.default(14,25)),new a.default(30,new u.default(42,15),new u.default(32,16))),new d(39,Int32Array.from([6,26,54,82,110,138,166]),new a.default(30,new u.default(20,117),new u.default(4,118)),new a.default(28,new u.default(40,47),new u.default(7,48)),new a.default(30,new u.default(43,24),new u.default(22,25)),new a.default(30,new u.default(10,15),new u.default(67,16))),new d(40,Int32Array.from([6,30,58,86,114,142,170]),new a.default(30,new u.default(19,118),new u.default(6,119)),new a.default(28,new u.default(18,47),new u.default(31,48)),new a.default(30,new u.default(34,24),new u.default(34,25)),new a.default(30,new u.default(20,15),new u.default(61,16)))],d);function d(t,e){for(var r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];this.versionNumber=t,this.alignmentPatternCenters=e;var u=0,s=(this.ecBlocks=i)[0].getECCodewordsPerBlock(),f=i[0].getECBlocks();try{for(var l=n(f),d=l.next();!d.done;d=l.next()){var c=d.value;u+=c.getCount()*(c.getDataCodewords()+s)}}catch(t){r={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}this.totalCodewords=u}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.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,u){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var s,f=a?parseInt(a.substr(1)):void 0;switch(u){case"s":s=e[r];break;case"c":s=e[r][0];break;case"f":s=parseFloat(e[r]).toFixed(t);break;case"p":s=parseFloat(e[r]).toPrecision(t);break;case"e":s=parseFloat(e[r]).toExponential(t);break;case"x":s=parseInt(e[r]).toString(f||16);break;case"d":s=parseFloat(parseInt(e[r],f||10).toPrecision(t)).toFixed(0)}s="object"==typeof s?JSON.stringify(s):(+s).toString(f);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";s.length<l;)s=void 0!==n?s+d:d+s;return s}})},o.prototype.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.buffer+=o.form(t,e)},o.prototype.toString=function(){return this.buffer},o);function o(){this.buffer=""}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(30),i=r(15),a=r(22),u=r(25),s=r(83),f=r(76),l=r(46),d=r(84),c=r(145),h=r(49),p=r(146),_=r(21),g=r(147),v=r(50),w=(y.calculateMaskPenalty=function(t){return d.default.applyMaskPenaltyRule1(t)+d.default.applyMaskPenaltyRule2(t)+d.default.applyMaskPenaltyRule3(t)+d.default.applyMaskPenaltyRule4(t)},y.encode=function(t,e,r){void 0===r&&(r=null);var n=y.DEFAULT_BYTE_MODE_ENCODING,u=null!==r&&void 0!==r.get(o.default.CHARACTER_SET);u&&(n=r.get(o.default.CHARACTER_SET).toString());var s=this.chooseMode(t,n),d=new i.default;if(s===f.default.BYTE&&(u||y.DEFAULT_BYTE_MODE_ENCODING!==n)){var _=a.default.getCharacterSetECIByName(n);void 0!==_&&this.appendECI(_,d)}this.appendModeInfo(s,d);var g,w=new i.default;if(this.appendBytes(t,s,w,n),null!==r&&void 0!==r.get(o.default.QR_VERSION)){var A=Number.parseInt(r.get(o.default.QR_VERSION).toString(),10);g=l.default.getVersionForNumber(A);var E=this.calculateBitsNeeded(s,d,w,g);if(!this.willFit(E,g,e))throw new v.default("Data too big for requested version")}else g=this.recommendVersion(e,s,d,w);var C=new i.default;C.appendBitArray(d);var m=s===f.default.BYTE?w.getSizeInBytes():t.length;this.appendLengthInfo(m,g,s,C),C.appendBitArray(w);var I=g.getECBlocksForLevel(e),S=g.getTotalCodewords()-I.getTotalECCodewords();this.terminateBits(S,C);var O=this.interleaveWithECBytes(C,g.getTotalCodewords(),S,I.getNumBlocks()),T=new h.default;T.setECLevel(e),T.setMode(s),T.setVersion(g);var R=g.getDimensionForVersion(),b=new c.default(R,R),N=this.chooseMaskPattern(O,e,g,b);return T.setMaskPattern(N),p.default.buildMatrix(O,e,g,N,b),T.setMatrix(b),T},y.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,l.default.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},y.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},y.getAlphanumericCode=function(t){return t<y.ALPHANUMERIC_TABLE.length?y.ALPHANUMERIC_TABLE[t]:-1},y.chooseMode=function(t,e){if(void 0===e&&(e=null),a.default.SJIS.getName()===e&&this.isOnlyDoubleByteKanji(t))return f.default.KANJI;for(var r=!1,n=!1,o=0,i=t.length;o<i;++o){var u=t.charAt(o);if(y.isDigit(u))r=!0;else{if(-1===this.getAlphanumericCode(u.charCodeAt(0)))return f.default.BYTE;n=!0}}return n?f.default.ALPHANUMERIC:r?f.default.NUMERIC:f.default.BYTE},y.isOnlyDoubleByteKanji=function(t){var e;try{e=_.default.encode(t,a.default.SJIS)}catch(t){return!1}var r=e.length;if(r%2!=0)return!1;for(var n=0;n<r;n+=2){var o=255&e[n];if((o<129||159<o)&&(o<224||235<o))return!1}return!0},y.chooseMaskPattern=function(t,e,r,n){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<h.default.NUM_MASK_PATTERNS;a++){p.default.buildMatrix(t,e,r,a,n);var u=this.calculateMaskPenalty(n);u<o&&(o=u,i=a)}return i},y.chooseVersion=function(t,e){for(var r=1;r<=40;r++){var n=l.default.getVersionForNumber(r);if(y.willFit(t,n,e))return n}throw new v.default("Data too big")},y.willFit=function(t,e,r){return(t+7)/8<=e.getTotalCodewords()-e.getECBlocksForLevel(r).getTotalECCodewords()},y.terminateBits=function(t,e){var r=8*t;if(e.getSize()>r)throw new v.default("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()<r;++n)e.appendBit(!1);var o=7&e.getSize();if(0<o)for(n=o;n<8;n++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(n=0;n<i;++n)e.appendBits(0==(1&n)?236:17,8);if(e.getSize()!==r)throw new v.default("Bits size does not equal capacity")},y.getNumDataBytesAndNumECBytesForBlockID=function(t,e,r,n,o,i){if(r<=n)throw new v.default("Block ID too large");var a=t%r,u=r-a,s=Math.floor(t/r),f=s+1,l=Math.floor(e/r),d=l+1,c=s-l,h=f-d;if(c!=h)throw new v.default("EC bytes mismatch");if(r!==u+a)throw new v.default("RS blocks mismatch");if(t!==(l+c)*u+(d+h)*a)throw new v.default("Total bytes mismatch");n<u?(o[0]=l,i[0]=c):(o[0]=d,i[0]=h)},y.interleaveWithECBytes=function(t,e,r,o){var a,u,s,f;if(t.getSizeInBytes()!==r)throw new v.default("Number of bits and data bytes does not match");for(var l=0,d=0,c=0,h=new Array,p=0;p<o;++p){var _=new Int32Array(1),w=new Int32Array(1);y.getNumDataBytesAndNumECBytesForBlockID(e,r,o,p,_,w);var A=_[0],E=new Uint8Array(A);t.toBytes(8*l,E,0,A);var C=y.generateECBytes(E,w[0]);h.push(new g.default(E,C)),d=Math.max(d,A),c=Math.max(c,C.length),l+=_[0]}if(r!==l)throw new v.default("Data bytes does not match offset");var m=new i.default;for(p=0;p<d;++p)try{for(var I=n(h),S=I.next();!S.done;S=I.next())p<(E=S.value.getDataBytes()).length&&m.appendBits(E[p],8)}catch(t){a={error:t}}finally{try{S&&!S.done&&(u=I.return)&&u.call(I)}finally{if(a)throw a.error}}for(p=0;p<c;++p)try{for(var O=n(h),T=O.next();!T.done;T=O.next())p<(C=T.value.getErrorCorrectionBytes()).length&&m.appendBits(C[p],8)}catch(t){s={error:t}}finally{try{T&&!T.done&&(f=O.return)&&f.call(O)}finally{if(s)throw s.error}}if(e!==m.getSizeInBytes())throw new v.default("Interleaving error: "+e+" and "+m.getSizeInBytes()+" differ.");return m},y.generateECBytes=function(t,e){for(var r=t.length,n=new Int32Array(r+e),o=0;o<r;o++)n[o]=255&t[o];new s.default(u.default.QR_CODE_FIELD_256).encode(n,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=n[r+o];return i},y.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},y.appendLengthInfo=function(t,e,r,n){var o=r.getCharacterCountBits(e);if(1<<o<=t)throw new v.default(t+" is bigger than "+((1<<o)-1));n.appendBits(t,o)},y.appendBytes=function(t,e,r,n){switch(e){case f.default.NUMERIC:y.appendNumericBytes(t,r);break;case f.default.ALPHANUMERIC:y.appendAlphanumericBytes(t,r);break;case f.default.BYTE:y.append8BitBytes(t,r,n);break;case f.default.KANJI:y.appendKanjiBytes(t,r);break;default:throw new v.default("Invalid mode: "+e)}},y.getDigit=function(t){return t.charCodeAt(0)-48},y.isDigit=function(t){var e=y.getDigit(t);return 0<=e&&e<=9},y.appendNumericBytes=function(t,e){for(var r=t.length,n=0;n<r;){var o=y.getDigit(t.charAt(n));if(n+2<r){var i=y.getDigit(t.charAt(n+1)),a=y.getDigit(t.charAt(n+2));e.appendBits(100*o+10*i+a,10),n+=3}else n+1<r?(i=y.getDigit(t.charAt(n+1)),e.appendBits(10*o+i,7),n+=2):(e.appendBits(o,4),n++)}},y.appendAlphanumericBytes=function(t,e){for(var r=t.length,n=0;n<r;){var o=y.getAlphanumericCode(t.charCodeAt(n));if(-1===o)throw new v.default;if(n+1<r){var i=y.getAlphanumericCode(t.charCodeAt(n+1));if(-1===i)throw new v.default;e.appendBits(45*o+i,11),n+=2}else e.appendBits(o,6),n++}},y.append8BitBytes=function(t,e,r){var n;try{n=_.default.encode(t,r)}catch(t){throw new v.default(t)}for(var o=0,i=n.length;o!==i;o++){var a=n[o];e.appendBits(a,8)}},y.appendKanjiBytes=function(t,e){var r;try{r=_.default.encode(t,a.default.SJIS)}catch(t){throw new v.default(t)}for(var n=r.length,o=0;o<n;o+=2){var i=(255&r[o])<<8&4294967295|255&r[o+1],u=-1;if(33088<=i&&i<=40956?u=i-33088:57408<=i&&i<=60351&&(u=i-49472),-1===u)throw new v.default("Invalid byte sequence");var s=192*(u>>8)+(255&u);e.appendBits(s,13)}},y.appendECI=function(t,e){e.appendBits(f.default.ECI.getBits(),4),e.appendBits(t.getValue(),8)},y.ALPHANUMERIC_TABLE=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]),y.DEFAULT_BYTE_MODE_ENCODING=a.default.UTF8.getName(),y);function y(){}e.default=w},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),o=(i.prototype.getMode=function(){return this.mode},i.prototype.getECLevel=function(){return this.ecLevel},i.prototype.getVersion=function(){return this.version},i.prototype.getMaskPattern=function(){return this.maskPattern},i.prototype.getMatrix=function(){return this.matrix},i.prototype.toString=function(){var t=new n.default;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()},i.prototype.setMode=function(t){this.mode=t},i.prototype.setECLevel=function(t){this.ecLevel=t},i.prototype.setVersion=function(t){this.version=t},i.prototype.setMaskPattern=function(t){this.maskPattern=t},i.prototype.setMatrix=function(t){this.matrix=t},i.isValidMaskPattern=function(t){return 0<=t&&t<i.NUM_MASK_PATTERNS},i.NUM_MASK_PATTERNS=8,i);function i(){this.maskPattern=-1}e.default=o},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getNewPosition=function(){return this.newPosition},o);function o(t){this.newPosition=t}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=(i.prototype.getWidth=function(){return this.binarizer.getWidth()},i.prototype.getHeight=function(){return this.binarizer.getHeight()},i.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},i.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},i.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},i.prototype.crop=function(t,e,r,n){var o=this.binarizer.getLuminanceSource().crop(t,e,r,n);return new i(this.binarizer.createBinarizer(o))},i.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},i.prototype.rotateCounterClockwise=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new i(this.binarizer.createBinarizer(t))},i.prototype.rotateCounterClockwise45=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new i(this.binarizer.createBinarizer(t))},i.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},i);function i(t){if(null===(this.binarizer=t))throw new n.default("Binarizer must be non-null.")}e.default=o},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(54),u=r(12),s=(o(f,i=a.default),f.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var t=this.getLuminanceSource(),e=t.getWidth(),r=t.getHeight();if(f.MINIMUM_DIMENSION<=e&&f.MINIMUM_DIMENSION<=r){var n=t.getMatrix(),o=e>>f.BLOCK_SIZE_POWER;0!=(e&f.BLOCK_SIZE_MASK)&&o++;var a=r>>f.BLOCK_SIZE_POWER;0!=(r&f.BLOCK_SIZE_MASK)&&a++;var s=f.calculateBlackPoints(n,o,a,e,r),l=new u.default(e,r);f.calculateThresholdForBlock(n,o,a,e,r,s,l),this.matrix=l}else this.matrix=i.prototype.getBlackMatrix.call(this);return this.matrix},f.prototype.createBinarizer=function(t){return new f(t)},f.calculateThresholdForBlock=function(t,e,r,n,o,i,a){for(var u=o-f.BLOCK_SIZE,s=n-f.BLOCK_SIZE,l=0;l<r;l++){var d=l<<f.BLOCK_SIZE_POWER;u<d&&(d=u);for(var c=f.cap(l,2,r-3),h=0;h<e;h++){var p=h<<f.BLOCK_SIZE_POWER;s<p&&(p=s);for(var _=f.cap(h,2,e-3),g=0,v=-2;v<=2;v++){var w=i[c+v];g+=w[_-2]+w[_-1]+w[_]+w[_+1]+w[_+2]}f.thresholdBlock(t,p,d,g/25,n,a)}}},f.cap=function(t,e,r){return t<e?e:r<t?r:t},f.thresholdBlock=function(t,e,r,n,o,i){for(var a=0,u=r*o+e;a<f.BLOCK_SIZE;a++,u+=o)for(var s=0;s<f.BLOCK_SIZE;s++)(255&t[u+s])<=n&&i.set(e+s,r+a)},f.calculateBlackPoints=function(t,e,r,n,o){for(var i=o-f.BLOCK_SIZE,a=n-f.BLOCK_SIZE,u=new Array(r),s=0;s<r;s++){u[s]=new Int32Array(e);var l=s<<f.BLOCK_SIZE_POWER;i<l&&(l=i);for(var d=0;d<e;d++){var c=d<<f.BLOCK_SIZE_POWER;a<c&&(c=a);for(var h=0,p=255,_=0,g=0,v=l*n+c;g<f.BLOCK_SIZE;g++,v+=n){for(var w=0;w<f.BLOCK_SIZE;w++){var y=255&t[v+w];h+=y,y<p&&(p=y),_<y&&(_=y)}if(f.MIN_DYNAMIC_RANGE<_-p)for(g++,v+=n;g<f.BLOCK_SIZE;g++,v+=n)for(w=0;w<f.BLOCK_SIZE;w++)h+=255&t[v+w]}var A=h>>2*f.BLOCK_SIZE_POWER;if(_-p<=f.MIN_DYNAMIC_RANGE&&(A=p/2,0<s&&0<d)){var E=(u[s-1][d]+2*u[s][d-1]+u[s-1][d-1])/4;p<E&&(A=E)}u[s][d]=A}}return u},f.BLOCK_SIZE_MASK=(f.BLOCK_SIZE=1<<(f.BLOCK_SIZE_POWER=3))-1,f.MINIMUM_DIMENSION=5*f.BLOCK_SIZE,f.MIN_DYNAMIC_RANGE=24,f);function f(t){var e=i.call(this,t)||this;return e.matrix=null,e}e.default=s},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(55),u=r(15),s=r(12),f=r(0),l=(o(d,i=a.default),d.prototype.getBlackRow=function(t,e){var r=this.getLuminanceSource(),n=r.getWidth();null==e||e.getSize()<n?e=new u.default(n):e.clear(),this.initArrays(n);for(var o=r.getRow(t,this.luminances),i=this.buckets,a=0;a<n;a++)i[(255&o[a])>>d.LUMINANCE_SHIFT]++;var s=d.estimateBlackPoint(i);if(n<3)for(a=0;a<n;a++)(255&o[a])<s&&e.set(a);else{var f=255&o[0],l=255&o[1];for(a=1;a<n-1;a++){var c=255&o[a+1];(4*l-f-c)/2<s&&e.set(a),f=l,l=c}}return e},d.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),e=t.getWidth(),r=t.getHeight(),n=new s.default(e,r);this.initArrays(e);for(var o=this.buckets,i=1;i<5;i++)for(var a=Math.floor(r*i/5),u=t.getRow(a,this.luminances),f=Math.floor(4*e/5),l=Math.floor(e/5);l<f;l++)o[(255&u[l])>>d.LUMINANCE_SHIFT]++;var c=d.estimateBlackPoint(o),h=t.getMatrix();for(i=0;i<r;i++){var p=i*e;for(l=0;l<e;l++)(255&h[p+l])<c&&n.set(l,i)}return n},d.prototype.createBinarizer=function(t){return new d(t)},d.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var e=this.buckets,r=0;r<d.LUMINANCE_BUCKETS;r++)e[r]=0},d.estimateBlackPoint=function(t){for(var e=t.length,r=0,n=0,o=0,i=0;i<e;i++)t[i]>o&&(o=t[n=i]),t[i]>r&&(r=t[i]);var a=0,u=0;for(i=0;i<e;i++){var s=i-n;u<(p=t[i]*s*s)&&(a=i,u=p)}if(a<n){var l=n;n=a,a=l}if(a-n<=e/16)throw new f.default;var c=a-1,h=-1;for(i=a-1;n<i;i--){var p,_=i-n;h<(p=_*_*(a-i)*(r-t[i]))&&(c=i,h=p)}return c<<d.LUMINANCE_SHIFT},d.LUMINANCE_SHIFT=8-(d.LUMINANCE_BITS=5),d.LUMINANCE_BUCKETS=1<<d.LUMINANCE_BITS,d.EMPTY=Uint8ClampedArray.from([0]),d);function d(t){var e=i.call(this,t)||this;return e.luminances=d.EMPTY,e.buckets=new Int32Array(d.LUMINANCE_BUCKETS),e}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getLuminanceSource=function(){return this.source},o.prototype.getWidth=function(){return this.source.getWidth()},o.prototype.getHeight=function(){return this.source.getHeight()},o);function o(t){this.source=t}e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(23),u=r(24),s=r(1),f=(o(l,i=u.default),l.makeBufferFromCanvasImageData=function(t){var e=t.getContext("2d").getImageData(0,0,t.width,t.height);return l.toGrayscaleBuffer(e.data,t.width,t.height)},l.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 u;u=0===t[o+3]?255:306*t[o]+601*t[o+1]+117*t[o+2]+512>>10,n[i]=u}return n},l.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new s.default("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},l.prototype.getMatrix=function(){return this.buffer},l.prototype.isCropSupported=function(){return!0},l.prototype.crop=function(t,e,r,n){return this.crop(t,e,r,n),this},l.prototype.isRotateSupported=function(){return!0},l.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},l.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},l.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},l.prototype.rotate=function(t){var e=this.getTempCanvasElement(),r=e.getContext("2d"),n=t*l.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),u=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);return e.width=a,e.height=u,r.translate(a/2,u/2),r.rotate(n),r.drawImage(this.canvas,o/-2,i/-2),this.buffer=l.makeBufferFromCanvasImageData(e),this},l.prototype.invert=function(){return new a.default(this)},l.DEGREE_TO_RADIANS=Math.PI/180,l);function l(t){var e=i.call(this,t.width,t.height)||this;return e.canvas=t,e.tempCanvasElement=null,e.buffer=l.makeBufferFromCanvasImageData(t),e}e.HTMLCanvasElementLuminanceSource=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},o);function o(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}e.VideoInputDevice=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(11),f=r(2),l=r(0),d=r(13),c=r(9),h=r(5),p=(o(_,a=d.default),_.prototype.decodeRow=function(t,e,r){var n,o,a,f,d=this.counters;d.fill(0),this.decodeRowResult="";var p,g,v=_.findAsteriskPattern(e,d),w=e.getNextSet(v[1]),y=e.getSize();do{_.recordPattern(e,w,d);var A=_.toNarrowWidePattern(d);if(A<0)throw new l.default;p=_.patternToChar(A),this.decodeRowResult+=p,g=w;try{for(var E=i(d),C=E.next();!C.done;C=E.next())w+=C.value}catch(t){n={error:t}}finally{try{C&&!C.done&&(o=E.return)&&o.call(E)}finally{if(n)throw n.error}}w=e.getNextSet(w)}while("*"!==p);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var m,I=0;try{for(var S=i(d),O=S.next();!O.done;O=S.next())I+=O.value}catch(t){a={error:t}}finally{try{O&&!O.done&&(f=S.return)&&f.call(S)}finally{if(a)throw a.error}}if(w!==y&&2*(w-g-I)<I)throw new l.default;if(this.usingCheckDigit){for(var T=this.decodeRowResult.length-1,R=0,b=0;b<T;b++)R+=_.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(b));if(this.decodeRowResult.charAt(T)!==_.ALPHABET_STRING.charAt(R%43))throw new s.default;this.decodeRowResult=this.decodeRowResult.substring(0,T)}if(0===this.decodeRowResult.length)throw new l.default;m=this.extendedMode?_.decodeExtended(this.decodeRowResult):this.decodeRowResult;var N=(v[1]+v[0])/2,M=g+I/2;return new c.default(m,null,0,[new h.default(N,t),new h.default(M,t)],u.default.CODE_39,(new Date).getTime())},_.findAsteriskPattern=function(t,e){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=n,a=!1,u=e.length,s=n;s<r;s++)if(t.get(s)!==a)e[o]++;else{if(o===u-1){if(this.toNarrowWidePattern(e)===_.ASTERISK_ENCODING&&t.isRange(Math.max(0,i-Math.floor((s-i)/2)),i,!1))return[i,s];i+=e[0]+e[1],e.copyWithin(0,2,2+o-1),e[o-1]=0,e[o]=0,o--}else o++;e[o]=1,a=!a}throw new l.default},_.toNarrowWidePattern=function(t){var e,r,n,o=t.length,a=0;do{var u=2147483647;try{for(var s=i(t),f=s.next();!f.done;f=s.next())(h=f.value)<u&&a<h&&(u=h)}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}a=u;for(var l=n=0,d=0,c=0;c<o;c++)a<(h=t[c])&&(d|=1<<o-1-c,n++,l+=h);if(3===n){for(c=0;c<o&&0<n;c++){var h;if(a<(h=t[c])&&(n--,l<=2*h))return-1}return d}}while(3<n);return-1},_.patternToChar=function(t){for(var e=0;e<_.CHARACTER_ENCODINGS.length;e++)if(_.CHARACTER_ENCODINGS[e]===t)return _.ALPHABET_STRING.charAt(e);if(t===_.ASTERISK_ENCODING)return"*";throw new l.default},_.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(!("A"<=i&&i<="Z"))throw new f.default;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!("A"<=i&&i<="Z"))throw new f.default;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if("A"<=i&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if("F"<=i&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if("K"<=i&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if("P"<=i&&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 f.default;a=""}break;case"/":if("A"<=i&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new f.default;a=":"}}r+=a,n++}else r+=o}return r},_.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",_.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],_.ASTERISK_ENCODING=148,_);function _(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var r=a.call(this)||this;return r.usingCheckDigit=t,r.extendedMode=e,r.decodeRowResult="",r.counters=new Array(9),r}e.default=p},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.floatToIntBits=function(t){return t},o.MAX_VALUE=Number.MAX_SAFE_INTEGER,o);function o(){}e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(3),u=r(8),s=r(9),f=r(5),l=r(13),d=r(0),c=r(2),h=r(11),p=(o(_,i=l.default),_.findStartPattern=function(t){for(var e=t.getSize(),r=t.getNextSet(0),n=0,o=[0,0,0,0,0,0],i=r,a=!1,u=r;u<e;u++)if(t.get(u)!==a)o[n]++;else{if(5===n){for(var s=_.MAX_AVG_VARIANCE,f=-1,c=_.CODE_START_A;c<=_.CODE_START_C;c++){var h=l.default.patternMatchVariance(o,_.CODE_PATTERNS[c],_.MAX_INDIVIDUAL_VARIANCE);h<s&&(s=h,f=c)}if(0<=f&&t.isRange(Math.max(0,i-(u-i)/2),i,!1))return[i,u,f];i+=o[0]+o[1],o.splice(0,2),o[n-1]=0,o[n]=0,n--}else n++;o[n]=1,a=!a}throw new d.default},_.decodeCode=function(t,e,r){l.default.recordPattern(t,r,e);for(var n=_.MAX_AVG_VARIANCE,o=-1,i=0;i<_.CODE_PATTERNS.length;i++){var a=_.CODE_PATTERNS[i],u=this.patternMatchVariance(e,a,_.MAX_INDIVIDUAL_VARIANCE);u<n&&(n=u,o=i)}if(0<=o)return o;throw new d.default},_.prototype.decodeRow=function(t,e,r){var n,o=r&&!0===r.get(u.default.ASSUME_GS1),i=_.findStartPattern(e),l=i[2],p=0,g=new Uint8Array(20);switch(g[p++]=l){case _.CODE_START_A:n=_.CODE_CODE_A;break;case _.CODE_START_B:n=_.CODE_CODE_B;break;case _.CODE_START_C:n=_.CODE_CODE_C;break;default:throw new c.default}for(var v=!1,w=!1,y="",A=i[0],E=i[1],C=[0,0,0,0,0,0],m=0,I=0,S=l,O=0,T=!0,R=!1,b=!1;!v;){var N=w;switch(w=!1,m=I,I=_.decodeCode(e,C,E),(g[p++]=I)!==_.CODE_STOP&&(T=!0),I!==_.CODE_STOP&&(S+=++O*I),A=E,E+=C.reduce(function(t,e){return t+e},0),I){case _.CODE_START_A:case _.CODE_START_B:case _.CODE_START_C:throw new c.default}switch(n){case _.CODE_CODE_A:if(I<64)y+=b===R?String.fromCharCode(" ".charCodeAt(0)+I):String.fromCharCode(" ".charCodeAt(0)+I+128),b=!1;else if(I<96)y+=b===R?String.fromCharCode(I-64):String.fromCharCode(I+64),b=!1;else switch(I!==_.CODE_STOP&&(T=!1),I){case _.CODE_FNC_1:o&&(0===y.length?y+="]C1":y+=String.fromCharCode(29));break;case _.CODE_FNC_2:case _.CODE_FNC_3:break;case _.CODE_FNC_4_A:b=!R&&b?!(R=!0):!R||!b||(R=!1);break;case _.CODE_SHIFT:w=!0,n=_.CODE_CODE_B;break;case _.CODE_CODE_B:n=_.CODE_CODE_B;break;case _.CODE_CODE_C:n=_.CODE_CODE_C;break;case _.CODE_STOP:v=!0}break;case _.CODE_CODE_B:if(I<96)y+=b===R?String.fromCharCode(" ".charCodeAt(0)+I):String.fromCharCode(" ".charCodeAt(0)+I+128),b=!1;else switch(I!==_.CODE_STOP&&(T=!1),I){case _.CODE_FNC_1:o&&(0===y.length?y+="]C1":y+=String.fromCharCode(29));break;case _.CODE_FNC_2:case _.CODE_FNC_3:break;case _.CODE_FNC_4_B:b=!R&&b?!(R=!0):!R||!b||(R=!1);break;case _.CODE_SHIFT:w=!0,n=_.CODE_CODE_A;break;case _.CODE_CODE_A:n=_.CODE_CODE_A;break;case _.CODE_CODE_C:n=_.CODE_CODE_C;break;case _.CODE_STOP:v=!0}break;case _.CODE_CODE_C:if(I<100)I<10&&(y+="0"),y+=I;else switch(I!==_.CODE_STOP&&(T=!1),I){case _.CODE_FNC_1:o&&(0===y.length?y+="]C1":y+=String.fromCharCode(29));break;case _.CODE_CODE_A:n=_.CODE_CODE_A;break;case _.CODE_CODE_B:n=_.CODE_CODE_B;break;case _.CODE_STOP:v=!0}}N&&(n=n===_.CODE_CODE_A?_.CODE_CODE_B:_.CODE_CODE_A)}var M=E-A;if(E=e.getNextUnset(E),!e.isRange(E,Math.min(e.getSize(),E+(E-A)/2),!1))throw new d.default;if((S-=O*m)%103!==m)throw new h.default;var P=y.length;if(0===P)throw new d.default;0<P&&T&&(y=n===_.CODE_CODE_C?y.substring(0,P-2):y.substring(0,P-1));for(var D=(i[1]+i[0])/2,B=A+M/2,L=g.length,F=new Uint8Array(L),x=0;x<L;x++)F[x]=g[x];var k=[new f.default(D,t),new f.default(B,t)];return new s.default(y,F,0,k,a.default.CODE_128,(new Date).getTime())},_.CODE_PATTERNS=[[2,1,2,2,2,2],[2,2,2,1,2,2],[2,2,2,2,2,1],[1,2,1,2,2,3],[1,2,1,3,2,2],[1,3,1,2,2,2],[1,2,2,2,1,3],[1,2,2,3,1,2],[1,3,2,2,1,2],[2,2,1,2,1,3],[2,2,1,3,1,2],[2,3,1,2,1,2],[1,1,2,2,3,2],[1,2,2,1,3,2],[1,2,2,2,3,1],[1,1,3,2,2,2],[1,2,3,1,2,2],[1,2,3,2,2,1],[2,2,3,2,1,1],[2,2,1,1,3,2],[2,2,1,2,3,1],[2,1,3,2,1,2],[2,2,3,1,1,2],[3,1,2,1,3,1],[3,1,1,2,2,2],[3,2,1,1,2,2],[3,2,1,2,2,1],[3,1,2,2,1,2],[3,2,2,1,1,2],[3,2,2,2,1,1],[2,1,2,1,2,3],[2,1,2,3,2,1],[2,3,2,1,2,1],[1,1,1,3,2,3],[1,3,1,1,2,3],[1,3,1,3,2,1],[1,1,2,3,1,3],[1,3,2,1,1,3],[1,3,2,3,1,1],[2,1,1,3,1,3],[2,3,1,1,1,3],[2,3,1,3,1,1],[1,1,2,1,3,3],[1,1,2,3,3,1],[1,3,2,1,3,1],[1,1,3,1,2,3],[1,1,3,3,2,1],[1,3,3,1,2,1],[3,1,3,1,2,1],[2,1,1,3,3,1],[2,3,1,1,3,1],[2,1,3,1,1,3],[2,1,3,3,1,1],[2,1,3,1,3,1],[3,1,1,1,2,3],[3,1,1,3,2,1],[3,3,1,1,2,1],[3,1,2,1,1,3],[3,1,2,3,1,1],[3,3,2,1,1,1],[3,1,4,1,1,1],[2,2,1,4,1,1],[4,3,1,1,1,1],[1,1,1,2,2,4],[1,1,1,4,2,2],[1,2,1,1,2,4],[1,2,1,4,2,1],[1,4,1,1,2,2],[1,4,1,2,2,1],[1,1,2,2,1,4],[1,1,2,4,1,2],[1,2,2,1,1,4],[1,2,2,4,1,1],[1,4,2,1,1,2],[1,4,2,2,1,1],[2,4,1,2,1,1],[2,2,1,1,1,4],[4,1,3,1,1,1],[2,4,1,1,1,2],[1,3,4,1,1,1],[1,1,1,2,4,2],[1,2,1,1,4,2],[1,2,1,2,4,1],[1,1,4,2,1,2],[1,2,4,1,1,2],[1,2,4,2,1,1],[4,1,1,2,1,2],[4,2,1,1,1,2],[4,2,1,2,1,1],[2,1,2,1,4,1],[2,1,4,1,2,1],[4,1,2,1,2,1],[1,1,1,1,4,3],[1,1,1,3,4,1],[1,3,1,1,4,1],[1,1,4,1,1,3],[1,1,4,3,1,1],[4,1,1,1,1,3],[4,1,1,3,1,1],[1,1,3,1,4,1],[1,1,4,1,3,1],[3,1,1,1,4,1],[4,1,1,1,3,1],[2,1,1,4,1,2],[2,1,1,2,1,4],[2,1,1,2,3,2],[2,3,3,1,1,1,2]],_.MAX_AVG_VARIANCE=.25,_.MAX_INDIVIDUAL_VARIANCE=.7,_.CODE_SHIFT=98,_.CODE_CODE_C=99,_.CODE_CODE_B=100,_.CODE_CODE_A=101,_.CODE_FNC_1=102,_.CODE_FNC_2=97,_.CODE_FNC_3=96,_.CODE_FNC_4_A=101,_.CODE_FNC_4_B=100,_.CODE_START_A=103,_.CODE_START_B=104,_.CODE_START_C=105,_.CODE_STOP=106,_);function _(){return null!==i&&i.apply(this,arguments)||this}e.default=p},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(62),s=r(96),f=r(9),l=r(8),d=r(0),c=r(4),h=r(3),p=r(5),_=r(63),g=r(36),v=r(10),w=r(64),y=r(7),A=r(13),E=(o(C,a=u.default),C.prototype.decodeRow=function(t,e,r){var n,o,a,u,s=this.decodePair(e,!1,t,r);C.addOrTally(this.possibleLeftPairs,s),e.reverse();var f=this.decodePair(e,!0,t,r);C.addOrTally(this.possibleRightPairs,f),e.reverse();try{for(var l=i(this.possibleLeftPairs),c=l.next();!c.done;c=l.next()){var h=c.value;if(1<h.getCount())try{for(var p=i(this.possibleRightPairs),_=p.next();!_.done;_=p.next()){var g=_.value;if(1<g.getCount()&&C.checkChecksum(h,g))return C.constructResult(h,g)}}catch(t){a={error:t}}finally{try{_&&!_.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}throw new d.default},C.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var a=i(t),u=a.next();!u.done;u=a.next()){var s=u.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}o||t.push(e)}},C.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},C.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new c.default,i=13-n.length;0<i;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var u=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=0==(1&i)?3*u:u}10==(a=10-a%10)&&(a=0),o.append(a.toString());var s=t.getFinderPattern().getResultPoints(),l=e.getFinderPattern().getResultPoints();return new f.default(o.toString(),null,0,[s[0],s[1],l[0],l[1]],h.default.RSS_14,(new Date).getTime())},C.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return 72<n&&n--,8<n&&n--,r===n},C.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(l.default.NEED_RESULT_POINT_CALLBACK);if(null!=a){var u=(o[0]+o[1])/2;e&&(u=t.getSize()-1-u),a.foundPossibleResultPoint(new p.default(u,r))}var f=this.decodeDataCharacter(t,i,!0),d=this.decodeDataCharacter(t,i,!1);return new s.default(1597*f.getValue()+d.getValue(),f.getChecksumPortion()+4*d.getChecksumPortion(),i)}catch(t){return null}},C.prototype.decodeDataCharacter=function(t,e,r){for(var n=this.getDataCharacterCounters(),o=0;o<n.length;o++)n[o]=0;if(r)A.default.recordPatternInReverse(t,e.getStartEnd()[0],n);else{A.default.recordPattern(t,e.getStartEnd()[1]+1,n);for(var i=0,a=n.length-1;i<a;i++,a--){var u=n[i];n[i]=n[a],n[a]=u}}var s=r?16:15,f=v.default.sum(new Int32Array(n))/s,l=this.getOddCounts(),c=this.getEvenCounts(),h=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(i=0;i<n.length;i++){var _=n[i]/f,y=Math.floor(.5+_);y<1?y=1:8<y&&(y=8);var E=Math.floor(i/2);0==(1&i)?(l[E]=y,h[E]=_-y):(c[E]=y,p[E]=_-y)}this.adjustOddEvenCounts(r,s);var m=0,I=0;for(i=l.length-1;0<=i;i--)I*=9,I+=l[i],m+=l[i];var S=0,O=0;for(i=c.length-1;0<=i;i--)S*=9,S+=c[i],O+=c[i];var T=I+3*S;if(r){if(0!=(1&m)||12<m||m<4)throw new d.default;var R=9-(B=C.OUTSIDE_ODD_WIDEST[D=(12-m)/2]),b=w.default.getRSSvalue(l,B,!1),N=w.default.getRSSvalue(c,R,!0),M=C.OUTSIDE_EVEN_TOTAL_SUBSET[D],P=C.OUTSIDE_GSUM[D];return new g.default(b*M+N+P,T)}if(0!=(1&O)||10<O||O<4)throw new d.default;R=9-(B=C.INSIDE_ODD_WIDEST[D=(10-O)/2]),b=w.default.getRSSvalue(l,B,!0),N=w.default.getRSSvalue(c,R,!1);var D,B,L=C.INSIDE_ODD_TOTAL_SUBSET[D];return P=C.INSIDE_GSUM[D],new g.default(N*L+b+P,T)},C.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,f=i;f<n;f++)if(t.get(f)!==o)r[a]++;else{if(3===a){if(u.default.isFinderPattern(r))return[s,f];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 d.default},C.prototype.parseFoundFinderPattern=function(t,e,r,n){for(var o=t.get(n[0]),i=n[0]-1;0<=i&&o!==t.get(i);)i--;i++;var a=n[0]-i,u=this.getDecodeFinderCounters(),s=new Array(u.length);y.default.arraycopy(u,0,s,1,u.length-1),s[0]=a;var f=this.parseFinderValue(s,C.FINDER_PATTERNS),l=i,d=n[1];return r&&(l=t.getSize()-1-l,d=t.getSize()-1-d),new _.default(f,[i,n[1]],l,d,e)},C.prototype.adjustOddEvenCounts=function(t,e){var r=v.default.sum(new Int32Array(this.getOddCounts())),n=v.default.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(12<r?i=!0:r<4&&(o=!0),12<n?s=!0:n<4&&(a=!0)):(11<r?i=!0:r<5&&(o=!0),10<n?s=!0:n<4&&(a=!0));var f=r+n-e,l=(1&r)==(t?1:0),c=1==(1&n);if(1==f)if(l){if(c)throw new d.default;i=!0}else{if(!c)throw new d.default;s=!0}else if(-1==f)if(l){if(c)throw new d.default;o=!0}else{if(!c)throw new d.default;a=!0}else{if(0!=f)throw new d.default;if(l){if(!c)throw new d.default;r<n?s=o=!0:a=i=!0}else if(c)throw new d.default}if(o){if(i)throw new d.default;u.default.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&u.default.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new d.default;u.default.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&u.default.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},C.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],C.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],C.OUTSIDE_GSUM=[0,161,961,2015,2715],C.INSIDE_GSUM=[0,336,1036,1516],C.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],C.INSIDE_ODD_WIDEST=[2,4,6,8],C.FINDER_PATTERNS=[[3,8,2,1],[3,5,5,1],[3,3,7,1],[3,1,9,1],[2,7,4,1],[2,5,6,1],[2,3,8,1],[1,5,7,1],[1,3,9,1]],C);function C(){var t=null!==a&&a.apply(this,arguments)||this;return t.possibleLeftPairs=[],t.possibleRightPairs=[],t}e.default=E},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(13),s=r(0),f=r(10),l=(o(d,a=u.default),d.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},d.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},d.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},d.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},d.prototype.getOddCounts=function(){return this.oddCounts},d.prototype.getEvenCounts=function(){return this.evenCounts},d.prototype.parseFinderValue=function(t,e){for(var r=0;r<e.length;r++)if(u.default.patternMatchVariance(t,e[r],d.MAX_INDIVIDUAL_VARIANCE)<d.MAX_AVG_VARIANCE)return r;throw new s.default},d.count=function(t){return f.default.sum(new Int32Array(t))},d.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]++},d.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]--},d.isFinderPattern=function(t){var e,r,n=t[0]+t[1],o=n/(n+t[2]+t[3]);if(d.MIN_FINDER_PATTERN_RATIO<=o&&o<=d.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;try{for(var s=i(t),f=s.next();!f.done;f=s.next()){var l=f.value;u<l&&(u=l),l<a&&(a=l)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return u<10*a}return!1},d.MAX_AVG_VARIANCE=.2,d.MAX_INDIVIDUAL_VARIANCE=.45,d.MIN_FINDER_PATTERN_RATIO=9.5/12,d.MAX_FINDER_PATTERN_RATIO=12.5/14,d);function d(){var t=a.call(this)||this;return t.decodeFinderCounters=new Array(4),t.dataCharacterCounters=new Array(8),t.oddRoundingErrors=new Array(4),t.evenRoundingErrors=new Array(4),t.oddCounts=new Array(t.dataCharacterCounters.length/2),t.evenCounts=new Array(t.dataCharacterCounters.length/2),t}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5),o=(i.prototype.getValue=function(){return this.value},i.prototype.getStartEnd=function(){return this.startEnd},i.prototype.getResultPoints=function(){return this.resultPoints},i.prototype.equals=function(t){if(!(t instanceof i))return!1;var e=t;return this.value===e.value},i.prototype.hashCode=function(){return this.value},i);function i(t,e,r,o,i){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new n.default(r,i)),this.resultPoints.push(new n.default(o,i))}e.default=o},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=(i.prototype.RSSUtils=function(){},i.getRSSvalue=function(t,e,r){var o,a,u=0;try{for(var s=n(t),f=s.next();!f.done;f=s.next())u+=f.value}catch(t){o={error:t}}finally{try{f&&!f.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}for(var l=0,d=0,c=t.length,h=0;h<c-1;h++){var p=void 0;for(d|=(p=1)<<h;p<t[h];p++,d&=~(1<<h)){var _=i.combins(u-p-1,c-h-2);if(r&&0===d&&c-h-1<=u-p-(c-h-1)&&(_-=i.combins(u-p-(c-h),c-h-2)),1<c-h-1){for(var g=0,v=u-p-(c-h-2);e<v;v--)g+=i.combins(u-p-v-1,c-h-3);_-=g*(c-1-h)}else e<u-p&&_--;l+=_}u-=p}return l},i.combins=function(t,e){var r,n;r=e<t-e?t-(n=e):(n=t-e,e);for(var o=1,i=1,a=t;r<a;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},i);function i(){}e.default=o},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(8),f=r(9),l=r(5),d=r(13),c=r(4),h=r(7),p=r(2),_=r(0),g=(o(v,a=d.default),v.prototype.decodeRow=function(t,e,r){var n,o,a=this.decodeStart(e),d=this.decodeEnd(e),h=new c.default;v.decodeMiddle(e,a[1],d[0],h);var _=h.toString(),g=null;null!=r&&(g=r.get(s.default.ALLOWED_LENGTHS)),null==g&&(g=v.DEFAULT_ALLOWED_LENGTHS);var w=_.length,y=!1,A=0;try{for(var E=i(g),C=E.next();!C.done;C=E.next()){var m=C.value;if(w===m){y=!0;break}A<m&&(A=m)}}catch(t){n={error:t}}finally{try{C&&!C.done&&(o=E.return)&&o.call(E)}finally{if(n)throw n.error}}if(!y&&A<w&&(y=!0),!y)throw new p.default;var I=[new l.default(a[1],t),new l.default(d[0],t)];return new f.default(_,null,0,I,u.default.ITF,(new Date).getTime())},v.decodeMiddle=function(t,e,r,n){var o=new Array(10),i=new Array(5),a=new Array(5);for(o.fill(0),i.fill(0),a.fill(0);e<r;){d.default.recordPattern(t,e,o);for(var u=0;u<5;u++){var s=2*u;i[u]=o[s],a[u]=o[1+s]}var f=v.decodeDigit(i);n.append(f.toString()),f=this.decodeDigit(a),n.append(f.toString()),o.forEach(function(t){e+=t})}},v.prototype.decodeStart=function(t){var e=v.skipWhiteSpace(t),r=v.findGuardPattern(t,e,v.START_PATTERN);return this.narrowLineWidth=(r[1]-r[0])/4,this.validateQuietZone(t,r[0]),r},v.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;0<r&&0<=n&&!t.get(n);n--)r--;if(0!==r)throw new _.default},v.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new _.default;return r},v.prototype.decodeEnd=function(t){t.reverse();try{var e=v.skipWhiteSpace(t),r=void 0;try{r=v.findGuardPattern(t,e,v.END_PATTERN_REVERSED[0])}catch(n){r=v.findGuardPattern(t,e,v.END_PATTERN_REVERSED[1])}this.validateQuietZone(t,r[0]);var n=r[0];return r[0]=t.getSize()-r[1],r[1]=t.getSize()-n,r}finally{t.reverse()}},v.findGuardPattern=function(t,e,r){var n=r.length,o=new Array(n),i=t.getSize(),a=!1,u=0,s=e;o.fill(0);for(var f=e;f<i;f++)if(t.get(f)!==a)o[u]++;else{if(u===n-1){if(d.default.patternMatchVariance(o,r,v.MAX_INDIVIDUAL_VARIANCE)<v.MAX_AVG_VARIANCE)return[s,f];s+=o[0]+o[1],h.default.arraycopy(o,2,o,0,u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new _.default},v.decodeDigit=function(t){for(var e=v.MAX_AVG_VARIANCE,r=-1,n=v.PATTERNS.length,o=0;o<n;o++){var i=v.PATTERNS[o],a=d.default.patternMatchVariance(t,i,v.MAX_INDIVIDUAL_VARIANCE);a<e?(e=a,r=o):a===e&&(r=-1)}if(0<=r)return r%10;throw new _.default},v.W=3,v.w=2,v.N=1,v.PATTERNS=[[1,1,2,2,1],[2,1,1,1,2],[1,2,1,1,2],[2,2,1,1,1],[1,1,2,1,2],[2,1,2,1,1],[1,2,2,1,1],[1,1,1,2,2],[2,1,1,2,1],[1,2,1,2,1],[1,1,3,3,1],[3,1,1,1,3],[1,3,1,1,3],[3,3,1,1,1],[1,1,3,1,3],[3,1,3,1,1],[1,3,3,1,1],[1,1,1,3,3],[3,1,1,3,1],[1,3,1,3,1]],v.MAX_AVG_VARIANCE=.38,v.MAX_INDIVIDUAL_VARIANCE=.5,v.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],v.START_PATTERN=[1,1,1,1],v.END_PATTERN_REVERSED=[[1,1,2],[1,1,3]],v);function v(){var t=null!==a&&a.apply(this,arguments)||this;return t.narrowLineWidth=-1,t}e.default=g},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(67),f=r(0),l=(o(d,a=s.default),d.prototype.decodeMiddle=function(t,e,r){var n,o,a,u,f=this.decodeMiddleCounters;f[0]=0,f[1]=0,f[2]=0,f[3]=0;for(var l=t.getSize(),c=e[1],h=0,p=0;p<6&&c<l;p++){var _=s.default.decodeDigit(t,f,c,s.default.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+_%10);try{for(var g=i(f),v=g.next();!v.done;v=g.next())c+=v.value}catch(t){n={error:t}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}10<=_&&(h|=1<<5-p)}for(r=d.determineFirstDigit(r,h),c=s.default.findGuardPattern(t,c,!0,s.default.MIDDLE_PATTERN,new Array(s.default.MIDDLE_PATTERN.length).fill(0))[1],p=0;p<6&&c<l;p++){_=s.default.decodeDigit(t,f,c,s.default.L_PATTERNS),r+=String.fromCharCode("0".charCodeAt(0)+_);try{for(var w=i(f),y=w.next();!y.done;y=w.next())c+=y.value}catch(t){a={error:t}}finally{try{y&&!y.done&&(u=w.return)&&u.call(w)}finally{if(a)throw a.error}}}return{rowOffset:c,resultString:r}},d.prototype.getBarcodeFormat=function(){return u.default.EAN_13},d.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 f.default},d.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],d);function d(){var t=a.call(this)||this;return t.decodeMiddleCounters=[0,0,0,0],t}e.default=l},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(3),u=r(8),s=r(9),f=r(14),l=r(5),d=r(98),c=r(26),h=r(0),p=r(2),_=r(11),g=(o(v,i=c.default),v.prototype.decodeRow=function(t,e,r){var n=v.findStartGuardPattern(e),o=null==r?null:r.get(u.default.NEED_RESULT_POINT_CALLBACK);if(null!=o){var i=new l.default((n[0]+n[1])/2,t);o.foundPossibleResultPoint(i)}var c=this.decodeMiddle(e,n,this.decodeRowStringBuffer),g=c.rowOffset,w=c.resultString;if(null!=o){var y=new l.default(g,t);o.foundPossibleResultPoint(y)}var A=v.decodeEnd(e,g);if(null!=o){var E=new l.default((A[0]+A[1])/2,t);o.foundPossibleResultPoint(E)}var C=A[1],m=C+(C-A[0]);if(m>=e.getSize()||!e.isRange(C,m,!1))throw new h.default;var I=w.toString();if(I.length<8)throw new p.default;if(!v.checkChecksum(I))throw new _.default;var S=(n[1]+n[0])/2,O=(A[1]+A[0])/2,T=this.getBarcodeFormat(),R=[new l.default(S,t),new l.default(O,t)],b=new s.default(I,null,0,R,T,(new Date).getTime()),N=0;try{var M=d.default.decodeRow(t,e,A[1]);b.putMetadata(f.default.UPC_EAN_EXTENSION,M.getText()),b.putAllMetadata(M.getResultMetadata()),b.addResultPoints(M.getResultPoints()),N=M.getText().length}catch(t){}var P=null==r?null:r.get(u.default.ALLOWED_EAN_EXTENSIONS);if(null!=P){var D=!1;for(var B in P)if(N.toString()===B){D=!0;break}if(!D)throw new h.default}return T===a.default.EAN_13||a.default.UPC_A,b},v.checkChecksum=function(t){return v.checkStandardUPCEANChecksum(t)},v.checkStandardUPCEANChecksum=function(t){var e=t.length;if(0===e)return!1;var r=parseInt(t.charAt(e-1),10);return v.getStandardUPCEANChecksum(t.substring(0,e-1))===r},v.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;0<=n;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||9<o)throw new p.default;r+=o}for(r*=3,n=e-2;0<=n;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||9<o)throw new p.default;r+=o}return(1e3-r)%10},v.decodeEnd=function(t,e){return v.findGuardPattern(t,e,!1,v.START_END_PATTERN,new Array(v.START_END_PATTERN.length).fill(0))},v);function v(){var t=i.call(this)||this;t.decodeRowStringBuffer="",v.L_AND_G_PATTERNS=v.L_PATTERNS.map(function(t){return t.slice()});for(var e=10;e<20;e++){for(var r=v.L_PATTERNS[e-10],n=new Array(r.length),o=0;o<r.length;o++)n[o]=r[r.length-o-1];v.L_AND_G_PATTERNS[e]=n}return t}e.default=g},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=(i.prototype.exp=function(t){return this.expTable[t]},i.prototype.log=function(t){if(0===t)throw new n.default;return this.logTable[t]},i.addOrSubtract=function(t,e){return t^e},i);function i(){}e.default=o},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(71),u=r(12),s=r(44),f=r(0),l=(o(d,i=a.default),d.prototype.sampleGrid=function(t,e,r,n,o,i,a,u,f,l,d,c,h,p,_,g,v,w,y){var A=s.default.quadrilateralToQuadrilateral(n,o,i,a,u,f,l,d,c,h,p,_,g,v,w,y);return this.sampleGridWithTransform(t,e,r,A)},d.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new f.default;for(var o=new u.default(e,r),i=new Float32Array(2*e),s=0;s<r;s++){for(var l=i.length,d=s+.5,c=0;c<l;c+=2)i[c]=c/2+.5,i[c+1]=d;n.transformPoints(i),a.default.checkAndNudgePoints(t,i);try{for(c=0;c<l;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,s)}catch(t){throw new f.default}}return o},d);function d(){return null!==i&&i.apply(this,arguments)||this}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=(i.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),o=t.getHeight(),i=!0,a=0;a<e.length&&i;a+=2){var u=Math.floor(e[a]),s=Math.floor(e[a+1]);if(u<-1||r<u||s<-1||o<s)throw new n.default;i=!1,-1===u?i=!(e[a]=0):u===r&&(e[a]=r-1,i=!0),-1===s?i=!(e[a+1]=0):s===o&&(e[a+1]=o-1,i=!0)}for(i=!0,a=e.length-2;0<=a&&i;a-=2){if(u=Math.floor(e[a]),s=Math.floor(e[a+1]),u<-1||r<u||s<-1||o<s)throw new n.default;i=!1,-1===u?i=!(e[a]=0):u===r&&(e[a]=r-1,i=!0),-1===s?i=!(e[a+1]=0):s===o&&(e[a+1]=o-1,i=!0)}},i);function i(){}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(5),o=r(10),i=r(0),a=(u.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,a=!0,u=!1,s=!1,f=!1,l=!1,d=!1,c=this.width,h=this.height;a;){for(var p=!(a=!1);(p||!s)&&e<c;)(p=this.containsBlackPoint(r,n,e,!1))?(e++,s=a=!0):s||e++;if(c<=e){o=!0;break}for(var _=!0;(_||!f)&&n<h;)(_=this.containsBlackPoint(t,e,n,!0))?(n++,f=a=!0):f||n++;if(h<=n){o=!0;break}for(var g=!0;(g||!l)&&0<=t;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,l=a=!0):l||t--;if(t<0){o=!0;break}for(var v=!0;(v||!d)&&0<=r;)(v=this.containsBlackPoint(t,e,r,!0))?(r--,d=a=!0):d||r--;if(r<0){o=!0;break}a&&(u=!0)}if(o||!u)throw new i.default;for(var w=e-t,y=null,A=1;null===y&&A<w;A++)y=this.getBlackPointOnSegment(t,n-A,t+A,n);if(null==y)throw new i.default;var E=null;for(A=1;null===E&&A<w;A++)E=this.getBlackPointOnSegment(t,r+A,t+A,r);if(null==E)throw new i.default;var C=null;for(A=1;null===C&&A<w;A++)C=this.getBlackPointOnSegment(e,r+A,e-A,r);if(null==C)throw new i.default;var m=null;for(A=1;null===m&&A<w;A++)m=this.getBlackPointOnSegment(e,n-A,e-A,n);if(null==m)throw new i.default;return this.centerEdges(m,y,C,E)},u.prototype.getBlackPointOnSegment=function(t,e,r,i){for(var a=o.default.round(o.default.distance(t,e,r,i)),u=(r-t)/a,s=(i-e)/a,f=this.image,l=0;l<a;l++){var d=o.default.round(t+l*u),c=o.default.round(e+l*s);if(f.get(d,c))return new n.default(d,c)}return null},u.prototype.centerEdges=function(t,e,r,o){var i=t.getX(),a=t.getY(),s=e.getX(),f=e.getY(),l=r.getX(),d=r.getY(),c=o.getX(),h=o.getY(),p=u.CORR;return i<this.width/2?[new n.default(c-p,h+p),new n.default(s+p,f+p),new n.default(l-p,d-p),new n.default(i+p,a-p)]:[new n.default(c+p,h+p),new n.default(s+p,f-p),new n.default(l-p,d+p),new n.default(i-p,a-p)]},u.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},u.INIT_SIZE=10,u.CORR=1,u);function u(t,e,r,n){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),null==e&&(e=u.INIT_SIZE),null==r&&(r=t.getWidth()/2|0),null==n&&(n=t.getHeight()/2|0);var o=e/2|0;if(this.leftInit=r-o,this.rightInit=r+o,this.upInit=n-o,this.downInit=n+o,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new i.default}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),i=r(3),a=r(45),u=r(35),s=r(37),f=r(0),l=r(77),d=r(82),c=(h.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},h.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},h.prototype.setHints=function(t){var e=null!=(this.hints=t)&&void 0!==t.get(o.default.TRY_HARDER),r=null==t?null:t.get(o.default.POSSIBLE_FORMATS),n=new Array;if(null!=r){var f=r.some(function(t){return t===i.default.UPC_A||t===i.default.UPC_E||t===i.default.EAN_13||t===i.default.EAN_8||t===i.default.CODABAR||t===i.default.CODE_39||t===i.default.CODE_93||t===i.default.CODE_128||t===i.default.ITF||t===i.default.RSS_14||t===i.default.RSS_EXPANDED});f&&!e&&n.push(new u.default(t)),r.includes(i.default.QR_CODE)&&n.push(new a.default),r.includes(i.default.DATA_MATRIX)&&n.push(new s.default),r.includes(i.default.PDF_417)&&n.push(new l.default),f&&e&&n.push(new u.default(t))}0===n.length&&(e||n.push(new u.default(t)),n.push(new a.default),n.push(new s.default),n.push(new l.default),e&&n.push(new u.default(t))),this.readers=n},h.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=n(this.readers),o=r.next();!o.done;o=r.next())o.value.reset()}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},h.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new d.default("No readers where selected, nothing can be read.");try{for(var o=n(this.readers),i=o.next();!i.done;i=o.next()){var a=i.value;try{return a.decode(t,this.hints)}catch(t){if(t instanceof d.default)continue}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}throw new f.default("No MultiFormat Readers were able to detect the code.")},h);function h(){}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(29),i=r(16),a=(u.numBitsDiffering=function(t,e){return i.default.bitCount(t^e)},u.decodeFormatInformation=function(t,e){var r=u.doDecodeFormatInformation(t,e);return null!==r?r:u.doDecodeFormatInformation(t^u.FORMAT_INFO_MASK_QR,e^u.FORMAT_INFO_MASK_QR)},u.doDecodeFormatInformation=function(t,e){var r,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=n(u.FORMAT_INFO_DECODE_LOOKUP),f=s.next();!f.done;f=s.next()){var l=f.value,d=l[0];if(d===t||d===e)return new u(l[1]);var c=u.numBitsDiffering(t,d);c<i&&(a=l[1],i=c),t!==e&&(c=u.numBitsDiffering(e,d))<i&&(a=l[1],i=c)}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i<=3?new u(a):null},u.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},u.prototype.getDataMask=function(){return this.dataMask},u.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;return this.errorCorrectionLevel===e.errorCorrectionLevel&&this.dataMask===e.dataMask},u.FORMAT_INFO_MASK_QR=21522,u.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])],u);function u(t){this.errorCorrectionLevel=o.default.forBits(t>>3&3),this.dataMask=7&t}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.isMirrored=function(){return this.mirrored},o.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},o);function o(t){this.mirrored=t}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,i=r(1);(o=n=e.ModeValues||(e.ModeValues={}))[o.TERMINATOR=0]="TERMINATOR",o[o.NUMERIC=1]="NUMERIC",o[o.ALPHANUMERIC=2]="ALPHANUMERIC",o[o.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",o[o.BYTE=4]="BYTE",o[o.ECI=5]="ECI",o[o.KANJI=6]="KANJI",o[o.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",o[o.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",o[o.HANZI=9]="HANZI";var a=(u.forBits=function(t){var e=u.FOR_BITS.get(t);if(void 0===e)throw new i.default;return e},u.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},u.prototype.getValue=function(){return this.value},u.prototype.getBits=function(){return this.bits},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;return this.value===e.value},u.prototype.toString=function(){return this.stringValue},u.FOR_BITS=new Map,u.FOR_VALUE=new Map,u.TERMINATOR=new u(n.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),u.NUMERIC=new u(n.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),u.ALPHANUMERIC=new u(n.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),u.STRUCTURED_APPEND=new u(n.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),u.BYTE=new u(n.BYTE,"BYTE",Int32Array.from([8,16,16]),4),u.ECI=new u(n.ECI,"ECI",Int32Array.from([0,0,0]),7),u.KANJI=new u(n.KANJI,"KANJI",Int32Array.from([8,10,12]),8),u.FNC1_FIRST_POSITION=new u(n.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),u.FNC1_SECOND_POSITION=new u(n.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),u.HANZI=new u(n.HANZI,"HANZI",Int32Array.from([8,10,12]),13),u);function u(t,e,r,n){this.value=t,this.stringValue=e,this.characterCountBitsForVersions=r,this.bits=n,u.FOR_BITS.set(n,this),u.FOR_VALUE.set(t,this)}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(11),a=r(2),u=r(0),s=r(9),f=r(19),l=r(16),d=r(14),c=r(123),h=r(125),p=(_.prototype.decode=function(t,e){void 0===e&&(e=null);var r=_.decode(t,e,!1);if(null==r||0===r.length||null==r[0])throw u.default.getNotFoundInstance();return r[0]},_.prototype.decodeMultiple=function(t,e){void 0===e&&(e=null);try{return _.decode(t,e,!0)}catch(t){if(t instanceof a.default||t instanceof i.default)throw u.default.getNotFoundInstance();throw t}},_.decode=function(t,e,r){var i,a,u=new Array,f=c.default.detectMultiple(t,e,r);try{for(var l=n(f.getPoints()),p=l.next();!p.done;p=l.next()){var g=p.value,v=h.default.decode(f.getBits(),g[4],g[5],g[6],g[7],_.getMinCodewordWidth(g),_.getMaxCodewordWidth(g)),w=new s.default(v.getText(),v.getRawBytes(),void 0,g,o.default.PDF_417);w.putMetadata(d.default.ERROR_CORRECTION_LEVEL,v.getECLevel());var y=v.getOther();null!=y&&w.putMetadata(d.default.PDF417_EXTRA_METADATA,y),u.push(w)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return u.map(function(t){return t})},_.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},_.getMinWidth=function(t,e){return null==t||null==e?l.default.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},_.getMaxCodewordWidth=function(t){return Math.floor(Math.max(Math.max(_.getMaxWidth(t[0],t[4]),_.getMaxWidth(t[6],t[2])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN),Math.max(_.getMaxWidth(t[1],t[5]),_.getMaxWidth(t[7],t[3])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN)))},_.getMinCodewordWidth=function(t){return Math.floor(Math.min(Math.min(_.getMinWidth(t[0],t[4]),_.getMinWidth(t[6],t[2])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN),Math.min(_.getMinWidth(t[1],t[5]),_.getMinWidth(t[7],t[3])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN)))},_.prototype.reset=function(){},_);function _(){}e.default=p},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(7),a=r(4),u=(s.prototype.getCoefficients=function(){return this.coefficients},s.prototype.getDegree=function(){return this.coefficients.length-1},s.prototype.isZero=function(){return 0===this.coefficients[0]},s.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},s.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var o=0;try{for(var i=n(this.coefficients),a=i.next();!a.done;a=i.next()){var u=a.value;o=this.field.add(o,u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o}for(var s=this.coefficients[0],f=this.coefficients.length,l=1;l<f;l++)s=this.field.add(this.field.multiply(t,s),this.coefficients[l]);return s},s.prototype.add=function(t){if(!this.field.equals(t.field))throw new o.default("ModulusPolys do not have same ModulusGF field");if(this.isZero())return t;if(t.isZero())return this;var e=this.coefficients,r=t.coefficients;if(e.length>r.length){var n=e;e=r,r=n}var a=new Int32Array(r.length),u=r.length-e.length;i.default.arraycopy(r,0,a,0,u);for(var f=u;f<r.length;f++)a[f]=this.field.add(e[f-u],r[f]);return new s(this.field,a)},s.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new o.default("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},s.prototype.multiply=function(t){return t instanceof s?this.multiplyOther(t):this.multiplyScalar(t)},s.prototype.multiplyOther=function(t){if(!this.field.equals(t.field))throw new o.default("ModulusPolys do not have same ModulusGF field");if(this.isZero()||t.isZero())return new s(this.field,new Int32Array([0]));for(var e=this.coefficients,r=e.length,n=t.coefficients,i=n.length,a=new Int32Array(r+i-1),u=0;u<r;u++)for(var f=e[u],l=0;l<i;l++)a[u+l]=this.field.add(a[u+l],this.field.multiply(f,n[l]));return new s(this.field,a)},s.prototype.negative=function(){for(var t=this.coefficients.length,e=new Int32Array(t),r=0;r<t;r++)e[r]=this.field.subtract(0,this.coefficients[r]);return new s(this.field,e)},s.prototype.multiplyScalar=function(t){if(0===t)return new s(this.field,new Int32Array([0]));if(1===t)return this;for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.multiply(this.coefficients[n],t);return new s(this.field,r)},s.prototype.multiplyByMonomial=function(t,e){if(t<0)throw new o.default;if(0===e)return new s(this.field,new Int32Array([0]));for(var r=this.coefficients.length,n=new Int32Array(r+t),i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new s(this.field,n)},s.prototype.toString=function(){for(var t=new a.default,e=this.getDegree();0<=e;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):0<t.length()&&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()},s);function s(t,e){if(0===e.length)throw new o.default;this.field=t;var r=e.length;if(1<r&&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),i.default.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=r(5),i=(a.prototype.constructor_1=function(t,e,r,i,a){var u=null==e||null==r,s=null==i||null==a;if(u&&s)throw new n.default;u?(e=new o.default(0,i.getY()),r=new o.default(0,a.getY())):s&&(i=new o.default(t.getWidth()-1,e.getY()),a=new o.default(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=i,this.bottomRight=a,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(i.getX(),a.getX())),this.minY=Math.trunc(Math.min(e.getY(),i.getY())),this.maxY=Math.trunc(Math.max(r.getY(),a.getY()))},a.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()},a.merge=function(t,e){return null==t?e:null==e?t:new a(t.image,t.topLeft,t.bottomLeft,e.topRight,e.bottomRight)},a.prototype.addMissingRows=function(t,e,r){var n=this.topLeft,i=this.bottomLeft,u=this.topRight,s=this.bottomRight;if(0<t){var f=r?this.topLeft:this.topRight,l=Math.trunc(f.getY()-t);l<0&&(l=0);var d=new o.default(f.getX(),l);r?n=d:u=d}if(0<e){var c=r?this.bottomLeft:this.bottomRight,h=Math.trunc(c.getY()+e);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var p=new o.default(c.getX(),h);r?i=p:s=p}return new a(this.image,n,i,u,s)},a.prototype.getMinX=function(){return this.minX},a.prototype.getMaxX=function(){return this.maxX},a.prototype.getMinY=function(){return this.minY},a.prototype.getMaxY=function(){return this.maxY},a.prototype.getTopLeft=function(){return this.topLeft},a.prototype.getTopRight=function(){return this.topRight},a.prototype.getBottomLeft=function(){return this.bottomLeft},a.prototype.getBottomRight=function(){return this.bottomRight},a);function a(t,e,r,n,o){t instanceof a?this.constructor_2(t):this.constructor_1(t,e,r,n,o)}e.default=i},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(47),i=r(79),a=(u.prototype.getCodewordNearby=function(t){var e=this.getCodeword(t);if(null!=e)return e;for(var r=1;r<u.MAX_NEARBY_DISTANCE;r++){var n=this.imageRowToCodewordIndex(t)-r;if(0<=n&&null!=(e=this.codewords[n]))return e;if((n=this.imageRowToCodewordIndex(t)+r)<this.codewords.length&&null!=(e=this.codewords[n]))return e}return null},u.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},u.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},u.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},u.prototype.getBoundingBox=function(){return this.boundingBox},u.prototype.getCodewords=function(){return this.codewords},u.prototype.toString=function(){var t,e,r=new o.default,i=0;try{for(var a=n(this.codewords),u=a.next();!u.done;u=a.next()){var s=u.value;null!=s?r.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue()):r.format("%3d:    |   %n",i++)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return r.toString()},u.MAX_NEARBY_DISTANCE=5,u);function u(t){this.boundingBox=new i.default(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},o=this&&this.__read||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||0<e--)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var i=r(19),a=(u.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},u.prototype.getValue=function(){function t(t,e){var r=function(){return t},n=function(){return e};n()>a?(a=n(),(u=[]).push(r())):n()===a&&u.push(r())}var e,r,a=-1,u=new Array;try{for(var s=n(this.values.entries()),f=s.next();!f.done;f=s.next()){var l=o(f.value,2);t(l[0],l[1])}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return i.default.toIntArray(u)},u.prototype.getConfidence=function(t){return this.values.get(t)},u);function u(){this.values=new Map}e.default=a},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(27),o=r(7),i=r(1),a=(u.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],o=this.field,i=e.length;i<=t;i++){var a=r.multiply(new n.default(o,Int32Array.from([1,o.exp(i-1+o.getGeneratorBase())])));e.push(a),r=a}return e[t]},u.prototype.encode=function(t,e){if(0===e)throw new i.default("No error correction bytes");var r=t.length-e;if(r<=0)throw new i.default("No data bytes provided");var a=this.buildGenerator(e),u=new Int32Array(r);o.default.arraycopy(t,0,u,0,r);for(var s=new n.default(this.field,u),f=(s=s.multiplyByMonomial(e,1)).divide(a)[1].getCoefficients(),l=e-f.length,d=0;d<l;d++)t[r+d]=0;o.default.arraycopy(f,0,t,r+l,f.length)},u);function u(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new n.default(t,Int32Array.from([1])))}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=(i.applyMaskPenaltyRule1=function(t){return i.applyMaskPenaltyRule1Internal(t,!0)+i.applyMaskPenaltyRule1Internal(t,!1)},i.applyMaskPenaltyRule2=function(t){for(var e=0,r=t.getArray(),n=t.getWidth(),o=t.getHeight(),a=0;a<o-1;a++)for(var u=r[a],s=0;s<n-1;s++){var f=u[s];f===u[s+1]&&f===r[a+1][s]&&f===r[a+1][s+1]&&e++}return i.N2*e},i.applyMaskPenaltyRule3=function(t){for(var e=0,r=t.getArray(),n=t.getWidth(),o=t.getHeight(),a=0;a<o;a++)for(var u=0;u<n;u++){var s=r[a];u+6<n&&1===s[u]&&0===s[u+1]&&1===s[u+2]&&1===s[u+3]&&1===s[u+4]&&0===s[u+5]&&1===s[u+6]&&(i.isWhiteHorizontal(s,u-4,u)||i.isWhiteHorizontal(s,u+7,u+11))&&e++,a+6<o&&1===r[a][u]&&0===r[a+1][u]&&1===r[a+2][u]&&1===r[a+3][u]&&1===r[a+4][u]&&0===r[a+5][u]&&1===r[a+6][u]&&(i.isWhiteVertical(r,u,a-4,a)||i.isWhiteVertical(r,u,a+7,a+11))&&e++}return e*i.N3},i.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},i.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},i.applyMaskPenaltyRule4=function(t){for(var e=0,r=t.getArray(),n=t.getWidth(),o=t.getHeight(),a=0;a<o;a++)for(var u=r[a],s=0;s<n;s++)1===u[s]&&e++;var f=t.getHeight()*t.getWidth();return Math.floor(10*Math.abs(2*e-f)/f)*i.N4},i.getDataMaskBit=function(t,e,r){var o,i;switch(t){case 0:o=r+e&1;break;case 1:o=1&r;break;case 2:o=e%3;break;case 3:o=(r+e)%3;break;case 4:o=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:o=(1&(i=r*e))+i%3;break;case 6:o=(1&(i=r*e))+i%3&1;break;case 7:o=(i=r*e)%3+(r+e&1)&1;break;default:throw new n.default("Invalid mask pattern: "+t)}return 0===o},i.applyMaskPenaltyRule1Internal=function(t,e){for(var r=0,n=e?t.getHeight():t.getWidth(),o=e?t.getWidth():t.getHeight(),a=t.getArray(),u=0;u<n;u++){for(var s=0,f=-1,l=0;l<o;l++){var d=e?a[u][l]:a[l][u];d===f?s++:(5<=s&&(r+=i.N1+(s-5)),s=1,f=d)}5<=s&&(r+=i.N1+(s-5))}return r},i.N1=3,i.N2=3,i.N3=40,i.N4=10,i);function i(){}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),o=r(30),i=r(12),a=r(29),u=r(48),s=r(1),f=r(18),l=(d.prototype.encode=function(t,e,r,i,f){if(0===t.length)throw new s.default("Found empty contents");if(e!==n.default.QR_CODE)throw new s.default("Can only encode QR_CODE, but got "+e);if(r<0||i<0)throw new s.default("Requested dimensions are too small: "+r+"x"+i);var l=a.default.L,c=d.QUIET_ZONE_SIZE;null!==f&&(void 0!==f.get(o.default.ERROR_CORRECTION)&&(l=a.default.fromString(f.get(o.default.ERROR_CORRECTION).toString())),void 0!==f.get(o.default.MARGIN)&&(c=Number.parseInt(f.get(o.default.MARGIN).toString(),10)));var h=u.default.encode(t,l,f);return d.renderResult(h,r,i,c)},d.renderResult=function(t,e,r,n){var o=t.getMatrix();if(null===o)throw new f.default;for(var a=o.getWidth(),u=o.getHeight(),s=a+2*n,l=u+2*n,d=Math.max(e,s),c=Math.max(r,l),h=Math.min(Math.floor(d/s),Math.floor(c/l)),p=Math.floor((d-a*h)/2),_=Math.floor((c-u*h)/2),g=new i.default(d,c),v=0,w=_;v<u;v++,w+=h)for(var y=0,A=p;y<a;y++,A+=h)1===o.get(y,v)&&g.setRegion(A,w,h,h);return g},d.QUIET_ZONE_SIZE=4,d);function d(){}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),o=r(18),i=r(4),a=r(153),u=r(154),s=r(155),f=r(156),l=r(157),d=(c.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=f.default.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()},c.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)},c.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return 0==e?new u.default(this.information.getSize(),u.default.FNC1,u.default.FNC1):new u.default(this.information.getSize(),e-1,u.default.FNC1)}var r=this.extractNumericValueFromBitArray(t,7),n=(r-8)/11,o=(r-8)%11;return new u.default(t+7,n,o)},c.prototype.extractNumericValueFromBitArray=function(t,e){return c.extractNumericValueFromBitArray(this.information,t,e)},c.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},c.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 s.default(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new s.default(this.current.getPosition(),this.buffer.toString())},c.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()},c.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 s.default(this.current.getPosition(),this.buffer.toString()):new s.default(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new l.default(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1())return e=new s.default(this.current.getPosition(),this.buffer.toString()),new l.default(!0,e);this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new l.default(!1)},c.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 s.default(this.current.getPosition(),this.buffer.toString());return new l.default(!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 l.default(!1)},c.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 s.default(this.current.getPosition(),this.buffer.toString());return new l.default(!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 l.default(!1)},c.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(5<=e&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(64<=r&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return 232<=n&&n<253},c.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15==e)return new a.default(t+5,a.default.FNC1);if(5<=e&&e<15)return new a.default(t+5,"0"+(e-5));var r,o=this.extractNumericValueFromBitArray(t,7);if(64<=o&&o<90)return new a.default(t+7,""+(o+1));if(90<=o&&o<116)return new a.default(t+7,""+(o+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 n.default}return new a.default(t+8,r)},c.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(5<=e&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return 16<=r&&r<63},c.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15==e)return new a.default(t+5,a.default.FNC1);if(5<=e&&e<15)return new a.default(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(32<=n&&n<58)return new a.default(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 o.default("Decoding invalid alphanumeric value: "+n)}return new a.default(t+6,r)},c.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},c.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},c.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},c);function c(t){this.buffer=new i.default,this.information=t}e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(86),o=(i.prototype.getInformation=function(){return this.information},i.prototype.getGeneralDecoder=function(){return this.generalDecoder},i);function i(t){this.information=t,this.generalDecoder=new n.default(t)}e.default=o},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(89),u=r(4),s=r(0),f=(o(l,i=a.default),l.prototype.parseInformation=function(){if(this.getInformation().getSize()!=l.HEADER_SIZE+a.default.GTIN_SIZE+l.WEIGHT_SIZE)throw new s.default;var t=new u.default;return this.encodeCompressedGtin(t,l.HEADER_SIZE),this.encodeCompressedWeight(t,l.HEADER_SIZE+a.default.GTIN_SIZE,l.WEIGHT_SIZE),t.toString()},l.HEADER_SIZE=5,l.WEIGHT_SIZE=15,l);function l(t){return i.call(this,t)||this}e.default=f},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(31),u=(o(s,i=a.default),s.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)},s);function s(t){return i.call(this,t)||this}e.default=u},function(t,e,r){t.exports=r(91)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(92));var n=r(32);e.ArgumentException=n.default;var o=r(39);e.ArithmeticException=o.default;var i=r(11);e.ChecksumException=i.default;var a=r(6);e.Exception=a.default;var u=r(2);e.FormatException=u.default;var s=r(1);e.IllegalArgumentException=s.default;var f=r(18);e.IllegalStateException=f.default;var l=r(0);e.NotFoundException=l.default;var d=r(82);e.ReaderException=d.default;var c=r(69);e.ReedSolomonException=c.default;var h=r(34);e.UnsupportedOperationException=h.default;var p=r(50);e.WriterException=p.default;var _=r(3);e.BarcodeFormat=_.default;var g=r(55);e.Binarizer=g.default;var v=r(52);e.BinaryBitmap=v.default;var w=r(8);e.DecodeHintType=w.default;var y=r(23);e.InvertedLuminanceSource=y.default;var A=r(24);e.LuminanceSource=A.default;var E=r(73);e.MultiFormatReader=E.default;var C=r(148);e.MultiFormatWriter=C.default;var m=r(149);e.PlanarYUVLuminanceSource=m.default;var I=r(9);e.Result=I.default;var S=r(14);e.ResultMetadataType=S.default;var O=r(150);e.RGBLuminanceSource=O.default;var T=r(15);e.BitArray=T.default;var R=r(12);e.BitMatrix=R.default;var b=r(40);e.BitSource=b.default;var N=r(22);e.CharacterSetECI=N.default;var M=r(28);e.DecoderResult=M.default;var P=r(70);e.DefaultGridSampler=P.default;var D=r(42);e.DetectorResult=D.default;var B=r(30);e.EncodeHintType=B.default;var L=r(54);e.GlobalHistogramBinarizer=L.default;var F=r(71);e.GridSampler=F.default;var x=r(43);e.GridSamplerInstance=x.default;var k=r(53);e.HybridBinarizer=k.default;var V=r(44);e.PerspectiveTransform=V.default;var H=r(41);e.StringUtils=H.default;var U=r(10);e.MathUtils=U.default;var j=r(72);e.WhiteRectangleDetector=j.default;var G=r(25);e.GenericGF=G.default;var X=r(27);e.GenericGFPoly=X.default;var W=r(38);e.ReedSolomonDecoder=W.default;var z=r(83);e.ReedSolomonEncoder=z.default;var Y=r(37);e.DataMatrixReader=Y.default;var Z=r(45);e.QRCodeReader=Z.default;var K=r(85);e.QRCodeWriter=K.default;var q=r(29);e.QRCodeDecoderErrorCorrectionLevel=q.default;var Q=r(48);e.QRCodeEncoder=Q.default;var J=r(49);e.QRCodeEncoderQRCode=J.default;var $=r(13);e.OneDReader=$.default;var tt=r(66);e.EAN13Reader=tt.default;var et=r(60);e.Code128Reader=et.default;var rt=r(65);e.ITFReader=rt.default;var nt=r(58);e.Code39Reader=nt.default;var ot=r(61);e.RSS14Reader=ot.default;var it=r(151);e.RSSExpandedReader=it.default;var at=r(35);e.MultiformatReader=at.default},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(93)),n(r(20)),n(r(102)),n(r(109)),n(r(142)),n(r(143)),n(r(144)),n(r(56)),n(r(57))},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(20),u=r(35),s=(o(f,i=a.BrowserCodeReader),f);function f(t,e){return void 0===t&&(t=500),i.call(this,new u.default(e),t,e)||this}e.BrowserBarcodeReader=s},function(t,e,r){function n(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var o,i,a;o=e,i=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])},a=function(t){function e(e){var r=this.constructor,o=t.call(this,e)||this;return Object.defineProperty(o,"name",{value:r.name,enumerable:!1}),function(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}(o,r.prototype),n(o),o}return function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e}(Error),o.CustomError=a,o.customErrorFactory=function(t,e){function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(!(this instanceof r))return new(r.bind.apply(r,[void 0].concat(o)));e.apply(this,o),t.apply(this,o),this.name=t.name||e.name,n(this,r)}return void 0===e&&(e=Error),Object.defineProperties(r,{prototype:{value:Object.create(e.prototype,{constructor:{value:r,writable:!0,configurable:!0}})}})}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(33),u=(o(s,i=a.default),s);function s(t,e){void 0===t&&(t=void 0),void 0===e&&(e=void 0);var r=i.call(this,e)||this;return r.index=t,r.message=e,r}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(36),u=(o(s,i=a.default),s.prototype.getFinderPattern=function(){return this.finderPattern},s.prototype.getCount=function(){return this.count},s.prototype.incrementCount=function(){this.count++},s);function s(t,e,r){var n=i.call(this,t,e)||this;return n.count=0,n.finderPattern=r,n}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(8),f=r(13),l=r(66),d=r(101),c=r(0),h=(o(p,a=f.default),p.prototype.decodeRow=function(t,e,r){var n,o;try{for(var a=i(this.readers),u=a.next();!u.done;u=a.next()){var s=u.value;try{return s.decodeRow(t,e,r)}catch(t){}}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}throw new c.default},p.prototype.reset=function(){var t,e;try{for(var r=i(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},p);function p(t){var e=a.call(this)||this,r=null==t?null:t.get(s.default.POSSIBLE_FORMATS),n=[];return null!=r&&(-1<r.indexOf(u.default.EAN_13)&&n.push(new l.default),-1<r.indexOf(u.default.EAN_8)&&n.push(new d.default)),0===n.length&&(n.push(new l.default),n.push(new d.default)),e.readers=n,e}e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(26),o=r(99),i=r(100),a=(u.decodeRow=function(t,e,r){var a=n.default.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new o.default).decodeRow(t,e,a)}catch(r){return(new i.default).decodeRow(t,e,a)}},u.EXTENSION_START_PATTERN=[1,1,2],u);function u(){}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(26),a=r(9),u=r(5),s=r(14),f=r(0),l=(d.prototype.decodeRow=function(t,e,r){var n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),s=n.toString(),f=d.parseExtensionString(s),l=[new u.default((r[0]+r[1])/2,t),new u.default(i,t)],c=new a.default(s,null,0,l,o.default.UPC_EAN_EXTENSION,(new Date).getTime());return null!=f&&c.putAllMetadata(f),c},d.prototype.decodeMiddle=function(t,e,r){var o,a,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var s=t.getSize(),l=e[1],c=0,h=0;h<5&&l<s;h++){var p=i.default.decodeDigit(t,u,l,i.default.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+p%10);try{for(var _=n(u),g=_.next();!g.done;g=_.next())l+=g.value}catch(t){o={error:t}}finally{try{g&&!g.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}10<=p&&(c|=1<<4-h),4!==h&&(l=t.getNextSet(l),l=t.getNextUnset(l))}if(5!==r.length)throw new f.default;var v=this.determineCheckDigit(c);if(d.extensionChecksum(r.toString())!==v)throw new f.default;return l},d.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;0<=n;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);for(r*=3,n=e-1;0<=n;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},d.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new f.default},d.parseExtensionString=function(t){if(5!==t.length)return null;var e=d.parseExtension5String(t);return null==e?null:new Map([[s.default.SUGGESTED_PRICE,e]])},d.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())},d);function d(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=[0,0,0,0],this.decodeRowStringBuffer=""}e.default=l},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(26),a=r(9),u=r(5),s=r(14),f=r(0),l=(d.prototype.decodeRow=function(t,e,r){var n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),s=n.toString(),f=d.parseExtensionString(s),l=[new u.default((r[0]+r[1])/2,t),new u.default(i,t)],c=new a.default(s,null,0,l,o.default.UPC_EAN_EXTENSION,(new Date).getTime());return null!=f&&c.putAllMetadata(f),c},d.prototype.decodeMiddle=function(t,e,r){var o,a,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var s=t.getSize(),l=e[1],d=0,c=0;c<2&&l<s;c++){var h=i.default.decodeDigit(t,u,l,i.default.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+h%10);try{for(var p=n(u),_=p.next();!_.done;_=p.next())l+=_.value}catch(t){o={error:t}}finally{try{_&&!_.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}10<=h&&(d|=1<<1-c),1!==c&&(l=t.getNextSet(l),l=t.getNextUnset(l))}if(2!==r.length)throw new f.default;if(parseInt(r.toString())%4!==d)throw new f.default;return l},d.parseExtensionString=function(t){return 2!==t.length?null:new Map([[s.default.ISSUE_NUMBER,parseInt(t)]])},d);function d(){this.decodeMiddleCounters=[0,0,0,0],this.decodeRowStringBuffer=""}e.default=l},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(67),f=(o(l,a=s.default),l.prototype.decodeMiddle=function(t,e,r){var n,o,a,u,f=this.decodeMiddleCounters;f[0]=0,f[1]=0,f[2]=0,f[3]=0;for(var l=t.getSize(),d=e[1],c=0;c<4&&d<l;c++){var h=s.default.decodeDigit(t,f,d,s.default.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+h);try{for(var p=i(f),_=p.next();!_.done;_=p.next())d+=_.value}catch(t){n={error:t}}finally{try{_&&!_.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}}for(d=s.default.findGuardPattern(t,d,!0,s.default.MIDDLE_PATTERN,new Array(s.default.MIDDLE_PATTERN.length).fill(0))[1],c=0;c<4&&d<l;c++){h=s.default.decodeDigit(t,f,d,s.default.L_PATTERNS),r+=String.fromCharCode("0".charCodeAt(0)+h);try{for(var g=i(f),v=g.next();!v.done;v=g.next())d+=v.value}catch(t){a={error:t}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(a)throw a.error}}}return{rowOffset:d,resultString:r}},l.prototype.getBarcodeFormat=function(){return u.default.EAN_8},l);function l(){var t=a.call(this)||this;return t.decodeMiddleCounters=[0,0,0,0],t}e.default=f},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(20),u=r(37),s=(o(f,i=a.BrowserCodeReader),f);function f(t){return void 0===t&&(t=500),i.call(this,new u.default,t)||this}e.BrowserDatamatrixCodeReader=s},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(38),i=r(25),a=r(104),u=r(106),s=r(107),f=r(11),l=(d.prototype.decode=function(t){var e,r,o=new a.default(t),i=o.getVersion(),f=o.readCodewords(),l=u.default.getDataBlocks(f,i),d=0;try{for(var c=n(l),h=c.next();!h.done;h=c.next())d+=h.value.getNumDataCodewords()}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}for(var p=new Uint8Array(d),_=l.length,g=0;g<_;g++){var v=l[g],w=v.getCodewords(),y=v.getNumDataCodewords();this.correctErrors(w,y);for(var A=0;A<y;A++)p[A*_+g]=w[A]}return s.default.decode(p)},d.prototype.correctErrors=function(t,e){t.length;var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new f.default}for(var n=0;n<e;n++)t[n]=r[n]},d);function d(){this.rsDecoder=new o.default(i.default.DATA_MATRIX_FIELD_256)}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(12),o=r(105),i=r(2),a=r(1),u=(s.prototype.getVersion=function(){return this.version},s.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return o.default.getVersionForDimensions(e,r)},s.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),a=this.mappingBitMatrix.getWidth(),u=!1,s=!1,f=!1,l=!1;do{if(r!==o||0!==n||u)if(r!==o-2||0!==n||0==(3&a)||s)if(r!==o+4||2!==n||0!=(7&a)||f)if(r!==o-2||0!==n||4!=(7&a)||l){for(;r<o&&0<=n&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,a)),n+=2,0<=(r-=2)&&n<a;);for(r+=1,n+=3;0<=r&&n<a&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,a)),n-=2,(r+=2)<o&&0<=n;);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,a),r-=2,n+=2,l=!0;else t[e++]=255&this.readCorner3(o,a),r-=2,n+=2,f=!0;else t[e++]=255&this.readCorner2(o,a),r-=2,n+=2,s=!0;else t[e++]=255&this.readCorner1(o,a),r-=2,n+=2,u=!0}while(r<o||n<a);if(e!==this.version.getTotalCodewords())throw new i.default;return t},s.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)},s.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},s.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},s.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},s.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},s.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},s.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new a.default("Dimension of bitMatrix must match the version size");for(var o=this.version.getDataRegionSizeRows(),i=this.version.getDataRegionSizeColumns(),u=e/o|0,s=r/i|0,f=u*o,l=s*i,d=new n.default(l,f),c=0;c<u;++c)for(var h=c*o,p=0;p<s;++p)for(var _=p*i,g=0;g<o;++g)for(var v=c*(o+2)+1+g,w=h+g,y=0;y<i;++y){var A=p*(i+2)+1+y;if(t.get(A,v)){var E=_+y;d.set(E,w)}}return d},s);function s(t){var e=t.getHeight();if(e<8||144<e||0!=(1&e))throw new i.default;this.version=s.readVersion(t),this.mappingBitMatrix=this.extractDataRegion(t),this.readMappingMatrix=new n.default(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),i=(a.prototype.getECCodewords=function(){return this.ecCodewords},a.prototype.getECBlocks=function(){return this.ecBlocks},a);function a(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}e.ECBlocks=i;var u=(s.prototype.getCount=function(){return this.count},s.prototype.getDataCodewords=function(){return this.dataCodewords},s);function s(t,e){this.count=t,this.dataCodewords=e}e.ECB=u;var f=(l.prototype.getVersionNumber=function(){return this.versionNumber},l.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},l.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},l.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},l.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},l.prototype.getTotalCodewords=function(){return this.totalCodewords},l.prototype.getECBlocks=function(){return this.ecBlocks},l.getVersionForDimensions=function(t,e){var r,i;if(0!=(1&t)||0!=(1&e))throw new o.default;try{for(var a=n(l.VERSIONS),u=a.next();!u.done;u=a.next()){var s=u.value;if(s.symbolSizeRows===t&&s.symbolSizeColumns===e)return s}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}throw new o.default},l.prototype.toString=function(){return""+this.versionNumber},l.buildVersions=function(){return[new l(1,10,10,8,8,new i(5,new u(1,3))),new l(2,12,12,10,10,new i(7,new u(1,5))),new l(3,14,14,12,12,new i(10,new u(1,8))),new l(4,16,16,14,14,new i(12,new u(1,12))),new l(5,18,18,16,16,new i(14,new u(1,18))),new l(6,20,20,18,18,new i(18,new u(1,22))),new l(7,22,22,20,20,new i(20,new u(1,30))),new l(8,24,24,22,22,new i(24,new u(1,36))),new l(9,26,26,24,24,new i(28,new u(1,44))),new l(10,32,32,14,14,new i(36,new u(1,62))),new l(11,36,36,16,16,new i(42,new u(1,86))),new l(12,40,40,18,18,new i(48,new u(1,114))),new l(13,44,44,20,20,new i(56,new u(1,144))),new l(14,48,48,22,22,new i(68,new u(1,174))),new l(15,52,52,24,24,new i(42,new u(2,102))),new l(16,64,64,14,14,new i(56,new u(2,140))),new l(17,72,72,16,16,new i(36,new u(4,92))),new l(18,80,80,18,18,new i(48,new u(4,114))),new l(19,88,88,20,20,new i(56,new u(4,144))),new l(20,96,96,22,22,new i(68,new u(4,174))),new l(21,104,104,24,24,new i(56,new u(6,136))),new l(22,120,120,18,18,new i(68,new u(6,175))),new l(23,132,132,20,20,new i(62,new u(8,163))),new l(24,144,144,22,22,new i(62,new u(8,156),new u(2,155))),new l(25,8,18,6,16,new i(7,new u(1,5))),new l(26,8,32,6,14,new i(11,new u(1,10))),new l(27,12,26,10,24,new i(14,new u(1,16))),new l(28,12,36,10,16,new i(18,new u(1,22))),new l(29,16,36,14,16,new i(24,new u(1,32))),new l(30,16,48,14,22,new i(28,new u(1,49)))]},l.VERSIONS=l.buildVersions(),l);function l(t,e,r,o,i,a){var u,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=o,this.dataRegionSizeColumns=i;var f=0,l=(this.ecBlocks=a).getECCodewords(),d=a.getECBlocks();try{for(var c=n(d),h=c.next();!h.done;h=c.next()){var p=h.value;f+=p.getCount()*(p.getDataCodewords()+l)}}catch(t){u={error:t}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(u)throw u.error}}this.totalCodewords=f}e.default=f},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=(a.getDataBlocks=function(t,e){var r,i,u,s,f=e.getECBlocks(),l=0,d=f.getECBlocks();try{for(var c=n(d),h=c.next();!h.done;h=c.next())l+=(w=h.value).getCount()}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var p=new Array(l),_=0;try{for(var g=n(d),v=g.next();!v.done;v=g.next())for(var w=v.value,y=0;y<w.getCount();y++){var A=w.getDataCodewords(),E=f.getECCodewords()+A;p[_++]=new a(A,new Uint8Array(E))}}catch(t){u={error:t}}finally{try{v&&!v.done&&(s=g.return)&&s.call(g)}finally{if(u)throw u.error}}var C=p[0].codewords.length-f.getECCodewords(),m=C-1,I=0;for(y=0;y<m;y++)for(var S=0;S<_;S++)p[S].codewords[y]=t[I++];var O=24===e.getVersionNumber(),T=O?8:_;for(S=0;S<T;S++)p[S].codewords[C-1]=t[I++];var R=p[0].codewords.length;for(y=C;y<R;y++)for(S=0;S<_;S++){var b=O?(S+8)%_:S,N=O&&7<b?y-1:y;p[b].codewords[N]=t[I++]}if(I!==t.length)throw new o.default;return p},a.prototype.getNumDataCodewords=function(){return this.numDataCodewords},a.prototype.getCodewords=function(){return this.codewords},a);function a(t,e){this.numDataCodewords=t,this.codewords=e}e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,i=r(28),a=r(40),u=r(4),s=r(21),f=r(41),l=r(2),d=r(18);(o=n=n||{})[o.PAD_ENCODE=0]="PAD_ENCODE",o[o.ASCII_ENCODE=1]="ASCII_ENCODE",o[o.C40_ENCODE=2]="C40_ENCODE",o[o.TEXT_ENCODE=3]="TEXT_ENCODE",o[o.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",o[o.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",o[o.BASE256_ENCODE=6]="BASE256_ENCODE";var c=(h.decode=function(t){var e=new a.default(t),r=new u.default,o=new u.default,s=new Array,f=n.ASCII_ENCODE;do{if(f===n.ASCII_ENCODE)f=this.decodeAsciiSegment(e,r,o);else{switch(f){case n.C40_ENCODE:this.decodeC40Segment(e,r);break;case n.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case n.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case n.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case n.BASE256_ENCODE:this.decodeBase256Segment(e,r,s);break;default:throw new l.default}f=n.ASCII_ENCODE}}while(f!==n.PAD_ENCODE&&0<e.available());return 0<o.length()&&r.append(o.toString()),new i.default(t,r.toString(),0===s.length?null:s,null)},h.decodeAsciiSegment=function(t,e,r){var o=!1;do{var i=t.readBits(8);if(0===i)throw new l.default;if(i<=128)return o&&(i+=128),e.append(String.fromCharCode(i-1)),n.ASCII_ENCODE;if(129===i)return n.PAD_ENCODE;if(i<=229){var a=i-130;a<10&&e.append("0"),e.append(""+a)}else switch(i){case 230:return n.C40_ENCODE;case 231:return n.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:break;case 235:o=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return n.ANSIX12_ENCODE;case 239:return n.TEXT_ENCODE;case 240:return n.EDIFACT_ENCODE;case 241:break;default:if(254!==i||0!==t.available())throw new l.default}}while(0<t.available());return n.ASCII_ENCODE},h.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 u=n[a];switch(o){case 0:if(u<3)o=u+1;else{if(!(u<this.C40_BASIC_SET_CHARS.length))throw new l.default;var s=this.C40_BASIC_SET_CHARS[u];r?(e.append(String.fromCharCode(s.charCodeAt(0)+128)),r=!1):e.append(s)}break;case 1:r?(e.append(String.fromCharCode(u+128)),r=!1):e.append(String.fromCharCode(u)),o=0;break;case 2:if(u<this.C40_SHIFT2_SET_CHARS.length)s=this.C40_SHIFT2_SET_CHARS[u],r?(e.append(String.fromCharCode(s.charCodeAt(0)+128)),r=!1):e.append(s);else switch(u){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new l.default}o=0;break;case 3:r?(e.append(String.fromCharCode(u+224)),r=!1):e.append(String.fromCharCode(u+96)),o=0;break;default:throw new l.default}}}while(0<t.available())},h.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 u=n[a];switch(o){case 0:if(u<3)o=u+1;else{if(!(u<this.TEXT_BASIC_SET_CHARS.length))throw new l.default;var s=this.TEXT_BASIC_SET_CHARS[u];r?(e.append(String.fromCharCode(s.charCodeAt(0)+128)),r=!1):e.append(s)}break;case 1:r?(e.append(String.fromCharCode(u+128)),r=!1):e.append(String.fromCharCode(u)),o=0;break;case 2:if(u<this.TEXT_SHIFT2_SET_CHARS.length)s=this.TEXT_SHIFT2_SET_CHARS[u],r?(e.append(String.fromCharCode(s.charCodeAt(0)+128)),r=!1):e.append(s);else switch(u){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new l.default}o=0;break;case 3:if(!(u<this.TEXT_SHIFT3_SET_CHARS.length))throw new l.default;s=this.TEXT_SHIFT3_SET_CHARS[u],r?(e.append(String.fromCharCode(s.charCodeAt(0)+128)),r=!1):e.append(s),o=0;break;default:throw new l.default}}}while(0<t.available())},h.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 l.default;e.append(String.fromCharCode(i+51))}}}}while(0<t.available())},h.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);n-=1600*(r[0]=o),o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},h.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(0<t.available())},h.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 l.default;for(var a=new Uint8Array(n),u=0;u<n;u++){if(t.available()<8)throw new l.default;a[u]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(s.default.decode(a,f.default.ISO88591))}catch(t){throw new d.default("Platform does not support required encoding: "+t.message)}},h.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return 0<=r?r:256+r},h.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"],h.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],h.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"],h.TEXT_SHIFT2_SET_CHARS=h.C40_SHIFT2_SET_CHARS,h.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)],h);function h(){}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},o=this&&this.__read||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||0<e--)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var i=r(5),a=r(42),u=r(43),s=r(10),f=r(72),l=r(0),d=(c.prototype.detect=function(){var t,e,r=this.rectangleDetector.detect(),u=r[0],s=r[1],f=r[2],d=r[3],p=[];p.push(this.transitionsBetween(u,s)),p.push(this.transitionsBetween(u,f)),p.push(this.transitionsBetween(s,d)),p.push(this.transitionsBetween(f,d)),p.sort(h.resultPointsAndTransitionsComparator);var _=p[0],g=p[1],v=new Map;c.increment(v,_.getFrom()),c.increment(v,_.getTo()),c.increment(v,g.getFrom()),c.increment(v,g.getTo());var w=null,y=null,A=null;try{for(var E=n(Array.from(v.entries())),C=E.next();!C.done;C=E.next()){var m=o(C.value,2),I=m[0];2===m[1]?y=I:null==w?w=I:A=I}}catch(e){t={error:e}}finally{try{C&&!C.done&&(e=E.return)&&e.call(E)}finally{if(t)throw t.error}}if(null==w||null==y||null==A)throw new l.default;var S=[w,y,A];i.default.orderBestPatterns(S);var O=S[0];y=S[1];var T,R=S[2];T=v.has(u)?v.has(s)?v.has(f)?d:f:s:u;var b,N,M=this.transitionsBetween(R,T).getTransitions(),P=this.transitionsBetween(O,T).getTransitions();if(1==(1&M)&&M++,1==(1&P)&&P++,7*(P+=2)<=4*(M+=2)||7*M<=4*P)null==(N=this.correctTopRightRectangular(y,O,R,T,M,P))&&(N=T),1==(1&(M=this.transitionsBetween(R,N).getTransitions()))&&M++,1==(1&(P=this.transitionsBetween(O,N).getTransitions()))&&P++,b=c.sampleGrid(this.image,R,y,O,N,M,P);else{var D=Math.min(P,M);null==(N=this.correctTopRight(y,O,R,T,D))&&(N=T);var B=Math.max(this.transitionsBetween(R,N).getTransitions(),this.transitionsBetween(O,N).getTransitions());1==(1&++B)&&B++,b=c.sampleGrid(this.image,R,y,O,N,B,B)}return new a.default(b,[R,y,O,N])},c.prototype.correctTopRightRectangular=function(t,e,r,n,o,a){var u=c.distance(t,e)/o,s=c.distance(r,n),f=(n.getX()-r.getX())/s,l=(n.getY()-r.getY())/s,d=new i.default(n.getX()+u*f,n.getY()+u*l);u=c.distance(t,r)/a,s=c.distance(e,n),f=(n.getX()-e.getX())/s,l=(n.getY()-e.getY())/s;var h=new i.default(n.getX()+u*f,n.getY()+u*l);return this.isValid(d)?this.isValid(h)?Math.abs(o-this.transitionsBetween(r,d).getTransitions())+Math.abs(a-this.transitionsBetween(e,d).getTransitions())<=Math.abs(o-this.transitionsBetween(r,h).getTransitions())+Math.abs(a-this.transitionsBetween(e,h).getTransitions())?d:h:d:this.isValid(h)?h:null},c.prototype.correctTopRight=function(t,e,r,n,o){var a=c.distance(t,e)/o,u=c.distance(r,n),s=(n.getX()-r.getX())/u,f=(n.getY()-r.getY())/u,l=new i.default(n.getX()+a*s,n.getY()+a*f);a=c.distance(t,r)/o,u=c.distance(e,n),s=(n.getX()-e.getX())/u,f=(n.getY()-e.getY())/u;var d=new i.default(n.getX()+a*s,n.getY()+a*f);return this.isValid(l)?this.isValid(d)?Math.abs(this.transitionsBetween(r,l).getTransitions()-this.transitionsBetween(e,l).getTransitions())<=Math.abs(this.transitionsBetween(r,d).getTransitions()-this.transitionsBetween(e,d).getTransitions())?l:d:l:this.isValid(d)?d:null},c.prototype.isValid=function(t){return 0<=t.getX()&&t.getX()<this.image.getWidth()&&0<t.getY()&&t.getY()<this.image.getHeight()},c.distance=function(t,e){return s.default.round(i.default.distance(t,e))},c.increment=function(t,e){var r=t.get(e);t.set(e,null==r?1:r+1)},c.sampleGrid=function(t,e,r,n,o,i,a){return u.default.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())},c.prototype.transitionsBetween=function(t,e){var r=0|t.getX(),n=0|t.getY(),o=0|e.getX(),i=0|e.getY(),a=Math.abs(i-n)>Math.abs(o-r);if(a){var u=r;r=n,n=u,u=o,o=i,i=u}for(var s=Math.abs(o-r),f=Math.abs(i-n),l=-s/2,d=n<i?1:-1,c=r<o?1:-1,p=0,_=this.image.get(a?n:r,a?r:n),g=r,v=n;g!==o;g+=c){var w=this.image.get(a?v:g,a?g:v);if(w!==_&&(p++,_=w),0<(l+=f)){if(v===i)break;v+=d,l-=s}}return new h(t,e,p)},c);function c(t){this.image=t,this.rectangleDetector=new f.default(t)}e.default=d;var h=(p.prototype.getFrom=function(){return this.from},p.prototype.getTo=function(){return this.to},p.prototype.getTransitions=function(){return this.transitions},p.prototype.toString=function(){return this.from+"/"+this.to+"/"+this.transitions},p.resultPointsAndTransitionsComparator=function(t,e){return t.getTransitions()-e.getTransitions()},p);function p(t,e,r){this.from=t,this.to=e,this.transitions=r}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(20),u=r(73),s=(o(f,i=a.BrowserCodeReader),f.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},f);function f(t,e){void 0===t&&(t=null),void 0===e&&(e=500);var r=new u.default;return r.setHints(t),i.call(this,r,e)||this}e.BrowserMultiFormatReader=s},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(12),i=r(25),a=r(38),u=r(111),s=r(75),f=r(115),l=r(116),d=r(11),c=(h.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(o.default.parseFromBooleanArray(t),e)},h.prototype.decodeBitMatrix=function(t,e){var r=new u.default(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new s.default(!0)),o}catch(t){if(null!==n)throw n;throw t}},h.prototype.decodeBitMatrixParser=function(t,e){var r,o,i,a,u=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),d=t.readCodewords(),c=f.default.getDataBlocks(d,u,s),h=0;try{for(var p=n(c),_=p.next();!_.done;_=p.next())h+=(A=_.value).getNumDataCodewords()}catch(t){r={error:t}}finally{try{_&&!_.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}var g=new Uint8Array(h),v=0;try{for(var w=n(c),y=w.next();!y.done;y=w.next()){var A,E=(A=y.value).getCodewords(),C=A.getNumDataCodewords();this.correctErrors(E,C);for(var m=0;m<C;m++)g[v++]=E[m]}}catch(t){i={error:t}}finally{try{y&&!y.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}return l.default.decode(g,u,s,e)},h.prototype.correctErrors=function(t,e){t.length;var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new d.default}for(var n=0;n<e;n++)t[n]=r[n]},h);function h(){this.rsDecoder=new a.default(i.default.QR_CODE_FIELD_256)}e.default=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(46),o=r(74),i=r(114),a=r(2),u=(s.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;0<=r;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),i=0,u=n-7;for(r=n-1;u<=r;r--)i=this.copyBit(8,r,i);for(e=n-8;e<n;e++)i=this.copyBit(e,8,i);if(this.parsedFormatInfo=o.default.decodeFormatInformation(t,i),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new a.default},s.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 n.default.getVersionForNumber(e);for(var r=0,o=t-11,i=5;0<=i;i--)for(var u=t-9;o<=u;u--)r=this.copyBit(u,i,r);var s=n.default.decodeVersionInformation(r);if(null!==s&&s.getDimensionForVersion()===t)return this.parsedVersion=s;for(r=0,u=5;0<=u;u--)for(i=t-9;o<=i;i--)r=this.copyBit(u,i,r);if(null!==(s=n.default.decodeVersionInformation(r))&&s.getDimensionForVersion()===t)return this.parsedVersion=s;throw new a.default},s.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},s.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=i.default.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),u=!0,s=new Uint8Array(e.getTotalCodewords()),f=0,l=0,d=0,c=n-1;0<c;c-=2){6===c&&c--;for(var h=0;h<n;h++)for(var p=u?n-1-h:h,_=0;_<2;_++)o.get(c-_,p)||(d++,l<<=1,this.bitMatrix.get(c-_,p)&&(l|=1),8===d&&(s[f++]=l,l=d=0));u=!u}if(f!==e.getTotalCodewords())throw new a.default;return s},s.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=i.default.values[this.parsedFormatInfo.getDataMask()],e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},s.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},s.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))},s);function s(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new a.default;this.bitMatrix=t}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=(i.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},i.prototype.getNumBlocks=function(){var t,e,r=0,o=this.ecBlocks;try{for(var i=n(o),a=i.next();!a.done;a=i.next())r+=a.value.getCount()}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r},i.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},i.prototype.getECBlocks=function(){return this.ecBlocks},i);function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getCount=function(){return this.count},o.prototype.getDataCodewords=function(){return this.dataCodewords},o);function o(t,e){this.count=t,this.dataCodewords=e}e.default=n},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=e.DataMaskValues||(e.DataMaskValues={}))[o.DATA_MASK_000=0]="DATA_MASK_000",o[o.DATA_MASK_001=1]="DATA_MASK_001",o[o.DATA_MASK_010=2]="DATA_MASK_010",o[o.DATA_MASK_011=3]="DATA_MASK_011",o[o.DATA_MASK_100=4]="DATA_MASK_100",o[o.DATA_MASK_101=5]="DATA_MASK_101",o[o.DATA_MASK_110=6]="DATA_MASK_110",o[o.DATA_MASK_111=7]="DATA_MASK_111";var i=(a.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)},a.values=new Map([[n.DATA_MASK_000,new a(n.DATA_MASK_000,function(t,e){return 0==(t+e&1)})],[n.DATA_MASK_001,new a(n.DATA_MASK_001,function(t,e){return 0==(1&t)})],[n.DATA_MASK_010,new a(n.DATA_MASK_010,function(t,e){return e%3==0})],[n.DATA_MASK_011,new a(n.DATA_MASK_011,function(t,e){return(t+e)%3==0})],[n.DATA_MASK_100,new a(n.DATA_MASK_100,function(t,e){return 0==(Math.floor(t/2)+Math.floor(e/3)&1)})],[n.DATA_MASK_101,new a(n.DATA_MASK_101,function(t,e){return t*e%6==0})],[n.DATA_MASK_110,new a(n.DATA_MASK_110,function(t,e){return t*e%6<3})],[n.DATA_MASK_111,new a(n.DATA_MASK_111,function(t,e){return 0==(t+e+t*e%3&1)})]]),a);function a(t,e){this.value=t,this.isMasked=e}e.default=i},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=(a.getDataBlocks=function(t,e,r){var i,u,s,f;if(t.length!==e.getTotalCodewords())throw new o.default;var l=e.getECBlocksForLevel(r),d=0,c=l.getECBlocks();try{for(var h=n(c),p=h.next();!p.done;p=h.next())d+=(y=p.value).getCount()}catch(t){i={error:t}}finally{try{p&&!p.done&&(u=h.return)&&u.call(h)}finally{if(i)throw i.error}}var _=new Array(d),g=0;try{for(var v=n(c),w=v.next();!w.done;w=v.next())for(var y=w.value,A=0;A<y.getCount();A++){var E=y.getDataCodewords(),C=l.getECCodewordsPerBlock()+E;_[g++]=new a(E,new Uint8Array(C))}}catch(t){s={error:t}}finally{try{w&&!w.done&&(f=v.return)&&f.call(v)}finally{if(s)throw s.error}}for(var m=_[0].codewords.length,I=_.length-1;0<=I&&_[I].codewords.length!==m;)I--;I++;var S=m-l.getECCodewordsPerBlock(),O=0;for(A=0;A<S;A++)for(var T=0;T<g;T++)_[T].codewords[A]=t[O++];for(T=I;T<g;T++)_[T].codewords[S]=t[O++];var R=_[0].codewords.length;for(A=S;A<R;A++)for(T=0;T<g;T++){var b=T<I?A:A+1;_[T].codewords[b]=t[O++]}return _},a.prototype.getNumDataCodewords=function(){return this.numDataCodewords},a.prototype.getCodewords=function(){return this.codewords},a);function a(t,e){this.numDataCodewords=t,this.codewords=e}e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(40),o=r(22),i=r(28),a=r(41),u=r(76),s=r(4),f=r(21),l=r(2),d=(c.decode=function(t,e,r,a){var f=new n.default(t),d=new s.default,h=new Array,p=-1,_=-1;try{var g=null,v=!1,w=void 0;do{if(f.available()<4)w=u.default.TERMINATOR;else{var y=f.readBits(4);w=u.default.forBits(y)}switch(w){case u.default.TERMINATOR:break;case u.default.FNC1_FIRST_POSITION:case u.default.FNC1_SECOND_POSITION:v=!0;break;case u.default.STRUCTURED_APPEND:if(f.available()<16)throw new l.default;p=f.readBits(8),_=f.readBits(8);break;case u.default.ECI:var A=c.parseECIValue(f);if(null===(g=o.default.getCharacterSetECIByValue(A)))throw new l.default;break;case u.default.HANZI:var E=f.readBits(4),C=f.readBits(w.getCharacterCountBits(e));E===c.GB2312_SUBSET&&c.decodeHanziSegment(f,d,C);break;default:var m=f.readBits(w.getCharacterCountBits(e));switch(w){case u.default.NUMERIC:c.decodeNumericSegment(f,d,m);break;case u.default.ALPHANUMERIC:c.decodeAlphanumericSegment(f,d,m,v);break;case u.default.BYTE:c.decodeByteSegment(f,d,m,g,h,a);break;case u.default.KANJI:c.decodeKanjiSegment(f,d,m);break;default:throw new l.default}}}while(w!==u.default.TERMINATOR)}catch(t){throw new l.default}return new i.default(t,d.toString(),0===h.length?null:h,null===r?null:r.toString(),p,_)},c.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new l.default;for(var n=new Uint8Array(2*r),o=0;0<r;){var i=t.readBits(13),u=i/96<<8&4294967295|i%96;u+=u<959?41377:42657,n[o]=u>>8&255,n[o+1]=255&u,o+=2,r--}try{e.append(f.default.decode(n,a.default.GB2312))}catch(t){throw new l.default(t)}},c.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new l.default;for(var n=new Uint8Array(2*r),o=0;0<r;){var i=t.readBits(13),u=i/192<<8&4294967295|i%192;u+=u<7936?33088:49472,n[o]=u>>8,n[o+1]=u,o+=2,r--}try{e.append(f.default.decode(n,a.default.SHIFT_JIS))}catch(t){throw new l.default(t)}},c.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new l.default;for(var u,s=new Uint8Array(r),d=0;d<r;d++)s[d]=t.readBits(8);u=null===n?a.default.guessEncoding(s,i):n.getName();try{e.append(f.default.decode(s,u))}catch(t){throw new l.default(t)}o.push(s)},c.toAlphaNumericChar=function(t){if(t>=c.ALPHANUMERIC_CHARS.length)throw new l.default;return c.ALPHANUMERIC_CHARS[t]},c.decodeAlphanumericSegment=function(t,e,r,n){for(var o=e.length();1<r;){if(t.available()<11)throw new l.default;var i=t.readBits(11);e.append(c.toAlphaNumericChar(Math.floor(i/45))),e.append(c.toAlphaNumericChar(i%45)),r-=2}if(1===r){if(t.available()<6)throw new l.default;e.append(c.toAlphaNumericChar(t.readBits(6)))}if(n)for(var a=o;a<e.length();a++)"%"===e.charAt(a)&&(a<e.length()-1&&"%"===e.charAt(a+1)?e.deleteCharAt(a+1):e.setCharAt(a,String.fromCharCode(29)))},c.decodeNumericSegment=function(t,e,r){for(;3<=r;){if(t.available()<10)throw new l.default;var n=t.readBits(10);if(1e3<=n)throw new l.default;e.append(c.toAlphaNumericChar(Math.floor(n/100))),e.append(c.toAlphaNumericChar(Math.floor(n/10)%10)),e.append(c.toAlphaNumericChar(n%10)),r-=3}if(2===r){if(t.available()<7)throw new l.default;var o=t.readBits(7);if(100<=o)throw new l.default;e.append(c.toAlphaNumericChar(Math.floor(o/10))),e.append(c.toAlphaNumericChar(o%10))}else if(1===r){if(t.available()<4)throw new l.default;var i=t.readBits(4);if(10<=i)throw new l.default;e.append(c.toAlphaNumericChar(i))}},c.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))throw new l.default;return(31&e)<<16&4294967295|t.readBits(16)},c.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",c.GB2312_SUBSET=1,c);function c(){}e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8),o=r(5),i=r(42),a=r(43),u=r(44),s=r(10),f=r(46),l=r(118),d=r(121),c=r(0),h=(p.prototype.getImage=function(){return this.image},p.prototype.getResultPointCallback=function(){return this.resultPointCallback},p.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(n.default.NEED_RESULT_POINT_CALLBACK);var e=new l.default(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},p.prototype.processFinderPatternInfo=function(t){var e=t.getTopLeft(),r=t.getTopRight(),n=t.getBottomLeft(),o=this.calculateModuleSize(e,r,n);if(o<1)throw new c.default("No pattern found in proccess finder.");var a=p.computeDimension(e,r,n,o),u=f.default.getProvisionalVersionForDimension(a),s=u.getDimensionForVersion()-7,l=null;if(0<u.getAlignmentPatternCenters().length)for(var d=r.getX()-e.getX()+n.getX(),h=r.getY()-e.getY()+n.getY(),_=1-3/s,g=Math.floor(e.getX()+_*(d-e.getX())),v=Math.floor(e.getY()+_*(h-e.getY())),w=4;w<=16;w<<=1)try{l=this.findAlignmentInRegion(o,g,v,w);break}catch(t){if(!(t instanceof c.default))throw t}var y,A=p.createTransform(e,r,n,l,a),E=p.sampleGrid(this.image,A,a);return y=null===l?[n,e,r]:[n,e,r,l],new i.default(E,y)},p.createTransform=function(t,e,r,n,o){var i,a,s,f,l=o-3.5;return f=s=null!==n?(i=n.getX(),a=n.getY(),l-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),l),u.default.quadrilateralToQuadrilateral(3.5,3.5,l,3.5,s,f,3.5,l,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},p.sampleGrid=function(t,e,r){return a.default.getInstance().sampleGridWithTransform(t,r,r,e)},p.computeDimension=function(t,e,r,n){var i=s.default.round(o.default.distance(t,e)/n),a=s.default.round(o.default.distance(t,r)/n),u=Math.floor((i+a)/2)+7;switch(3&u){case 0:u++;break;case 2:u--;break;case 3:throw new c.default("Dimensions could be not found.")}return u},p.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},p.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},p.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 u=Math.floor(e-(n-e)*i);return i=1,u<0?(i=e/(e-u),u=0):u>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(u-e),u=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,u))-1},p.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),u=Math.abs(n-e),f=-a/2,l=t<r?1:-1,d=e<n?1:-1,c=0,h=r+l,p=t,_=e;p!==h;p+=l){var g=o?_:p,v=o?p:_;if(1===c===this.image.get(g,v)){if(2===c)return s.default.distance(p,_,t,e);c++}if(0<(f+=u)){if(_===n)break;_+=d,f-=a}}return 2===c?s.default.distance(r+l,n,t,e):NaN},p.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 c.default("Alignment top exceeds estimated module size.");var u=Math.max(0,r-o),s=Math.min(this.image.getHeight()-1,r+o);if(s-u<3*t)throw new c.default("Alignment bottom exceeds estimated module size.");return new d.default(this.image,i,u,a-i,s-u,t,this.resultPointCallback).find()},p);function p(t){this.image=t}e.default=h},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),i=r(5),a=r(119),u=r(120),s=r(0),f=(l.prototype.getImage=function(){return this.image},l.prototype.getPossibleCenters=function(){return this.possibleCenters},l.prototype.find=function(t){var e=null!=t&&void 0!==t.get(o.default.TRY_HARDER),r=null!=t&&void 0!==t.get(o.default.PURE_BARCODE),n=this.image,a=n.getHeight(),s=n.getWidth(),f=Math.floor(3*a/(4*l.MAX_MODULES));(f<l.MIN_SKIP||e)&&(f=l.MIN_SKIP);for(var d=!1,c=new Int32Array(5),h=f-1;h<a&&!d;h+=f){c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var p=c[4]=0,_=0;_<s;_++)if(n.get(_,h))1==(1&p)&&p++,c[p]++;else if(0==(1&p))if(4===p)if(l.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,h,_,r)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,p=3;continue}if(f=2,!0===this.hasSkipped)d=this.haveMultiplyConfirmedCenters();else{var g=this.findRowSkip();g>c[2]&&(h+=g-c[2]-f,_=s-1)}c[p=0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,p=3;else c[++p]++;else c[p]++;l.foundPatternCross(c)&&!0===this.handlePossibleCenter(c,h,s,r)&&(f=c[0],this.hasSkipped&&(d=this.haveMultiplyConfirmedCenters()))}var v=this.selectBestPatterns();return i.default.orderBestPatterns(v),new u.default(v)},l.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},l.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},l.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},l.prototype.crossCheckDiagonal=function(t,e,r,n){for(var o=this.getCrossCheckStateCount(),i=0,a=this.image;i<=t&&i<=e&&a.get(e-i,t-i);)o[2]++,i++;if(t<i||e<i)return!1;for(;i<=t&&i<=e&&!a.get(e-i,t-i)&&o[1]<=r;)o[1]++,i++;if(t<i||e<i||o[1]>r)return!1;for(;i<=t&&i<=e&&a.get(e-i,t-i)&&o[0]<=r;)o[0]++,i++;if(o[0]>r)return!1;var u=a.getHeight(),s=a.getWidth();for(i=1;t+i<u&&e+i<s&&a.get(e+i,t+i);)o[2]++,i++;if(u<=t+i||s<=e+i)return!1;for(;t+i<u&&e+i<s&&!a.get(e+i,t+i)&&o[3]<r;)o[3]++,i++;if(u<=t+i||s<=e+i||o[3]>=r)return!1;for(;t+i<u&&e+i<s&&a.get(e+i,t+i)&&o[4]<r;)o[4]++,i++;if(o[4]>=r)return!1;var f=o[0]+o[1]+o[2]+o[3]+o[4];return Math.abs(f-n)<2*n&&l.foundPatternCross(o)},l.prototype.crossCheckVertical=function(t,e,r,n){for(var o=this.image,i=o.getHeight(),a=this.getCrossCheckStateCount(),u=t;0<=u&&o.get(e,u);)a[2]++,u--;if(u<0)return NaN;for(;0<=u&&!o.get(e,u)&&a[1]<=r;)a[1]++,u--;if(u<0||a[1]>r)return NaN;for(;0<=u&&o.get(e,u)&&a[0]<=r;)a[0]++,u--;if(a[0]>r)return NaN;for(u=t+1;u<i&&o.get(e,u);)a[2]++,u++;if(u===i)return NaN;for(;u<i&&!o.get(e,u)&&a[3]<r;)a[3]++,u++;if(u===i||a[3]>=r)return NaN;for(;u<i&&o.get(e,u)&&a[4]<r;)a[4]++,u++;if(a[4]>=r)return NaN;var s=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(s-n)>=2*n?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,u):NaN},l.prototype.crossCheckHorizontal=function(t,e,r,n){for(var o=this.image,i=o.getWidth(),a=this.getCrossCheckStateCount(),u=t;0<=u&&o.get(u,e);)a[2]++,u--;if(u<0)return NaN;for(;0<=u&&!o.get(u,e)&&a[1]<=r;)a[1]++,u--;if(u<0||a[1]>r)return NaN;for(;0<=u&&o.get(u,e)&&a[0]<=r;)a[0]++,u--;if(a[0]>r)return NaN;for(u=t+1;u<i&&o.get(u,e);)a[2]++,u++;if(u===i)return NaN;for(;u<i&&!o.get(u,e)&&a[3]<r;)a[3]++,u++;if(u===i||a[3]>=r)return NaN;for(;u<i&&o.get(u,e)&&a[4]<r;)a[4]++,u++;if(a[4]>=r)return NaN;var s=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(s-n)>=n?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,u):NaN},l.prototype.handlePossibleCenter=function(t,e,r,n){var o=t[0]+t[1]+t[2]+t[3]+t[4],i=l.centerFromEnd(t,r),u=this.crossCheckVertical(e,Math.floor(i),t[2],o);if(isNaN(u)||(i=this.crossCheckHorizontal(Math.floor(i),Math.floor(u),t[2],o),isNaN(i)||n&&!this.crossCheckDiagonal(Math.floor(u),Math.floor(i),t[2],o)))return!1;for(var s=o/7,f=!1,d=this.possibleCenters,c=0,h=d.length;c<h;c++){var p=d[c];if(p.aboutEquals(s,u,i)){d[c]=p.combineEstimate(u,i,s),f=!0;break}}if(!f){var _=new a.default(i,u,s);d.push(_),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(_)}return!0},l.prototype.findRowSkip=function(){var t,e;if(this.possibleCenters.length<=1)return 0;var r=null;try{for(var o=n(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=l.CENTER_QUORUM){if(null!=r)return this.hasSkipped=!0,Math.floor((Math.abs(r.getX()-a.getX())-Math.abs(r.getY()-a.getY()))/2);r=a}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return 0},l.prototype.haveMultiplyConfirmedCenters=function(){var t,e,r,o,i=0,a=0,u=this.possibleCenters.length;try{for(var s=n(this.possibleCenters),f=s.next();!f.done;f=s.next())(_=f.value).getCount()>=l.CENTER_QUORUM&&(i++,a+=_.getEstimatedModuleSize())}catch(e){t={error:e}}finally{try{f&&!f.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(i<3)return!1;var d=a/u,c=0;try{for(var h=n(this.possibleCenters),p=h.next();!p.done;p=h.next()){var _=p.value;c+=Math.abs(_.getEstimatedModuleSize()-d)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}return c<=.05*a},l.prototype.selectBestPatterns=function(){var t,e,r,o,i=this.possibleCenters.length;if(i<3)throw new s.default;var a,u=this.possibleCenters;if(3<i){var f=0,l=0;try{for(var d=n(this.possibleCenters),c=d.next();!c.done;c=d.next()){var h=c.value.getEstimatedModuleSize();f+=h,l+=h*h}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}a=f/i;var p=Math.sqrt(l/i-a*a);u.sort(function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-a),n=Math.abs(t.getEstimatedModuleSize()-a);return r<n?-1:n<r?1:0});for(var _=Math.max(.2*a,p),g=0;g<u.length&&3<u.length;g++){var v=u[g];Math.abs(v.getEstimatedModuleSize()-a)>_&&(u.splice(g,1),g--)}}if(3<u.length){f=0;try{for(var w=n(u),y=w.next();!y.done;y=w.next())f+=y.value.getEstimatedModuleSize()}catch(e){r={error:e}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(r)throw r.error}}a=f/u.length,u.sort(function(t,e){if(e.getCount()!==t.getCount())return e.getCount()-t.getCount();var r=Math.abs(e.getEstimatedModuleSize()-a),n=Math.abs(t.getEstimatedModuleSize()-a);return r<n?1:n<r?-1:0}),u.splice(3)}return[u[0],u[1],u[2]]},l.CENTER_QUORUM=2,l.MIN_SKIP=3,l.MAX_MODULES=57,l);function l(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}e.default=f},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(5),u=(o(s,i=a.default),s.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},s.prototype.getCount=function(){return this.count},s.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},s.prototype.combineEstimate=function(t,e,r){var n=this.count+1;return new s((this.count*this.getX()+e)/n,(this.count*this.getY()+t)/n,(this.count*this.estimatedModuleSize+r)/n,n)},s);function s(t,e,r,n){var o=i.call(this,t,e)||this;return o.estimatedModuleSize=r,void 0===(o.count=n)&&(o.count=1),o}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getBottomLeft=function(){return this.bottomLeft},o.prototype.getTopLeft=function(){return this.topLeft},o.prototype.getTopRight=function(){return this.topRight},o);function o(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(122),i=r(0),a=(u.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),a=this.image,u=0;u<e;u++){var s=n+(0==(1&u)?Math.floor((u+1)/2):-Math.floor((u+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var f=t;f<r&&!a.get(f,s);)f++;for(var l=0;f<r;){if(a.get(f,s))if(1===l)o[1]++;else if(2===l){var d;if(this.foundPatternCross(o)&&null!==(d=this.handlePossibleCenter(o,s,f)))return d;o[0]=o[2],o[1]=1,o[2]=0,l=1}else o[++l]++;else 1===l&&l++,o[l]++;f++}if(this.foundPatternCross(o)&&null!==(d=this.handlePossibleCenter(o,s,r)))return d}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new i.default},u.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},u.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},u.prototype.crossCheckVertical=function(t,e,r,n){var o=this.image,i=o.getHeight(),a=this.crossCheckStateCount;a[0]=0,a[1]=0,a[2]=0;for(var s=t;0<=s&&o.get(e,s)&&a[1]<=r;)a[1]++,s--;if(s<0||a[1]>r)return NaN;for(;0<=s&&!o.get(e,s)&&a[0]<=r;)a[0]++,s--;if(a[0]>r)return NaN;for(s=t+1;s<i&&o.get(e,s)&&a[1]<=r;)a[1]++,s++;if(s===i||a[1]>r)return NaN;for(;s<i&&!o.get(e,s)&&a[2]<=r;)a[2]++,s++;if(a[2]>r)return NaN;var f=a[0]+a[1]+a[2];return 5*Math.abs(f-n)>=2*n?NaN:this.foundPatternCross(a)?u.centerFromEnd(a,s):NaN},u.prototype.handlePossibleCenter=function(t,e,r){var i,a,s=t[0]+t[1]+t[2],f=u.centerFromEnd(t,r),l=this.crossCheckVertical(e,f,2*t[1],s);if(!isNaN(l)){var d=(t[0]+t[1]+t[2])/3;try{for(var c=n(this.possibleCenters),h=c.next();!h.done;h=c.next()){var p=h.value;if(p.aboutEquals(d,l,f))return p.combineEstimate(l,f,d)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var _=new o.default(f,l,d);this.possibleCenters.push(_),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(_)}return null},u);function u(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)}e.default=a},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(5),u=(o(s,i=a.default),s.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},s.prototype.combineEstimate=function(t,e,r){return new s((this.getX()+e)/2,(this.getY()+t)/2,(this.estimatedModuleSize+r)/2)},s);function s(t,e,r){var n=i.call(this,t,e)||this;return n.estimatedModuleSize=r,n}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(5),i=r(7),a=r(17),u=r(124),s=(f.detectMultiple=function(t,e,r){var n=t.getBlackMatrix(),o=f.detect(r,n);return o.length||((n=n.clone()).rotate180(),o=f.detect(r,n)),new u.default(n,o)},f.detect=function(t,e){for(var r,o,i=new Array,a=0,u=0,s=!1;a<e.getHeight();){var l=f.findVertices(e,a,u);if(null!=l[0]||null!=l[3]){if(s=!0,i.push(l),!t)break;a=null!=l[2]?(u=Math.trunc(l[2].getX()),Math.trunc(l[2].getY())):(u=Math.trunc(l[4].getX()),Math.trunc(l[4].getY()))}else{if(!s)break;s=!1,u=0;try{for(var d=n(i),c=d.next();!c.done;c=d.next()){var h=c.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}a+=f.ROW_STEP}}return i},f.findVertices=function(t,e,r){var n=t.getHeight(),o=t.getWidth(),i=new Array(8);return f.copyToResult(i,f.findRowsWithPattern(t,n,o,e,r,f.START_PATTERN),f.INDEXES_START_PATTERN),null!=i[4]&&(r=Math.trunc(i[4].getX()),e=Math.trunc(i[4].getY())),f.copyToResult(i,f.findRowsWithPattern(t,n,o,e,r,f.STOP_PATTERN),f.INDEXES_STOP_PATTERN),i},f.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},f.findRowsWithPattern=function(t,e,r,n,i,u){for(var s=new Array(4),l=!1,d=new Int32Array(u.length);n<e;n+=f.ROW_STEP)if(null!=(_=f.findGuardPattern(t,i,n,r,!1,u,d))){for(;0<n;){if(null==(p=f.findGuardPattern(t,i,--n,r,!1,u,d))){n++;break}_=p}s[0]=new o.default(_[0],n),s[1]=new o.default(_[1],n),l=!0;break}var c=n+1;if(l){for(var h=0,p=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);c<e;c++){var _;if(null!=(_=f.findGuardPattern(t,p[0],c,r,!1,u,d))&&Math.abs(p[0]-_[0])<f.MAX_PATTERN_DRIFT&&Math.abs(p[1]-_[1])<f.MAX_PATTERN_DRIFT)p=_,h=0;else{if(f.SKIPPED_ROW_COUNT_MAX<h)break;h++}}c-=h+1,s[2]=new o.default(p[0],c),s[3]=new o.default(p[1],c)}return c-n<f.BARCODE_MIN_HEIGHT&&a.default.fill(s,null),s},f.findGuardPattern=function(t,e,r,n,o,u,s){a.default.fillWithin(s,0,s.length,0);for(var l=e,d=0;t.get(l,r)&&0<l&&d++<f.MAX_PIXEL_DRIFT;)l--;for(var c=l,h=0,p=u.length,_=o;c<n;c++)if(t.get(c,r)!==_)s[h]++;else{if(h===p-1){if(f.patternMatchVariance(s,u,f.MAX_INDIVIDUAL_VARIANCE)<f.MAX_AVG_VARIANCE)return new Int32Array([l,c]);l+=s[0]+s[1],i.default.arraycopy(s,2,s,0,h-1),s[h-1]=0,s[h]=0,h--}else h++;s[h]=1,_=!_}return h===p-1&&f.patternMatchVariance(s,u,f.MAX_INDIVIDUAL_VARIANCE)<f.MAX_AVG_VARIANCE?new Int32Array([l,c-1]):null},f.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 u=o/i;r*=u;for(var s=0,f=0;f<n;f++){var l=t[f],d=e[f]*u,c=d<l?l-d:d-l;if(r<c)return 1/0;s+=c}return s/o},f.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),f.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),f.MAX_AVG_VARIANCE=.42,f.MAX_INDIVIDUAL_VARIANCE=.8,f.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),f.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),f.MAX_PIXEL_DRIFT=3,f.MAX_PATTERN_DRIFT=5,f.SKIPPED_ROW_COUNT_MAX=25,f.ROW_STEP=5,f.BARCODE_MIN_HEIGHT=10,f);function f(){}e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getBits=function(){return this.bits},o.prototype.getPoints=function(){return this.points},o);function o(t,e){this.bits=t,this.points=e}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),i=r(2),a=r(0),u=r(10),s=r(19),f=r(126),l=r(79),d=r(129),c=r(131),h=r(80),p=r(132),_=r(81),g=r(133),v=r(134),w=r(47),y=(A.decode=function(t,e,r,n,o,i,u){for(var s,f=new l.default(t,e,r,n,o),c=null,p=null,_=!0;;_=!1){if(null!=e&&(c=A.getRowIndicatorColumn(t,f,e,!0,i,u)),null!=n&&(p=A.getRowIndicatorColumn(t,f,n,!1,i,u)),null==(s=A.merge(c,p)))throw a.default.getNotFoundInstance();var g=s.getBoundingBox();if(!_||null==g||!(g.getMinY()<f.getMinY()||g.getMaxY()>f.getMaxY()))break;f=g}s.setBoundingBox(f);var v=s.getBarcodeColumnCount()+1;s.setDetectionResultColumn(0,c),s.setDetectionResultColumn(v,p);for(var w=null!=c,y=1;y<=v;y++){var E=w?y:v-y;if(void 0===s.getDetectionResultColumn(E)){var C=void 0;C=0===E||E===v?new d.default(f,0===E):new h.default(f),s.setDetectionResultColumn(E,C);for(var m=-1,I=m,S=f.getMinY();S<=f.getMaxY();S++){if((m=A.getStartColumn(s,E,S,w))<0||m>f.getMaxX()){if(-1===I)continue;m=I}var O=A.detectCodeword(t,f.getMinX(),f.getMaxX(),w,m,S,i,u);null!=O&&(C.setCodeword(S,O),I=m,i=Math.min(i,O.getWidth()),u=Math.max(u,O.getWidth()))}}}return A.createDecoderResult(s)},A.merge=function(t,e){if(null==t&&null==e)return null;var r=A.getBarcodeMetadata(t,e);if(null==r)return null;var n=l.default.merge(A.adjustBoundingBox(t),A.adjustBoundingBox(e));return new c.default(r,n)},A.adjustBoundingBox=function(t){var e,r;if(null==t)return null;var o=t.getRowHeights();if(null==o)return null;var i=A.getMax(o),a=0;try{for(var u=n(o),s=u.next();!s.done;s=u.next()){var f=s.value;if(a+=i-f,0<f)break}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}for(var l=t.getCodewords(),d=0;0<a&&null==l[d];d++)a--;var c=0;for(d=o.length-1;0<=d&&(c+=i-o[d],!(0<o[d]));d--);for(d=l.length-1;0<c&&null==l[d];d--)c--;return t.getBoundingBox().addMissingRows(a,c,t.isLeft())},A.getMax=function(t){var e,r,o=-1;try{for(var i=n(t),a=i.next();!a.done;a=i.next()){var u=a.value;o=Math.max(o,u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o},A.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},A.getRowIndicatorColumn=function(t,e,r,n,o,i){for(var a=new d.default(e,n),u=0;u<2;u++)for(var s=0===u?1:-1,f=Math.trunc(Math.trunc(r.getX())),l=Math.trunc(Math.trunc(r.getY()));l<=e.getMaxY()&&l>=e.getMinY();l+=s){var c=A.detectCodeword(t,0,t.getWidth(),n,f,l,o,i);null!=c&&(a.setCodeword(l,c),f=n?c.getStartX():c.getEndX())}return a},A.adjustCodewordCount=function(t,e){var r=e[0][1],n=r.getValue(),o=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-A.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===n.length){if(o<1||o>s.default.MAX_CODEWORDS_IN_BARCODE)throw a.default.getNotFoundInstance();r.setValue(o)}else n[0]!==o&&r.setValue(o)},A.createDecoderResult=function(t){var e=A.createBarcodeMatrix(t);A.adjustCodewordCount(t,e);for(var r=new Array,n=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),o=[],i=new Array,a=0;a<t.getBarcodeRowCount();a++)for(var u=0;u<t.getBarcodeColumnCount();u++){var f=e[a][u+1].getValue(),l=a*t.getBarcodeColumnCount()+u;0===f.length?r.push(l):1===f.length?n[l]=f[0]:(i.push(l),o.push(f))}for(var d=new Array(o.length),c=0;c<d.length;c++)d[c]=o[c];return A.createDecoderResultFromAmbiguousValues(t.getBarcodeECLevel(),n,s.default.toIntArray(r),s.default.toIntArray(i),d)},A.createDecoderResultFromAmbiguousValues=function(t,e,r,n,i){for(var a=new Int32Array(n.length),u=100;0<u--;){for(var s=0;s<a.length;s++)e[n[s]]=i[s][a[s]];try{return A.decodeCodewords(e,t,r)}catch(t){if(!(t instanceof o.default))throw t}if(0===a.length)throw o.default.getChecksumInstance();for(s=0;s<a.length;s++){if(a[s]<i[s].length-1){a[s]++;break}if(a[s]=0,s===a.length-1)throw o.default.getChecksumInstance()}}throw o.default.getChecksumInstance()},A.createBarcodeMatrix=function(t){for(var e,r,o,i,a=Array.from({length:t.getBarcodeRowCount()},function(){return new Array(t.getBarcodeColumnCount()+2)}),u=0;u<a.length;u++)for(var s=0;s<a[u].length;s++)a[u][s]=new _.default;var f=0;try{for(var l=n(t.getDetectionResultColumns()),d=l.next();!d.done;d=l.next()){var c=d.value;if(null!=c)try{for(var h=n(c.getCodewords()),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g.getRowNumber();if(0<=v){if(v>=a.length)continue;a[v][f].setValue(g.getValue())}}}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}f++}}catch(t){e={error:t}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}return a},A.isValidBarcodeColumn=function(t,e){return 0<=e&&e<=t.getBarcodeColumnCount()+1},A.getStartColumn=function(t,e,r,o){var i,a,u=o?1:-1,s=null;if(A.isValidBarcodeColumn(t,e-u)&&(s=t.getDetectionResultColumn(e-u).getCodeword(r)),null!=s)return o?s.getEndX():s.getStartX();if(null!=(s=t.getDetectionResultColumn(e).getCodewordNearby(r)))return o?s.getStartX():s.getEndX();if(A.isValidBarcodeColumn(t,e-u)&&(s=t.getDetectionResultColumn(e-u).getCodewordNearby(r)),null!=s)return o?s.getEndX():s.getStartX();for(var f=0;A.isValidBarcodeColumn(t,e-u);){e-=u;try{for(var l=n(t.getDetectionResultColumn(e).getCodewords()),d=l.next();!d.done;d=l.next()){var c=d.value;if(null!=c)return(o?c.getEndX():c.getStartX())+u*f*(c.getEndX()-c.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}f++}return o?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()},A.detectCodeword=function(t,e,r,n,o,i,a,f){o=A.adjustCodewordStartColumn(t,e,r,n,o,i);var l,d=A.getModuleBitCount(t,e,r,n,o,i);if(null==d)return null;var c=u.default.sum(d);if(n)l=o+c;else{for(var h=0;h<d.length/2;h++){var _=d[h];d[h]=d[d.length-1-h],d[d.length-1-h]=_}o=(l=o)-c}if(!A.checkCodewordSkew(c,a,f))return null;var v=g.default.getDecodedValue(d),w=s.default.getCodeword(v);return-1===w?null:new p.default(o,l,A.getCodewordBucketNumber(v),w)},A.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,u=new Int32Array(8),s=0,f=n?1:-1,l=n;(n?a<r:e<=a)&&s<u.length;)t.get(a,i)===l?(u[s]++,a+=f):(s++,l=!l);return s===u.length||a===(n?r:e)&&s===u.length-1?u:null},A.getNumberOfECCodeWords=function(t){return 2<<t},A.adjustCodewordStartColumn=function(t,e,r,n,o,i){for(var a=o,u=n?-1:1,s=0;s<2;s++){for(;(n?e<=a:a<r)&&n===t.get(a,i);){if(Math.abs(o-a)>A.CODEWORD_SKEW_SIZE)return o;a+=u}u=-u,n=!n}return a},A.checkCodewordSkew=function(t,e,r){return e-A.CODEWORD_SKEW_SIZE<=t&&t<=r+A.CODEWORD_SKEW_SIZE},A.decodeCodewords=function(t,e,r){if(0===t.length)throw i.default.getFormatInstance();var n=1<<e+1,o=A.correctErrors(t,r,n);A.verifyCodewordCount(t,n);var a=v.default.decode(t,""+e);return a.setErrorsCorrected(o),a.setErasures(r.length),a},A.correctErrors=function(t,e,r){if(null!=e&&e.length>r/2+A.MAX_ERRORS||r<0||A.MAX_EC_CODEWORDS<r)throw o.default.getChecksumInstance();return A.errorCorrection.decode(t,r,e)},A.verifyCodewordCount=function(t,e){if(t.length<4)throw i.default.getFormatInstance();var r=t[0];if(r>t.length)throw i.default.getFormatInstance();if(0===r){if(!(e<t.length))throw i.default.getFormatInstance();t[0]=t.length-e}},A.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},A.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},A.getCodewordBucketNumber_number=function(t){return A.getCodewordBucketNumber(A.getBitCountForCodeword(t))},A.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},A.toString=function(t){for(var e=new w.default,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()},A.CODEWORD_SKEW_SIZE=2,A.MAX_ERRORS=3,A.MAX_EC_CODEWORDS=512,A.errorCorrection=new f.default,A);function A(){}e.default=y},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),i=r(78),a=r(127),u=(s.prototype.decode=function(t,e,r){for(var a,u,s=new i.default(this.field,t),f=new Int32Array(e),l=!1,d=e;0<d;d--){var c=s.evaluateAt(this.field.exp(d));0!==(f[e-d]=c)&&(l=!0)}if(!l)return 0;var h=this.field.getOne();if(null!=r)try{for(var p=n(r),_=p.next();!_.done;_=p.next()){var g=_.value,v=this.field.exp(t.length-1-g),w=new i.default(this.field,new Int32Array([this.field.subtract(0,v),1]));h=h.multiply(w)}}catch(t){a={error:t}}finally{try{_&&!_.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}var y=new i.default(this.field,f),A=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),y,e),E=A[0],C=A[1],m=this.findErrorLocations(E),I=this.findErrorMagnitudes(C,E,m);for(d=0;d<m.length;d++){var S=t.length-1-this.field.log(m[d]);if(S<0)throw o.default.getChecksumInstance();t[S]=this.field.subtract(t[S],I[d])}return m.length},s.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var i=t,a=e,u=this.field.getZero(),s=this.field.getOne();a.getDegree()>=Math.round(r/2);){var f=i,l=u;if(u=s,(i=a).isZero())throw o.default.getChecksumInstance();a=f;for(var d=this.field.getZero(),c=i.getCoefficient(i.getDegree()),h=this.field.inverse(c);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),_=this.field.multiply(a.getCoefficient(a.getDegree()),h);d=d.add(this.field.buildMonomial(p,_)),a=a.subtract(i.multiplyByMonomial(p,_))}s=d.multiply(u).subtract(l).negative()}var g=s.getCoefficient(0);if(0===g)throw o.default.getChecksumInstance();var v=this.field.inverse(g);return[s.multiply(v),a.multiply(v)]},s.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,i=1;i<this.field.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=this.field.inverse(i),n++);if(n!==e)throw o.default.getChecksumInstance();return r},s.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),a=1;a<=n;a++)o[n-a]=this.field.multiply(a,e.getCoefficient(a));var u=new i.default(this.field,o),s=r.length,f=new Int32Array(s);for(a=0;a<s;a++){var l=this.field.inverse(r[a]),d=this.field.subtract(0,t.evaluateAt(l)),c=this.field.inverse(u.evaluateAt(l));f[a]=this.field.multiply(d,c)}return f},s);function s(){this.field=a.default.PDF417_GF}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(19),u=r(78),s=r(1),f=r(128),l=(o(d,i=f.default),d.prototype.getZero=function(){return this.zero},d.prototype.getOne=function(){return this.one},d.prototype.buildMonomial=function(t,e){if(t<0)throw new s.default;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new u.default(this,r)},d.PDF417_GF=new d(a.default.NUMBER_OF_CODEWORDS,3),d);function d(t,e){var r=i.call(this)||this;r.modulus=t,r.expTable=new Int32Array(t),r.logTable=new Int32Array(t);for(var n=1,o=0;o<t;o++)n=(r.expTable[o]=n)*e%t;for(o=0;o<t-1;o++)r.logTable[r.expTable[o]]=o;return r.zero=new u.default(r,new Int32Array([0])),r.one=new u.default(r,new Int32Array([1])),r}e.default=l},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(39),i=(a.prototype.add=function(t,e){return(t+e)%this.modulus},a.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},a.prototype.exp=function(t){return this.expTable[t]},a.prototype.log=function(t){if(0===t)throw new n.default;return this.logTable[t]},a.prototype.inverse=function(t){if(0===t)throw new o.default;return this.expTable[this.modulus-this.logTable[t]-1]},a.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},a.prototype.getSize=function(){return this.modulus},a.prototype.equals=function(t){return t===this},a);function a(){}e.default=i},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(19),s=r(130),f=r(80),l=r(81),d=(o(c,a=f.default),c.prototype.setRowNumbers=function(){var t,e;try{for(var r=i(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},c.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())),u=-1,s=1,f=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],c=d.getRowNumber()-u;if(0==c)f++;else if(1==c)s=Math.max(s,f),f=1,u=d.getRowNumber();else if(c<0||d.getRowNumber()>=t.getRowCount()||l<c)e[l]=null;else{for(var h,p=l<=(h=2<s?(s-2)*c:c),_=1;_<=h&&!p;_++)p=null!=e[l-_];p?e[l]=null:(u=d.getRowNumber(),f=1)}}},c.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=i(this.getCodewords()),a=o.next();!a.done;a=o.next()){var u=a.value;if(null!=u){var s=u.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},c.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(),u=-1,s=1,f=0,l=o;l<i;l++)if(null!=a[l]){var d=a[l];d.setRowNumberAsRowIndicatorColumn();var c=d.getRowNumber()-u;0==c?f++:1==c?(s=Math.max(s,f),f=1,u=d.getRowNumber()):d.getRowNumber()>=t.getRowCount()?a[l]=null:(u=d.getRowNumber(),f=1)}},c.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new l.default,o=new l.default,a=new l.default,f=new l.default;try{for(var d=i(r),c=d.next();!c.done;c=d.next()){var h=c.value;if(null!=h){h.setRowNumberAsRowIndicatorColumn();var p=h.getValue()%30,_=h.getRowNumber();switch(this._isLeft||(_+=2),_%3){case 0:o.setValue(3*p+1);break;case 1:f.setValue(p/3),a.setValue(p%3);break;case 2:n.setValue(1+p)}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===a.getValue().length||0===f.getValue().length||n.getValue()[0]<1||o.getValue()[0]+a.getValue()[0]<u.default.MIN_ROWS_IN_BARCODE||o.getValue()[0]+a.getValue()[0]>u.default.MAX_ROWS_IN_BARCODE)return null;var g=new s.default(n.getValue()[0],o.getValue()[0],a.getValue()[0],f.getValue()[0]);return this.removeIncorrectCodewords(r,g),g},c.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:1+o!==e.getColumnCount()&&(t[r]=null)}}}},c.prototype.isLeft=function(){return this._isLeft},c.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+a.prototype.toString.call(this)},c);function c(t,e){var r=a.call(this,t)||this;return r._isLeft=e,r}e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getColumnCount=function(){return this.columnCount},o.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},o.prototype.getRowCount=function(){return this.rowCount},o.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},o.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},o);function o(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(19),i=r(47),a=(u.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);for(var t,e=o.default.MAX_CODEWORDS_IN_BARCODE;t=e,0<(e=this.adjustRowNumbersAndGetCount())&&e<t;);return this.detectionResultColumns},u.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},u.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},u.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},u.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))}},u.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var t=0,e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<e.length;r++)if(null!=e[r])for(var n=e[r].getRowNumber(),o=0,i=this.barcodeColumnCount+1;0<i&&o<this.ADJUST_ROW_NUMBER_SKIP;i--){var a=this.detectionResultColumns[i].getCodewords()[r];null!=a&&(o=u.adjustRowNumberIfValid(n,o,a),a.hasValidRowNumber()||t++)}return t},u.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var t=0,e=this.detectionResultColumns[0].getCodewords(),r=0;r<e.length;r++)if(null!=e[r])for(var n=e[r].getRowNumber(),o=0,i=1;i<this.barcodeColumnCount+1&&o<this.ADJUST_ROW_NUMBER_SKIP;i++){var a=this.detectionResultColumns[i].getCodewords()[r];null!=a&&(o=u.adjustRowNumberIfValid(n,o,a),a.hasValidRowNumber()||t++)}return t},u.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},u.prototype.adjustRowNumbers=function(t,e,r){var o,i,a=r[e],s=this.detectionResultColumns[t-1].getCodewords(),f=s;null!=this.detectionResultColumns[t+1]&&(f=this.detectionResultColumns[t+1].getCodewords());var l=new Array(14);l[2]=s[e],l[3]=f[e],0<e&&(l[0]=r[e-1],l[4]=s[e-1],l[5]=f[e-1]),1<e&&(l[8]=r[e-2],l[10]=s[e-2],l[11]=f[e-2]),e<r.length-1&&(l[1]=r[e+1],l[6]=s[e+1],l[7]=f[e+1]),e<r.length-2&&(l[9]=r[e+2],l[12]=s[e+2],l[13]=f[e+2]);try{for(var d=n(l),c=d.next();!c.done;c=d.next()){var h=c.value;if(u.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}},u.adjustRowNumber=function(t,e){return!(null==e||!e.hasValidRowNumber()||e.getBucket()!==t.getBucket()||(t.setRowNumber(e.getRowNumber()),0))},u.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},u.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},u.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},u.prototype.setBoundingBox=function(t){this.boundingBox=t},u.prototype.getBoundingBox=function(){return this.boundingBox},u.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},u.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},u.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new i.default,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()},u);function u(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)}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},o.prototype.isValidRowNumber=function(t){return t!==o.BARCODE_ROW_UNKNOWN&&this.bucket===t%3*3},o.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},o.prototype.getWidth=function(){return this.endX-this.startX},o.prototype.getStartX=function(){return this.startX},o.prototype.getEndX=function(){return this.endX},o.prototype.getBucket=function(){return this.bucket},o.prototype.getValue=function(){return this.value},o.prototype.getRowNumber=function(){return this.rowNumber},o.prototype.setRowNumber=function(t){this.rowNumber=t},o.prototype.toString=function(){return this.rowNumber+"|"+this.value},o.BARCODE_ROW_UNKNOWN=-1,o);function o(t,e,r,n){this.rowNumber=o.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(t),this.endX=Math.trunc(e),this.bucket=Math.trunc(r),this.value=Math.trunc(n)}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(10),o=r(19),i=r(59),a=(u.initialize=function(){for(var t=0;t<o.default.SYMBOL_TABLE.length;t++)for(var e=o.default.SYMBOL_TABLE[t],r=1&e,n=0;n<o.default.BARS_IN_MODULE;n++){for(var i=0;(1&e)===r;)i+=1,e>>=1;r=1&e,u.RATIOS_TABLE[t]||(u.RATIOS_TABLE[t]=new Array(o.default.BARS_IN_MODULE)),u.RATIOS_TABLE[t][o.default.BARS_IN_MODULE-n-1]=Math.fround(i/o.default.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},u.getDecodedValue=function(t){var e=u.getDecodedCodewordValue(u.sampleBitCounts(t));return-1!==e?e:u.getClosestDecodedValue(t)},u.sampleBitCounts=function(t){for(var e=n.default.sum(t),r=new Int32Array(o.default.BARS_IN_MODULE),i=0,a=0,u=0;u<o.default.MODULES_IN_CODEWORD;u++){var s=e/(2*o.default.MODULES_IN_CODEWORD)+u*e/o.default.MODULES_IN_CODEWORD;a+t[i]<=s&&(a+=t[i],i++),r[i]++}return r},u.getDecodedCodewordValue=function(t){var e=u.getBitValue(t);return-1===o.default.getCodeword(e)?-1:e},u.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)},u.getClosestDecodedValue=function(t){var e=n.default.sum(t),r=new Array(o.default.BARS_IN_MODULE);if(1<e)for(var a=0;a<r.length;a++)r[a]=Math.fround(t[a]/e);var s=i.default.MAX_VALUE,f=-1;this.bSymbolTableReady||u.initialize();for(var l=0;l<u.RATIOS_TABLE.length;l++){for(var d=0,c=u.RATIOS_TABLE[l],h=0;h<o.default.BARS_IN_MODULE;h++){var p=Math.fround(c[h]-r[h]);if(s<=(d+=Math.fround(p*p)))break}d<s&&(s=d,f=o.default.SYMBOL_TABLE[l])}return f},u.bSymbolTableReady=!1,u.RATIOS_TABLE=new Array(o.default.SYMBOL_TABLE.length).map(function(t){return new Array(o.default.BARS_IN_MODULE)}),u);function u(){}e.default=a},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n,o,i,a=r(2),u=r(22),s=r(28),f=r(136),l=r(17),d=r(4),c=r(16),h=r(137),p=r(138),_=r(21);function g(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==t)return t.BigInt||null;throw new Error("Can't search globals for BigInt!")}function v(t){if(void 0===i&&(i=g()),null===i)throw new Error("BigInt is not supported!");return i(t)}(o=n=n||{})[o.ALPHA=0]="ALPHA",o[o.LOWER=1]="LOWER",o[o.MIXED=2]="MIXED",o[o.PUNCT=3]="PUNCT",o[o.ALPHA_SHIFT=4]="ALPHA_SHIFT",o[o.PUNCT_SHIFT=5]="PUNCT_SHIFT";var w=(y.decode=function(t,e){var r=new d.default(""),n=u.default.ISO8859_1;r.enableDecoding(n);for(var o=1,i=t[o++],l=new f.default;o<t[0];){switch(i){case y.TEXT_COMPACTION_MODE_LATCH:o=y.textCompaction(t,o,r);break;case y.BYTE_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH_6:o=y.byteCompaction(i,t,n,o,r);break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[o++]);break;case y.NUMERIC_COMPACTION_MODE_LATCH:o=y.numericCompaction(t,o,r);break;case y.ECI_CHARSET:u.default.getCharacterSetECIByValue(t[o++]);break;case y.ECI_GENERAL_PURPOSE:o+=2;break;case y.ECI_USER_DEFINED:o++;break;case y.BEGIN_MACRO_PDF417_CONTROL_BLOCK:o=y.decodeMacroBlock(t,o,l);break;case y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case y.MACRO_PDF417_TERMINATOR:throw new a.default;default:o=y.textCompaction(t,--o,r)}if(!(o<t.length))throw a.default.getFormatInstance();i=t[o++]}if(0===r.length())throw a.default.getFormatInstance();var c=new s.default(null,r.toString(),null,e);return c.setOther(l),c},y.decodeMacroBlock=function(t,e,r){if(e+y.NUMBER_OF_SEQUENCE_CODEWORDS>t[0])throw a.default.getFormatInstance();for(var n=new Int32Array(y.NUMBER_OF_SEQUENCE_CODEWORDS),o=0;o<y.NUMBER_OF_SEQUENCE_CODEWORDS;o++,e++)n[o]=t[e];r.setSegmentIndex(c.default.parseInt(y.decodeBase900toBase10(n,y.NUMBER_OF_SEQUENCE_CODEWORDS)));var i=new d.default;e=y.textCompaction(t,e,i),r.setFileId(i.toString());var u=-1;for(t[e]===y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(u=e+1);e<t[0];)switch(t[e]){case y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(t[++e]){case y.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var s=new d.default;e=y.textCompaction(t,e+1,s),r.setFileName(s.toString());break;case y.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var f=new d.default;e=y.textCompaction(t,e+1,f),r.setSender(f.toString());break;case y.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var p=new d.default;e=y.textCompaction(t,e+1,p),r.setAddressee(p.toString());break;case y.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var _=new d.default;e=y.numericCompaction(t,e+1,_),r.setSegmentCount(c.default.parseInt(_.toString()));break;case y.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var g=new d.default;e=y.numericCompaction(t,e+1,g),r.setTimestamp(h.default.parseLong(g.toString()));break;case y.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var v=new d.default;e=y.numericCompaction(t,e+1,v),r.setChecksum(c.default.parseInt(v.toString()));break;case y.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var w=new d.default;e=y.numericCompaction(t,e+1,w),r.setFileSize(h.default.parseLong(w.toString()));break;default:throw a.default.getFormatInstance()}break;case y.MACRO_PDF417_TERMINATOR:e++,r.setLastSegment(!0);break;default:throw a.default.getFormatInstance()}if(-1!==u){var A=e-u;r.isLastSegment()&&A--,r.setOptionalData(l.default.copyOfRange(t,u,u+A))}return e},y.textCompaction=function(t,e,r){for(var n=new Int32Array(2*(t[0]-e)),o=new Int32Array(2*(t[0]-e)),i=0,a=!1;e<t[0]&&!a;){var u=t[e++];if(u<y.TEXT_COMPACTION_MODE_LATCH)n[i]=u/30,n[i+1]=u%30,i+=2;else switch(u){case y.TEXT_COMPACTION_MODE_LATCH:n[i++]=y.TEXT_COMPACTION_MODE_LATCH;break;case y.BYTE_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH_6:case y.NUMERIC_COMPACTION_MODE_LATCH:case y.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case y.MACRO_PDF417_TERMINATOR:e--,a=!0;break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n[i]=y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=t[e++],o[i]=u,i++}}return y.decodeTextCompaction(n,o,i,r),e},y.decodeTextCompaction=function(t,e,r,o){for(var i=n.ALPHA,a=n.ALPHA,u=0;u<r;){var s=t[u],f="";switch(i){case n.ALPHA:if(s<26)f=String.fromCharCode(65+s);else switch(s){case 26:f=" ";break;case y.LL:i=n.LOWER;break;case y.ML:i=n.MIXED;break;case y.PS:a=i,i=n.PUNCT_SHIFT;break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[u]);break;case y.TEXT_COMPACTION_MODE_LATCH:i=n.ALPHA}break;case n.LOWER:if(s<26)f=String.fromCharCode(97+s);else switch(s){case 26:f=" ";break;case y.AS:a=i,i=n.ALPHA_SHIFT;break;case y.ML:i=n.MIXED;break;case y.PS:a=i,i=n.PUNCT_SHIFT;break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[u]);break;case y.TEXT_COMPACTION_MODE_LATCH:i=n.ALPHA}break;case n.MIXED:if(s<y.PL)f=y.MIXED_CHARS[s];else switch(s){case y.PL:i=n.PUNCT;break;case 26:f=" ";break;case y.LL:i=n.LOWER;break;case y.AL:i=n.ALPHA;break;case y.PS:a=i,i=n.PUNCT_SHIFT;break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[u]);break;case y.TEXT_COMPACTION_MODE_LATCH:i=n.ALPHA}break;case n.PUNCT:if(s<y.PAL)f=y.PUNCT_CHARS[s];else switch(s){case y.PAL:i=n.ALPHA;break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[u]);break;case y.TEXT_COMPACTION_MODE_LATCH:i=n.ALPHA}break;case n.ALPHA_SHIFT:if(i=a,s<26)f=String.fromCharCode(65+s);else switch(s){case 26:f=" ";break;case y.TEXT_COMPACTION_MODE_LATCH:i=n.ALPHA}break;case n.PUNCT_SHIFT:if(i=a,s<y.PAL)f=y.PUNCT_CHARS[s];else switch(s){case y.PAL:i=n.ALPHA;break;case y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[u]);break;case y.TEXT_COMPACTION_MODE_LATCH:i=n.ALPHA}}""!==f&&o.append(f),u++}},y.byteCompaction=function(t,e,r,n,o){var i=new p.default,a=0,u=0,s=!1;switch(t){case y.BYTE_COMPACTION_MODE_LATCH:for(var f=new Int32Array(6),l=e[n++];n<e[0]&&!s;)switch(u=900*u+(f[a++]=l),l=e[n++]){case y.TEXT_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH:case y.NUMERIC_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH_6:case y.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case y.MACRO_PDF417_TERMINATOR:n--,s=!0;break;default:if(a%5==0&&0<a){for(var d=0;d<6;++d)i.write(Number(v(u)>>v(8*(5-d))));a=u=0}}n===e[0]&&l<y.TEXT_COMPACTION_MODE_LATCH&&(f[a++]=l);for(var c=0;c<a;c++)i.write(f[c]);break;case y.BYTE_COMPACTION_MODE_LATCH_6:for(;n<e[0]&&!s;){var h=e[n++];if(h<y.TEXT_COMPACTION_MODE_LATCH)a++,u=900*u+h;else switch(h){case y.TEXT_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH:case y.NUMERIC_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH_6:case y.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case y.MACRO_PDF417_TERMINATOR:n--,s=!0}if(a%5==0&&0<a){for(d=0;d<6;++d)i.write(Number(v(u)>>v(8*(5-d))));a=u=0}}}return o.append(_.default.decode(i.toByteArray(),r)),n},y.numericCompaction=function(t,e,r){for(var n=0,o=!1,i=new Int32Array(y.MAX_NUMERIC_CODEWORDS);e<t[0]&&!o;){var a=t[e++];if(e===t[0]&&(o=!0),a<y.TEXT_COMPACTION_MODE_LATCH)i[n]=a,n++;else switch(a){case y.TEXT_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH:case y.BYTE_COMPACTION_MODE_LATCH_6:case y.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case y.MACRO_PDF417_TERMINATOR:e--,o=!0}(n%y.MAX_NUMERIC_CODEWORDS==0||a===y.NUMERIC_COMPACTION_MODE_LATCH||o)&&0<n&&(r.append(y.decodeBase900toBase10(i,n)),n=0)}return e},y.decodeBase900toBase10=function(t,e){for(var r=v(0),n=0;n<e;n++)r+=y.EXP900[e-n-1]*v(t[n]);var o=r.toString();if("1"!==o.charAt(0))throw new a.default;return o.substring(1)},y.TEXT_COMPACTION_MODE_LATCH=900,y.BYTE_COMPACTION_MODE_LATCH=901,y.NUMERIC_COMPACTION_MODE_LATCH=902,y.BYTE_COMPACTION_MODE_LATCH_6=924,y.ECI_USER_DEFINED=925,y.ECI_GENERAL_PURPOSE=926,y.ECI_CHARSET=927,y.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,y.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,y.MACRO_PDF417_TERMINATOR=922,y.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,y.MAX_NUMERIC_CODEWORDS=15,y.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,y.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,y.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,y.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,y.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,y.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,y.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,y.PL=25,y.LL=27,y.AS=27,y.ML=28,y.AL=28,y.PS=29,y.PAL=29,y.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",y.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",y.EXP900=g()?function(){var t=[];t[0]=v(1);var e=v(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],y.NUMBER_OF_SEQUENCE_CODEWORDS=2,y);function y(){}e.default=w}).call(this,r(135))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getSegmentIndex=function(){return this.segmentIndex},o.prototype.setSegmentIndex=function(t){this.segmentIndex=t},o.prototype.getFileId=function(){return this.fileId},o.prototype.setFileId=function(t){this.fileId=t},o.prototype.getOptionalData=function(){return this.optionalData},o.prototype.setOptionalData=function(t){this.optionalData=t},o.prototype.isLastSegment=function(){return this.lastSegment},o.prototype.setLastSegment=function(t){this.lastSegment=t},o.prototype.getSegmentCount=function(){return this.segmentCount},o.prototype.setSegmentCount=function(t){this.segmentCount=t},o.prototype.getSender=function(){return this.sender||null},o.prototype.setSender=function(t){this.sender=t},o.prototype.getAddressee=function(){return this.addressee||null},o.prototype.setAddressee=function(t){this.addressee=t},o.prototype.getFileName=function(){return this.fileName},o.prototype.setFileName=function(t){this.fileName=t},o.prototype.getFileSize=function(){return this.fileSize},o.prototype.setFileSize=function(t){this.fileSize=t},o.prototype.getChecksum=function(){return this.checksum},o.prototype.setChecksum=function(t){this.checksum=t},o.prototype.getTimestamp=function(){return this.timestamp},o.prototype.setTimestamp=function(t){this.timestamp=t},o);function o(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},o);function o(){}e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(17),u=r(139),s=r(16),f=r(1),l=r(141),d=r(7),c=r(33),h=(o(p,i=u.default),p.prototype.ensureCapacity=function(t){0<t-this.buf.length&&this.grow(t)},p.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new l.default;e=s.default.MAX_VALUE}this.buf=a.default.copyOfUint8Array(this.buf,e)},p.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},p.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||0<e+r-t.length)throw new c.default;this.ensureCapacity(this.count+r),d.default.arraycopy(t,e,this.buf,this.count,r),this.count+=r},p.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},p.prototype.reset=function(){this.count=0},p.prototype.toByteArray=function(){return a.default.copyOfUint8Array(this.buf,this.count)},p.prototype.size=function(){return this.count},p.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},p.prototype.toString_void=function(){return new String(this.buf).toString()},p.prototype.toString_string=function(t){return new String(this.buf).toString()},p.prototype.toString_number=function(t){return new String(this.buf).toString()},p.prototype.close=function(){},p);function p(t){void 0===t&&(t=32);var e=i.call(this)||this;if(t<(e.count=0))throw new f.default("Negative initial size: "+t);return e.buf=new Uint8Array(t),e}e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(33),o=r(140),i=(a.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},a.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new o.default;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new n.default;if(0!==r)for(var i=0;i<r;i++)this.write(t[e+i])},a.prototype.flush=function(){},a.prototype.close=function(){},a);function a(){}e.default=i},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(20),u=r(77),s=(o(f,i=a.BrowserCodeReader),f);function f(t){return void 0===t&&(t=500),i.call(this,new u.default,t)||this}e.BrowserPDF417Reader=s},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(20),u=r(45),s=(o(f,i=a.BrowserCodeReader),f);function f(t){return void 0===t&&(t=500),i.call(this,new u.default,t)||this}e.BrowserQRCodeReader=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(30),o=r(48),i=r(29),a=r(1),u=r(18),s=(f.prototype.write=function(t,e,r,u){if(void 0===u&&(u=null),0===t.length)throw new a.default("Found empty contents");if(e<0||r<0)throw new a.default("Requested dimensions are too small: "+e+"x"+r);var s=i.default.L,l=f.QUIET_ZONE_SIZE;null!==u&&(void 0!==u.get(n.default.ERROR_CORRECTION)&&(s=i.default.fromString(u.get(n.default.ERROR_CORRECTION).toString())),void 0!==u.get(n.default.MARGIN)&&(l=Number.parseInt(u.get(n.default.MARGIN).toString(),10)));var d=o.default.encode(t,s,u);return this.renderResult(d,e,r,l)},f.prototype.writeToDom=function(t,e,r,n,o){void 0===o&&(o=null),"string"==typeof t&&(t=document.querySelector(t));var i=this.write(e,r,n,o);t&&t.appendChild(i)},f.prototype.renderResult=function(t,e,r,n){var o=t.getMatrix();if(null===o)throw new u.default;for(var i=o.getWidth(),a=o.getHeight(),s=i+2*n,f=a+2*n,l=Math.max(e,s),d=Math.max(r,f),c=Math.min(Math.floor(l/s),Math.floor(d/f)),h=Math.floor((l-i*c)/2),p=Math.floor((d-a*c)/2),_=this.createSVGElement(l,d),g=0,v=p;g<a;g++,v+=c)for(var w=0,y=h;w<i;w++,y+=c)if(1===o.get(w,g)){var A=this.createSvgRectElement(y,v,c,c);_.appendChild(A)}return _},f.prototype.createSVGElement=function(t,e){var r=document.createElementNS(f.SVG_NS,"svg");return r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"width",e.toString()),r},f.prototype.createSvgRectElement=function(t,e,r,n){var o=document.createElementNS(f.SVG_NS,"rect");return o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",e.toString()),o.setAttributeNS(null,"height",r.toString()),o.setAttributeNS(null,"width",n.toString()),o.setAttributeNS(null,"fill","#000000"),o},f.QUIET_ZONE_SIZE=4,f.SVG_NS="http://www.w3.org/2000/svg",f);function f(){}e.BrowserQRCodeSvgWriter=s},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(17),i=r(4),a=(u.prototype.getHeight=function(){return this.height},u.prototype.getWidth=function(){return this.width},u.prototype.get=function(t,e){return this.bytes[e][t]},u.prototype.getArray=function(){return this.bytes},u.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},u.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},u.prototype.clear=function(t){var e,r;try{for(var i=n(this.bytes),a=i.next();!a.done;a=i.next()){var u=a.value;o.default.fill(u,t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;if(this.width!==e.width)return!1;if(this.height!==e.height)return!1;for(var r=0,n=this.height;r<n;++r)for(var o=this.bytes[r],i=e.bytes[r],a=0,s=this.width;a<s;++a)if(o[a]!==i[a])return!1;return!0},u.prototype.toString=function(){for(var t=new i.default,e=0,r=this.height;e<r;++e){for(var n=this.bytes[e],o=0,a=this.width;o<a;++o)switch(n[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append("  ")}t.append("\n")}return t.toString()},u);function u(t,e){this.width=t,this.height=e;for(var r=new Array(e),n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=r(16),i=r(49),a=r(84),u=r(50),s=r(1),f=(l.clearMatrix=function(t){t.clear(255)},l.buildMatrix=function(t,e,r,n,o){l.clearMatrix(o),l.embedBasicPatterns(r,o),l.embedTypeInfo(e,n,o),l.maybeEmbedVersionInfo(r,o),l.embedDataBits(t,n,o)},l.embedBasicPatterns=function(t,e){l.embedPositionDetectionPatternsAndSeparators(e),l.embedDarkDotAtLeftBottomCorner(e),l.maybeEmbedPositionAdjustmentPatterns(t,e),l.embedTimingPatterns(e)},l.embedTypeInfo=function(t,e,r){var o=new n.default;l.makeTypeInfoBits(t,e,o);for(var i=0,a=o.getSize();i<a;++i){var u=o.get(o.getSize()-1-i),s=l.TYPE_INFO_COORDINATES[i],f=s[0],d=s[1];if(r.setBoolean(f,d,u),i<8){var c=r.getWidth()-i-1,h=8;r.setBoolean(c,h,u)}else c=8,h=r.getHeight()-7+(i-8),r.setBoolean(c,h,u)}},l.maybeEmbedVersionInfo=function(t,e){if(!(t.getVersionNumber()<7)){var r=new n.default;l.makeVersionInfoBits(t,r);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var u=r.get(o);o--,e.setBoolean(i,e.getHeight()-11+a,u),e.setBoolean(e.getHeight()-11+a,i,u)}}},l.embedDataBits=function(t,e,r){for(var n=0,o=-1,i=r.getWidth()-1,s=r.getHeight()-1;0<i;){for(6===i&&(i-=1);0<=s&&s<r.getHeight();){for(var f=0;f<2;++f){var d=i-f;if(l.isEmpty(r.get(d,s))){var c=void 0;n<t.getSize()?(c=t.get(n),++n):c=!1,255!==e&&a.default.getDataMaskBit(e,d,s)&&(c=!c),r.setBoolean(d,s,c)}}s+=o}s+=o=-o,i-=2}if(n!==t.getSize())throw new u.default("Not all bits consumed: "+n+"/"+t.getSize())},l.findMSBSet=function(t){return 32-o.default.numberOfLeadingZeros(t)},l.calculateBCHCode=function(t,e){if(0===e)throw new s.default("0 polynomial");var r=l.findMSBSet(e);for(t<<=r-1;l.findMSBSet(t)>=r;)t^=e<<l.findMSBSet(t)-r;return t},l.makeTypeInfoBits=function(t,e,r){if(!i.default.isValidMaskPattern(e))throw new u.default("Invalid mask pattern");var o=t.getBits()<<3|e;r.appendBits(o,5);var a=l.calculateBCHCode(o,l.TYPE_INFO_POLY);r.appendBits(a,10);var s=new n.default;if(s.appendBits(l.TYPE_INFO_MASK_PATTERN,15),r.xor(s),15!==r.getSize())throw new u.default("should not happen but we got: "+r.getSize())},l.makeVersionInfoBits=function(t,e){e.appendBits(t.getVersionNumber(),6);var r=l.calculateBCHCode(t.getVersionNumber(),l.VERSION_INFO_POLY);if(e.appendBits(r,12),18!==e.getSize())throw new u.default("should not happen but we got: "+e.getSize())},l.isEmpty=function(t){return 255===t},l.embedTimingPatterns=function(t){for(var e=8;e<t.getWidth()-8;++e){var r=(e+1)%2;l.isEmpty(t.get(e,6))&&t.setNumber(e,6,r),l.isEmpty(t.get(6,e))&&t.setNumber(6,e,r)}},l.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new u.default;t.setNumber(8,t.getHeight()-8,1)},l.embedHorizontalSeparationPattern=function(t,e,r){for(var n=0;n<8;++n){if(!l.isEmpty(r.get(t+n,e)))throw new u.default;r.setNumber(t+n,e,0)}},l.embedVerticalSeparationPattern=function(t,e,r){for(var n=0;n<7;++n){if(!l.isEmpty(r.get(t,e+n)))throw new u.default;r.setNumber(t,e+n,0)}},l.embedPositionAdjustmentPattern=function(t,e,r){for(var n=0;n<5;++n)for(var o=l.POSITION_ADJUSTMENT_PATTERN[n],i=0;i<5;++i)r.setNumber(t+i,e+n,o[i])},l.embedPositionDetectionPattern=function(t,e,r){for(var n=0;n<7;++n)for(var o=l.POSITION_DETECTION_PATTERN[n],i=0;i<7;++i)r.setNumber(t+i,e+n,o[i])},l.embedPositionDetectionPatternsAndSeparators=function(t){var e=l.POSITION_DETECTION_PATTERN[0].length;l.embedPositionDetectionPattern(0,0,t),l.embedPositionDetectionPattern(t.getWidth()-e,0,t),l.embedPositionDetectionPattern(0,t.getWidth()-e,t),l.embedHorizontalSeparationPattern(0,7,t),l.embedHorizontalSeparationPattern(t.getWidth()-8,7,t),l.embedHorizontalSeparationPattern(0,t.getWidth()-8,t),l.embedVerticalSeparationPattern(7,0,t),l.embedVerticalSeparationPattern(t.getHeight()-7-1,0,t),l.embedVerticalSeparationPattern(7,t.getHeight()-7,t)},l.maybeEmbedPositionAdjustmentPatterns=function(t,e){if(!(t.getVersionNumber()<2))for(var r=t.getVersionNumber()-1,n=l.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[r],o=0,i=n.length;o!==i;o++){var a=n[o];if(0<=a)for(var u=0;u!==i;u++){var s=n[u];0<=s&&l.isEmpty(e.get(s,a))&&l.embedPositionAdjustmentPattern(s-2,a-2,e)}}},l.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])]),l.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])]),l.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])]),l.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])]),l.VERSION_INFO_POLY=7973,l.TYPE_INFO_POLY=1335,l.TYPE_INFO_MASK_PATTERN=21522,l);function l(){}e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getDataBytes=function(){return this.dataBytes},o.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},o);function o(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(85),o=r(3),i=r(1),a=(u.prototype.encode=function(t,e,r,a,u){var s;switch(e){case o.default.QR_CODE:s=new n.default;break;default:throw new i.default("No encoder available for format "+e)}return s.encode(t,e,r,a,u)},u);function u(){}e.default=a},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(7),u=r(24),s=r(23),f=r(1),l=(o(d,i=u.default),d.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new f.default("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 a.default.arraycopy(this.yuvData,n,e,0,r),e},d.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 a.default.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var u=i*t;a.default.arraycopy(this.yuvData,o,n,u,t),o+=this.dataWidth}return n},d.prototype.isCropSupported=function(){return!0},d.prototype.crop=function(t,e,r,n){return new d(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+e,r,n,!1)},d.prototype.renderThumbnail=function(){for(var t=this.getWidth()/d.THUMBNAIL_SCALE_FACTOR,e=this.getHeight()/d.THUMBNAIL_SCALE_FACTOR,r=new Int32Array(t*e),n=this.yuvData,o=this.top*this.dataWidth+this.left,i=0;i<e;i++){for(var a=i*t,u=0;u<t;u++){var s=255&n[o+u*d.THUMBNAIL_SCALE_FACTOR];r[a+u]=4278190080|65793*s}o+=this.dataWidth*d.THUMBNAIL_SCALE_FACTOR}return r},d.prototype.getThumbnailWidth=function(){return this.getWidth()/d.THUMBNAIL_SCALE_FACTOR},d.prototype.getThumbnailHeight=function(){return this.getHeight()/d.THUMBNAIL_SCALE_FACTOR},d.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,u=o+t-1;a<i;a++,u--){var s=r[a];r[a]=r[u],r[u]=s}},d.prototype.invert=function(){return new s.default(this)},d.THUMBNAIL_SCALE_FACTOR=2,d);function d(t,e,r,n,o,a,u,s){var l=i.call(this,a,u)||this;if(l.yuvData=t,l.dataWidth=e,l.dataHeight=r,l.left=n,l.top=o,e<n+a||r<o+u)throw new f.default("Crop rectangle does not fit within image data.");return s&&l.reverseHorizontal(a,u),l}e.default=l},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),r(23);var i,a=r(23),u=r(24),s=r(7),f=r(1),l=(o(d,i=u.default),d.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new f.default("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 s.default.arraycopy(this.luminances,n,e,0,r),e},d.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 s.default.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;s.default.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},d.prototype.isCropSupported=function(){return!0},d.prototype.crop=function(t,e,r,n){return new d(this.luminances,r,n,this.dataWidth,this.dataHeight,this.left+t,this.top+e)},d.prototype.invert=function(){return new a.default(this)},d);function d(t,e,r,n,o,a,u){var s=i.call(this,e,r)||this;if(s.dataWidth=n,s.dataHeight=o,s.left=a,s.top=u,4===t.BYTES_PER_ELEMENT){for(var l=e*r,d=new Uint8ClampedArray(l),c=0;c<l;c++){var h=t[c],p=h>>16&255,_=h>>7&510,g=255&h;d[c]=(p+_+g)/4&255}s.luminances=d}else s.luminances=t;if(void 0===n&&(s.dataWidth=e),void 0===o&&(s.dataHeight=r),void 0===a&&(s.left=0),void 0===u&&(s.top=0),s.left+e>s.dataWidth||s.top+r>s.dataHeight)throw new f.default("Crop rectangle does not fit within image data.");return s}e.default=l},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(0),f=r(9),l=r(10),d=r(62),c=r(36),h=r(63),p=r(64),_=r(152),g=r(165),v=r(166),w=r(167),y=r(7),A=(o(E,a=d.default),E.prototype.decodeRow=function(t,e,r){this.pairs.length=0,this.startFromEven=!1;try{return E.constructResult(this.decodeRow2pairs(t,e))}catch(t){console.log(t)}return this.pairs.length=0,this.startFromEven=!0,E.constructResult(this.decodeRow2pairs(t,e))},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(t){if(!this.pairs.length)throw new t;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 s.default},E.prototype.checkRowsBoolean=function(t){if(25<this.rows.length)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(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},E.prototype.checkRows=function(t,e){for(var r,n,o=e;o<this.rows.length;o++){var a=this.rows[o];this.pairs.length=0;try{for(var u=i(t),f=u.next();!f.done;f=u.next()){var l=f.value;this.pairs.push(l.getPairs())}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(this.pairs.push(a.getPairs()),E.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var d=new Array(t);d.push(a);try{return this.checkRows(d,o+1)}catch(t){console.log(t)}}}throw new s.default},E.isValidSequence=function(t){var e,r;try{for(var n=i(E.FINDER_PATTERN_SEQUENCES),o=n.next();!o.done;o=n.next()){var a=o.value;if(!(t.length>a.length)){for(var u=!0,s=0;s<t.length;s++)if(t[s].getFinderPattern().getValue()!=a[s]){u=!1;break}if(u)return!0}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return!1},E.prototype.storeRow=function(t,e){for(var r=0,n=!1,o=!1;r<this.rows.length;){var i=this.rows[r];if(i.getRowNumber()>t){o=i.isEquivalent(this.pairs);break}n=i.isEquivalent(this.pairs),r++}o||n||E.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new v.default(this.pairs,t,e)),this.removePartialRows(this.pairs,this.rows))},E.prototype.removePartialRows=function(t,e){var r,n,o,a,u,s;try{for(var f=i(e),l=f.next();!l.done;l=f.next()){var d=l.value;if(d.getPairs().length!==t.length)try{for(var c=i(d.getPairs()),h=c.next();!h.done;h=c.next()){var p=h.value;try{for(var _=i(t),v=_.next();!v.done;v=_.next()){var w=v.value;if(g.default.equals(p,w))break}}catch(t){u={error:t}}finally{try{v&&!v.done&&(s=_.return)&&s.call(_)}finally{if(u)throw u.error}}}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},E.isPartialRow=function(t,e){var r,n,o,a,u,s;try{for(var f=i(e),l=f.next();!l.done;l=f.next()){var d=l.value,c=!0;try{for(var h=i(t),p=h.next();!p.done;p=h.next()){var _=p.value,g=!1;try{for(var v=i(d.getPairs()),w=v.next();!w.done;w=v.next()){var y=w.value;if(_.equals(y)){g=!0;break}}}catch(t){u={error:t}}finally{try{w&&!w.done&&(s=v.return)&&s.call(v)}finally{if(u)throw u.error}}if(!g){c=!1;break}}}catch(t){o={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}if(c)return!0}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return!1},E.prototype.getRows=function(){return this.rows},E.constructResult=function(t){var e=w.default.buildBitArray(t),r=_.createDecoder(e).parseInformation(),n=t[0].getFinderPattern().getResultPoints(),o=t[t.length-1].getFinderPattern().getResultPoints(),i=[n[0],n[1],o[0],o[1]];return new f.default(r,null,null,i,u.default.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 u=a.getRightChar();null!=u&&(n+=u.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),t.getNextSet(r)):(r=t.getNextSet(e),t.getNextUnset(r))},E.prototype.retrieveNextPair=function(t,e,r){var n,o=e.length%2==0;this.startFromEven&&(o=!o);for(var i=!0,a=-1;this.findNextPair(t,e,a),null==(n=this.parseFoundFinderPattern(t,r,o))?a=E.getNextSecondBar(t,this.startEnd[0]):i=!1,i;);var u,f=this.decodeDataCharacter(t,n,o,!0);if(!this.isEmptyPair(e)&&e[e.length-1].mustBeLast())throw new s.default;try{u=this.decodeDataCharacter(t,n,o,!1)}catch(t){u=null,console.log(t)}return new g.default(f,u,n,!0)},E.prototype.isEmptyPair=function(t){return 0===t.length},E.prototype.findNextPair=function(t,e,r){var n=this.getDecodeFinderCounters();n[0]=0,n[1]=0,n[2]=0,n[3]=0;var o,i=t.getSize();o=0<=r?r:this.isEmptyPair(e)?0:e[e.length-1].getFinderPattern().getStartEnd()[1];var a=e.length%2!=0;this.startFromEven&&(a=!a);for(var u=!1;o<i&&(u=!t.get(o));)o++;for(var f=0,l=o,d=o;d<i;d++)if(t.get(d)!=u)n[f]++;else{if(3==f){if(a&&E.reverseCounters(n),E.isFinderPattern(n))return this.startEnd[0]=l,void(this.startEnd[1]=d);a&&E.reverseCounters(n),l+=n[0]+n[1],n[0]=n[2],n[1]=n[3],n[2]=0,n[3]=0,f--}else f++;n[f]=1,u=!u}throw new s.default},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,e,r){var n,o,i;if(r){for(var a=this.startEnd[0]-1;0<=a&&!t.get(a);)a--;a++,n=this.startEnd[0]-a,o=a,i=this.startEnd[1]}else o=this.startEnd[0],n=(i=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,s=this.getDecodeFinderCounters();y.default.arraycopy(s,0,s,1,s.length-1),s[0]=n;try{u=this.parseFinderValue(s,E.FINDER_PATTERNS)}catch(t){return null}return new h.default(u,[o,i],o,i,e)},E.prototype.decodeDataCharacter=function(t,e,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)E.recordPatternInReverse(t,e.getStartEnd()[0],o);else{E.recordPattern(t,e.getStartEnd()[1],o);for(var a=0,u=o.length-1;a<u;a++,u--){var f=o[a];o[a]=o[u],o[u]=f}}var d=l.default.sum(new Int32Array(o))/17,h=(e.getStartEnd()[1]-e.getStartEnd()[0])/15;if(.3<Math.abs(d-h)/h)throw new s.default;var _=this.getOddCounts(),g=this.getEvenCounts(),v=this.getOddRoundingErrors(),w=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var y=1*o[a]/d,A=.5+y;if(A<1){if(y<.3)throw new s.default;A=1}else if(8<A){if(8.7<y)throw new s.default;A=8}var C=a/2;0==(1&a)?(_[C]=A,v[C]=y-A):(g[C]=A,w[C]=y-A)}this.adjustOddEvenCounts(17);var m=4*e.getValue()+(r?0:2)+(n?0:1)-1,I=0,S=0;for(a=_.length-1;0<=a;a--){if(E.isNotA1left(e,r,n)){var O=E.WEIGHTS[m][2*a];S+=_[a]*O}I+=_[a]}var T=0;for(a=g.length-1;0<=a;a--)E.isNotA1left(e,r,n)&&(O=E.WEIGHTS[m][2*a+1],T+=g[a]*O);var R=S+T;if(0!=(1&I)||13<I||I<4)throw new s.default;var b=(13-I)/2,N=E.SYMBOL_WIDEST[b],M=9-N,P=p.default.getRSSvalue(_,N,!0),D=p.default.getRSSvalue(g,M,!1),B=P*E.EVEN_TOTAL_SUBSET[b]+D+E.GSUM[b];return new c.default(B,R)},E.isNotA1left=function(t,e,r){return!(0==t.getValue()&&e&&r)},E.prototype.adjustOddEvenCounts=function(t){var e=l.default.sum(new Int32Array(this.getOddCounts())),r=l.default.sum(new Int32Array(this.getEvenCounts())),n=!1,o=!1;13<e?o=!0:e<4&&(n=!0);var i=!1,a=!1;13<r?a=!0:r<4&&(i=!0);var u=e+r-t,f=1==(1&e),d=0==(1&r);if(1==u)if(f){if(d)throw new s.default;o=!0}else{if(!d)throw new s.default;a=!0}else if(-1==u)if(f){if(d)throw new s.default;n=!0}else{if(!d)throw new s.default;i=!0}else{if(0!=u)throw new s.default;if(f){if(!d)throw new s.default;e<r?a=n=!0:i=o=!0}else if(d)throw new s.default}if(n){if(o)throw new s.default;E.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&E.decrement(this.getOddCounts(),this.getOddRoundingErrors()),i){if(a)throw new s.default;E.increment(this.getEvenCounts(),this.getOddRoundingErrors())}a&&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=[[1,8,4,1],[3,6,4,1],[3,4,6,1],[3,2,8,1],[2,6,5,1],[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_PATTERN_SEQUENCES=[[E.FINDER_PAT_A=0,E.FINDER_PAT_A],[E.FINDER_PAT_A,E.FINDER_PAT_B=1,E.FINDER_PAT_B],[E.FINDER_PAT_A,E.FINDER_PAT_C=2,E.FINDER_PAT_B,E.FINDER_PAT_D=3],[E.FINDER_PAT_A,E.FINDER_PAT_E=4,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=5],[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);function E(){var t=null!==a&&a.apply(this,arguments)||this;return t.pairs=new Array(E.MAX_PAIRS),t.rows=new Array,t.startEnd=[2],t}e.default=A},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(18),o=r(86),i=r(158),a=r(159),u=r(160),s=r(161),f=r(162),l=r(163),d=r(164);e.createDecoder=function(t){try{if(t.get(1))return new i.default(t);if(!t.get(2))return new a.default(t);switch(o.default.extractNumericValueFromBitArray(t,1,4)){case 4:return new u.default(t);case 5:return new s.default(t)}switch(o.default.extractNumericValueFromBitArray(t,1,5)){case 12:return new f.default(t);case 13:return new l.default(t)}switch(o.default.extractNumericValueFromBitArray(t,1,7)){case 56:return new d.default(t,"310","11");case 57:return new d.default(t,"320","11");case 58:return new d.default(t,"310","13");case 59:return new d.default(t,"320","13");case 60:return new d.default(t,"310","15");case 61:return new d.default(t,"320","15");case 62:return new d.default(t,"310","17");case 63:return new d.default(t,"320","17")}}catch(e){throw console.log(e),new n.default("unknown decoder: "+t)}}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(51),u=(o(s,i=a.default),s.prototype.getValue=function(){return this.value},s.prototype.isFNC1=function(){return this.value===s.FNC1},s.FNC1="$",s);function s(t,e){var r=i.call(this,t)||this;return r.value=e,r}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(2),u=r(51),s=(o(f,i=u.default),f.prototype.getFirstDigit=function(){return this.firstDigit},f.prototype.getSecondDigit=function(){return this.secondDigit},f.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},f.prototype.isFirstDigitFNC1=function(){return this.firstDigit==f.FNC1},f.prototype.isSecondDigitFNC1=function(){return this.secondDigit==f.FNC1},f.prototype.isAnyFNC1=function(){return this.firstDigit===f.FNC1||this.secondDigit===f.FNC1},f.FNC1=10,f);function f(t,e,r){var n=i.call(this,t)||this;if(e<0||10<e||r<0||10<r)throw new a.default;return n.firstDigit=e,n.secondDigit=r,n}e.default=s},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(51),u=(o(s,i=a.default),s.prototype.getNewString=function(){return this.newString},s.prototype.isRemaining=function(){return this.remaining},s.prototype.getRemainingValue=function(){return this.remainingValue},s);function s(t,e,r){var n=i.call(this,t)||this;return r?(n.remaining=!0,n.remainingValue=n.remainingValue):(n.remaining=!1,n.remainingValue=0),n.newString=e,n}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(0),i=(a.parseFieldsInGeneralPurpose=function(t){var e,r,i,u,s,f,l,d;if(!t)return null;if(t.length<2)throw new o.default;var c=t.substring(0,2);try{for(var h=n(a.TWO_DIGIT_DATA_LENGTH),p=h.next();!p.done;p=h.next())if((m=p.value)[0]===c)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(2,m[2],t):a.processFixedAI(2,m[1],t)}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(e)throw e.error}}if(t.length<3)throw new o.default;var _=t.substring(0,3);try{for(var g=n(a.THREE_DIGIT_DATA_LENGTH),v=g.next();!v.done;v=g.next())if((m=v.value)[0]===_)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(3,m[2],t):a.processFixedAI(3,m[1],t)}catch(t){i={error:t}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(i)throw i.error}}try{for(var w=n(a.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=w.next();!y.done;y=w.next())if((m=y.value)[0]===_)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(4,m[2],t):a.processFixedAI(4,m[1],t)}catch(t){s={error:t}}finally{try{y&&!y.done&&(f=w.return)&&f.call(w)}finally{if(s)throw s.error}}if(t.length<4)throw new o.default;var A=t.substring(0,4);try{for(var E=n(a.FOUR_DIGIT_DATA_LENGTH),C=E.next();!C.done;C=E.next()){var m;if((m=C.value)[0]===A)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(4,m[2],t):a.processFixedAI(4,m[1],t)}}catch(t){l={error:t}}finally{try{C&&!C.done&&(d=E.return)&&d.call(E)}finally{if(l)throw l.error}}throw new o.default},a.processFixedAI=function(t,e,r){if(r.length<t)throw new o.default;var n=r.substring(0,t);if(r.length<t+e)throw new o.default;var i=r.substring(t,t+e),u=r.substring(t+e),s="("+n+")"+i,f=a.parseFieldsInGeneralPurpose(u);return null==f?s:s+f},a.processVariableAI=function(t,e,r){var n,o=r.substring(0,t);n=r.length<t+e?r.length:t+e;var i=r.substring(t,n),u=r.substring(n),s="("+o+")"+i,f=a.parseFieldsInGeneralPurpose(u);return null==f?s:s+f},a.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",a.VARIABLE_LENGTH=[],20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",a.VARIABLE_LENGTH,20],["22",a.VARIABLE_LENGTH,29],["30",a.VARIABLE_LENGTH,8],["37",a.VARIABLE_LENGTH,8],["90",a.VARIABLE_LENGTH,30],["91",a.VARIABLE_LENGTH,30],["92",a.VARIABLE_LENGTH,30],["93",a.VARIABLE_LENGTH,30],["94",a.VARIABLE_LENGTH,30],["95",a.VARIABLE_LENGTH,30],["96",a.VARIABLE_LENGTH,30],["97",a.VARIABLE_LENGTH,3],["98",a.VARIABLE_LENGTH,30],["99",a.VARIABLE_LENGTH,30]],a.THREE_DIGIT_DATA_LENGTH=[["240",a.VARIABLE_LENGTH,30],["241",a.VARIABLE_LENGTH,30],["242",a.VARIABLE_LENGTH,6],["250",a.VARIABLE_LENGTH,30],["251",a.VARIABLE_LENGTH,30],["253",a.VARIABLE_LENGTH,17],["254",a.VARIABLE_LENGTH,20],["400",a.VARIABLE_LENGTH,30],["401",a.VARIABLE_LENGTH,30],["402",17],["403",a.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",a.VARIABLE_LENGTH,20],["421",a.VARIABLE_LENGTH,15],["422",3],["423",a.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],a.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",a.VARIABLE_LENGTH,15],["391",a.VARIABLE_LENGTH,18],["392",a.VARIABLE_LENGTH,15],["393",a.VARIABLE_LENGTH,18],["703",a.VARIABLE_LENGTH,30]],a.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",a.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",a.VARIABLE_LENGTH,20],["8003",a.VARIABLE_LENGTH,30],["8004",a.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",a.VARIABLE_LENGTH,30],["8008",a.VARIABLE_LENGTH,12],["8018",18],["8020",a.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",a.VARIABLE_LENGTH,70],["8200",a.VARIABLE_LENGTH,70]],a);function a(){}e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getDecodedInformation=function(){return this.decodedInformation},o.prototype.isFinished=function(){return this.finished},o);function o(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(31),u=r(4),s=(o(f,i=a.default),f.prototype.parseInformation=function(){var t=new u.default;t.append("(01)");var e=t.length(),r=this.getGeneralDecoder().extractNumericValueFromBitArray(f.HEADER_SIZE,4);return t.append(r),this.encodeCompressedGtinWithoutAI(t,f.HEADER_SIZE+4,e),this.getGeneralDecoder().decodeAllCodes(t,f.HEADER_SIZE+44)},f.HEADER_SIZE=4,f);function f(t){return i.call(this,t)||this}e.default=s},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(4),u=r(87),s=(o(f,i=u.default),f.prototype.parseInformation=function(){var t=new a.default;return this.getGeneralDecoder().decodeAllCodes(t,f.HEADER_SIZE)},f.HEADER_SIZE=5,f);function f(t){return i.call(this,t)||this}e.default=s},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(88),u=(o(s,i=a.default),s.prototype.addWeightCode=function(t,e){t.append("(3103)")},s.prototype.checkWeight=function(t){return t},s);function s(t){return i.call(this,t)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(88),u=(o(s,i=a.default),s.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},s.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},s);function s(t){return i.call(this,t)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(31),u=r(0),s=r(4),f=(o(l,i=a.default),l.prototype.parseInformation=function(){if(this.getInformation().getSize()<l.HEADER_SIZE+a.default.GTIN_SIZE)throw new u.default;var t=new s.default;this.encodeCompressedGtin(t,l.HEADER_SIZE);var e=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE+a.default.GTIN_SIZE,l.LAST_DIGIT_SIZE);t.append("(392"),t.append(e),t.append(")");var r=this.getGeneralDecoder().decodeGeneralPurposeField(l.HEADER_SIZE+a.default.GTIN_SIZE+l.LAST_DIGIT_SIZE,null);return t.append(r.getNewString()),t.toString()},l.HEADER_SIZE=8,l.LAST_DIGIT_SIZE=2,l);function l(t){return i.call(this,t)||this}e.default=f},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(31),u=r(0),s=r(4),f=(o(l,i=a.default),l.prototype.parseInformation=function(){if(this.getInformation().getSize()<l.HEADER_SIZE+a.default.GTIN_SIZE)throw new u.default;var t=new s.default;this.encodeCompressedGtin(t,l.HEADER_SIZE);var e=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE+a.default.GTIN_SIZE,l.LAST_DIGIT_SIZE);t.append("(393"),t.append(e),t.append(")");var r=this.getGeneralDecoder().extractNumericValueFromBitArray(l.HEADER_SIZE+a.default.GTIN_SIZE+l.LAST_DIGIT_SIZE,l.FIRST_THREE_DIGITS_SIZE);r/100==0&&t.append("0"),r/10==0&&t.append("0"),t.append(r);var n=this.getGeneralDecoder().decodeGeneralPurposeField(l.HEADER_SIZE+a.default.GTIN_SIZE+l.LAST_DIGIT_SIZE+l.FIRST_THREE_DIGITS_SIZE,null);return t.append(n.getNewString()),t.toString()},l.HEADER_SIZE=8,l.LAST_DIGIT_SIZE=2,l.FIRST_THREE_DIGITS_SIZE=10,l);function l(t){return i.call(this,t)||this}e.default=f},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=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}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i,a=r(89),u=r(0),s=r(4),f=(o(l,i=a.default),l.prototype.parseInformation=function(){if(this.getInformation().getSize()!=l.HEADER_SIZE+l.GTIN_SIZE+l.WEIGHT_SIZE+l.DATE_SIZE)throw new u.default;var t=new s.default;return this.encodeCompressedGtin(t,l.HEADER_SIZE),this.encodeCompressedWeight(t,l.HEADER_SIZE+l.GTIN_SIZE,l.WEIGHT_SIZE),this.encodeCompressedDate(t,l.HEADER_SIZE+l.GTIN_SIZE+l.WEIGHT_SIZE),t.toString()},l.prototype.encodeCompressedDate=function(t,e){var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e,l.DATE_SIZE);if(38400!=r){t.append("("),t.append(this.dateCode),t.append(")");var n=r%32,o=(r/=32)%12+1,i=r/=12;i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o),n/10==0&&t.append("0"),t.append(n)}},l.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},l.prototype.checkWeight=function(t){return t%1e5},l.HEADER_SIZE=8,l.WEIGHT_SIZE=20,l.DATE_SIZE=16,l);function l(t,e,r){var n=i.call(this,t)||this;return n.dateCode=r,n.firstAIdigits=e,n}e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.mayBeLast=function(){return this.maybeLast},o.prototype.getLeftChar=function(){return this.leftchar},o.prototype.getRightChar=function(){return this.rightchar},o.prototype.getFinderPattern=function(){return this.finderpattern},o.prototype.mustBeLast=function(){return null==this.rightchar},o.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},o.equals=function(t,e){return t instanceof o&&o.equalsOrNull(t.leftchar,e.leftchar)&&o.equalsOrNull(t.rightchar,e.rightchar)&&o.equalsOrNull(t.finderpattern,e.finderpattern)},o.equalsOrNull=function(t,e){return null===t?null===e:o.equals(t,e)},o.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},o.hashNotNull=function(t){return null===t?0:t.hashCode()},o);function o(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getPairs=function(){return this.pairs},o.prototype.getRowNumber=function(){return this.rowNumber},o.prototype.isReversed=function(){return this.wasReversed},o.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},o.prototype.toString=function(){return"{ "+this.pairs+" }"},o.prototype.equals=function(t,e){return t instanceof o&&this.checkEqualitity(t,e)&&t.wasReversed===e.wasReversed},o.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},o);function o(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=(i.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=12*e,o=new n.default(r),i=0,a=t[0].getRightChar().getValue(),u=11;0<=u;--u)0!=(a&1<<u)&&o.set(i),i++;for(u=1;u<t.length;++u){for(var s=t[u],f=s.getLeftChar().getValue(),l=11;0<=l;--l)0!=(f&1<<l)&&o.set(i),i++;if(null!=s.getRightChar()){var d=s.getRightChar().getValue();for(l=11;0<=l;--l)0!=(d&1<<l)&&o.set(i),i++}}return o},i);function i(){}e.default=o}],t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(t){return e[t]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=90);function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,r});
  (function(){window.handwritten={start:function(n,t){function i(n){this.linewidth=1;this.color="#000000";this.background="#ffffff";for(var i in n)this[i]=n[i];this.canvas=document.createElement("canvas");this.el.appendChild(this.canvas);this.cxt=this.canvas.getContext("2d");this.canvas.width=this.el.clientWidth;this.canvas.height=this.el.clientHeight;this.cxt.fillStyle=this.background;this.cxt.fillRect(0,0,this.canvas.width,this.canvas.height);this.cxt.fillStyle=this.background;this.cxt.strokeStyle=this.color;this.cxt.lineWidth=this.linewidth;this.cxt.lineCap="round";this.canvas.addEventListener("touchstart",function(n){this.cxt.beginPath();this.cxt.moveTo(n.changedTouches[0].pageX,n.changedTouches[0].pageY)}.bind(this),!1);this.canvas.addEventListener("touchmove",function(n){this.cxt.lineTo(n.changedTouches[0].pageX,n.changedTouches[0].pageY);this.cxt.stroke()}.bind(this),!1);this.canvas.addEventListener("touchend",function(){this.cxt.closePath()}.bind(this),!1);this.clearEl.addEventListener("click",function(){this.cxt.clearRect(0,0,this.canvas.width,this.canvas.height)}.bind(this),!1);this.saveEl.addEventListener("click",function(){var n=this.canvas.toDataURL();return t.invokeMethodAsync("invokeFromJS",n)}.bind(this),!1)}console.log("start handwritten");Date.prototype.format=function(n){var i={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()},t;/(y+)/.test(n)&&(n=n.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(t in i)new RegExp("("+t+")").test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length==1?i[t]:("00"+i[t]).substr((""+i[t]).length)));return n};document.body.addEventListener("touchmove",function(n){n.preventDefault()},{passive:!1});new i({el:document.getElementById("canvas"),clearEl:document.getElementById("clearCanvas"),saveEl:document.getElementById("saveCanvas")})}}})();
  /*! Summernote v0.8.18 | (c) 2013- Alan Hong and other contributors | MIT license */
  !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],e);else{var n="object"==typeof exports?e(require("jquery")):e(t.jQuery);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(function(t){return(()=>{"use strict";var e={9458:e=>{e.exports=t}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.amdO={},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{o.r(i);var t=o(9458),e=o.n(t);function n(t){return(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})(t)}function r(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var a=function(){function t(e,n,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.markup=e,this.children=n,this.options=o,this.callback=i}var n,o,i;return n=t,(o=[{key:"render",value:function(t){var n=e()(this.markup);if(this.options&&this.options.contents&&n.html(this.options.contents),this.options&&this.options.className&&n.addClass(this.options.className),this.options&&this.options.data&&e().each(this.options.data,(function(t,e){n.attr("data-bs-"+t,e)})),this.options&&this.options.click&&n.on("click",this.options.click),this.children){var o=n.find(".note-children-container");this.children.forEach((function(t){t.render(o.length?o:n)}))}return this.callback&&this.callback(n,this.options),this.options&&this.options.callback&&this.options.callback(n),t&&t.append(n),n}}])&&r(n.prototype,o),i&&r(n,i),t}();const s=function(t,e){return function(){var o="object"===n(arguments[1])?arguments[1]:arguments[0],i=Array.isArray(arguments[0])?arguments[0]:[];return o&&o.children&&(i=o.children),new a(t,i,o,e)}};function l(t){return(l="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})(t)}var c=s('<div class="note-editor note-frame card"/>'),u=s('<div class="note-toolbar card-header" role="toolbar"/>'),d=s('<div class="note-editing-area"/>'),h=s('<textarea class="note-codable" aria-multiline="true"/>'),f=s('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>'),p=s(['<output class="note-status-output" role="status" aria-live="polite"></output>','<div class="note-statusbar" role="status">','<div class="note-resizebar" aria-label="Resize">','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>',"</div>","</div>"].join("")),m=s('<div class="note-editor note-airframe"/>'),v=s(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join("")),g=s('<div class="note-btn-group btn-group">'),b=s('<div class="note-dropdown-menu dropdown-menu" role="list">',(function(t,e){var n=Array.isArray(e.items)?e.items.map((function(t){var n="string"==typeof t?t:t.value||"",o=e.template?e.template(t):t,i="object"===l(t)?t.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+n+'"'+(void 0!==i?' data-option="'+i+'"':""))+' role="listitem" aria-label="'+n+'">'+o+"</a>"})).join(""):e.items;t.html(n).attr({"aria-label":e.title}),e&&e.codeviewKeepButton&&t.addClass("note-codeview-keep")})),y=function(t){return t},k=s('<div class="note-dropdown-menu dropdown-menu note-check" role="list">',(function(t,e){var n=Array.isArray(e.items)?e.items.map((function(t){var n="string"==typeof t?t:t.value||"",o=e.template?e.template(t):t;return'<a class="dropdown-item" href="#" data-value="'+n+'" role="listitem" aria-label="'+t+'">'+S(e.checkClassName)+" "+o+"</a>"})).join(""):e.items;t.html(n).attr({"aria-label":e.title}),e&&e.codeviewKeepButton&&t.addClass("note-codeview-keep")})),w=s('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"/>',(function(t,e){e.fade&&t.addClass("fade"),t.attr({"aria-label":e.title}),t.html(['<div class="modal-dialog">','<div class="modal-content">',e.title?'<div class="modal-header"><h4 class="modal-title">'+e.title+'</h4><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" aria-hidden="true"></button></div>':"",'<div class="modal-body">'+e.body+"</div>",e.footer?'<div class="modal-footer">'+e.footer+"</div>":"","</div>","</div>"].join(""))})),C=s(['<div class="note-popover popover in">','<div class="arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function(t,e){var n=void 0!==e.direction?e.direction:"bottom";t.addClass(n),e.hideArrow&&t.find(".arrow").hide()})),x=s('<div class="form-check"></div>',(function(t,e){t.html(['<label class="form-check-label"'+(e.id?' for="note-'+e.id+'"':"")+">",'<input type="checkbox" class="form-check-input"'+(e.id?' id="note-'+e.id+'"':""),e.checked?" checked":"",' aria-label="'+(e.text?e.text:"")+'"',' aria-checked="'+(e.checked?"true":"false")+'"/>'," "+(e.text?e.text:"")+"</label>"].join(""))})),S=function(t,e){return t.match(/^</)?t:"<"+(e=e||"i")+' class="'+t+'"></'+e+">"};const T=function(t){return{editor:c,toolbar:u,editingArea:d,codable:h,editable:f,statusbar:p,airEditor:m,airEditable:v,buttonGroup:g,dropdown:b,dropdownButtonContents:y,dropdownCheck:k,dialog:w,popover:C,icon:S,checkbox:x,options:t,palette:function(e,n){return s('<div class="note-color-palette"/>',(function(e,n){for(var o=[],i=0,r=n.colors.length;i<r;i++){for(var a=n.eventName,s=n.colors[i],l=n.colorsName[i],c=[],u=0,d=s.length;u<d;u++){var h=s[u],f=l[u];c.push(['<button type="button" class="note-color-btn"','style="background-color:',h,'" ','data-event="',a,'" ','data-value="',h,'" ','title="',f,'" ','aria-label="',f,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+c.join("")+"</div>")}e.html(o.join("")),n.tooltip&&e.find(".note-color-btn").tooltip({container:n.container||t.container,trigger:"hover",placement:"bottom"})}))(e,n)},button:function(n,o){return s('<button type="button" class="note-btn btn btn-light btn-sm" tabindex="-1">',(function(n,o){o&&o.tooltip&&n.attr({title:o.tooltip,"aria-label":o.tooltip}).tooltip({container:o.container||t.container,trigger:"hover",placement:"bottom"}).on("click",(function(t){e()(t.currentTarget).tooltip("hide")})),o&&o.codeviewButton&&n.addClass("note-codeview-keep")}))(n,o)},toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(e){var n=(t.airMode?m([d([h(),v()])]):"bottom"===t.toolbarPosition?c([d([h(),f()]),u(),p()]):c([u(),d([h(),f()]),p()])).render();return n.insertAfter(e),{note:e,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}}};e().summernote=e().summernote||{lang:{}},e().extend(e().summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size",sizeunit:"Font Size Unit"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window",useProtocol:"Use default protocol"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Text Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{escape:"Escape",insertParagraph:"Insert Paragraph",undo:"Undo the last command",redo:"Redo the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"},output:{noSelection:"No Selection Made!"}}});var E="function"==typeof define&&o.amdO,I=["sans-serif","serif","monospace","cursive","fantasy"];function $(t){return-1===e().inArray(t.toLowerCase(),I)?"'".concat(t,"'"):t}var N,P=navigator.userAgent,R=/MSIE|Trident/i.test(P);if(R){var L=/MSIE (\d+[.]\d+)/.exec(P);L&&(N=parseFloat(L[1])),(L=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(P))&&(N=parseFloat(L[1]))}var A=/Edge\/\d+/.test(P),F="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,D=R?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const H={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:R,isEdge:A,isFF:!A&&/firefox/i.test(P),isPhantom:/PhantomJS/i.test(P),isWebkit:!A&&/webkit/i.test(P),isChrome:!A&&/chrome/i.test(P),isSafari:!A&&/safari/i.test(P)&&!/chrome/i.test(P),browserVersion:N,jqueryVersion:parseFloat(e().fn.jquery),isSupportAmd:E,isSupportTouch:F,isFontInstalled:function(t){var e="Comic Sans MS"===t?"Courier New":"Comic Sans MS",n="mmmmmmmmmmwwwww",o=document.createElement("canvas").getContext("2d");o.font="200px '"+e+"'";var i=o.measureText(n).width;return o.font="200px "+$(t)+', "'+e+'"',i!==o.measureText(n).width},isW3CRangeSupport:!!document.createRange,inputEventName:D,genericFontFamilies:I,validFontName:$};var B=0;const z={eq:function(t){return function(e){return t===e}},eq2:function(t,e){return t===e},peq2:function(t){return function(e,n){return e[t]===n[t]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(t,e){return function(n){return t(n)&&e(n)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},resetUniqueId:function(){B=0},uniqueId:function(t){var e=++B+"";return t?t+e:e},rect2bnd:function(t){var n=e()(document);return{top:t.top+n.scrollTop(),left:t.left+n.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[t[n]]=n);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map((function(t){return t.substring(0,1).toUpperCase()+t.substring(1)})).join("")},debounce:function(t,e,n){var o;return function(){var i=this,r=arguments,a=function(){o=null,n||t.apply(i,r)},s=n&&!o;clearTimeout(o),o=setTimeout(a,e),s&&t.apply(i,r)}},isValidUrl:function(t){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(t)}};function M(t){return t[0]}function O(t){return t[t.length-1]}function U(t){return t.slice(1)}function j(t,e){if(t&&t.length&&e){if(t.indexOf)return-1!==t.indexOf(e);if(t.contains)return t.contains(e)}return!1}const W={head:M,last:O,initial:function(t){return t.slice(0,t.length-1)},tail:U,prev:function(t,e){if(t&&t.length&&e){var n=t.indexOf(e);return-1===n?null:t[n-1]}return null},next:function(t,e){if(t&&t.length&&e){var n=t.indexOf(e);return-1===n?null:t[n+1]}return null},find:function(t,e){for(var n=0,o=t.length;n<o;n++){var i=t[n];if(e(i))return i}},contains:j,all:function(t,e){for(var n=0,o=t.length;n<o;n++)if(!e(t[n]))return!1;return!0},sum:function(t,e){return e=e||z.self,t.reduce((function(t,n){return t+e(n)}),0)},from:function(t){for(var e=[],n=t.length,o=-1;++o<n;)e[o]=t[o];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(t,e){return t.length?U(t).reduce((function(t,n){var o=O(t);return e(O(o),n)?o[o.length]=n:t[t.length]=[n],t}),[[M(t)]]):[]},compact:function(t){for(var e=[],n=0,o=t.length;n<o;n++)t[n]&&e.push(t[n]);return e},unique:function(t){for(var e=[],n=0,o=t.length;n<o;n++)j(e,t[n])||e.push(t[n]);return e}};var K=String.fromCharCode(160);function q(t){return t&&e()(t).hasClass("note-editable")}function V(t){return t=t.toUpperCase(),function(e){return e&&e.nodeName.toUpperCase()===t}}function _(t){return t&&3===t.nodeType}function G(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(t.nodeName.toUpperCase())}function Y(t){return!q(t)&&(t&&/^DIV|^P|^LI|^H[1-7]/.test(t.nodeName.toUpperCase()))}var Z=V("PRE"),X=V("LI");var Q=V("TABLE"),J=V("DATA");function tt(t){return!(rt(t)||et(t)||nt(t)||Y(t)||Q(t)||it(t)||J(t))}function et(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())}var nt=V("HR");function ot(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())}var it=V("BLOCKQUOTE");function rt(t){return ot(t)||it(t)||q(t)}var at=V("A");var st=V("BODY");var lt=H.isMSIE&&H.browserVersion<11?"&nbsp;":"<br>";function ct(t){return _(t)?t.nodeValue.length:t?t.childNodes.length:0}function ut(t){var e=ct(t);return 0===e||(!_(t)&&1===e&&t.innerHTML===lt||!(!W.all(t.childNodes,_)||""!==t.innerHTML))}function dt(t){G(t)||ct(t)||(t.innerHTML=lt)}function ht(t,e){for(;t;){if(e(t))return t;if(q(t))break;t=t.parentNode}return null}function ft(t,e){e=e||z.fail;var n=[];return ht(t,(function(t){return q(t)||n.push(t),e(t)})),n}function pt(t,e){e=e||z.fail;for(var n=[];t&&!e(t);)n.push(t),t=t.nextSibling;return n}function mt(t,e){var n=e.nextSibling,o=e.parentNode;return n?o.insertBefore(t,n):o.appendChild(t),t}function vt(t,n){return e().each(n,(function(e,n){t.appendChild(n)})),t}function gt(t){return 0===t.offset}function bt(t){return t.offset===ct(t.node)}function yt(t){return gt(t)||bt(t)}function kt(t,e){for(;t&&t!==e;){if(0!==Ct(t))return!1;t=t.parentNode}return!0}function wt(t,e){if(!e)return!1;for(;t&&t!==e;){if(Ct(t)!==ct(t.parentNode)-1)return!1;t=t.parentNode}return!0}function Ct(t){for(var e=0;t=t.previousSibling;)e+=1;return e}function xt(t){return!!(t&&t.childNodes&&t.childNodes.length)}function St(t,e){var n,o;if(0===t.offset){if(q(t.node))return null;n=t.node.parentNode,o=Ct(t.node)}else xt(t.node)?o=ct(n=t.node.childNodes[t.offset-1]):(n=t.node,o=e?0:t.offset-1);return{node:n,offset:o}}function Tt(t,e){var n,o;if(ct(t.node)===t.offset){if(q(t.node))return null;var i=It(t.node);i?(n=i,o=0):(n=t.node.parentNode,o=Ct(t.node)+1)}else xt(t.node)?(n=t.node.childNodes[t.offset],o=0):(n=t.node,o=e?ct(t.node):t.offset+1);return{node:n,offset:o}}function Et(t,e){var n,o=0;if(ut(t.node))return null===t.node?null:{node:n=t.node.nextSibling,offset:o=0};if(ct(t.node)===t.offset){if(q(t.node))return null;n=t.node.parentNode,o=Ct(t.node)+1,q(n)&&(n=t.node.nextSibling,o=0)}else if(xt(t.node)){if(o=0,ut(n=t.node.childNodes[t.offset]))return ut(t.node.nextSibling)?null:{node:t.node.nextSibling,offset:o}}else if(n=t.node,o=e?ct(t.node):t.offset+1,ut(n))return null;return{node:n,offset:o}}function It(t){if(t.nextSibling&&t.parent===t.nextSibling.parent)return _(t.nextSibling)?t.nextSibling:It(t.nextSibling)}function $t(t,e){return t.node===e.node&&t.offset===e.offset}function Nt(t,e){var n=e&&e.isSkipPaddingBlankHTML,o=e&&e.isNotSplitEdgePoint,i=e&&e.isDiscardEmptySplits;if(i&&(n=!0),yt(t)&&(_(t.node)||o)){if(gt(t))return t.node;if(bt(t))return t.node.nextSibling}if(_(t.node))return t.node.splitText(t.offset);var r=t.node.childNodes[t.offset],a=mt(t.node.cloneNode(!1),t.node);return vt(a,pt(r)),n||(dt(t.node),dt(a)),i&&(ut(t.node)&&Lt(t.node),ut(a))?(Lt(a),t.node.nextSibling):a}function Pt(t,e,n){var o=ft(e.node,z.eq(t));return o.length?1===o.length?Nt(e,n):o.reduce((function(t,o){return t===e.node&&(t=Nt(e,n)),Nt({node:o,offset:t?Ct(t):ct(o)},n)})):null}function Rt(t){return document.createElement(t)}function Lt(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var n=t.parentNode;if(!e){for(var o=[],i=0,r=t.childNodes.length;i<r;i++)o.push(t.childNodes[i]);for(var a=0,s=o.length;a<s;a++)n.insertBefore(o[a],t)}n.removeChild(t)}}var At=V("TEXTAREA");function Ft(t,e){var n=At(t[0])?t.val():t.html();return e?n.replace(/[\n\r]/g,""):n}const Dt={NBSP_CHAR:K,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:lt,emptyPara:"<p>".concat(lt,"</p>"),makePredByNodeName:V,isEditable:q,isControlSizing:function(t){return t&&e()(t).hasClass("note-control-sizing")},isText:_,isElement:function(t){return t&&1===t.nodeType},isVoid:G,isPara:Y,isPurePara:function(t){return Y(t)&&!X(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:tt,isBlock:z.not(tt),isBodyInline:function(t){return tt(t)&&!ht(t,Y)},isBody:st,isParaInline:function(t){return tt(t)&&!!ht(t,Y)},isPre:Z,isList:et,isTable:Q,isData:J,isCell:ot,isBlockquote:it,isBodyContainer:rt,isAnchor:at,isDiv:V("DIV"),isLi:X,isBR:V("BR"),isSpan:V("SPAN"),isB:V("B"),isU:V("U"),isS:V("S"),isI:V("I"),isImg:V("IMG"),isTextarea:At,deepestChildIsEmpty:function(t){do{if(null===t.firstElementChild||""===t.firstElementChild.innerHTML)break}while(t=t.firstElementChild);return ut(t)},isEmpty:ut,isEmptyAnchor:z.and(at,ut),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||z.ok;var n=[];return t.previousSibling&&e(t.previousSibling)&&n.push(t.previousSibling),n.push(t),t.nextSibling&&e(t.nextSibling)&&n.push(t.nextSibling),n},nodeLength:ct,isLeftEdgePoint:gt,isRightEdgePoint:bt,isEdgePoint:yt,isLeftEdgeOf:kt,isRightEdgeOf:wt,isLeftEdgePointOf:function(t,e){return gt(t)&&kt(t.node,e)},isRightEdgePointOf:function(t,e){return bt(t)&&wt(t.node,e)},prevPoint:St,nextPoint:Tt,nextPointWithEmptyNode:Et,isSamePoint:$t,isVisiblePoint:function(t){if(_(t.node)||!xt(t.node)||ut(t.node))return!0;var e=t.node.childNodes[t.offset-1],n=t.node.childNodes[t.offset];return!((e&&!G(e)||n&&!G(n))&&!Q(n))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=St(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=Tt(t)}return null},isCharPoint:function(t){if(!_(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==K},isSpacePoint:function(t){if(!_(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return" "===e||e===K},walkPoint:function(t,e,n,o){for(var i=t;i&&(n(i),!$t(i,e));){i=Et(i,o&&t.node!==i.node&&e.node!==i.node)}},ancestor:ht,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===ct(t);){if(e(t))return t;if(q(t))break;t=t.parentNode}return null},listAncestor:ft,lastAncestor:function(t,e){var n=ft(t);return W.last(n.filter(e))},listNext:pt,listPrev:function(t,e){e=e||z.fail;for(var n=[];t&&!e(t);)n.push(t),t=t.previousSibling;return n},listDescendant:function(t,e){var n=[];return e=e||z.ok,function o(i){t!==i&&e(i)&&n.push(i);for(var r=0,a=i.childNodes.length;r<a;r++)o(i.childNodes[r])}(t),n},commonAncestor:function(t,e){for(var n=ft(t),o=e;o;o=o.parentNode)if(n.indexOf(o)>-1)return o;return null},wrap:function(t,n){var o=t.parentNode,i=e()("<"+n+">")[0];return o.insertBefore(i,t),i.appendChild(t),i},insertAfter:mt,appendChildNodes:vt,position:Ct,hasChildren:xt,makeOffsetPath:function(t,e){return ft(e,z.eq(t)).map(Ct).reverse()},fromOffsetPath:function(t,e){for(var n=t,o=0,i=e.length;o<i;o++)n=n.childNodes.length<=e[o]?n.childNodes[n.childNodes.length-1]:n.childNodes[e[o]];return n},splitTree:Pt,splitPoint:function(t,e){var n,o,i=e?Y:rt,r=ft(t.node,i),a=W.last(r)||t.node;i(a)?(n=r[r.length-2],o=a):o=(n=a).parentNode;var s=n&&Pt(n,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return s||o!==t.node||(s=t.node.childNodes[t.offset]),{rightNode:s,container:o}},create:Rt,createText:function(t){return document.createTextNode(t)},remove:Lt,removeWhile:function(t,e){for(;t&&!q(t)&&e(t);){var n=t.parentNode;Lt(t),t=n}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var n=Rt(e);return t.style.cssText&&(n.style.cssText=t.style.cssText),vt(n,W.from(t.childNodes)),mt(n,t),Lt(t),n},html:function(t,e){var n=Ft(t);if(e){n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,(function(t,e,n){n=n.toUpperCase();var o=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!e,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return t+(o||i?"\n":"")}))).trim()}return n},value:Ft,posFromPlaceholder:function(t){var n=e()(t),o=n.offset(),i=n.outerHeight(!0);return{left:o.left,top:o.top+i}},attachEvents:function(t,e){Object.keys(e).forEach((function(n){t.on(n,e[n])}))},detachEvents:function(t,e){Object.keys(e).forEach((function(n){t.off(n,e[n])}))},isCustomStyleTag:function(t){return t&&!_(t)&&W.contains(t.classList,"note-styletag")}};function Ht(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Bt=function(){function t(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$note=n,this.memos={},this.modules={},this.layoutInfo={},this.options=e().extend(!0,{},o),e().summernote.ui=e().summernote.ui_template(this.options),this.ui=e().summernote.ui,this.initialize()}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){return this.layoutInfo=this.ui.createLayout(this.$note),this._initialize(),this.$note.hide(),this}},{key:"destroy",value:function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function(){var t=this.isDisabled();this.code(Dt.emptyPara),this._destroy(),this._initialize(),t&&this.disable()}},{key:"_initialize",value:function(){var t=this;this.options.id=z.uniqueId(e().now()),this.options.container=this.options.container||this.layoutInfo.editor;var n=e().extend({},this.options.buttons);Object.keys(n).forEach((function(e){t.memo("button."+e,n[e])}));var o=e().extend({},this.options.modules,e().summernote.plugins||{});Object.keys(o).forEach((function(e){t.module(e,o[e],!0)})),Object.keys(this.modules).forEach((function(e){t.initializeModule(e)}))}},{key:"_destroy",value:function(){var t=this;Object.keys(this.modules).reverse().forEach((function(e){t.removeModule(e)})),Object.keys(this.memos).forEach((function(e){t.removeMemo(e)})),this.triggerEvent("destroy",this)}},{key:"code",value:function(t){var e=this.invoke("codeview.isActivated");if(void 0===t)return this.invoke("codeview.sync"),e?this.layoutInfo.codable.val():this.layoutInfo.editable.html();e?this.invoke("codeview.sync",t):this.layoutInfo.editable.html(t),this.$note.val(t),this.triggerEvent("change",t,this.layoutInfo.editable)}},{key:"isDisabled",value:function(){return"false"===this.layoutInfo.editable.attr("contenteditable")}},{key:"enable",value:function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1),this.options.editing=!0}},{key:"disable",value:function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.options.editing=!1,this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)}},{key:"triggerEvent",value:function(){var t=W.head(arguments),e=W.tail(W.from(arguments)),n=this.options.callbacks[z.namespaceToCamel(t,"on")];n&&n.apply(this.$note[0],e),this.$note.trigger("summernote."+t,e)}},{key:"initializeModule",value:function(t){var e=this.modules[t];e.shouldInitialize=e.shouldInitialize||z.ok,e.shouldInitialize()&&(e.initialize&&e.initialize(),e.events&&Dt.attachEvents(this.$note,e.events))}},{key:"module",value:function(t,e,n){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),n||this.initializeModule(t)}},{key:"removeModule",value:function(t){var e=this.modules[t];e.shouldInitialize()&&(e.events&&Dt.detachEvents(this.$note,e.events),e.destroy&&e.destroy()),delete this.modules[t]}},{key:"memo",value:function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e}},{key:"removeMemo",value:function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]}},{key:"createInvokeHandlerAndUpdateState",value:function(t,e){var n=this;return function(o){n.createInvokeHandler(t,e)(o),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(t,n){var o=this;return function(i){i.preventDefault();var r=e()(i.target);o.invoke(t,n||r.closest("[data-value]").data("value"),r)}}},{key:"invoke",value:function(){var t=W.head(arguments),e=W.tail(W.from(arguments)),n=t.split("."),o=n.length>1,i=o&&W.head(n),r=o?W.last(n):W.head(n),a=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,e):a&&a[r]&&a.shouldInitialize()?a[r].apply(a,e):void 0}}])&&Ht(n.prototype,o),i&&Ht(n,i),t}();function zt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Mt(t,e){var n,o,i=t.parentElement(),r=document.body.createTextRange(),a=W.from(i.childNodes);for(n=0;n<a.length;n++)if(!Dt.isText(a[n])){if(r.moveToElementText(a[n]),r.compareEndPoints("StartToStart",t)>=0)break;o=a[n]}if(0!==n&&Dt.isText(a[n-1])){var s=document.body.createTextRange(),l=null;s.moveToElementText(o||i),s.collapse(!o),l=o?o.nextSibling:i.firstChild;var c=t.duplicate();c.setEndPoint("StartToStart",s);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&Dt.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,n=u}return{cont:i,offset:n}}function Ot(t){var e=document.body.createTextRange(),n=function t(e,n){var o,i;if(Dt.isText(e)){var r=Dt.listPrev(e,z.not(Dt.isText)),a=W.last(r).previousSibling;o=a||e.parentNode,n+=W.sum(W.tail(r),Dt.nodeLength),i=!a}else{if(o=e.childNodes[n]||e,Dt.isText(o))return t(o,0);n=0,i=!1}return{node:o,collapseToStart:i,offset:n}}(t.node,t.offset);return e.moveToElementText(n.node),e.collapse(n.collapseToStart),e.moveStart("character",n.offset),e}e().fn.extend({summernote:function(){var t=e().type(W.head(arguments)),n="string"===t,o="object"===t,i=e().extend({},e().summernote.options,o?W.head(arguments):{});i.langInfo=e().extend(!0,{},e().summernote.lang["en-US"],e().summernote.lang[i.lang]),i.icons=e().extend(!0,{},e().summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!H.isSupportTouch:i.tooltip,this.each((function(t,n){var o=e()(n);if(!o.data("summernote")){var r=new Bt(o,i);o.data("summernote",r),o.data("summernote").triggerEvent("init",r.layoutInfo)}}));var r=this.first();if(r.length){var a=r.data("summernote");if(n)return a.invoke.apply(a,W.from(arguments));i.focus&&a.invoke("editor.focus")}return this}});var Ut=function(){function t(e,n,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sc=e,this.so=n,this.ec=o,this.eo=i,this.isOnEditable=this.makeIsOn(Dt.isEditable),this.isOnList=this.makeIsOn(Dt.isList),this.isOnAnchor=this.makeIsOn(Dt.isAnchor),this.isOnCell=this.makeIsOn(Dt.isCell),this.isOnData=this.makeIsOn(Dt.isData)}var n,o,i;return n=t,(o=[{key:"nativeRange",value:function(){if(H.isW3CRangeSupport){var t=document.createRange();return t.setStart(this.sc,this.so),t.setEnd(this.ec,this.eo),t}var e=Ot({node:this.sc,offset:this.so});return e.setEndPoint("EndToEnd",Ot({node:this.ec,offset:this.eo})),e}},{key:"getPoints",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function(){var t=this.nativeRange();if(H.isW3CRangeSupport){var e=document.getSelection();e.rangeCount>0&&e.removeAllRanges(),e.addRange(t)}else t.select();return this}},{key:"scrollIntoView",value:function(t){var n=e()(t).height();return t.scrollTop+n<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+n-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var e=function(t,e){if(!t)return t;if(Dt.isVisiblePoint(t)&&(!Dt.isEdgePoint(t)||Dt.isRightEdgePoint(t)&&!e||Dt.isLeftEdgePoint(t)&&e||Dt.isRightEdgePoint(t)&&e&&Dt.isVoid(t.node.nextSibling)||Dt.isLeftEdgePoint(t)&&!e&&Dt.isVoid(t.node.previousSibling)||Dt.isBlock(t.node)&&Dt.isEmpty(t.node)))return t;var n=Dt.ancestor(t.node,Dt.isBlock),o=!1;if(!o){var i=Dt.prevPoint(t)||{node:null};o=(Dt.isLeftEdgePointOf(t,n)||Dt.isVoid(i.node))&&!e}var r=!1;if(!r){var a=Dt.nextPoint(t)||{node:null};r=(Dt.isRightEdgePointOf(t,n)||Dt.isVoid(a.node))&&e}if(o||r){if(Dt.isVisiblePoint(t))return t;e=!e}return(e?Dt.nextPointUntil(Dt.nextPoint(t),Dt.isVisiblePoint):Dt.prevPointUntil(Dt.prevPoint(t),Dt.isVisiblePoint))||t},n=e(this.getEndPoint(),!1),o=this.isCollapsed()?n:e(this.getStartPoint(),!0);return new t(o.node,o.offset,n.node,n.offset)}},{key:"nodes",value:function(t,e){t=t||z.ok;var n=e&&e.includeAncestor,o=e&&e.fullyContains,i=this.getStartPoint(),r=this.getEndPoint(),a=[],s=[];return Dt.walkPoint(i,r,(function(e){var i;Dt.isEditable(e.node)||(o?(Dt.isLeftEdgePoint(e)&&s.push(e.node),Dt.isRightEdgePoint(e)&&W.contains(s,e.node)&&(i=e.node)):i=n?Dt.ancestor(e.node,t):e.node,i&&t(i)&&a.push(i))}),!0),W.unique(a)}},{key:"commonAncestor",value:function(){return Dt.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(e){var n=Dt.ancestor(this.sc,e),o=Dt.ancestor(this.ec,e);if(!n&&!o)return new t(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return n&&(i.sc=n,i.so=0),o&&(i.ec=o,i.eo=Dt.nodeLength(o)),new t(i.sc,i.so,i.ec,i.eo)}},{key:"collapse",value:function(e){return e?new t(this.sc,this.so,this.sc,this.so):new t(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var e=this.sc===this.ec,n=this.getPoints();return Dt.isText(this.ec)&&!Dt.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),Dt.isText(this.sc)&&!Dt.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,e&&(n.ec=n.sc,n.eo=this.eo-this.so)),new t(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var n=this.splitText(),o=n.nodes(null,{fullyContains:!0}),i=Dt.prevPointUntil(n.getStartPoint(),(function(t){return!W.contains(o,t.node)})),r=[];return e().each(o,(function(t,e){var n=e.parentNode;i.node!==n&&1===Dt.nodeLength(n)&&r.push(n),Dt.remove(e,!1)})),e().each(r,(function(t,e){Dt.remove(e,!1)})),new t(i.node,i.offset,i.node,i.offset).normalize()}},{key:"makeIsOn",value:function(t){return function(){var e=Dt.ancestor(this.sc,t);return!!e&&e===Dt.ancestor(this.ec,t)}}},{key:"isLeftEdgeOf",value:function(t){if(!Dt.isLeftEdgePoint(this.getStartPoint()))return!1;var e=Dt.ancestor(this.sc,t);return e&&Dt.isLeftEdgeOf(this.sc,e)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(Dt.isBodyContainer(this.sc)&&Dt.isEmpty(this.sc))return this.sc.innerHTML=Dt.emptyPara,new t(this.sc.firstChild,0,this.sc.firstChild,0);var e,n=this.normalize();if(Dt.isParaInline(this.sc)||Dt.isPara(this.sc))return n;if(Dt.isInline(n.sc)){var o=Dt.listAncestor(n.sc,z.not(Dt.isInline));e=W.last(o),Dt.isInline(e)||(e=o[o.length-2]||n.sc.childNodes[n.so])}else e=n.sc.childNodes[n.so>0?n.so-1:0];if(e){var i=Dt.listPrev(e,Dt.isParaInline).reverse();if((i=i.concat(Dt.listNext(e.nextSibling,Dt.isParaInline))).length){var r=Dt.wrap(W.head(i),"p");Dt.appendChildNodes(r,W.tail(i))}}return this.normalize()}},{key:"insertNode",value:function(t){var e=this;(Dt.isText(t)||Dt.isInline(t))&&(e=this.wrapBodyInlineWithPara().deleteContents());var n=Dt.splitPoint(e.getStartPoint(),Dt.isInline(t));return n.rightNode?(n.rightNode.parentNode.insertBefore(t,n.rightNode),Dt.isEmpty(n.rightNode)&&Dt.isPara(t)&&n.rightNode.parentNode.removeChild(n.rightNode)):n.container.appendChild(t),t}},{key:"pasteHTML",value:function(t){t=e().trim(t);var n=e()("<div></div>").html(t)[0],o=W.from(n.childNodes),i=this,r=!1;return i.so>=0&&(o=o.reverse(),r=!0),o=o.map((function(t){return i.insertNode(t)})),r&&(o=o.reverse()),o}},{key:"toString",value:function(){var t=this.nativeRange();return H.isW3CRangeSupport?t.toString():t.text}},{key:"getWordRange",value:function(e){var n=this.getEndPoint();if(!Dt.isCharPoint(n))return this;var o=Dt.prevPointUntil(n,(function(t){return!Dt.isCharPoint(t)}));return e&&(n=Dt.nextPointUntil(n,(function(t){return!Dt.isCharPoint(t)}))),new t(o.node,o.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(e){var n=this.getEndPoint(),o=function(t){return!Dt.isCharPoint(t)&&!Dt.isSpacePoint(t)};if(o(n))return this;var i=Dt.prevPointUntil(n,o);return e&&(n=Dt.nextPointUntil(n,o)),new t(i.node,i.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(e){var n=this.getEndPoint(),o=Dt.prevPointUntil(n,(function(o){if(!Dt.isCharPoint(o)&&!Dt.isSpacePoint(o))return!0;var i=new t(o.node,o.offset,n.node,n.offset),r=e.exec(i.toString());return r&&0===r.index})),i=new t(o.node,o.offset,n.node,n.offset),r=i.toString(),a=e.exec(r);return a&&a[0].length===r.length?i:null}},{key:"bookmark",value:function(t){return{s:{path:Dt.makeOffsetPath(t,this.sc),offset:this.so},e:{path:Dt.makeOffsetPath(t,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(t){return{s:{path:W.tail(Dt.makeOffsetPath(W.head(t),this.sc)),offset:this.so},e:{path:W.tail(Dt.makeOffsetPath(W.last(t),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}])&&zt(n.prototype,o),i&&zt(n,i),t}();const jt={create:function(t,e,n,o){if(4===arguments.length)return new Ut(t,e,n,o);if(2===arguments.length)return new Ut(t,e,n=t,o=e);var i=this.createFromSelection();if(!i&&1===arguments.length){var r=arguments[0];return Dt.isEditable(r)&&(r=r.lastChild),this.createFromBodyElement(r,Dt.emptyPara===arguments[0].innerHTML)}return i},createFromBodyElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.createFromNode(t);return n.collapse(e)},createFromSelection:function(){var t,e,n,o;if(H.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(Dt.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);t=r.startContainer,e=r.startOffset,n=r.endContainer,o=r.endOffset}else{var a=document.selection.createRange(),s=a.duplicate();s.collapse(!1);var l=a;l.collapse(!0);var c=Mt(l,!0),u=Mt(s,!1);Dt.isText(c.node)&&Dt.isLeftEdgePoint(c)&&Dt.isTextNode(u.node)&&Dt.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),t=c.cont,e=c.offset,n=u.cont,o=u.offset}return new Ut(t,e,n,o)},createFromNode:function(t){var e=t,n=0,o=t,i=Dt.nodeLength(o);return Dt.isVoid(e)&&(n=Dt.listPrev(e).length-1,e=e.parentNode),Dt.isBR(o)?(i=Dt.listPrev(o).length-1,o=o.parentNode):Dt.isVoid(o)&&(i=Dt.listPrev(o).length,o=o.parentNode),this.create(e,n,o,i)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var n=Dt.fromOffsetPath(t,e.s.path),o=e.s.offset,i=Dt.fromOffsetPath(t,e.e.path),r=e.e.offset;return new Ut(n,o,i,r)},createFromParaBookmark:function(t,e){var n=t.s.offset,o=t.e.offset,i=Dt.fromOffsetPath(W.head(e),t.s.path),r=Dt.fromOffsetPath(W.last(e),t.e.path);return new Ut(i,n,r,o)}};var Wt={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34};const Kt={isEdit:function(t){return W.contains([Wt.BACKSPACE,Wt.TAB,Wt.ENTER,Wt.SPACE,Wt.DELETE],t)},isMove:function(t){return W.contains([Wt.LEFT,Wt.UP,Wt.RIGHT,Wt.DOWN],t)},isNavigation:function(t){return W.contains([Wt.HOME,Wt.END,Wt.PAGEUP,Wt.PAGEDOWN],t)},nameFromCode:z.invertObject(Wt),code:Wt};function qt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Vt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stack=[],this.stackOffset=-1,this.context=e,this.$editable=e.layoutInfo.editable,this.editable=this.$editable[0]}var e,n,o;return e=t,(n=[{key:"makeSnapshot",value:function(){var t=jt.create(this.editable);return{contents:this.$editable.html(),bookmark:t&&t.isOnEditable()?t.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(t){null!==t.contents&&this.$editable.html(t.contents),null!==t.bookmark&&jt.createFromBookmark(this.editable,t.bookmark).select()}},{key:"rewind",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function(){this.stack=[],this.stackOffset=-1,this.recordUndo()}},{key:"reset",value:function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()}},{key:"undo",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot()),this.stack.length>this.context.options.historyLimit&&(this.stack.shift(),this.stackOffset-=1)}}])&&qt(e.prototype,n),o&&qt(e,o),t}();function _t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Gt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,o,i;return n=t,(o=[{key:"jQueryCSS",value:function(t,n){var o={};return e().each(n,(function(e,n){o[n]=t.css(n)})),o}},{key:"fromNode",value:function(t){var e=this.jQueryCSS(t,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=t[0].style.fontSize||e["font-size"];return e["font-size"]=parseInt(n,10),e["font-size-unit"]=n.match(/[a-z%]+$/),e}},{key:"stylePara",value:function(t,n){e().each(t.nodes(Dt.isPara,{includeAncestor:!0}),(function(t,o){e()(o).css(n)}))}},{key:"styleNodes",value:function(t,n){t=t.splitText();var o=n&&n.nodeName||"SPAN",i=!(!n||!n.expandClosestSibling),r=!(!n||!n.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(Dt.create(o))];var a=Dt.makePredByNodeName(o),s=t.nodes(Dt.isText,{fullyContains:!0}).map((function(t){return Dt.singleChildAncestor(t,a)||Dt.wrap(t,o)}));if(i){if(r){var l=t.nodes();a=z.and(a,(function(t){return W.contains(l,t)}))}return s.map((function(t){var n=Dt.withClosestSiblings(t,a),o=W.head(n),i=W.tail(n);return e().each(i,(function(t,e){Dt.appendChildNodes(o,e.childNodes),Dt.remove(e)})),W.head(n)}))}return s}},{key:"current",value:function(t){var n=e()(Dt.isElement(t.sc)?t.sc:t.sc.parentNode),o=this.fromNode(n);try{o=e().extend(o,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||o["font-family"]})}catch(t){}if(t.isOnList()){var i=["circle","disc","disc-leading-zero","square"].indexOf(o["list-style-type"])>-1;o["list-style"]=i?"unordered":"ordered"}else o["list-style"]="none";var r=Dt.ancestor(t.sc,Dt.isPara);if(r&&r.style["line-height"])o["line-height"]=r.style.lineHeight;else{var a=parseInt(o["line-height"],10)/parseInt(o["font-size"],10);o["line-height"]=a.toFixed(1)}return o.anchor=t.isOnAnchor()&&Dt.ancestor(t.sc,Dt.isAnchor),o.ancestors=Dt.listAncestor(t.sc,Dt.isEditable),o.range=t,o}}])&&_t(n.prototype,o),i&&_t(n,i),t}();function Yt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Zt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,o,i;return n=t,(o=[{key:"insertOrderedList",value:function(t){this.toggleList("OL",t)}},{key:"insertUnorderedList",value:function(t){this.toggleList("UL",t)}},{key:"indent",value:function(t){var n=this,o=jt.create(t).wrapBodyInlineWithPara(),i=o.nodes(Dt.isPara,{includeAncestor:!0}),r=W.clusterBy(i,z.peq2("parentNode"));e().each(r,(function(t,o){var i=W.head(o);if(Dt.isLi(i)){var r=n.findList(i.previousSibling);r?o.map((function(t){return r.appendChild(t)})):(n.wrapList(o,i.parentNode.nodeName),o.map((function(t){return t.parentNode})).map((function(t){return n.appendToPrevious(t)})))}else e().each(o,(function(t,n){e()(n).css("marginLeft",(function(t,e){return(parseInt(e,10)||0)+25}))}))})),o.select()}},{key:"outdent",value:function(t){var n=this,o=jt.create(t).wrapBodyInlineWithPara(),i=o.nodes(Dt.isPara,{includeAncestor:!0}),r=W.clusterBy(i,z.peq2("parentNode"));e().each(r,(function(t,o){var i=W.head(o);Dt.isLi(i)?n.releaseList([o]):e().each(o,(function(t,n){e()(n).css("marginLeft",(function(t,e){return(e=parseInt(e,10)||0)>25?e-25:""}))}))})),o.select()}},{key:"toggleList",value:function(t,n){var o=this,i=jt.create(n).wrapBodyInlineWithPara(),r=i.nodes(Dt.isPara,{includeAncestor:!0}),a=i.paraBookmark(r),s=W.clusterBy(r,z.peq2("parentNode"));if(W.find(r,Dt.isPurePara)){var l=[];e().each(s,(function(e,n){l=l.concat(o.wrapList(n,t))})),r=l}else{var c=i.nodes(Dt.isList,{includeAncestor:!0}).filter((function(n){return!e().nodeName(n,t)}));c.length?e().each(c,(function(e,n){Dt.replace(n,t)})):r=this.releaseList(s,!0)}jt.createFromParaBookmark(a,r).select()}},{key:"wrapList",value:function(t,e){var n=W.head(t),o=W.last(t),i=Dt.isList(n.previousSibling)&&n.previousSibling,r=Dt.isList(o.nextSibling)&&o.nextSibling,a=i||Dt.insertAfter(Dt.create(e||"UL"),o);return t=t.map((function(t){return Dt.isPurePara(t)?Dt.replace(t,"LI"):t})),Dt.appendChildNodes(a,t),r&&(Dt.appendChildNodes(a,W.from(r.childNodes)),Dt.remove(r)),t}},{key:"releaseList",value:function(t,n){var o=this,i=[];return e().each(t,(function(t,r){var a=W.head(r),s=W.last(r),l=n?Dt.lastAncestor(a,Dt.isList):a.parentNode,c=l.parentNode;if("LI"===l.parentNode.nodeName)r.map((function(t){var e=o.findNextSiblings(t);c.nextSibling?c.parentNode.insertBefore(t,c.nextSibling):c.parentNode.appendChild(t),e.length&&(o.wrapList(e,l.nodeName),t.appendChild(e[0].parentNode))})),0===l.children.length&&c.removeChild(l),0===c.childNodes.length&&c.parentNode.removeChild(c);else{var u=l.childNodes.length>1?Dt.splitTree(l,{node:s.parentNode,offset:Dt.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,d=Dt.splitTree(l,{node:a.parentNode,offset:Dt.position(a)},{isSkipPaddingBlankHTML:!0});r=n?Dt.listDescendant(d,Dt.isLi):W.from(d.childNodes).filter(Dt.isLi),!n&&Dt.isList(l.parentNode)||(r=r.map((function(t){return Dt.replace(t,"P")}))),e().each(W.from(r).reverse(),(function(t,e){Dt.insertAfter(e,l)}));var h=W.compact([l,d,u]);e().each(h,(function(t,n){var o=[n].concat(Dt.listDescendant(n,Dt.isList));e().each(o.reverse(),(function(t,e){Dt.nodeLength(e)||Dt.remove(e,!0)}))}))}i=i.concat(r)})),i}},{key:"appendToPrevious",value:function(t){return t.previousSibling?Dt.appendChildNodes(t.previousSibling,[t]):this.wrapList([t],"LI")}},{key:"findList",value:function(t){return t?W.find(t.children,(function(t){return["OL","UL"].indexOf(t.nodeName)>-1})):null}},{key:"findNextSiblings",value:function(t){for(var e=[];t.nextSibling;)e.push(t.nextSibling),t=t.nextSibling;return e}}])&&Yt(n.prototype,o),i&&Yt(n,i),t}();function Xt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Qt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.bullet=new Zt,this.options=e.options}var n,o,i;return n=t,(o=[{key:"insertTab",value:function(t,e){var n=Dt.createText(new Array(e+1).join(Dt.NBSP_CHAR));(t=t.deleteContents()).insertNode(n,!0),(t=jt.create(n,e)).select()}},{key:"insertParagraph",value:function(t,n){n=(n=(n=n||jt.create(t)).deleteContents()).wrapBodyInlineWithPara();var o,i=Dt.ancestor(n.sc,Dt.isPara);if(i){if(Dt.isLi(i)&&(Dt.isEmpty(i)||Dt.deepestChildIsEmpty(i)))return void this.bullet.toggleList(i.parentNode.nodeName);var r=null;if(1===this.options.blockquoteBreakingLevel?r=Dt.ancestor(i,Dt.isBlockquote):2===this.options.blockquoteBreakingLevel&&(r=Dt.lastAncestor(i,Dt.isBlockquote)),r){o=e()(Dt.emptyPara)[0],Dt.isRightEdgePoint(n.getStartPoint())&&Dt.isBR(n.sc.nextSibling)&&e()(n.sc.nextSibling).remove();var a=Dt.splitTree(r,n.getStartPoint(),{isDiscardEmptySplits:!0});a?a.parentNode.insertBefore(o,a):Dt.insertAfter(o,r)}else{o=Dt.splitTree(i,n.getStartPoint());var s=Dt.listDescendant(i,Dt.isEmptyAnchor);s=s.concat(Dt.listDescendant(o,Dt.isEmptyAnchor)),e().each(s,(function(t,e){Dt.remove(e)})),(Dt.isHeading(o)||Dt.isPre(o)||Dt.isCustomStyleTag(o))&&Dt.isEmpty(o)&&(o=Dt.replace(o,"p"))}}else{var l=n.sc.childNodes[n.so];o=e()(Dt.emptyPara)[0],l?n.sc.insertBefore(o,l):n.sc.appendChild(o)}jt.create(o,0).normalize().select().scrollIntoView(t)}}])&&Xt(n.prototype,o),i&&Xt(n,i),t}();function Jt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var te=function t(e,n,o,i){var r={colPos:0,rowPos:0},a=[],s=[];function l(t,e,n,o,i,r,s){var l={baseRow:n,baseCell:o,isRowSpan:i,isColSpan:r,isVirtual:s};a[t]||(a[t]=[]),a[t][e]=l}function c(t,e,n,o){return{baseCell:t.baseCell,action:e,virtualTable:{rowIndex:n,cellIndex:o}}}function u(t,e){if(!a[t])return e;if(!a[t][e])return e;for(var n=e;a[t][n];)if(n++,!a[t][n])return n}function d(t,e){var n=u(t.rowIndex,e.cellIndex),o=e.colSpan>1,i=e.rowSpan>1,a=t.rowIndex===r.rowPos&&e.cellIndex===r.colPos;l(t.rowIndex,n,t,e,i,o,!1);var s=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(s>1)for(var c=1;c<s;c++){var d=t.rowIndex+c;h(d,n,e,a),l(d,n,t,e,!0,o,!0)}var f=e.attributes.colSpan?parseInt(e.attributes.colSpan.value,10):0;if(f>1)for(var p=1;p<f;p++){var m=u(t.rowIndex,n+p);h(t.rowIndex,m,e,a),l(t.rowIndex,m,t,e,i,!0,!0)}}function h(t,e,n,o){t===r.rowPos&&r.colPos>=n.cellIndex&&n.cellIndex<=e&&!o&&r.colPos++}function f(e){switch(n){case t.where.Column:if(e.isColSpan)return t.resultAction.SubtractSpanCount;break;case t.where.Row:if(!e.isVirtual&&e.isRowSpan)return t.resultAction.AddCell;if(e.isRowSpan)return t.resultAction.SubtractSpanCount}return t.resultAction.RemoveCell}function p(e){switch(n){case t.where.Column:if(e.isColSpan)return t.resultAction.SumSpanCount;if(e.isRowSpan&&e.isVirtual)return t.resultAction.Ignore;break;case t.where.Row:if(e.isRowSpan)return t.resultAction.SumSpanCount;if(e.isColSpan&&e.isVirtual)return t.resultAction.Ignore}return t.resultAction.AddCell}this.getActionList=function(){for(var e=n===t.where.Row?r.rowPos:-1,i=n===t.where.Column?r.colPos:-1,l=0,u=!0;u;){var d=e>=0?e:l,h=i>=0?i:l,m=a[d];if(!m)return u=!1,s;var v=m[h];if(!v)return u=!1,s;var g=t.resultAction.Ignore;switch(o){case t.requestAction.Add:g=p(v);break;case t.requestAction.Delete:g=f(v)}s.push(c(v,g,d,h)),l++}return s},e&&e.tagName&&("td"===e.tagName.toLowerCase()||"th"===e.tagName.toLowerCase())&&(r.colPos=e.cellIndex,e.parentElement&&e.parentElement.tagName&&"tr"===e.parentElement.tagName.toLowerCase()&&(r.rowPos=e.parentElement.rowIndex)),function(){for(var t=i.rows,e=0;e<t.length;e++)for(var n=t[e].cells,o=0;o<n.length;o++)d(t[e],n[o])}()};te.where={Row:0,Column:1},te.requestAction={Add:0,Delete:1},te.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var ee=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,o,i;return n=t,(o=[{key:"tab",value:function(t,e){var n=Dt.ancestor(t.commonAncestor(),Dt.isCell),o=Dt.ancestor(n,Dt.isTable),i=Dt.listDescendant(o,Dt.isCell),r=W[e?"prev":"next"](i,n);r&&jt.create(r,0).select()}},{key:"addRow",value:function(t,n){for(var o=Dt.ancestor(t.commonAncestor(),Dt.isCell),i=e()(o).closest("tr"),r=this.recoverAttributes(i),a=e()("<tr"+r+"></tr>"),s=new te(o,te.where.Row,te.requestAction.Add,e()(i).closest("table")[0]).getActionList(),l=0;l<s.length;l++){var c=s[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case te.resultAction.AddCell:a.append("<td"+u+">"+Dt.blank+"</td>");break;case te.resultAction.SumSpanCount:if("top"===n&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var d=e()("<div></div>").append(e()("<td"+u+">"+Dt.blank+"</td>").removeAttr("rowspan")).html();a.append(d);break}var h=parseInt(c.baseCell.rowSpan,10);h++,c.baseCell.setAttribute("rowSpan",h)}}if("top"===n)i.before(a);else{if(o.rowSpan>1){var f=i[0].rowIndex+(o.rowSpan-2);return void e()(e()(i).parent().find("tr")[f]).after(e()(a))}i.after(a)}}},{key:"addCol",value:function(t,n){var o=Dt.ancestor(t.commonAncestor(),Dt.isCell),i=e()(o).closest("tr");e()(i).siblings().push(i);for(var r=new te(o,te.where.Column,te.requestAction.Add,e()(i).closest("table")[0]).getActionList(),a=0;a<r.length;a++){var s=r[a],l=this.recoverAttributes(s.baseCell);switch(s.action){case te.resultAction.AddCell:"right"===n?e()(s.baseCell).after("<td"+l+">"+Dt.blank+"</td>"):e()(s.baseCell).before("<td"+l+">"+Dt.blank+"</td>");break;case te.resultAction.SumSpanCount:if("right"===n){var c=parseInt(s.baseCell.colSpan,10);c++,s.baseCell.setAttribute("colSpan",c)}else e()(s.baseCell).before("<td"+l+">"+Dt.blank+"</td>")}}}},{key:"recoverAttributes",value:function(t){var e="";if(!t)return e;for(var n=t.attributes||[],o=0;o<n.length;o++)"id"!==n[o].name.toLowerCase()&&n[o].specified&&(e+=" "+n[o].name+"='"+n[o].value+"'");return e}},{key:"deleteRow",value:function(t){for(var n=Dt.ancestor(t.commonAncestor(),Dt.isCell),o=e()(n).closest("tr"),i=o.children("td, th").index(e()(n)),r=o[0].rowIndex,a=new te(n,te.where.Row,te.requestAction.Delete,e()(o).closest("table")[0]).getActionList(),s=0;s<a.length;s++)if(a[s]){var l=a[s].baseCell,c=a[s].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(a[s].action){case te.resultAction.Ignore:continue;case te.resultAction.AddCell:var h=o.next("tr")[0];if(!h)continue;var f=o[0].cells[i];u&&(d>2?(d--,h.insertBefore(f,h.cells[i]),h.cells[i].setAttribute("rowSpan",d),h.cells[i].innerHTML=""):2===d&&(h.insertBefore(f,h.cells[i]),h.cells[i].removeAttribute("rowSpan"),h.cells[i].innerHTML=""));continue;case te.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")));continue;case te.resultAction.RemoveCell:continue}}o.remove()}},{key:"deleteCol",value:function(t){for(var n=Dt.ancestor(t.commonAncestor(),Dt.isCell),o=e()(n).closest("tr"),i=o.children("td, th").index(e()(n)),r=new te(n,te.where.Column,te.requestAction.Delete,e()(o).closest("table")[0]).getActionList(),a=0;a<r.length;a++)if(r[a])switch(r[a].action){case te.resultAction.Ignore:continue;case te.resultAction.SubtractSpanCount:var s=r[a].baseCell;if(s.colSpan&&s.colSpan>1){var l=s.colSpan?parseInt(s.colSpan,10):0;l>2?(l--,s.setAttribute("colSpan",l),s.cellIndex===i&&(s.innerHTML="")):2===l&&(s.removeAttribute("colSpan"),s.cellIndex===i&&(s.innerHTML=""))}continue;case te.resultAction.RemoveCell:Dt.remove(r[a].baseCell,!0);continue}}},{key:"createTable",value:function(t,n,o){for(var i,r=[],a=0;a<t;a++)r.push("<td>"+Dt.blank+"</td>");i=r.join("");for(var s,l=[],c=0;c<n;c++)l.push("<tr>"+i+"</tr>");s=l.join("");var u=e()("<table>"+s+"</table>");return o&&o.tableClassName&&u.addClass(o.tableClassName),u[0]}},{key:"deleteTable",value:function(t){var n=Dt.ancestor(t.commonAncestor(),Dt.isCell);e()(n).closest("table").remove()}}])&&Jt(n.prototype,o),i&&Jt(n,i),t}();function ne(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var oe=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new Gt,this.table=new ee,this.typing=new Qt(n),this.bullet=new Zt,this.history=new Vt(n),this.context.memo("help.escape",this.lang.help.escape),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var i=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],r=0,a=i.length;r<a;r++)this[i[r]]=function(t){return function(e){o.beforeCommand(),document.execCommand(t,!1,e),o.afterCommand(!0)}}(i[r]),this.context.memo("help."+i[r],this.lang.help[i[r]]);this.fontName=this.wrapCommand((function(t){return o.fontStyling("font-family",H.validFontName(t))})),this.fontSize=this.wrapCommand((function(t){var e=o.currentStyle()["font-size-unit"];return o.fontStyling("font-size",t+e)})),this.fontSizeUnit=this.wrapCommand((function(t){var e=o.currentStyle()["font-size"];return o.fontStyling("font-size",e+t)}));for(var s=1;s<=6;s++)this["formatH"+s]=function(t){return function(){o.formatBlock("H"+t)}}(s),this.context.memo("help.formatH"+s,this.lang.help["formatH"+s]);this.insertParagraph=this.wrapCommand((function(){o.typing.insertParagraph(o.editable)})),this.insertOrderedList=this.wrapCommand((function(){o.bullet.insertOrderedList(o.editable)})),this.insertUnorderedList=this.wrapCommand((function(){o.bullet.insertUnorderedList(o.editable)})),this.indent=this.wrapCommand((function(){o.bullet.indent(o.editable)})),this.outdent=this.wrapCommand((function(){o.bullet.outdent(o.editable)})),this.insertNode=this.wrapCommand((function(t){o.isLimited(e()(t).text().length)||(o.getLastRange().insertNode(t),o.setLastRange(jt.createFromNodeAfter(t).select()))})),this.insertText=this.wrapCommand((function(t){if(!o.isLimited(t.length)){var e=o.getLastRange().insertNode(Dt.createText(t));o.setLastRange(jt.create(e,Dt.nodeLength(e)).select())}})),this.pasteHTML=this.wrapCommand((function(t){if(!o.isLimited(t.length)){t=o.context.invoke("codeview.purify",t);var e=o.getLastRange().pasteHTML(t);o.setLastRange(jt.createFromNodeAfter(W.last(e)).select())}})),this.formatBlock=this.wrapCommand((function(t,e){var n=o.options.callbacks.onApplyCustomStyle;n?n.call(o,e,o.context,o.onFormatBlock):o.onFormatBlock(t,e)})),this.insertHorizontalRule=this.wrapCommand((function(){var t=o.getLastRange().insertNode(Dt.create("HR"));t.nextSibling&&o.setLastRange(jt.create(t.nextSibling,0).normalize().select())})),this.lineHeight=this.wrapCommand((function(t){o.style.stylePara(o.getLastRange(),{lineHeight:t})})),this.createLink=this.wrapCommand((function(t){var n=t.url,i=t.text,r=t.isNewWindow,a=t.checkProtocol,s=t.range||o.getLastRange(),l=i.length-s.toString().length;if(!(l>0&&o.isLimited(l))){var c=s.toString()!==i;"string"==typeof n&&(n=n.trim()),o.options.onCreateLink?n=o.options.onCreateLink(n):a&&(n=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(n)?n:o.options.defaultProtocol+n);var u=[];if(c){var d=(s=s.deleteContents()).insertNode(e()("<A>"+i+"</A>")[0]);u.push(d)}else u=o.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});e().each(u,(function(t,o){e()(o).attr("href",n),r?e()(o).attr("target","_blank"):e()(o).removeAttr("target")})),o.setLastRange(o.createRangeFromList(u).select())}})),this.color=this.wrapCommand((function(t){var e=t.foreColor,n=t.backColor;e&&document.execCommand("foreColor",!1,e),n&&document.execCommand("backColor",!1,n)})),this.foreColor=this.wrapCommand((function(t){document.execCommand("foreColor",!1,t)})),this.insertTable=this.wrapCommand((function(t){var e=t.split("x");o.getLastRange().deleteContents().insertNode(o.table.createTable(e[0],e[1],o.options))})),this.removeMedia=this.wrapCommand((function(){var t=e()(o.restoreTarget()).parent();t.closest("figure").length?t.closest("figure").remove():t=e()(o.restoreTarget()).detach(),o.context.triggerEvent("media.delete",t,o.$editable)})),this.floatMe=this.wrapCommand((function(t){var n=e()(o.restoreTarget());n.toggleClass("note-float-left","left"===t),n.toggleClass("note-float-right","right"===t),n.css("float","none"===t?"":t)})),this.resize=this.wrapCommand((function(t){var n=e()(o.restoreTarget());0===(t=parseFloat(t))?n.css("width",""):n.css({width:100*t+"%",height:""})}))}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t=this;this.$editable.on("keydown",(function(e){if(e.keyCode===Kt.code.ENTER&&t.context.triggerEvent("enter",e),t.context.triggerEvent("keydown",e),t.snapshot=t.history.makeSnapshot(),t.hasKeyShortCut=!1,e.isDefaultPrevented()||(t.options.shortcuts?t.hasKeyShortCut=t.handleKeyMap(e):t.preventDefaultEditableShortCuts(e)),t.isLimited(1,e)){var n=t.getLastRange();if(n.eo-n.so==0)return!1}t.setLastRange(),t.options.recordEveryKeystroke&&!1===t.hasKeyShortCut&&t.history.recordUndo()})).on("keyup",(function(e){t.setLastRange(),t.context.triggerEvent("keyup",e)})).on("focus",(function(e){t.setLastRange(),t.context.triggerEvent("focus",e)})).on("blur",(function(e){t.context.triggerEvent("blur",e)})).on("mousedown",(function(e){t.context.triggerEvent("mousedown",e)})).on("mouseup",(function(e){t.setLastRange(),t.history.recordUndo(),t.context.triggerEvent("mouseup",e)})).on("scroll",(function(e){t.context.triggerEvent("scroll",e)})).on("paste",(function(e){t.setLastRange(),t.context.triggerEvent("paste",e)})).on("input",(function(){t.isLimited(0)&&t.snapshot&&t.history.applySnapshot(t.snapshot)})),this.$editable.attr("spellcheck",this.options.spellCheck),this.$editable.attr("autocorrect",this.options.spellCheck),this.options.disableGrammar&&this.$editable.attr("data-gramm",!1),this.$editable.html(Dt.html(this.$note)||Dt.emptyPara),this.$editable.on(H.inputEventName,z.debounce((function(){t.context.triggerEvent("change",t.$editable.html(),t.$editable)}),10)),this.$editable.on("focusin",(function(e){t.context.triggerEvent("focusin",e)})).on("focusout",(function(e){t.context.triggerEvent("focusout",e)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",(function(e){return t.context.triggerEvent("contextmenu",e),!1})):(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()}},{key:"destroy",value:function(){this.$editable.off()}},{key:"handleKeyMap",value:function(t){var e=this.options.keyMap[H.isMac?"mac":"pc"],n=[];t.metaKey&&n.push("CMD"),t.ctrlKey&&!t.altKey&&n.push("CTRL"),t.shiftKey&&n.push("SHIFT");var o=Kt.nameFromCode[t.keyCode];o&&n.push(o);var i=e[n.join("+")];if("TAB"!==o||this.options.tabDisable)if(i){if(!1!==this.context.invoke(i))return t.preventDefault(),!0}else Kt.isEdit(t.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(t){(t.ctrlKey||t.metaKey)&&W.contains([66,73,85],t.keyCode)&&t.preventDefault()}},{key:"isLimited",value:function(t,e){return t=t||0,(void 0===e||!(Kt.isMove(e.keyCode)||Kt.isNavigation(e.keyCode)||e.ctrlKey||e.metaKey||W.contains([Kt.code.BACKSPACE,Kt.code.DELETE],e.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+t>this.options.maxTextLength}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function(t){var e=jt.createFromNodeBefore(W.head(t)).getStartPoint(),n=jt.createFromNodeAfter(W.last(t)).getEndPoint();return jt.create(e.node,e.offset,n.node,n.offset)}},{key:"setLastRange",value:function(t){t?this.lastRange=t:(this.lastRange=jt.create(this.editable),0===e()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=jt.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(t){t&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(t){this.$editable.data("target",t)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var t=jt.create();return t&&(t=t.normalize()),t?this.style.current(t):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(t){return this.style.fromNode(t)}},{key:"undo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function(t){this.normalizeContent(),this.history.recordUndo(),t||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(t,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(t){return function(){this.beforeCommand(),t.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function(t,n){var o,i=this;return(o=t,e().Deferred((function(t){var n=e()("<img>");n.one("load",(function(){n.off("error abort"),t.resolve(n)})).one("error abort",(function(){n.off("load").detach(),t.reject(n)})).css({display:"none"}).appendTo(document.body).attr("src",o)})).promise()).then((function(t){i.beforeCommand(),"function"==typeof n?n(t):("string"==typeof n&&t.attr("data-filename",n),t.css("width",Math.min(i.$editable.width(),t.width()))),t.show(),i.getLastRange().insertNode(t[0]),i.setLastRange(jt.createFromNodeAfter(t[0]).select()),i.afterCommand()})).fail((function(t){i.context.triggerEvent("image.upload.error",t)}))}},{key:"insertImagesAsDataURL",value:function(t){var n=this;e().each(t,(function(t,o){var i=o.name;n.options.maximumImageFileSize&&n.options.maximumImageFileSize<o.size?n.context.triggerEvent("image.upload.error",n.lang.image.maximumFileSizeError):function(t){return e().Deferred((function(n){e().extend(new FileReader,{onload:function(t){var e=t.target.result;n.resolve(e)},onerror:function(t){n.reject(t)}}).readAsDataURL(t)})).promise()}(o).then((function(t){return n.insertImage(t,i)})).fail((function(){n.context.triggerEvent("image.upload.error")}))}))}},{key:"insertImagesOrCallback",value:function(t){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",t):this.insertImagesAsDataURL(t)}},{key:"getSelectedText",value:function(){var t=this.getLastRange();return t.isOnAnchor()&&(t=jt.createFromNode(Dt.ancestor(t.sc,Dt.isAnchor))),t.toString()}},{key:"onFormatBlock",value:function(t,n){if(document.execCommand("FormatBlock",!1,H.isMSIE?"<"+t+">":t),n&&n.length&&(n[0].tagName.toUpperCase()!==t.toUpperCase()&&(n=n.find(t)),n&&n.length)){var o=this.createRange(),i=e()([o.sc,o.ec]).closest(t);i.removeClass();var r=n[0].className||"";r&&i.addClass(r)}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(t,n){var o=this.getLastRange();if(""!==o){var i=this.style.styleNodes(o);if(this.$editor.find(".note-status-output").html(""),e()(i).css(t,n),o.isCollapsed()){var r=W.head(i);r&&!Dt.nodeLength(r)&&(r.innerHTML=Dt.ZERO_WIDTH_NBSP_CHAR,jt.createFromNode(r.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",r))}else this.setLastRange(this.createRangeFromList(i).select())}else{var a=e().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+a+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout((function(){e()("#note-status-output-"+a).remove()}),5e3)}}},{key:"unlink",value:function(){var t=this.getLastRange();if(t.isOnAnchor()){var e=Dt.ancestor(t.sc,Dt.isAnchor);(t=jt.createFromNode(e)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){var t=this.getLastRange().expand(Dt.isAnchor),n=e()(W.head(t.nodes(Dt.isAnchor))),o={range:t,text:t.toString(),url:n.length?n.attr("href"):""};return n.length&&(o.isNewWindow="_blank"===n.attr("target")),o}},{key:"addRow",value:function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addRow(e,t),this.afterCommand())}},{key:"addCol",value:function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addCol(e,t),this.afterCommand())}},{key:"deleteRow",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(t),this.afterCommand())}},{key:"deleteCol",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(t),this.afterCommand())}},{key:"deleteTable",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(t),this.afterCommand())}},{key:"resizeTo",value:function(t,e,n){var o;if(n){var i=t.y/t.x,r=e.data("ratio");o={width:r>i?t.x:t.y/r,height:r>i?t.x*r:t.y}}else o={width:t.x,height:t.y};e.css(o)}},{key:"hasFocus",value:function(){return this.$editable.is(":focus")}},{key:"focus",value:function(){this.hasFocus()||this.$editable.focus()}},{key:"isEmpty",value:function(){return Dt.isEmpty(this.$editable[0])||Dt.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",Dt.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}])&&ne(n.prototype,o),i&&ne(n,i),t}();function ie(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var re=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editable=e.layoutInfo.editable}var e,n,o;return e=t,(n=[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(t){var e=this,n=t.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var o=n.items.length>1?n.items[1]:W.head(n.items);"file"===o.kind&&-1!==o.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[o.getAsFile()]),t.preventDefault()):"string"===o.kind&&this.context.invoke("editor.isLimited",n.getData("Text").length)&&t.preventDefault()}else if(window.clipboardData){var i=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",i.length)&&t.preventDefault()}setTimeout((function(){e.context.invoke("editor.afterCommand")}),10)}}])&&ie(e.prototype,n),o&&ie(e,o),t}();function ae(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var se=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.$eventListener=e()(document),this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=e()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(t){t.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:"attachDragAndDropEvent",value:function(){var t=this,n=e()(),o=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(e){var i=t.context.invoke("codeview.isActivated"),r=t.$editor.width()>0&&t.$editor.height()>0;i||n.length||!r||(t.$editor.addClass("dragover"),t.$dropzone.width(t.$editor.width()),t.$dropzone.height(t.$editor.height()),o.text(t.lang.image.dragImageHere)),n=n.add(e.target)},this.documentEventHandlers.onDragleave=function(o){(n=n.not(o.target)).length&&"BODY"!==o.target.nodeName||(n=e()(),t.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){n=e()(),t.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",(function(){t.$dropzone.addClass("hover"),o.text(t.lang.image.dropImage)})).on("dragleave",(function(){t.$dropzone.removeClass("hover"),o.text(t.lang.image.dragImageHere)})),this.$dropzone.on("drop",(function(n){var o=n.originalEvent.dataTransfer;n.preventDefault(),o&&o.files&&o.files.length?(t.$editable.focus(),t.context.invoke("editor.insertImagesOrCallback",o.files)):e().each(o.types,(function(n,i){if(!(i.toLowerCase().indexOf("_moz_")>-1)){var r=o.getData(i);i.toLowerCase().indexOf("text")>-1?t.context.invoke("editor.pasteHTML",r):e()(r).each((function(e,n){t.context.invoke("editor.insertNode",n)}))}}))})).on("dragover",!1)}},{key:"destroy",value:function(){var t=this;Object.keys(this.documentEventHandlers).forEach((function(e){t.$eventListener.off(e.substr(2).toLowerCase(),t.documentEventHandlers[e])})),this.documentEventHandlers={}}}])&&ae(n.prototype,o),i&&ae(n,i),t}();function le(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ce(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function ue(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var de=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.options=e.options,this.CodeMirrorConstructor=window.CodeMirror,this.options.codemirror.CodeMirrorConstructor&&(this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor)}var e,n,o;return e=t,(n=[{key:"sync",value:function(t){var e=this.isActivated(),n=this.CodeMirrorConstructor;e&&(t?n?this.$codable.data("cmEditor").getDoc().setValue(t):this.$codable.val(t):n&&this.$codable.data("cmEditor").save())}},{key:"initialize",value:function(){var t=this;this.$codable.on("keyup",(function(e){e.keyCode===Kt.code.ESCAPE&&t.deactivate()}))}},{key:"isActivated",value:function(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function(t){if(this.options.codeviewFilter&&(t=t.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var e=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);t=t.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(t){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(t))return"";var n,o=le(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(new RegExp('src="(https?:)?//'+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(t))return t}}catch(t){o.e(t)}finally{o.f()}return""}))}return t}},{key:"activate",value:function(){var t=this,e=this.CodeMirrorConstructor;if(this.$codable.val(Dt.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.context.invoke("airPopover.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),e){var n=e.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var o=new e.TernServer(this.options.codemirror.tern);n.ternServer=o,n.on("cursorActivity",(function(t){o.updateArgHints(t)}))}n.on("blur",(function(e){t.context.triggerEvent("blur.codeview",n.getValue(),e)})),n.on("change",(function(){t.context.triggerEvent("change.codeview",n.getValue(),n)})),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n)}else this.$codable.on("blur",(function(e){t.context.triggerEvent("blur.codeview",t.$codable.val(),e)})),this.$codable.on("input",(function(){t.context.triggerEvent("change.codeview",t.$codable.val(),t.$codable)}))}},{key:"deactivate",value:function(){if(this.CodeMirrorConstructor){var t=this.$codable.data("cmEditor");this.$codable.val(t.getValue()),t.toTextArea()}var e=this.purify(Dt.value(this.$codable,this.options.prettifyHtml)||Dt.emptyPara),n=this.$editable.html()!==e;this.$editable.html(e),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1),this.context.invoke("airPopover.updateCodeview",!1)}},{key:"destroy",value:function(){this.isActivated()&&this.deactivate()}}])&&ue(e.prototype,n),o&&ue(e,o),t}();function he(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var fe=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$document=e()(document),this.$statusbar=n.layoutInfo.statusbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.options=n.options}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",(function(e){e.preventDefault(),e.stopPropagation();var n=t.$editable.offset().top-t.$document.scrollTop(),o=t.$codable.offset().top-t.$document.scrollTop(),i=function(e){var i=e.clientY-(n+24),r=e.clientY-(o+24);i=t.options.minheight>0?Math.max(i,t.options.minheight):i,i=t.options.maxHeight>0?Math.min(i,t.options.maxHeight):i,r=t.options.minheight>0?Math.max(r,t.options.minheight):r,r=t.options.maxHeight>0?Math.min(r,t.options.maxHeight):r,t.$editable.height(i),t.$codable.height(r)};t.$document.on("mousemove",i).one("mouseup",(function(){t.$document.off("mousemove",i)}))}))}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}])&&he(n.prototype,o),i&&he(n,i),t}();function pe(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var me=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.$window=e()(window),this.$scrollbar=e()("html, body"),this.scrollbarClassName="note-fullscreen-body",this.onResize=function(){o.resizeTo({h:o.$window.height()-o.$toolbar.outerHeight()})}}var n,o,i;return n=t,(o=[{key:"resizeTo",value:function(t){this.$editable.css("height",t.h),this.$codable.css("height",t.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,t.h)}},{key:"toggle",value:function(){this.$editor.toggleClass("fullscreen");var t=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,t),t?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight")),this.$editable.css("maxHeight",""),this.$window.on("resize",this.onResize).trigger("resize")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight"))),this.context.invoke("toolbar.updateFullscreen",t)}},{key:"isFullscreen",value:function(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function(){this.$scrollbar.removeClass(this.scrollbarClassName)}}])&&pe(n.prototype,o),i&&pe(n,i),t}();function ve(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var ge=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.$document=e()(document),this.$editingArea=n.layoutInfo.editingArea,this.options=n.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(t,e){o.update(e.target,e)&&e.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){o.update()},"summernote.disable summernote.blur":function(){o.hide()},"summernote.codeview.toggled":function(){o.update()}}}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t=this;this.$handle=e()(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",(function(e){if(Dt.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var n=t.$handle.find(".note-control-selection").data("target"),o=n.offset(),i=t.$document.scrollTop(),r=function(e){t.context.invoke("editor.resizeTo",{x:e.clientX-o.left,y:e.clientY-(o.top-i)},n,!e.shiftKey),t.update(n[0],e)};t.$document.on("mousemove",r).one("mouseup",(function(e){e.preventDefault(),t.$document.off("mousemove",r),t.context.invoke("editor.afterCommand")})),n.data("ratio")||n.data("ratio",n.height()/n.width())}})),this.$handle.on("wheel",(function(e){e.preventDefault(),t.update()}))}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(t,n){if(this.context.isDisabled())return!1;var o=Dt.isImg(t),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",t,n),o){var r=e()(t),a=r.position(),s={left:a.left+parseInt(r.css("marginLeft"),10),top:a.top+parseInt(r.css("marginTop"),10)},l={w:r.outerWidth(!1),h:r.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:l.w,height:l.h}).data("target",r);var c=new Image;c.src=r.attr("src");var u=l.w+"x"+l.h+" ("+this.lang.image.original+": "+c.width+"x"+c.height+")";i.find(".note-control-selection-info").text(u),this.context.invoke("editor.saveTarget",t)}else this.hide();return o}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}])&&ve(n.prototype,o),i&&ve(n,i),t}();function be(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var ye=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,ke=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.options=e.options,this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||n.handleKeyup(e)},"summernote.keydown":function(t,e){n.handleKeydown(e)}}}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var t=this.lastWordRange.toString(),n=t.match(ye);if(n&&(n[1]||n[2])){var o=n[1]?t:"http://"+t,i=this.options.showDomainOnlyForAutolink?t.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:t,r=e()("<a />").html(i).attr("href",o)[0];this.context.options.linkTargetBlank&&e()(r).attr("target","_blank"),this.lastWordRange.insertNode(r),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(t){if(W.contains([Kt.code.ENTER,Kt.code.SPACE],t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=e}}},{key:"handleKeyup",value:function(t){W.contains([Kt.code.ENTER,Kt.code.SPACE],t.keyCode)&&this.replace()}}])&&be(n.prototype,o),i&&be(n,i),t}();function we(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Ce=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$note=e.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(e.invoke("code"))}}}var e,n,o;return e=t,(n=[{key:"shouldInitialize",value:function(){return Dt.isTextarea(this.$note[0])}}])&&we(e.prototype,n),o&&we(e,o),t}();function xe(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Se=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.options=e.options.replace||{},this.keys=[Kt.code.ENTER,Kt.code.SPACE,Kt.code.PERIOD,Kt.code.COMMA,Kt.code.SEMICOLON,Kt.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||n.handleKeyup(e)},"summernote.keydown":function(t,e){n.handleKeydown(e)}}}var e,n,o;return e=t,(n=[{key:"shouldInitialize",value:function(){return!!this.options.match}},{key:"initialize",value:function(){this.lastWord=null}},{key:"destroy",value:function(){this.lastWord=null}},{key:"replace",value:function(){if(this.lastWord){var t=this,e=this.lastWord.toString();this.options.match(e,(function(e){if(e){var n="";if("string"==typeof e?n=Dt.createText(e):e instanceof jQuery?n=e[0]:e instanceof Node&&(n=e),!n)return;t.lastWord.insertNode(n),t.lastWord=null,t.context.invoke("editor.focus")}}))}}},{key:"handleKeydown",value:function(t){if(this.previousKeydownCode&&W.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=t.keyCode;else{if(W.contains(this.keys,t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWord=e}this.previousKeydownCode=t.keyCode}}},{key:"handleKeyup",value:function(t){W.contains(this.keys,t.keyCode)&&this.replace()}}])&&xe(e.prototype,n),o&&xe(e,o),t}();function Te(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Ee=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editingArea=e.layoutInfo.editingArea,this.options=e.options,!0===this.options.inheritPlaceholder&&(this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder),this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}}}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var t=this;this.$placeholder=e()('<div class="note-placeholder">'),this.$placeholder.on("click",(function(){t.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var t=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(t)}}])&&Te(n.prototype,o),i&&Te(n,i),t}();function Ie(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var $e=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ui=e().summernote.ui,this.context=n,this.$toolbar=n.layoutInfo.toolbar,this.options=n.options,this.lang=this.options.langInfo,this.invertedKeyMap=z.invertObject(this.options.keyMap[H.isMac?"mac":"pc"])}var n,o,i;return n=t,(o=[{key:"representShortcut",value:function(t){var e=this.invertedKeyMap[t];return this.options.shortcuts&&e?(H.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(t){return!this.options.tooltip&&t.tooltip&&delete t.tooltip,t.container=this.options.container,this.ui.button(t)}},{key:"initialize",value:function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}}},{key:"destroy",value:function(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function(t){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,t)||(this.fontInstalledMap[t]=H.isFontInstalled(t)||W.contains(this.options.fontNamesIgnoreCheck,t)),this.fontInstalledMap[t]}},{key:"isFontDeservedToAdd",value:function(t){return""!==(t=t.toLowerCase())&&this.isFontInstalled(t)&&-1===H.genericFontFamilies.indexOf(t)}},{key:"colorPalette",value:function(t,n,o,i){var r=this;return this.ui.buttonGroup({className:"note-color "+t,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:n,click:function(t){var n=e()(t.currentTarget);o&&i?r.context.invoke("editor.color",{backColor:n.attr("data-backColor"),foreColor:n.attr("data-foreColor")}):o?r.context.invoke("editor.color",{backColor:n.attr("data-backColor")}):i&&r.context.invoke("editor.color",{foreColor:n.attr("data-foreColor")})},callback:function(t){var e=t.find(".note-recent-color");o&&(e.css("background-color",r.options.colorButton.backColor),t.attr("data-backColor",r.options.colorButton.backColor)),i?(e.css("color",r.options.colorButton.foreColor),t.attr("data-foreColor",r.options.colorButton.foreColor)):e.css("color","transparent")}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),data:{toggle:"dropdown"}}),this.ui.dropdown({items:(o?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="backColor" data-value="transparent">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor">\x3c!-- back colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="backColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="backColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="backColorPalette-'+this.options.id+'" data-event="backColor"></div>',"</div>"].join(""):"")+(i?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor">\x3c!-- fore colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="foreColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="foreColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="foreColorPalette-'+this.options.id+'" data-event="foreColor"></div>',"</div>"].join(""):""),callback:function(t){t.find(".note-holder").each((function(t,n){var o=e()(n);o.append(r.ui.palette({colors:r.options.colors,colorsName:r.options.colorsName,eventName:o.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())}));var n=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];t.find(".note-holder-custom").each((function(t,o){var i=e()(o);i.append(r.ui.palette({colors:n,colorsName:n,eventName:i.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())})),t.find("input[type=color]").each((function(n,o){e()(o).change((function(){var n=t.find("#"+e()(this).data("event")).find(".note-color-btn").first(),o=this.value.toUpperCase();n.css("background-color",o).attr("aria-label",o).attr("data-value",o).attr("data-original-title",o),n.click()}))}))},click:function(n){n.stopPropagation();var o=e()("."+t).find(".note-dropdown-menu"),i=e()(n.target),a=i.data("event"),s=i.attr("data-value");if("openPalette"===a){var l=o.find("#"+s),c=e()(o.find("#"+l.data("event")).find(".note-color-row")[0]),u=c.find(".note-color-btn").last().detach(),d=l.val();u.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),c.prepend(u),l.click()}else{if(W.contains(["backColor","foreColor"],a)){var h="backColor"===a?"background-color":"color",f=i.closest(".note-color").find(".note-recent-color"),p=i.closest(".note-color").find(".note-current-color-button");f.css(h,s),p.attr("data"+a,s)}r.context.invoke("editor."+a,s)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var t=this;this.context.memo("button.style",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),data:{toggle:"dropdown"}}),t.ui.dropdown({className:"dropdown-style",items:t.options.styleTags,title:t.lang.style.style,template:function(e){"string"==typeof e&&(e={tag:e,title:Object.prototype.hasOwnProperty.call(t.lang.style,e)?t.lang.style[e]:e});var n=e.tag,o=e.title;return"<"+n+(e.style?' style="'+e.style+'" ':"")+(e.className?' class="'+e.className+'"':"")+">"+o+"</"+n+">"},click:t.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var n=function(e,n){var o=t.options.styleTags[e];t.context.memo("button.style."+o,(function(){return t.button({className:"note-btn-style-"+o,contents:'<div data-value="'+o+'">'+o.toUpperCase()+"</div>",tooltip:t.lang.style[o],click:t.context.createInvokeHandler("editor.formatBlock")}).render()}))},o=0,i=this.options.styleTags.length;o<i;o++)n(o);this.context.memo("button.bold",(function(){return t.button({className:"note-btn-bold",contents:t.ui.icon(t.options.icons.bold),tooltip:t.lang.font.bold+t.representShortcut("bold"),click:t.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()})),this.context.memo("button.italic",(function(){return t.button({className:"note-btn-italic",contents:t.ui.icon(t.options.icons.italic),tooltip:t.lang.font.italic+t.representShortcut("italic"),click:t.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()})),this.context.memo("button.underline",(function(){return t.button({className:"note-btn-underline",contents:t.ui.icon(t.options.icons.underline),tooltip:t.lang.font.underline+t.representShortcut("underline"),click:t.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()})),this.context.memo("button.clear",(function(){return t.button({contents:t.ui.icon(t.options.icons.eraser),tooltip:t.lang.font.clear+t.representShortcut("removeFormat"),click:t.context.createInvokeHandler("editor.removeFormat")}).render()})),this.context.memo("button.strikethrough",(function(){return t.button({className:"note-btn-strikethrough",contents:t.ui.icon(t.options.icons.strikethrough),tooltip:t.lang.font.strikethrough+t.representShortcut("strikethrough"),click:t.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()})),this.context.memo("button.superscript",(function(){return t.button({className:"note-btn-superscript",contents:t.ui.icon(t.options.icons.superscript),tooltip:t.lang.font.superscript,click:t.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()})),this.context.memo("button.subscript",(function(){return t.button({className:"note-btn-subscript",contents:t.ui.icon(t.options.icons.subscript),tooltip:t.lang.font.subscript,click:t.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()})),this.context.memo("button.fontname",(function(){var n=t.context.invoke("editor.currentStyle");return t.options.addDefaultFonts&&e().each(n["font-family"].split(","),(function(e,n){n=n.trim().replace(/['"]+/g,""),t.isFontDeservedToAdd(n)&&-1===t.options.fontNames.indexOf(n)&&t.options.fontNames.push(n)})),t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),title:t.lang.font.name,template:function(t){return'<span style="font-family: '+H.validFontName(t)+'">'+t+"</span>"},click:t.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,title:t.lang.font.size,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizeUnits,title:t.lang.font.sizeunit,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return t.colorPalette("note-color-all",t.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return t.colorPalette("note-color-fore",t.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return t.colorPalette("note-color-back",t.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut("insertUnorderedList"),click:t.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut("insertOrderedList"),click:t.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var r=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),s=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",z.invoke(r,"render")),this.context.memo("button.justifyCenter",z.invoke(a,"render")),this.context.memo("button.justifyRight",z.invoke(s,"render")),this.context.memo("button.justifyFull",z.invoke(l,"render")),this.context.memo("button.outdent",z.invoke(c,"render")),this.context.memo("button.indent",z.invoke(u,"render")),this.context.memo("button.paragraph",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),data:{toggle:"dropdown"}}),t.ui.dropdown([t.ui.buttonGroup({className:"note-align",children:[r,a,s,l]}),t.ui.buttonGroup({className:"note-list",children:[c,u]})])]).render()})),this.context.memo("button.height",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:"dropdown-line-height",title:t.lang.font.height,click:t.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),data:{toggle:"dropdown"}}),t.ui.dropdown({title:t.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(e){e.find(".note-dimension-picker-mousecatcher").css({width:t.options.insertTableMaxSize.col+"em",height:t.options.insertTableMaxSize.row+"em"}).mousedown(t.context.createInvokeHandler("editor.insertTable")).on("mousemove",t.tableMoveHandler.bind(t))}}).render()})),this.context.memo("button.link",(function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut("linkDialog.show"),click:t.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.image.image,click:t.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut("insertHorizontalRule"),click:t.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return t.button({className:"btn-fullscreen note-codeview-keep",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.lang.options.fullscreen,click:t.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return t.button({className:"btn-codeview note-codeview-keep",contents:t.ui.icon(t.options.icons.code),tooltip:t.lang.options.codeview,click:t.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut("redo"),click:t.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut("undo"),click:t.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.lang.options.help,click:t.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function(){var t=this;this.context.memo("button.resizeFull",(function(){return t.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return t.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return t.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.resizeNone,click:t.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return t.button({contents:t.ui.icon(t.options.icons.floatLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return t.button({contents:t.ui.icon(t.options.icons.floatRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function(){var t=this;this.context.memo("button.linkDialogShow",(function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function(){var t=this;this.context.memo("button.addRowUp",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function(t,e){for(var n=0,o=e.length;n<o;n++){for(var i=e[n],r=Array.isArray(i)?i[0]:i,a=Array.isArray(i)?1===i.length?[i[0]]:i[1]:[i],s=this.ui.buttonGroup({className:"note-"+r}).render(),l=0,c=a.length;l<c;l++){var u=this.context.memo("button."+a[l]);u&&s.append("function"==typeof u?u(this.context):u)}s.appendTo(t)}}},{key:"updateCurrentStyle",value:function(t){var n=t||this.$toolbar,o=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===o["font-bold"]},".note-btn-italic":function(){return"italic"===o["font-italic"]},".note-btn-underline":function(){return"underline"===o["font-underline"]},".note-btn-subscript":function(){return"subscript"===o["font-subscript"]},".note-btn-superscript":function(){return"superscript"===o["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===o["font-strikethrough"]}}),o["font-family"]){var i=o["font-family"].split(",").map((function(t){return t.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")})),r=W.find(i,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each((function(t,n){var o=e()(n),i=o.data("value")+""==r+"";o.toggleClass("checked",i)})),n.find(".note-current-fontname").text(r).css("font-family",r)}if(o["font-size"]){var a=o["font-size"];n.find(".dropdown-fontsize a").each((function(t,n){var o=e()(n),i=o.data("value")+""==a+"";o.toggleClass("checked",i)})),n.find(".note-current-fontsize").text(a);var s=o["font-size-unit"];n.find(".dropdown-fontsizeunit a").each((function(t,n){var o=e()(n),i=o.data("value")+""==s+"";o.toggleClass("checked",i)})),n.find(".note-current-fontsizeunit").text(s)}if(o["line-height"]){var l=o["line-height"];n.find(".dropdown-line-height a").each((function(t,n){var o=e()(n),i=e()(n).data("value")+""==l+"";o.toggleClass("checked",i)})),n.find(".note-current-line-height").text(l)}}},{key:"updateBtnStates",value:function(t,n){var o=this;e().each(n,(function(e,n){o.ui.toggleBtnActive(t.find(e),n())}))}},{key:"tableMoveHandler",value:function(t){var n,o=e()(t.target.parentNode),i=o.next(),r=o.find(".note-dimension-picker-mousecatcher"),a=o.find(".note-dimension-picker-highlighted"),s=o.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var l=e()(t.target).offset();n={x:t.pageX-l.left,y:t.pageY-l.top}}else n={x:t.offsetX,y:t.offsetY};var c=Math.ceil(n.x/18)||1,u=Math.ceil(n.y/18)||1;a.css({width:c+"em",height:u+"em"}),r.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&s.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&s.css({height:u+1+"em"}),i.html(c+" x "+u)}}])&&Ie(n.prototype,o),i&&Ie(n,i),t}();function Ne(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Pe=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.$window=e()(window),this.$document=e()(document),this.ui=e().summernote.ui,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$statusbar=n.layoutInfo.statusbar,this.options=n.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var t=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){t.context.invoke("buttons.updateCurrentStyle")})),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)}},{key:"destroy",value:function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)}},{key:"followScroll",value:function(){if(this.$editor.hasClass("fullscreen"))return!1;var t=this.$editor.outerHeight(),n=this.$editor.width(),o=this.$toolbar.height(),i=this.$statusbar.height(),r=0;this.options.otherStaticBar&&(r=e()(this.options.otherStaticBar).outerHeight());var a=this.$document.scrollTop(),s=this.$editor.offset().top,l=s-r,c=s+t-r-o-i;!this.isFollowing&&a>l&&a<c-o?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:r,width:n,zIndex:1e3})):this.isFollowing&&(a<l||a>c)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),t),this.changeContainer(t)}},{key:"updateCodeview",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),t),t?this.deactivate():this.activate()}},{key:"activate",value:function(t){var e=this.$toolbar.find("button");t||(e=e.not(".note-codeview-keep")),this.ui.toggleBtn(e,!0)}},{key:"deactivate",value:function(t){var e=this.$toolbar.find("button");t||(e=e.not(".note-codeview-keep")),this.ui.toggleBtn(e,!1)}}])&&Ne(n.prototype,o),i&&Ne(n,i),t}();function Re(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Le=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.$body=e()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo,n.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t=this.options.dialogsInBody?this.$body:this.options.container,n=['<div class="form-group note-form-group">','<label for="note-dialog-link-txt-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.textToDisplay,"</label>"),'<input id="note-dialog-link-txt-'.concat(this.options.id,'" class="note-link-text form-control note-form-control note-input" type="text"/>'),"</div>",'<div class="form-group note-form-group">','<label for="note-dialog-link-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.url,"</label>"),'<input id="note-dialog-link-url-'.concat(this.options.id,'" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'),"</div>",this.options.disableLinkTarget?"":e()("<div/>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),e()("<div/>").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),o='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn",'" value="').concat(this.lang.link.insert,'" disabled>');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:n,footer:o}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",(function(t){t.keyCode===Kt.code.ENTER&&(t.preventDefault(),e.trigger("click"))}))}},{key:"toggleLinkBtn",value:function(t,e,n){this.ui.toggleBtn(t,e.val()&&n.val())}},{key:"showLinkDialog",value:function(t){var n=this;return e().Deferred((function(e){var o=n.$dialog.find(".note-link-text"),i=n.$dialog.find(".note-link-url"),r=n.$dialog.find(".note-link-btn"),a=n.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),s=n.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");n.ui.onDialogShown(n.$dialog,(function(){n.context.triggerEvent("dialog.shown"),!t.url&&z.isValidUrl(t.text)&&(t.url=t.text),o.on("input paste propertychange",(function(){t.text=o.val(),n.toggleLinkBtn(r,o,i)})).val(t.text),i.on("input paste propertychange",(function(){t.text||o.val(i.val()),n.toggleLinkBtn(r,o,i)})).val(t.url),H.isSupportTouch||i.trigger("focus"),n.toggleLinkBtn(r,o,i),n.bindEnterKey(i,r),n.bindEnterKey(o,r);var l=void 0!==t.isNewWindow?t.isNewWindow:n.context.options.linkTargetBlank;a.prop("checked",l);var c=!t.url&&n.context.options.useProtocol;s.prop("checked",c),r.one("click",(function(r){r.preventDefault(),e.resolve({range:t.range,url:i.val(),text:o.val(),isNewWindow:a.is(":checked"),checkProtocol:s.is(":checked")}),n.ui.hideDialog(n.$dialog)}))})),n.ui.onDialogHidden(n.$dialog,(function(){o.off(),i.off(),r.off(),"pending"===e.state()&&e.reject()})),n.ui.showDialog(n.$dialog)})).promise()}},{key:"show",value:function(){var t=this,e=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(e).then((function(e){t.context.invoke("editor.restoreRange"),t.context.invoke("editor.createLink",e)})).fail((function(){t.context.invoke("editor.restoreRange")}))}}])&&Re(n.prototype,o),i&&Re(n,i),t}();function Ae(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Fe=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.options=n.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(t,e){e.originalEvent&&e.originalEvent.relatedTarget&&o.$popover[0].contains(e.originalEvent.relatedTarget)||o.hide()}}}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return!W.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.link),this.$popover.on("mousedown",(function(t){t.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var t=this.context.invoke("editor.getLastRange");if(t.isCollapsed()&&t.isOnAnchor()){var n=Dt.ancestor(t.sc,Dt.isAnchor),o=e()(n).attr("href");this.$popover.find("a").attr("href",o).text(o);var i=Dt.posFromPlaceholder(n),r=e()(this.options.container).offset();i.top-=r.top,i.left-=r.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&Ae(n.prototype,o),i&&Ae(n,i),t}();function De(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var He=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.$body=e()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t="";if(this.options.maximumImageFileSize){var e=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,e)).toFixed(2)+" "+" KMGTP"[e]+"B";t="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var o=this.options.dialogsInBody?this.$body:this.options.container,i=['<div class="form-group note-form-group note-group-select-from-files">','<label for="note-dialog-image-file-'+this.options.id+'" class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input id="note-dialog-image-file-'+this.options.id+'" class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="'+this.options.acceptImageFileTypes+'" multiple="multiple"/>',t,"</div>",'<div class="form-group note-group-image-url">','<label for="note-dialog-image-url-'+this.options.id+'" class="note-form-label">'+this.lang.image.url+"</label>",'<input id="note-dialog-image-url-'+this.options.id+'" class="note-image-url form-control note-form-control note-input" type="text"/>',"</div>"].join(""),r='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn",'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(o)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",(function(t){t.keyCode===Kt.code.ENTER&&(t.preventDefault(),e.trigger("click"))}))}},{key:"show",value:function(){var t=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange"),"string"==typeof e?t.options.callbacks.onImageLinkInsert?t.context.triggerEvent("image.link.insert",e):t.context.invoke("editor.insertImage",e):t.context.invoke("editor.insertImagesOrCallback",e)})).fail((function(){t.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function(){var t=this;return e().Deferred((function(e){var n=t.$dialog.find(".note-image-input"),o=t.$dialog.find(".note-image-url"),i=t.$dialog.find(".note-image-btn");t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",(function(t){e.resolve(t.target.files||t.target.value)})).val("")),o.on("input paste propertychange",(function(){t.ui.toggleBtn(i,o.val())})).val(""),H.isSupportTouch||o.trigger("focus"),i.click((function(t){t.preventDefault(),e.resolve(o.val())})),t.bindEnterKey(o,i)})),t.ui.onDialogHidden(t.$dialog,(function(){n.off(),o.off(),i.off(),"pending"===e.state()&&e.reject()})),t.ui.showDialog(t.$dialog)}))}}])&&De(n.prototype,o),i&&De(n,i),t}();function Be(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var ze=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.editable=n.layoutInfo.editable[0],this.options=n.options,this.events={"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(t,e){e.originalEvent&&e.originalEvent.relatedTarget&&o.$popover[0].contains(e.originalEvent.relatedTarget)||o.hide()}}}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return!W.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.image),this.$popover.on("mousedown",(function(t){t.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(t,n){if(Dt.isImg(t)){var o=e()(t).offset(),i=e()(this.options.container).offset(),r={};this.options.popatmouse?(r.left=n.pageX-20,r.top=n.pageY):r=o,r.top-=i.top,r.left-=i.left,this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&Be(n.prototype,o),i&&Be(n,i),t}();function Me(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Oe=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.options=n.options,this.events={"summernote.mousedown":function(t,e){o.update(e.target)},"summernote.keyup summernote.scroll summernote.change":function(){o.update()},"summernote.disable summernote.dialog.shown":function(){o.hide()},"summernote.blur":function(t,e){e.originalEvent&&e.originalEvent.relatedTarget&&o.$popover[0].contains(e.originalEvent.relatedTarget)||o.hide()}}}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return!W.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.table),H.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",(function(t){t.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(t){if(this.context.isDisabled())return!1;var n=Dt.isCell(t);if(n){var o=Dt.posFromPlaceholder(t),i=e()(this.options.container).offset();o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide();return n}},{key:"hide",value:function(){this.$popover.hide()}}])&&Me(n.prototype,o),i&&Me(n,i),t}();function Ue(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var je=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.$body=e()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t=this.options.dialogsInBody?this.$body:this.options.container,e=['<div class="form-group note-form-group row-fluid">','<label for="note-dialog-video-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.video.url,' <small class="text-muted">').concat(this.lang.video.providers,"</small></label>"),'<input id="note-dialog-video-url-'.concat(this.options.id,'" class="note-video-url form-control note-form-control note-input" type="text"/>'),"</div>"].join(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn",'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:e,footer:n}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",(function(t){t.keyCode===Kt.code.ENTER&&(t.preventDefault(),e.trigger("click"))}))}},{key:"createVideoNode",value:function(t){var n,o=t.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=t.match(/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/),r=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),a=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),l=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),c=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=t.match(/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),f=t.match(/^.+.(mp4|m4v)$/),p=t.match(/^.+.(ogg|ogv)$/),m=t.match(/^.+.(webm)$/),v=t.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(o&&11===o[1].length){var g=o[1],b=0;if(void 0!==o[2]){var y=o[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(y)for(var k=[3600,60,1],w=0,C=k.length;w<C;w++)b+=void 0!==y[w+1]?k[w]*parseInt(y[w+1],10):0}n=e()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+g+(b>0?"?start="+b:"")).attr("width","640").attr("height","360")}else if(i&&i[0].length)n=e()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+i[1]+"/preview").attr("width","640").attr("height","480");else if(r&&r[0].length)n=e()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+r[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(a&&a[0].length)n=e()("<iframe>").attr("frameborder",0).attr("src",a[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)n=e()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(l&&l[2].length)n=e()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+l[2]).attr("width","640").attr("height","360");else if(c&&c[1].length)n=e()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+c[1]);else if(u&&u[0].length){var x=0;"undefined"!==u[2]&&(x=u[2]);var S=0;"undefined"!==u[3]&&(S=u[3]);var T=0;"undefined"!==u[4]&&(T=u[4]);var E=0;"undefined"!==u[5]&&(E=u[5]);var I=0;"undefined"!==u[6]&&(I=u[6]),n=e()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+u[1]+"/videos/embed/"+u[2]+"?loop="+T+"&autoplay="+E+"&muted="+I+(x>0?"&start="+x:"")+(S>0?"&end="+b:"")).attr("width","560").attr("height","315")}else if(d&&d[1].length||h&&h[2].length){var $=d&&d[1].length?d[1]:h[2];n=e()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+$+"&amp;auto=0")}else if(f||p||m)n=e()("<video controls>").attr("src",t).attr("width","640").attr("height","360");else{if(!v||!v[0].length)return!1;n=e()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(v[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return n.addClass("note-video-clip"),n[0]}},{key:"show",value:function(){var t=this,e=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(e).then((function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange");var n=t.createVideoNode(e);n&&t.context.invoke("editor.insertNode",n)})).fail((function(){t.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function(){var t=this;return e().Deferred((function(e){var n=t.$dialog.find(".note-video-url"),o=t.$dialog.find(".note-video-btn");t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",(function(){t.ui.toggleBtn(o,n.val())})),H.isSupportTouch||n.trigger("focus"),o.click((function(t){t.preventDefault(),e.resolve(n.val())})),t.bindEnterKey(n,o)})),t.ui.onDialogHidden(t.$dialog,(function(){n.off(),o.off(),"pending"===e.state()&&e.reject()})),t.ui.showDialog(t.$dialog)}))}}])&&Ue(n.prototype,o),i&&Ue(n,i),t}();function We(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Ke=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.$body=e()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n,o,i;return n=t,(o=[{key:"initialize",value:function(){var t=this.options.dialogsInBody?this.$body:this.options.container,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank" rel="noopener noreferrer">Summernote 0.8.18</a> · ','<a href="https://github.com/summernote/summernote" target="_blank" rel="noopener noreferrer">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank" rel="noopener noreferrer">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:e,callback:function(t){t.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var t=this,n=this.options.keyMap[H.isMac?"mac":"pc"];return Object.keys(n).map((function(o){var i=n[o],r=e()('<div><div class="help-list-item"></div></div>');return r.append(e()("<label><kbd>"+o+"</kdb></label>").css({width:180,"margin-right":10})).append(e()("<span/>").html(t.context.memo("help."+i)||i)),r.html()})).join("")}},{key:"showHelpDialog",value:function(){var t=this;return e().Deferred((function(e){t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent("dialog.shown"),e.resolve()})),t.ui.showDialog(t.$dialog)})).promise()}},{key:"show",value:function(){var t=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then((function(){t.context.invoke("editor.restoreRange")}))}}])&&We(n.prototype,o),i&&We(n,i),t}();function qe(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Ve=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.options=n.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(t){o.options.editing&&(t.preventDefault(),t.stopPropagation(),o.onContextmenu=!0,o.update(!0))},"summernote.mousedown":function(t,e){o.pageX=e.pageX,o.pageY=e.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(t,e){o.options.editing&&!o.onContextmenu&&(o.pageX=e.pageX,o.pageY=e.pageY,o.update()),o.onContextmenu=!1},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function(){o.hide()},"summernote.focusout":function(){o.$popover.is(":active,:focus")||o.hide()}}}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return this.options.airMode&&!W.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var t=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content");this.context.invoke("buttons.build",e,this.options.popover.air),this.$popover.on("mousedown",(function(){t.hidable=!1})),this.$popover.on("mouseup",(function(){t.hidable=!0}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(t){var n=this.context.invoke("editor.currentStyle");if(!n.range||n.range.isCollapsed()&&!t)this.hide();else{var o={left:this.pageX,top:this.pageY},i=e()(this.options.container).offset();o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:Math.max(o.left,0)+-5,top:o.top+5}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}},{key:"updateCodeview",value:function(t){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),t),t&&this.hide()}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}])&&qe(n.prototype,o),i&&qe(n,i),t}();function _e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Ge=function(){function t(n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=n,this.ui=e().summernote.ui,this.$editable=n.layoutInfo.editable,this.options=n.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=Array.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||o.handleKeyup(e)},"summernote.keydown":function(t,e){o.handleKeydown(e)},"summernote.disable summernote.dialog.shown summernote.blur":function(){o.hide()}}}var n,o,i;return n=t,(o=[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var t=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",(function(n){t.$content.find(".active").removeClass("active"),e()(n.currentTarget).addClass("active"),t.replace()})),this.$popover.on("mousedown",(function(t){t.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var n=t.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var n=t.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var t=this.$content.find(".note-hint-item.active");if(t.length){var n=this.nodeFromItem(t);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var o=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;o>0&&(this.lastWordRange.so+=o)}if(this.lastWordRange.insertNode(n),"next"===this.options.hintSelect){var i=document.createTextNode("");e()(n).after(i),jt.createFromNodeBefore(i).select()}else jt.createFromNodeAfter(n).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function(t){var e=this.hints[t.data("index")],n=t.data("item"),o=e.content?e.content(n):n;return"string"==typeof o&&(o=Dt.createText(o)),o}},{key:"createItemTemplates",value:function(t,n){var o=this.hints[t];return n.map((function(n){var i=e()('<div class="note-hint-item"/>');return i.append(o.template?o.template(n):n+""),i.data({index:t,item:n}),i}))}},{key:"handleKeydown",value:function(t){this.$popover.is(":visible")&&(t.keyCode===Kt.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===Kt.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===Kt.code.DOWN&&(t.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(t,e,n){var o=this.hints[t];if(o&&o.match.test(e)&&o.search){var i=o.match.exec(e);this.matchingWord=i[0],o.search(i[1],n)}else n()}},{key:"createGroup",value:function(t,n){var o=this,i=e()('<div class="note-hint-group note-hint-group-'+t+'"></div>');return this.searchKeyword(t,n,(function(e){(e=e||[]).length&&(i.html(o.createItemTemplates(t,e)),o.show())})),i}},{key:"handleKeyup",value:function(t){var n=this;if(!W.contains([Kt.code.ENTER,Kt.code.UP,Kt.code.DOWN],t.keyCode)){var o,i,r=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(o=r.getWordsRange(r),i=o.toString(),this.hints.forEach((function(t){if(t.match.test(i))return o=r.getWordsMatchRange(t.match),!1})),!o)return void this.hide();i=o.toString()}else o=r.getWordRange(),i=o.toString();if(this.hints.length&&i){this.$content.empty();var a=z.rect2bnd(W.last(o.getClientRects())),s=e()(this.options.container).offset();a&&(a.top-=s.top,a.left-=s.left,this.$popover.hide(),this.lastWordRange=o,this.hints.forEach((function(t,e){t.match.test(i)&&n.createGroup(e,i).appendTo(n.$content)})),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:a.left,top:a.top-this.$popover.outerHeight()-5}):this.$popover.css({left:a.left,top:a.top+a.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}])&&_e(n.prototype,o),i&&_e(n,i),t}();e().summernote=e().extend(e().summernote,{version:"0.8.18",plugins:{},dom:Dt,range:jt,lists:W,options:{langInfo:e().summernote.lang["en-US"],editing:!0,modules:{editor:oe,clipboard:re,dropzone:se,codeview:de,statusbar:fe,fullscreen:me,handle:ge,hintPopover:Ge,autoLink:ke,autoSync:Ce,autoReplace:Se,placeholder:Ee,buttons:$e,toolbar:Pe,linkDialog:Le,linkPopover:Fe,imageDialog:He,imagePopover:ze,tablePopover:Oe,videoDialog:je,helpDialog:Ke,airPopover:Ve},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]],["view",["fullscreen","codeview"]]]},airMode:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,useProtocol:!0,defaultProtocol:"http://",focus:!1,tabDisabled:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,showDomainOnlyForAutolink:!1,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontNamesIgnoreCheck:[],addDefaultFonts:!0,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,acceptImageFileTypes:"image/*",callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},codeviewFilter:!0,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","jumpingbean.tv","v.qq.com"],keyMap:{pc:{ESC:"escape",ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ESC:"escape",ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",rollback:"note-icon-rollback",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}}),e().summernote=e().extend(e().summernote,{ui_template:T,interface:"bs5"}),e().summernote.options.styleTags=["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"pre","h1","h2","h3","h4","h5","h6"]})(),i})()}));
  
  (function(n,t){typeof define=="function"&&(define.amd||define.cmd)?define(function(){return t(n)}):typeof exports=="object"?module.exports=t(n):n.Browser=t(n)})(typeof self!="undefined"?self:this,function(n){var r=n||{},t=typeof n.navigator!="undefined"?n.navigator:{},i=function(n,i){var r=t.mimeTypes;for(var u in r)if(r[u][n]==i)return!0;return!1};return function(n){var u=n||t.userAgent||{},f=this,e={Trident:u.indexOf("Trident")>-1||u.indexOf("NET CLR")>-1,Presto:u.indexOf("Presto")>-1,WebKit:u.indexOf("AppleWebKit")>-1,Gecko:u.indexOf("Gecko/")>-1,KHTML:u.indexOf("KHTML/")>-1,Safari:u.indexOf("Safari")>-1,Chrome:u.indexOf("Chrome")>-1||u.indexOf("CriOS")>-1,IE:u.indexOf("MSIE")>-1||u.indexOf("Trident")>-1,Edge:u.indexOf("Edge")>-1||u.indexOf("Edg/")>-1,Firefox:u.indexOf("Firefox")>-1||u.indexOf("FxiOS")>-1,"Firefox Focus":u.indexOf("Focus")>-1,Chromium:u.indexOf("Chromium")>-1,Opera:u.indexOf("Opera")>-1||u.indexOf("OPR")>-1,Vivaldi:u.indexOf("Vivaldi")>-1,Yandex:u.indexOf("YaBrowser")>-1,Arora:u.indexOf("Arora")>-1,Lunascape:u.indexOf("Lunascape")>-1,QupZilla:u.indexOf("QupZilla")>-1,"Coc Coc":u.indexOf("coc_coc_browser")>-1,Kindle:u.indexOf("Kindle")>-1||u.indexOf("Silk/")>-1,Iceweasel:u.indexOf("Iceweasel")>-1,Konqueror:u.indexOf("Konqueror")>-1,Iceape:u.indexOf("Iceape")>-1,SeaMonkey:u.indexOf("SeaMonkey")>-1,Epiphany:u.indexOf("Epiphany")>-1,"360":u.indexOf("QihooBrowser")>-1||u.indexOf("QHBrowser")>-1,"360EE":u.indexOf("360EE")>-1,"360SE":u.indexOf("360SE")>-1,UC:u.indexOf("UCBrowser")>-1||u.indexOf(" UBrowser")>-1||u.indexOf("UCWEB")>-1,QQBrowser:u.indexOf("QQBrowser")>-1,QQ:u.indexOf("QQ/")>-1,Baidu:u.indexOf("Baidu")>-1||u.indexOf("BIDUBrowser")>-1||u.indexOf("baidubrowser")>-1||u.indexOf("baiduboxapp")>-1||u.indexOf("BaiduHD")>-1,Maxthon:u.indexOf("Maxthon")>-1,Sogou:u.indexOf("MetaSr")>-1||u.indexOf("Sogou")>-1,Liebao:u.indexOf("LBBROWSER")>-1||u.indexOf("LieBaoFast")>-1,"2345Explorer":u.indexOf("2345Explorer")>-1||u.indexOf("Mb2345Browser")>-1||u.indexOf("2345chrome")>-1,"115Browser":u.indexOf("115Browser")>-1,TheWorld:u.indexOf("TheWorld")>-1,XiaoMi:u.indexOf("MiuiBrowser")>-1,Quark:u.indexOf("Quark")>-1,Qiyu:u.indexOf("Qiyu")>-1,Wechat:u.indexOf("MicroMessenger")>-1,WechatWork:u.indexOf("wxwork/")>-1,Taobao:u.indexOf("AliApp(TB")>-1,Alipay:u.indexOf("AliApp(AP")>-1,Weibo:u.indexOf("Weibo")>-1,Douban:u.indexOf("com.douban.frodo")>-1,Suning:u.indexOf("SNEBUY-APP")>-1,iQiYi:u.indexOf("IqiyiApp")>-1,DingTalk:u.indexOf("DingTalk")>-1,Huawei:u.indexOf("HuaweiBrowser")>-1||u.indexOf("HUAWEI/")>-1||u.indexOf("HONOR")>-1,Vivo:u.indexOf("VivoBrowser")>-1,Windows:u.indexOf("Windows")>-1,Linux:u.indexOf("Linux")>-1||u.indexOf("X11")>-1,"Mac OS":u.indexOf("Macintosh")>-1,Android:u.indexOf("Android")>-1||u.indexOf("Adr")>-1,HarmonyOS:u.indexOf("HarmonyOS")>-1,Ubuntu:u.indexOf("Ubuntu")>-1,FreeBSD:u.indexOf("FreeBSD")>-1,Debian:u.indexOf("Debian")>-1,"Windows Phone":u.indexOf("IEMobile")>-1||u.indexOf("Windows Phone")>-1,BlackBerry:u.indexOf("BlackBerry")>-1||u.indexOf("RIM")>-1,MeeGo:u.indexOf("MeeGo")>-1,Symbian:u.indexOf("Symbian")>-1,iOS:u.indexOf("like Mac OS X")>-1,"Chrome OS":u.indexOf("CrOS")>-1,WebOS:u.indexOf("hpwOS")>-1,Mobile:u.indexOf("Mobi")>-1||u.indexOf("iPh")>-1||u.indexOf("480")>-1,Tablet:u.indexOf("Tablet")>-1||u.indexOf("Pad")>-1||u.indexOf("Nexus 7")>-1},o=!1,s,h,c,l,v,y,a;r.chrome&&(s=u.replace(/^.*Chrome\/([\d]+).*$/,"$1"),r.chrome.adblock2345||r.chrome.common2345?e["2345Explorer"]=!0:i("type","application/360softmgrplugin")||i("type","application/mozilla-npqihooquicklogin")?o=!0:s>36&&r.showModalDialog?o=!0:s>45&&(o=i("type","application/vnd.chromium.remoting-viewer"),!o&&s>=69&&(o=i("type","application/hwepass2001.installepass2001")||i("type","application/asx"))));e.Mobile?e.Mobile=!(u.indexOf("iPad")>-1):o&&(i("type","application/gameplugin")?e["360SE"]=!0:t&&typeof t.connection!="undefined"&&typeof t.connection.saveData=="undefined"?e["360SE"]=!0:e["360EE"]=!0);e.Baidu&&e.Opera?e.Baidu=!1:e.iOS&&(e.Safari=!0);h={engine:["WebKit","Trident","Gecko","Presto","KHTML"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","XiaoMi","Vivo","360","360SE","360EE","UC","QQBrowser","QQ","Huawei","Baidu","Maxthon","Sogou","Liebao","2345Explorer","115Browser","TheWorld","Quark","Qiyu","Wechat","WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi","DingTalk"],os:["Windows","Linux","Mac OS","Android","HarmonyOS","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};f.device="PC";f.language=function(){var i=t.browserLanguage||t.language,n=i.split("-");return n[1]&&(n[1]=n[1].toUpperCase()),n.join("_")}();for(c in h)for(l=0;l<h[c].length;l++)v=h[c][l],e[v]&&(f[c]=v);y={Windows:function(){var n=u.replace(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/,"$1");return{"10":"10","6.4":"10","6.3":"8.1","6.2":"8","6.1":"7","6.0":"Vista","5.2":"XP","5.1":"XP","5.0":"2000"}[n]||n},Android:function(){return u.replace(/^.*Android ([\d.]+);.*$/,"$1")},HarmonyOS:function(){var n=u.replace(/^Mozilla.*Android ([\d.]+)[;)].*$/,"$1");return{"10":"2"}[n]||""},iOS:function(){return u.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return u.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return u.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return u.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return u.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};f.osVersion="";y[f.os]&&(f.osVersion=y[f.os](),f.osVersion==u&&(f.osVersion=""));a={Safari:function(){return u.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return u.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return u.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return u.replace(/^.*Edge\/([\d.]+).*$/,"$1").replace(/^.*Edg\/([\d.]+).*$/,"$1")},Firefox:function(){return u.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return u.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return u.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return u.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return u.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return u.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return u.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return u.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return u.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return u.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return u.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return u.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return u.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return u.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return u.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return u.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},"360":function(){return u.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){var n=u.replace(/^.*Chrome\/([\d]+).*$/,"$1");return{"86":"13.0","78":"12.0","69":"11.0","63":"10.0","55":"9.1","45":"8.1","42":"8.0","31":"7.0","21":"6.3"}[n]||""},"360EE":function(){var n=u.replace(/^.*Chrome\/([\d]+).*$/,"$1");return{"86":"13.0","78":"12.0","69":"11.0","63":"9.5","55":"9.0","50":"8.7","30":"7.5"}[n]||""},Maxthon:function(){return u.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return u.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return u.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return u.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1").replace(/^.*baiduboxapp\/([\d.]+).*$/,"$1")},UC:function(){return u.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return u.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},Liebao:function(){var n="",t,i;return u.indexOf("LieBaoFast")>-1&&(n=u.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1")),t={"57":"6.5","49":"6.0","46":"5.9","42":"5.3","39":"5.2","34":"5.0","29":"4.5","21":"4.0"},i=u.replace(/^.*Chrome\/([\d]+).*$/,"$1"),n||t[i]||""},"2345Explorer":function(){var n=navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1");return{"69":"10.0","55":"9.9"}[n]||u.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1").replace(/^.*Mb2345Browser\/([\d.]+).*$/,"$1")},"115Browser":function(){return u.replace(/^.*115Browser\/([\d.]+).*$/,"$1")},TheWorld:function(){return u.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return u.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Vivo:function(){return u.replace(/^.*VivoBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return u.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return u.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return u.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return u.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return u.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return u.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return u.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")},DingTalk:function(){return u.replace(/^.*DingTalk\/([\d.]+).*$/,"$1")},Huawei:function(){return u.replace(/^.*Version\/([\d.]+).*$/,"$1").replace(/^.*HuaweiBrowser\/([\d.]+).*$/,"$1")}};f.version="";a[f.browser]&&(f.version=a[f.browser](),f.version==u&&(f.version=""));f.browser=="Chrome"&&u.match(/\S+Browser/)&&(f.browser=u.match(/\S+Browser/)[0],f.version=u.replace(/^.*Browser\/([\d.]+).*$/,"$1"));f.browser=="Firefox"&&(window.clientInformation||!window.u2f)&&(f.browser+=" Nightly");f.browser=="Edge"?f.engine=f.version>"75"?"Blink":"EdgeHTML":e.Chrome&&f.engine=="WebKit"&&parseInt(a.Chrome())>27?f.engine="Blink":f.browser=="Opera"&&parseInt(f.version)>12?f.engine="Blink":f.browser=="Yandex"&&(f.engine="Blink")}}),function(n){function r(t){return this.each(function(){var u=n(this),r=u.data(i.DATA_KEY),f=typeof t=="object"&&t;r?r.update(f):u.data(i.DATA_KEY,r=new i(this,f))})}var i=function(t,i){this.$element=n(t);this.options=n.extend({},i);this.init()},t;i.VERSION="5.1.0";i.Author="argo@163.com";i.DATA_KEY="lgb.SliderCaptcha";t=i.prototype;t.init=function(){this.initDOM();this.initImg();this.bindEvents()};t.initDOM=function(){var u=this.$element.find("canvas:first")[0].getContext("2d"),t=this.$element.find("canvas:last")[0],f=t.getContext("2d"),e=this.$element.find(".captcha-load"),i=this.$element.find(".captcha-footer"),o=i.find(".captcha-bar-bg"),s=this.$element.find(".captcha-bar"),r=this.$element.find(".captcha-bar-text"),h=this.$element.find(".captcha-refresh"),c=r.attr("data-text");n.extend(this,{canvas:u,block:t,bar:f,$load:e,$footer:i,$barLeft:o,$slider:s,$barText:r,$refresh:h,barText:c})};t.initImg=function(){var i=function(n,t){var i=this.options.sideLength,f=this.options.diameter,e=Math.PI,r=this.options.offsetX,u=this.options.offsetY;n.beginPath();n.moveTo(r,u);n.arc(r+i/2,u-f+2,f,.72*e,2.26*e);n.lineTo(r+i,u);n.arc(r+i+f-2,u+i/2,f,1.21*e,2.78*e);n.lineTo(r+i,u+i);n.lineTo(r,u+i);n.arc(r+f-2,u+i/2,f+.4,2.76*e,1.24*e,!0);n.lineTo(r,u);n.lineWidth=2;n.fillStyle="rgba(255, 255, 255, 0.7)";n.strokeStyle="rgba(255, 255, 255, 0.7)";n.stroke();n[t]();n.globalCompositeOperation="destination-over"},t=new Image,n;t.src=this.options.imageUrl;n=this;t.onload=function(){i.call(n,n.canvas,"fill");i.call(n,n.bar,"clip");n.canvas.drawImage(t,0,0,n.options.width,n.options.height);n.bar.drawImage(t,0,0,n.options.width,n.options.height);var r=n.options.offsetY-n.options.diameter*2-1,u=n.bar.getImageData(n.options.offsetX-3,r,n.options.barWidth,n.options.barWidth);n.block.width=n.options.barWidth;n.bar.putImageData(u,0,r)};t.onerror=function(){n.$load.text($load.attr("data-failed")).addClass("text-danger")}};t.bindEvents=function(){var n=this,t=0,i=0,r=[];this.$slider.drag(function(r){n.$barText.addClass("d-none");t=r.clientX||r.touches[0].clientX;i=r.clientY||r.touches[0].clientY},function(u){var o=u.clientX||u.touches[0].clientX,s=u.clientY||u.touches[0].clientY,f=o-t,h=s-i,e;if(f<0||f+40>n.options.width)return!1;n.$slider.css({left:f-1+"px"});e=(n.options.width-60)/(n.options.width-40)*f;n.block.style.left=e+"px";n.$footer.addClass("is-move");n.$barLeft.css({width:f+4+"px"});r.push(Math.round(h))},function(i){var f=i.clientX||i.changedTouches[0].clientX,u;n.$footer.removeClass("is-move");u=Math.ceil((n.options.width-60)/(n.options.width-40)*(f-t)+3);n.verify(u,r)});this.$refresh.on("click",function(){n.options.barText=n.$barText.attr("data-text")})};t.verify=function(n,t){var r=this.options.remoteObj.obj,u=this.options.remoteObj.method,i=this;r.invokeMethodAsync(u,n,t).then(function(n){n?(i.$footer.addClass("is-valid"),i.options.barText=i.$barText.attr("data-text")):(i.$footer.addClass("is-invalid"),setTimeout(function(){i.$refresh.trigger("click");i.options.barText=i.$barText.attr("data-try")},1e3))})};t.update=function(t){n.extend(this.options,t);this.resetCanvas();this.initImg();this.resetBar()};t.resetCanvas=function(){this.canvas.clearRect(0,0,this.options.width,this.options.height);this.bar.clearRect(0,0,this.options.width,this.options.height);this.block.width=this.options.width;this.block.style.left=0;this.$load.text(this.$load.attr("data-load")).removeClass("text-danger")};t.resetBar=function(){this.$footer.removeClass("is-invalid is-valid");this.$barText.text(this.options.barText).removeClass("d-none");this.$slider.css({left:"0px"});this.$barLeft.css({width:"0px"})};n.fn.sliderCaptcha=r;n.fn.sliderCaptcha.Constructor=i;n.extend({captcha:function(t,i,r,u){u.remoteObj={obj:i,method:r};n(t).sliderCaptcha(u)}})}(jQuery),function(n){n.isFunction(Date.prototype.format)||(Date.prototype.format=function(n){var i={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours()%12==0?12:this.getHours()%12,"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()},t;/(y+)/.test(n)&&(n=n.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));/(E+)/.test(n)&&(n=n.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?"星期":"周":"")+{0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"}[this.getDay()]));for(t in i)new RegExp("("+t+")").test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length===1?i[t]:("00"+i[t]).substr((""+i[t]).length)));return n});n.browser={versions:function(){var n=navigator.userAgent;return{trident:n.indexOf("Trident")>-1,presto:n.indexOf("Presto")>-1,webKit:n.indexOf("AppleWebKit")>-1,gecko:n.indexOf("Gecko")>-1&&n.indexOf("KHTML")===-1,mobile:!!n.match(/AppleWebKit.*Mobile.*/),ios:!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:n.indexOf("Android")>-1||n.indexOf("Linux")>-1,iPhone:n.indexOf("iPhone")>-1,iPod:n.indexOf("iPod")>-1,iPad:n.indexOf("iPad")>-1,mac:n.indexOf("Macintosh")>-1,webApp:n.indexOf("Safari")===-1}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase()};Array.prototype.indexOf=function(n){for(var t=0;t<this.length;t++)if(this[t]==n)return t;return-1};Array.prototype.remove=function(n){var t=this.indexOf(n);t>-1&&this.splice(t,1)};n.extend({format:function(t,i){return i===undefined||i===null?null:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(new RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)},getUID:function(n){n||(n="b");do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n},webClient:function(t,i,r){n.ajax({type:"GET",url:i,success:function(n){var i=new Browser;n.Browser=i.browser+" "+i.version;n.Os=i.os+" "+i.osVersion;n.Device=i.device;n.Language=i.language;t.invokeMethodAsync(r,n.Id,n.Ip,n.Os,n.Browser,n.Device,n.Language,n.UserAgent)}})}});n.fn.extend({drag:function(t,i,r){var u=n(this),o=function(i){i.stopPropagation();document.addEventListener("mousemove",f);document.addEventListener("touchmove",f);document.addEventListener("mouseup",e);document.addEventListener("touchend",e);n.isFunction(t)&&t.call(u,i)},f=function(t){n.isFunction(i)&&i.call(u,t)},e=function(t){n.isFunction(r)&&r.call(u,t);window.setTimeout(function(){document.removeEventListener("mousemove",f);document.removeEventListener("touchmove",f);document.removeEventListener("mouseup",e);document.removeEventListener("touchend",e)},100)};u.on("mousedown",o);u.on("touchstart",o)}})}(jQuery),function(n){function i(i){return this.each(function(){var r=n(this),u=r.data(t.DATA_KEY),f=typeof i=="object"&&i;u||r.data(t.DATA_KEY,u=new t(this,f))})}var t=function(t,i){this.$element=n(t);var u=this._getColSpan(this.$element),f=this.$element.data("type"),r=parseInt(this.$element.data("items"));isNaN(r)&&(r=12);this.options=n.extend({rowType:f,itemsPerRow:r,colSpan:u},i);this.layout()};t.VERSION="5.1.0";t.Author="argo@163.com";t.DATA_KEY="lgb.grid";n.extend(t.prototype,{layout:function(){this.options.colSpan!==0||this.$element.data("target")?this._layout_parent_row():this._layout_column(null);this.$element.removeClass("d-none")},_layout_column:function(t){var e=this.$element,o=this.options.rowType,s=this.options.itemsPerRow,f=!1,i=null,r=this,u=n('<div class="row g-3"><\/div>');o==="inline"&&u.addClass("form-inline");e.children().each(function(e,o){var s=n(o),l=s.data("toggle")==="row",h=r._getColSpan(s),c;l?(c=n.getUID(),s.attr("data-target",c),n("<div><\/div>").attr("data-uid",c).addClass(r._calc(h)).appendTo(u)):(f=s.prop("tagName")==="LABEL",f?(i===null&&(i=n("<div><\/div>").addClass(r._calc(h))),i.append(s)):(f=!1,i==null&&(i=n("<div><\/div>").addClass(r._calc(h))),i.append(s),t==null?i.appendTo(u):i.appendTo(t),i=null))});t==null&&e.append(u)},_layout_parent_row:function(){var t=this.$element.data("target"),i=n('[data-uid="'+t+'"]'),r=n('<div class="row"><\/div>').appendTo(i);this._layout_column(r);n('[data-target="'+t+'"]').remove()},_calc:function(n){var t=this.options.itemsPerRow,i;return n>0&&(t=t*n),i="col-12",t!==12&&(i="col-12 col-sm-"+t),i},_getColSpan:function(n){var t=parseInt(n.data("colspan"));return isNaN(t)&&(t=0),t}});n.fn.grid=i;n.fn.grid.Constructor=t}(jQuery),function(n){function r(i){return this.each(function(){var u=n(this),r=u.data(t.DATA_KEY),f=typeof i=="object"&&i;r||u.data(t.DATA_KEY,r=new t(this,f));typeof i=="string"&&/active/.test(i)&&r[i].apply(r)})}var t=function(t,i){this.$element=n(t);this.$header=this.$element.find(".tabs-header");this.$wrap=this.$header.find(".tabs-nav-wrap");this.$scroll=this.$wrap.find(".tabs-nav-scroll");this.$tab=this.$scroll.find(".tabs-nav");this.options=n.extend({},i);this.init()},i;t.VERSION="5.1.0";t.Author="argo@163.com";t.DATA_KEY="lgb.Tab";i=t.prototype;i.init=function(){var t=this;n(window).on("resize",function(){t.resize()});this.active()};i.fixSize=function(){var n=this.$element.height(),t=this.$element.width();this.$element.css({height:n+"px",width:t+"px"})};i.resize=function(){var n,t,i,r,u;this.vertical=this.$element.hasClass("tabs-left")||this.$element.hasClass("tabs-right");this.horizontal=this.$element.hasClass("tabs-top")||this.$element.hasClass("tabs-bottom");n=this.$tab.find(".tabs-item:last");n.length>0&&(this.vertical?(this.$wrap.css({height:this.$element.height()+"px"}),t=this.$tab.height(),i=n.position().top+n.outerHeight(),i<t?this.$wrap.removeClass("is-scrollable"):this.$wrap.addClass("is-scrollable")):(this.$wrap.removeAttr("style"),r=this.$tab.width(),u=n.position().left+n.outerWidth(),u<r?this.$wrap.removeClass("is-scrollable"):this.$wrap.addClass("is-scrollable")))};i.active=function(){var r,n,f,o,c,l;if(this.resize(),r=this.$element.find(".tabs-active-bar"),n=this.$element.find(".tabs-item.active"),n.length!==0)if(this.vertical){var u=n.position().top,a=u+n.outerHeight(),t=this.$scroll.scrollTop(),v=this.$scroll.outerHeight(),s=a-t-v;s>0?this.$scroll.scrollTop(t+s):(f=u-t,f<0&&this.$scroll.scrollTop(t+f));r.css({width:"2px",transform:"translateY("+u+"px)"})}else{var e=n.position().left,y=e+n.outerWidth(),i=this.$scroll.scrollLeft(),p=this.$scroll.width(),h=y-i-p;h>0?this.$scroll.scrollLeft(i+h):(o=e-i,o<0&&this.$scroll.scrollLeft(i+o));c=n.width();l=e+parseInt(n.css("paddingLeft"));r.css({width:c+"px",transform:"translateX("+l+"px)"})}};n.fn.lgbTab=r;n.fn.lgbTab.Constructor=t}(jQuery),function(n){n.extend({bb_anchor:function(t){var i=n(t);i.on("click",function(t){var f,u,r,e,o;t.preventDefault();f=n(i.data("target"));u=i.data("container");u||(u=window);r=f.offset().top;e=f.css("marginTop").replace("px","");e&&(r=r-parseInt(e));o=i.data("offset");o&&(r=r-parseInt(o));n(u).scrollTop(r)})}})}(jQuery),function(n){n.extend({bb_vibrate:function(){if("vibrate"in window.navigator){window.navigator.vibrate([200,100,200]);var n=window.setTimeout(function(){window.clearTimeout(n);window.navigator.vibrate([])},1e3)}},bb_barcode:function(t,i,r,u){var f=n(t),e=new ZXing.BrowserMultiFormatReader;if(r==="dispose"){e.reset();return}f.attr("data-scan")==="Camera"&&e.getVideoInputDevices().then(n=>{i.invokeMethodAsync("InitDevices",n).then(()=>{if(u&&n.length>0){var t=f.find('button[data-method="scan"]'),i=f.attr("data-scan");i==="Camera"&&t.trigger("click")}})});f.on("click","button[data-method]",function(){var r=n(this).attr("data-method"),o,s,u,t;if(r==="scan")i.invokeMethodAsync("Start"),o=f.find(".dropdown-item.active").attr("data-val"),s=f.find("video").attr("id"),e.decodeFromVideoDevice(o,s,(t,r)=>{if(t){n.bb_vibrate();console.log(t.text);i.invokeMethodAsync("GetResult",t.text);var u=f.attr("data-autostop")==="true";u&&e.reset()}!r||r instanceof ZXing.NotFoundException||(console.error(r),i.invokeMethodAsync("GetError",r))});else if(r==="scanImage"){e=new ZXing.BrowserMultiFormatReader;f.find(":file").remove();u=n(".scanner-image");t=n('<input type="file" hidden accept="image/*">');f.append(t);t.on("change",function(){if(this.files.length!==0){var t=new FileReader;t.onloadend=function(t){u.attr("src",t.target.result);e.decodeFromImage(u[0]).then(t=>{t&&(n.bb_vibrate(),console.log(t.text),i.invokeMethodAsync("GetResult",t.text))}).catch(n=>{n&&(console.log(n),i.invokeMethodAsync("GetError",n.message))})};t.readAsDataURL(this.files[0])}});t.trigger("click")}else r==="close"&&(e.reset(),i.invokeMethodAsync("Stop"))})}})}(jQuery),function(n){n.extend({bb_camera:function(t,i,r,u){var f=n(t),o=function(n,t){n.pause();n.srcObject=null;t.stop()},s,e;if(r==="stop"){s=f.find("video")[0];e=f.data("bb_video_track");e&&o(s,e);return}navigator.mediaDevices.enumerateDevices().then(function(t){var s=t.filter(function(n){return n.kind==="videoinput"});i.invokeMethodAsync("InitDevices",s).then(()=>{u&&s.length>0&&f.find('button[data-method="play"]').trigger("click")});var r=f.find("video")[0],h=f.find("canvas")[0],c=h.getContext("2d"),e;f.on("click","button[data-method]",function(){var s=n(this).attr("data-method"),t,l,u;if(s==="play"){var y=n(this).attr("data-camera"),a=f.find(".dropdown-item.active").attr("data-val"),v={video:{facingMode:y},audio:!1};a!==""&&(v.video.deviceId={exact:a});navigator.mediaDevices.getUserMedia(v).then(n=>{r.srcObject=n,r.play(),e=n.getTracks()[0],f.data("bb_video_track",e),i.invokeMethodAsync("Start")}).catch(n=>{console.log(n),i.invokeMethodAsync("GetError",n.message)})}else s==="stop"?(o(r,e),i.invokeMethodAsync("Stop")):s==="capture"&&(c.drawImage(r,0,0,300,200),t=h.toDataURL(),console.log(t),i.invokeMethodAsync("Capture"),l=f.find("img"),l.length===1&&l.attr("src",t),u=f.find("a.download"),u.attr("href",t),u.attr("download",(new Date).format("yyyyMMddHHmmss")+".png"),u[0].click())})})}})}(jQuery),function(n){n.extend({bb_carousel:function(t){var r=n(t).carousel(),i=null;r.hover(function(){var t,r,u;i!=null&&window.clearTimeout(i);t=n(this);r=t.find("[data-bs-slide]");r.removeClass("d-none");u=window.setTimeout(function(){window.clearTimeout(u);t.addClass("hover")},10)},function(){var t=n(this),r=t.find("[data-bs-slide]");t.removeClass("hover");i=window.setTimeout(function(){window.clearTimeout(i);r.addClass("d-none")},300)})}})}(jQuery),function(n){n.extend({bb_collapse:function(t){var i=n(t),r=null;i.hasClass("is-accordion")&&(r="["+t.getAttributeNames().pop()+"]");n.each(i.children(".accordion-item"),function(){var u=n(this),i=u.children(".accordion-collapse"),t=i.attr("id"),f;t||(t=n.getUID(),i.attr("id",t),r!=null&&i.attr("data-bs-parent",r),f=u.find('[data-bs-toggle="collapse"]'),f.attr("data-bs-target","#"+t).attr("aria-controls",t))});i.find(".tree .tree-item > .fa").on("click",function(){var t=n(this).parent();t.find('[data-bs-toggle="collapse"]').trigger("click")});if(i.parent().hasClass("menu"))i.on("click",".nav-link:not(.collapse)",function(){var r=n(this),t;for(i.find(".active").removeClass("active"),r.addClass("active"),t=r.closest(".accordion");t.length>0;)t.children(".accordion-header").find(".nav-link").addClass("active"),t=t.parent().closest(".accordion")})}})}(jQuery),function(n){n.extend({bb_console:function(t){var u=n(t),i=u.find('[data-scroll="auto"]'),r;i.length>0&&(r=i.find(".console-window"),i.scrollTop(r.height()))}})}(jQuery),function(n){n.extend({bb_timePicker:function(t){var i=n(t);return i.find(".time-spinner-item").height()},bb_timecell:function(t,i,r,u){var f=n(t);f.find(".time-spinner-list").on("mousewheel wheel",function(n){var t=n.originalEvent.wheelDeltaY||-n.originalEvent.deltaY;return t>0?i.invokeMethodAsync(r):i.invokeMethodAsync(u),!1})}})}(jQuery),function(n){n.extend({bb_form_load:function(t,i){var r=n(t);i==="show"?r.addClass("show"):r.removeClass("show")}})}(jQuery),function(n){n.extend({bb_download_wasm:function(n,t,i){var u=BINDING.conv_string(n),e=BINDING.conv_string(t),o=Blazor.platform.toUint8Array(i),s=new File([o],u,{type:e}),f=URL.createObjectURL(s),r=document.createElement("a");document.body.appendChild(r);r.href=f;r.download=u;r.target="_self";r.click();URL.revokeObjectURL(f)},bb_download:function(t,i,r){var f=n.bb_create_url(t,i,r),u=document.createElement("a");document.body.appendChild(u);u.href=f;u.download=t;u.target="_self";u.click();URL.revokeObjectURL(f)},bb_create_url_wasm:function(n,t,i){var r=BINDING.conv_string(n),u=BINDING.conv_string(t),f=Blazor.platform.toUint8Array(i),e=new File([f],r,{type:u});return URL.createObjectURL(e)},bb_create_url:function(t,i,r){var u=n.base64DecToArr(r),f=new File([u],t,{type:i});return URL.createObjectURL(f)},b64ToUint6:function(n){return n>64&&n<91?n-65:n>96&&n<123?n-71:n>47&&n<58?n+4:n===43?62:n===47?63:0},base64DecToArr:function(t,i){for(var h=t.replace(/[^A-Za-z0-9\+\/]/g,""),u=h.length,c=i?Math.ceil((u*3+1>>2)/i)*i:u*3+1>>2,l=new Uint8Array(c),f,e,o=0,s=0,r=0;r<u;r++)if(e=r&3,o|=n.b64ToUint6(h.charCodeAt(r))<<18-6*e,e===3||u-r==1){for(f=0;f<3&&s<c;f++,s++)l[s]=o>>>(16>>>f&24)&255;o=0}return l}})}(jQuery),function(n){n.extend({bb_drawer:function(t,i){var r=n(t),u;i?(r.addClass("is-open"),n("body").addClass("overflow-hidden")):r.hasClass("is-open")&&(r.removeClass("is-open").addClass("is-close"),u=window.setTimeout(function(){window.clearTimeout(u);r.removeClass("is-close");n("body").removeClass("overflow-hidden")},350))}})}(jQuery),function(n){n.extend({bb_html5edit:function(t,i){if(n.isFunction(n.fn.summernote)){var r=n(t),u=typeof i=="object"&&i;return/destroy|hide/.test(i)?r.toggleClass("open").summernote(i):typeof i=="string"?r.hasClass("open")?r.summernote(i):r.html():(u=n.extend({focus:!0,lang:"zh-CN",height:80,dialogsInBody:!0},u),r.on("click",u,function(t,i){var u=n(this).tooltip("hide"),r=n.extend({placeholder:u.attr("placeholder")},t.data,i||{});r.obj.invokeMethodAsync("GetToolBar").then(t=>{var i=u.toggleClass("open").summernote(n.extend({callbacks:{onChange:function(n){r.obj.invokeMethodAsync(r.method,n)}},toolbar:t},r)).next().find(".note-toolbar").on("click","button[data-method]",{note:u,op:r},function(t){var r=n(this),i,u;switch(r.attr("data-method")){case"submit":r.tooltip("dispose");i=t.data.note.toggleClass("open");u=i.summernote("code");i.summernote("destroy");t.data.op.obj.invokeMethodAsync(t.data.op.method,u)}}),f=n('<div class="note-btn-group btn-group note-view note-right"><button type="button" class="note-btn btn btn-sm note-btn-close" tabindex="-1" data-method="submit" title="完成" data-bs-placement="bottom"><i class="fa fa-check"><\/i><\/button><\/div>').appendTo(i).find("button").tooltip({container:"body"});n("body").find('.note-group-select-from-files [accept="image/*"]').attr("accept","image/bmp,image/png,image/jpg,image/jpeg,image/gif")})}).tooltip({title:"点击展开编辑"}),u.value&&r.html(u.value),r.hasClass("open")&&r.trigger("click",{focus:!1}),this)}},bb_editor:function(t,i,r,u,f,e,o){var s=function(){var r=t.getElementsByClassName("editor-body"),u;i==="code"?n(r).hasClass("open")?n(r).summernote("code",o):n(r).html(o):(u={obj:i,method:f,height:e},o&&(u.value=o),n.bb_html5edit(r,u))};r!==""?i.invokeMethodAsync(r).then(t=>{for(var r in t)(function(t,r){r!=null&&(pluginObj={},pluginObj[r]=function(f){var e=n.summernote.ui;f.memo("button."+r,function(){var n=e.button({contents:'<i class="'+t.iconClass+'"><\/i>',container:"body",tooltip:t.tooltip,click:function(){i.invokeMethodAsync(u,r).then(n=>{f.invoke("editor.pasteHTML",n)})}});return this.$button=n.render(),this.$button})},n.extend(n.summernote.plugins,pluginObj))})(t[r],t[r].buttonName);s()}):s()}})}(jQuery),function(n){n.extend({bb_gotop:function(t,i){var r=n(t),u=r.tooltip();r.on("click",function(t){t.preventDefault();n(i||window).scrollTop(0);u.tooltip("hide")})}})}(jQuery),function(n){n.extend({bb_layout:function(t,i){if(i==="dispose"){n(window).off("resize");return}var r=function(){var r=n(window).width();t.invokeMethodAsync(i,r)};n(".layout-header").find('[data-bs-toggle="tooltip"]').tooltip();r();n(window).on("resize",function(){r()})}})}(jQuery),function(n){n.extend({bb_side_menu_expand:function(t,i){if(i)n(t).find(".collapse").collapse("show");else{n(t).find(".collapse").collapse("hide");var r=window.setTimeout(function(){window.clearTimeout(r);n.bb_auto_expand(n(t))},400)}},bb_auto_expand:function(t){var u=t.find(".nav-link.expand").map(function(t,i){return n(i).removeClass("expand")}).toArray(),i=t.find(".active"),r;do r=i.parentsUntil(".submenu.collapse").parent(),r.length===1&&r.not(".show")?(i=r.prev(),i.length!==0&&u.push(i)):i=null;while(i!=null&&i.length>0);while(u.length>0)i=u.shift(),i[0].click()},bb_init_side_menu:function(t){var i=t.hasClass("accordion"),r=t.children(".submenu"),u;r.find(".submenu").each(function(){var t=n(this),r,f,e,u;t.addClass("collapse").removeClass("d-none");i?(r=t.parentsUntil(".submenu"),r.prop("nodeName")==="LI"&&(f=r.parent().attr("id"),t.attr("data-bs-parent","#"+f))):t.removeAttr("data-bs-parent");e=t.attr("id");u=t.prev();u.attr("data-bs-toggle","collapse");u.attr("href","#"+e)});i&&(u=r.find(".collapse"),u.each(function(t,r){var u=n(r),f;bootstrap.Collapse.getInstance(r)&&u.collapse("dispose");f="";i&&(f=u.attr("data-bs-parent"));u.collapse({parent:f,toggle:!1})}))},bb_side_menu:function(t){var i=n(t);n.bb_init_side_menu(i);n.bb_auto_expand(i)}});n(function(){n(document).on("click",'.menu a[href="#"]',function(){return!1})})}(jQuery),function(n){n.extend({bb_message:function(t,i,r){window.Messages||(window.Messages=[]);Messages.push(t);var u=n(t),e=u.attr("data-autohide")!=="false",o=parseInt(u.attr("data-delay")),f=null,s=window.setTimeout(function(){window.clearTimeout(s);e&&(f=window.setTimeout(function(){window.clearTimeout(f);u.close()},o));u.addClass("show")},50);u.close=function(){f!=null&&window.clearTimeout(f);u.removeClass("show");var n=window.setTimeout(function(){window.clearTimeout(n);Messages.remove(t);Messages.length===0&&i.invokeMethodAsync(r)},500)};u.on("click",".close",function(n){n.preventDefault();n.stopPropagation();u.close()})}})}(jQuery),function(n){n.extend({bb_modal_dialog:function(t,i,r){var u=n(t);u.data("bb_dotnet_invoker",{obj:i,method:r})},bb_modal:function(t,i){var u=n(t),l,o;if(i==="dispose")u.remove();else if(i==="init"){if(u.closest(".swal").length===0){n("body").append(u);var s=0,h=0,e=0,c=0,f={top:0,left:0},r=null;u.find(".is-draggable .modal-header").drag(function(n){s=n.clientX||n.touches[0].clientX;h=n.clientY||n.touches[0].clientY;r=this.closest(".modal-dialog");e=r.width();c=r.height();f.top=parseInt(r.css("marginTop").replace("px",""));f.left=parseInt(r.css("marginLeft").replace("px",""));r.css({marginLeft:f.left,marginTop:f.top});r.removeClass("modal-dialog-centered");r.css("width",e);this.addClass("is-drag")},function(t){var i=t.clientX||t.changedTouches[0].clientX,u=t.clientY||t.changedTouches[0].clientY;newValX=f.left+Math.ceil(i-s);newValY=f.top+Math.ceil(u-h);newValX<=0&&(newValX=0);newValY<=0&&(newValY=0);newValX+e<n(window).width()&&r!=null&&r.css({marginLeft:newValX});newValY+c<n(window).height()&&r!=null&&r.css({marginTop:newValY})},function(){this.removeClass("is-drag")})}u.on("shown.bs.modal",function(){var t=u.attr("data-bs-keyboard")==="true";if(t===!0)n(document).one("keyup",function(n){if(n.key==="Escape"){var i=u.find(".modal-dialog"),t=i.data("bb_dotnet_invoker");t!=null&&t.obj.invokeMethodAsync(t.method)}})})}else i!=="hide"&&i!=="dispose"&&(l=u.attr("data-bs-keyboard")==="true",o=bootstrap.Modal.getInstance(t),o!=null&&(o._config.keyboard=l)),u.modal(i)}})}(jQuery),function(n){n.extend({bb_confirm:function(t){var f=n('[data-bs-target="'+t+'"]'),r="is-show",i=document.getElementById(t),u=bootstrap.Popover.getOrCreateInstance(i,{toggle:"confirm",html:!0,sanitize:!1,content:f.find(".popover-body").html()});i.classList.contains(r)===!1?(u.show(),i.classList.add(r)):(u.hide(),i.classList.remove(r))},bb_popover:function(t,i,r,u,f,e,o){var s=n("#"+t),h={html:e,sanitize:!1,title:r,content:u,placement:f,trigger:o};i===""?(s.data("bs.popover")&&s.popover("dispose"),s.popover(h)):i==="dispose"?s.data("bs.popover")&&s.popover(i):(s.data("bs.popover")||s.popover(h),s.popover(i))},bb_datetimePicker:function(t,i){var r=n(t),f=r.attr("data-bs-placement")||"auto",u=r.find(".datetime-picker-input");if(i)u.popover(i);else{u.popover({toggle:"datetime-picker",placement:f}).on("show.bs.popover",function(){var t=n(this).parent().hasClass("disabled");return!t}).on("inserted.bs.popover",function(){var u=this.getAttribute("aria-describedby"),i,t;u&&(i=n("#"+u),t=i.find(".popover-body"),t.length===0&&(t=n('<div class="popover-body"><\/div>').appendTo(i)),t.append(r.find(".date-picker").removeClass("d-none")))}).on("hide.bs.popover",function(){var t=this.getAttribute("aria-describedby"),i,u;t&&(i=n("#"+t),u=i.find(".date-picker"),r.append(u.addClass("d-none")))});r.find(".datetime-picker-input-icon").on("click",function(t){if(!n(this).hasClass("disabled")){t.stopImmediatePropagation();var i=n(this).parents(".datetime-picker-bar").find(".datetime-picker-input");i.trigger("click")}});r.find(".date-table .cell").on("click",function(t){n(t.target).parent().parent().hasClass("disabled")&&(t.preventDefault(),t.stopImmediatePropagation())})}},bb_datetimeRange:function(t,i){var r=n(t),f=r.attr("data-bs-placement")||"auto",u=r.find(".datetime-range-bar");if(i)u.popover(i);else{u.popover({toggle:"datetime-range",placement:f}).on("show.bs.popover",function(){var t=n(this).parent().hasClass("disabled");return!t}).on("inserted.bs.popover",function(){var u=this.getAttribute("aria-describedby"),i,t;u&&(i=n("#"+u),t=i.find(".popover-body"),t.length===0&&(t=n('<div class="popover-body"><\/div>').appendTo(i)),t.append(r.find(".datetime-range-body").removeClass("d-none")))}).on("hide.bs.popover",function(){var t=this.getAttribute("aria-describedby"),i,u;t&&(i=n("#"+t),u=i.find(".datetime-range-body"),r.append(u.addClass("d-none")))});r.find(".is-clear").on("click",function(){u.popover("hide")})}}});n(function(){var r,t,i;n.fn.popover.Constructor.prototype.isWithContent=function(){var n=this._config.toggle;return["","confirm","datetime-picker","datetime-range"].indexOf(n)||this.getTitle()||this._getContent()};r=n.fn.popover.Constructor.prototype.getTipElement;n.fn.popover.Constructor.prototype.getTipElement=function(){var i=this._config.toggle,u=r.call(this),t=n(u).addClass("shadow");return t.find(".popover-header").length>0&&t.addClass("has-header"),i==="datetime-picker"&&t.addClass("popover-datetime"),i==="datetime-range"&&t.addClass("popover-datetime-range"),u};t=function(t){var i=null,r=t.parents(".popover"),u;return r.length>0&&(u=r.attr("id"),i=n('[aria-describedby="'+u+'"]')),i};i=function(n){n.popover("dispose");n.removeClass("is-show")};n(document).on("click",function(r){var e=!0,u=n(r.target),o=t(u),f;o!=null&&(e=!1);e&&(f=u,f.data("bs-toggle")!=="confirm"&&(f=f.parents('[data-bs-toggle="confirm"][aria-describedby^="popover"]')),n('[data-bs-toggle="confirm"][aria-describedby^="popover"]').each(function(t,r){if(f[0]!==r){var u=n(r);i(u)}}));u.parents(".popover-datetime.show").length===0&&n(".popover-datetime.show").each(function(){var t=this.getAttribute("id"),i;t&&(i=n('[aria-describedby="'+t+'"]'),u.attr("aria-describedby")!==t&&i.popover("hide"))});u.parents(".popover-datetime-range.show").length===0&&n(".popover-datetime-range.show").each(function(){var t=this.getAttribute("id"),i;t&&(i=n('[aria-describedby="'+t+'"]'),u.parents(".datetime-range-bar").attr("aria-describedby")!==t&&i.popover("hide"))})});n(document).on("click",".popover-confirm-buttons .btn",function(r){var u,f,e;r.stopPropagation();u=t(n(this));u.length>0&&(i(u),f=u.attr("id"),$ele=n('[data-bs-target="'+f+'"]'),e=this.getAttribute("data-dismiss")==="confirm"?$ele.find(".popover-confirm-buttons .btn:first"):$ele.find(".popover-confirm-buttons .btn:last"),e.trigger("click"))})})}(jQuery),function(n){n.extend({bb_qrcode:function(t){var u=n(t),f=u.find(".qrcode-img"),i,r,e;f.html("");i="";r=null;arguments.length===2?i=arguments[1]:(i=arguments[2],r=arguments[1]);i==="generate"&&(e=u.find(".qrcode-text").val(),qrcode=new QRCode(f[0],{text:e,width:128,height:128,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H}),r.invokeMethodAsync("Generated"))}})}(jQuery),function(n){n.extend({bb_rate:function(t,i,r){var u=n(t),f;u.val=parseInt(u.attr("aria-valuenow"));f=function(){var t=u.find(".rate-item");t.each(function(t){t>u.val?n(this).removeClass("is-on"):n(this).addClass("is-on")})};u.on("mouseenter",".rate-item",function(){if(!u.hasClass("disabled")){var t=u.find(".rate-item"),i=t.toArray().indexOf(this);t.each(function(t){t>i?n(this).removeClass("is-on"):n(this).addClass("is-on")})}});u.on("mouseleave",function(){u.hasClass("disabled")||f()});u.on("click",".rate-item",function(){if(!u.hasClass("disabled")){var n=u.find(".rate-item");u.val=n.toArray().indexOf(this);u.attr("aria-valuenow",u.val+1);i.invokeMethodAsync(r,u.val+1)}})}})}(jQuery),function(n){n.extend({bb_row:function(t){var i=n(t);i.grid()}})}(jQuery),function(n){n.extend({bb_scroll:function(t,i){var r=n(t),o=n(window).width()<768||navigator.userAgent.match(/Macintosh/);if(i||!o){var s=r.attr("data-hide"),u=r.attr("data-height"),f=r.attr("data-width"),e={alwaysVisible:s!=="true"};u||(u="auto");u!==""&&(e.height=u);f||(e.width=f)}else r.addClass("is-phone")}})}(jQuery),function(n){n.extend({bb_multi_select:function(t,i,r){n(t).data("bb_multi_select",{obj:i,method:r})}});n(function(){n(document).on("click",function(t){var r=n(t.target),i=r.closest(".multi-select");n(".multi-select.show").each(function(){if(i.length===0||this!=i[0]){var t=n(this).data("bb_multi_select");t.obj.invokeMethodAsync(t.method)}})})})}(jQuery),function(n){n.extend({bb_select:function(t,i,r){var u=n(t),f=u.find("input.search-text");u.on("show.bs.dropdown",function(n){u.find(".form-select").prop("disabled")&&n.preventDefault()});u.on("shown.bs.dropdown",function(){f.length>0&&f.focus()});u.on("keyup",function(t){var e=n(this),f,u,o,s,h;e.find(".dropdown-toggle").hasClass("show")&&(f=e.find(".dropdown-menu.show > .dropdown-item").not(".disabled, .search"),u=f.filter(function(t,i){return n(i).hasClass("active")}),f.length>1&&(t.key==="ArrowUp"?(u.removeClass("active"),o=u.prev().not(".disabled, .search"),o.length===0&&(o=f.last()),o.addClass("active")):t.key==="ArrowDown"&&(u.removeClass("active"),s=u.next().not(".disabled, .search"),s.length===0&&(s=f.first()),s.addClass("active"))),t.key==="Enter"&&(e.find(".show").removeClass("show"),h=u.index(),e.find(".search").length>0&&h--,i.invokeMethodAsync(r,h)))});u.on("click",".dropdown-item.disabled",function(n){n.stopImmediatePropagation()})}})}(jQuery),function(n){n.extend({bb_slider:function(t,i,r){var f=n(t),s=f.find(".disabled").length>0;if(!s){var e=0,o=0,u=0,h=f.innerWidth();f.find(".slider-button-wrapper").drag(function(n){e=n.clientX||n.touches[0].clientX;o=parseInt(f.attr("aria-valuetext"));f.find(".slider-button-wrapper, .slider-button").addClass("dragging")},function(n){var t=n.clientX||n.changedTouches[0].clientX;u=Math.ceil((t-e)*100/h)+o;u<=0&&(u=0);u>=100&&(u=100);f.find(".slider-bar").css({width:u.toString()+"%"});f.find(".slider-button-wrapper").css({left:u.toString()+"%"});f.attr("aria-valuetext",u.toString());i.invokeMethodAsync(r,u)},function(){f.find(".slider-button-wrapper, .slider-button").removeClass("dragging");i.invokeMethodAsync(r,u)})}}})}(jQuery),function(n){n.extend({bb_split:function(t){var i=n(t),f=i.innerWidth(),e=i.innerHeight(),u=0,r=0,o=0,s=0,h=!i.children().hasClass("is-horizontal");i.children().children(".split-bar").drag(function(n){f=i.innerWidth();e=i.innerHeight();h?(s=n.clientY||n.touches[0].clientY,u=i.children().children(".split-left").innerHeight()*100/e):(o=n.clientX||n.touches[0].clientX,u=i.children().children(".split-left").innerWidth()*100/f);i.toggleClass("dragging")},function(n){var t,c;h?(t=n.clientY||n.changedTouches[0].clientY,r=Math.ceil((t-s)*100/e)+u):(c=n.clientX||n.changedTouches[0].clientX,r=Math.ceil((c-o)*100/f)+u);r<=0&&(r=0);r>=100&&(r=100);i.children().children(".split-left").css({"flex-basis":r.toString()+"%"});i.children().children(".split-right").css({"flex-basis":(100-r).toString()+"%"});i.attr("data-split",r)},function(){i.toggleClass("dragging")})}})}(jQuery),function(n){n.extend({bb_tab:function(t){var i=n(t),r=window.setInterval(function(){i.is(":visible")&&(window.clearInterval(r),i.lgbTab("active"))},200)}})}(jQuery),function(n){n.extend({bb_filter:function(t,i,r){n(t).data("bb_filter",{obj:i,method:r})}});n(function(){n(document).on("click",function(t){var i=n(t.target),r=i.closest(".popover-datetime"),u,f,e;r.length==1&&(u=r.attr("id"),f=n('[aria-describedby="'+u+'"]'),f.closest(".datetime-picker").hasClass("is-filter"))||(e=i.closest(".table-filter-item"),e.length==0&&n(".table-filter-item.show").each(function(){var t=n(this).data("bb_filter");t.obj.invokeMethodAsync(t.method)}))});n(document).on("keyup",function(t){var i,r;t.key==="Enter"?(i=n(".table-filter .table-filter-item.show:first"),r=i.data("bb_filter"),r&&(i.removeClass("show"),r.obj.invokeMethodAsync("ConfirmByKey"))):t.key==="Escape"&&(i=n(".table-filter .table-filter-item.show:first"),r=i.data("bb_filter"),r&&(i.removeClass("show"),r.obj.invokeMethodAsync("EscByKey")))})})}(jQuery),function(n){n.extend({bb_table_search:function(t,i,r,u){n(t).data("bb_table_search",{obj:i,searchMethod:r,clearSearchMethod:u})},bb_table_resize:function(t){var f=t.find(".col-resizer");if(f.length>0){var e=function(t){var u=n(this),i=u.closest("th");t?i.addClass("border-resize"):i.removeClass("border-resize");var r=i.index(),f=i.closest(".table-resize").find("tbody"),e=f.find("tr").each(function(){var i=n(this.children[r]);t?i.addClass("border-resize"):i.removeClass("border-resize")});return r},i=0,r=0,u=0,o=0;f.each(function(){n(this).drag(function(f){u=e.call(this,!0);var s=t.find("table colgroup col")[u].width;i=s?parseInt(s):n(this).closest("th").width();r=n(this).closest("table").width();o=f.clientX},function(f){t.find("table colgroup").each(function(t,e){var c=n(e).find("col")[u],h=f.clientX-o,s;c.width=i+h;s=n(e).closest("table");s.parent().hasClass("table-fixed-header")?s.width(r+h):s.width(r+h-17)})},function(){e.call(this,!1)})})}},bb_table_load:function(t,i){var u=n(t),r=u.find(".table-loader");i==="show"?r.addClass("show"):r.removeClass("show")},bb_table_filter:function(t){var i=t.find(".table-toolbar"),r=0,u;i.length>0&&(r=i.outerHeight());u=function(){var o=n(this),c=o.position(),l=o.attr("data-field"),f=t.find('.table-filter-item[data-field="'+l+'"]'),i=o.closest("th"),a=i.closest("thead"),v=a.outerHeight()-i.outerHeight(),s=i.outerWidth()+i.position().left-f.outerWidth()/2,u=0,y=i.hasClass("fixed"),h,e;i.hasClass("sortable")&&(u=24);i.hasClass("filterable")&&(u=u+12);h=0;y||(h=i.closest("table").parent().scrollLeft());e=i.offset().left+i.outerWidth()-u+f.outerWidth()/2-n(window).width();u=u+h;e>0&&(s=s-e-16,$arrow=f.find(".card-arrow"),$arrow.css({left:"calc(50% - 0.5rem + "+(e+16)+"px)"}));f.css({top:c.top+r+v+50,left:s-u})};t.on("click",".filterable .fa-filter",function(){u.call(this)})},bb_table:function(t,i,r){var u=n(t),l=function(){u.find(".is-tips").tooltip({container:"body",title:function(){return n(this).text()}})},a,h,s,f,e,c,o,v;if(i==="fixTableHeader"){a=u.find(".table-fixed-header");h=u.find(".table-fixed-body");h.on("scroll",function(){var n=h.scrollLeft();a.scrollLeft(n)});if(s=u.find(".fixed-scroll"),s.length===1){for(f=s.prev();f.length===1;)if(f.hasClass("fixed-right")&&!f.hasClass("modified"))e=f.css("right"),e=e.replace("px",""),n.browser.versions.mac?e=parseFloat(e)-2+"px":n.browser.versions.mobile&&(e=parseFloat(e)-17+"px"),f.css({right:e}).addClass("modified"),f=f.prev();else break;n.browser.versions.mobile&&s.remove()}u.find(".col-resizer:last").remove();n.bb_table_filter(u);n.bb_table_resize(u)}else if(i==="init"){c=u.find(".table-cell.is-sort .table-text");o=r;c.each(function(){var i=n(this).parent().find(".fa:last"),t;i.length>0&&(t=o.unset,i.hasClass("fa-sort-asc")?t=o.sortAsc:i.hasClass("fa-sort-desc")&&(t=o.sortDesc),n(this).tooltip({container:"body",title:t}))});c.on("click",function(){var i=n(this),u=i.parent().find(".fa:last"),t="sortAsc",r,f;u.hasClass("fa-sort-asc")?t="sortDesc":u.hasClass("fa-sort-desc")&&(t="unset");r=n("#"+i.attr("aria-describedby"));r.length>0&&(f=r.find(".tooltip-inner"),f.html(o[t]),i.attr("data-original-title",o[t]))});n.bb_table_filter(u);l();u.children(".table-scroll").scroll(function(){u.find(".table-filter-item.show").each(function(){var t=n(this).attr("data-field"),i=u.find('.fa-filter[data-field="'+t+'"]')[0];calcPosition.call(i)})});n.bb_table_resize(u)}else{if(i==="width")return v=0,r?u.outerWidth(!0):n(window).outerWidth(!0);i==="tooltip"&&l()}}});n(function(){n(document).on("keyup",function(t){var r,i;t.key==="Enter"?(r=n(t.target).closest(".table-container"),i=r.data("bb_table_search"),i&&i.obj.invokeMethodAsync(i.searchMethod)):t.key==="Escape"&&(r=n(t.target).closest(".table-container"),i=r.data("bb_table_search"),i&&i.obj.invokeMethodAsync(i.clearSearchMethod))});n(document).on("click",function(t){var i=n(t.target),u=i.closest(".dropdown-menu.show"),r;u.length>0||(r=i.closest(".btn-col"),r.length>0)||n(".table-toolbar > .btn-group > .btn-col > .dropdown-toggle.show").each(function(t,i){n(i).trigger("click")})})})}(jQuery),function(n){n.extend({bb_setTitle:function(n){document.title=n}})}(jQuery),function(n){n.extend({bb_toast_close:function(t){var i=n(t);i.find(".btn-close").trigger("click")},bb_toast:function(t,i,r){var f,o;window.Toasts===undefined&&(window.Toasts=[]);Toasts.push(t);var u=n(t),s=u.attr("data-bs-autohide")!=="false",e=parseInt(u.attr("data-bs-delay"));u.addClass("d-block");f=null;o=window.setTimeout(function(){window.clearTimeout(o);s&&(u.find(".toast-progress").css({width:"100%",transition:"width "+e/1e3+"s linear"}),f=window.setTimeout(function(){window.clearTimeout(f);u.find(".btn-close").trigger("click")},e));u.addClass("show")},50);u.on("click",".btn-close",function(n){n.preventDefault();n.stopPropagation();f!=null&&window.clearTimeout(f);u.removeClass("show");var t=window.setTimeout(function(){window.clearTimeout(t);u.removeClass("d-block");Toasts.remove(u[0]);Toasts.length===0&&i.invokeMethodAsync(r)},500)})}})}(jQuery),function(n){n.extend({bb_tooltip:function(t,i,r,u,f,e){var h={html:f,sanitize:!f,title:r,placement:u,trigger:e},c=bootstrap.Tooltip.getInstance(document.getElementById(t)),s,o;c&&c.dispose();s=n("#"+t);i===""?s.tooltip(h):i==="enable"?(s.tooltip(h),o=s.parents("form").find(".is-invalid:first"),o.prop("nodeName")==="INPUT"?o.prop("readonly")?o.trigger("focus"):o.focus():o.prop("nodeName")==="DIV"&&o.trigger("focus")):i!=="dispose"&&(s.tooltip(h),s.tooltip(i))}});n(function(){n(document).on("inserted.bs.tooltip",".is-invalid",function(){n("#"+n(this).attr("aria-describedby")).addClass("is-invalid")})})}(jQuery),function(n){n.extend({bb_transition:function(t,i,r){n(t).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oAnimationEnd",function(){i.invokeMethodAsync(r)})}})}(jQuery),function(n){n.extend({bb_tree:function(t){var i=n(t);i.find(".tree-content").hover(function(){n(this).parent().addClass("hover")},function(){n(this).parent().removeClass("hover")})}})}(jQuery),function(n){n.extend({bb_upload:function(t){var i=n(t);i.on("click",".btn-browser",function(){var r=n(this),t=i.find(":file");t.trigger("click")})}})}(jQuery),function(n){n.extend({bb_form:function(t){var i=n("#"+t);i.find("[aria-describedby]").each(function(t,i){var r=n(i);r.tooltip("dispose")})}})}(jQuery);