total rebase
[anni] / static / frontends / pleroma-fe / dev1 / static / js / 48.b5ecdbc517423af07ca4.js
1 /*! For license information please see 48.b5ecdbc517423af07ca4.js.LICENSE.txt */
2 (self.webpackChunkpleroma_fe=self.webpackChunkpleroma_fe||[]).push([[48],{99990:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(66252),r=i(92592);const a="ready";var o=(0,n.aZ)({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[a],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const t=this.options||{},e=String(this.value),i=()=>{this.$emit(a,this.$el)};switch(this.tag){case"canvas":(0,r.rT)(this.$el,e,t,(t=>{if(t)throw t;i()}));break;case"img":(0,r.hz)(e,t,((t,e)=>{if(t)throw t;this.$el.src=e,this.$el.onload=i}));break;case"svg":(0,r.toString)(e,t,((t,e)=>{if(t)throw t;const n=document.createElement("div");n.innerHTML=e;const r=n.querySelector("svg");if(r){const{attributes:t,childNodes:e}=r;Object.keys(t).forEach((e=>{const i=t[Number(e)];this.$el.setAttribute(i.name,i.value)})),Object.keys(e).forEach((t=>{const i=e[Number(t)];this.$el.appendChild(i.cloneNode(!0))})),i()}}))}}},render(){return(0,n.h)(this.tag,this.$slots.default)}})},33129:function(t){t.exports=function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function e(e){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?t(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(t){return i="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},i(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var h="undefined"!=typeof window&&void 0!==window.document,c=h?window:{},l=!(!h||!c.document.documentElement)&&"ontouchstart"in c.document.documentElement,d=!!h&&"PointerEvent"in c,u="cropper",p="all",g="crop",f="move",m="zoom",v="e",w="w",y="s",b="n",x="ne",M="nw",C="se",E="sw",B="".concat(u,"-crop"),T="".concat(u,"-disabled"),D="".concat(u,"-hidden"),A="".concat(u,"-hide"),N="".concat(u,"-invisible"),k="".concat(u,"-modal"),R="".concat(u,"-move"),I="".concat(u,"Action"),L="".concat(u,"Preview"),P="crop",S="move",O="none",H="crop",z="cropend",Y="cropmove",U="cropstart",W="dblclick",j=d?"pointerdown":l?"touchstart":"mousedown",X=d?"pointermove":l?"touchmove":"mousemove",F=d?"pointerup pointercancel":l?"touchend touchcancel":"mouseup",K="ready",q="resize",$="wheel",_="zoom",J="image/jpeg",Q=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,V=/^data:/,Z=/^data:image\/jpeg;base64,/,G=/^img|canvas$/i,tt={viewMode:0,dragMode:P,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},et=Number.isNaN||c.isNaN;function it(t){return"number"==typeof t&&!et(t)}var nt=function(t){return t>0&&t<1/0};function rt(t){return void 0===t}function at(t){return"object"===i(t)&&null!==t}var ot=Object.prototype.hasOwnProperty;function st(t){if(!at(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&ot.call(i,"isPrototypeOf")}catch(t){return!1}}function ht(t){return"function"==typeof t}var ct=Array.prototype.slice;function lt(t){return Array.from?Array.from(t):ct.call(t)}function dt(t,e){return t&&ht(e)&&(Array.isArray(t)||it(t.length)?lt(t).forEach((function(i,n){e.call(t,i,n,t)})):at(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var ut=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return at(t)&&i.length>0&&i.forEach((function(e){at(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},pt=/\.\d*(?:0|9){12}\d*$/;function gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return pt.test(t)?Math.round(t*e)/e:t}var ft=/^width|height|left|top|marginLeft|marginTop$/;function mt(t,e){var i=t.style;dt(e,(function(t,e){ft.test(e)&&it(t)&&(t="".concat(t,"px")),i[e]=t}))}function vt(t,e){if(e)if(it(t.length))dt(t,(function(t){vt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function wt(t,e){e&&(it(t.length)?dt(t,(function(t){wt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function yt(t,e,i){e&&(it(t.length)?dt(t,(function(t){yt(t,e,i)})):i?vt(t,e):wt(t,e))}var bt=/([a-z\d])([A-Z])/g;function xt(t){return t.replace(bt,"$1-$2").toLowerCase()}function Mt(t,e){return at(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(xt(e)))}function Ct(t,e,i){at(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(xt(e)),i)}var Et=/\s\s*/,Bt=function(){var t=!1;if(h){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return t}();function Tt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i;e.trim().split(Et).forEach((function(e){if(!Bt){var a=t.listeners;a&&a[e]&&a[e][i]&&(r=a[e][i],delete a[e][i],0===Object.keys(a[e]).length&&delete a[e],0===Object.keys(a).length&&delete t.listeners)}t.removeEventListener(e,r,n)}))}function Dt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i;e.trim().split(Et).forEach((function(e){if(n.once&&!Bt){var a=t.listeners,o=void 0===a?{}:a;r=function(){delete o[e][i],t.removeEventListener(e,r,n);for(var a=arguments.length,s=new Array(a),h=0;h<a;h++)s[h]=arguments[h];i.apply(t,s)},o[e]||(o[e]={}),o[e][i]&&t.removeEventListener(e,o[e][i],n),o[e][i]=r,t.listeners=o}t.addEventListener(e,r,n)}))}function At(t,e,i){var n;return ht(Event)&&ht(CustomEvent)?n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(n)}function Nt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var kt=c.location,Rt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function It(t){var e=t.match(Rt);return null!==e&&(e[1]!==kt.protocol||e[2]!==kt.hostname||e[3]!==kt.port)}function Lt(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Pt(t){var e=t.rotate,i=t.scaleX,n=t.scaleY,r=t.translateX,a=t.translateY,o=[];it(r)&&0!==r&&o.push("translateX(".concat(r,"px)")),it(a)&&0!==a&&o.push("translateY(".concat(a,"px)")),it(e)&&0!==e&&o.push("rotate(".concat(e,"deg)")),it(i)&&1!==i&&o.push("scaleX(".concat(i,")")),it(n)&&1!==n&&o.push("scaleY(".concat(n,")"));var s=o.length?o.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function St(t,i){var n=t.pageX,r=t.pageY,a={endX:n,endY:r};return i?a:e({startX:n,startY:r},a)}function Ot(t){var e=t.aspectRatio,i=t.height,n=t.width,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",a=nt(n),o=nt(i);if(a&&o){var s=i*e;"contain"===r&&s>n||"cover"===r&&s<n?i=n/e:n=i*e}else a?i=n/e:o&&(n=i*e);return{width:n,height:i}}function Ht(t,e,i,n){var r=e.aspectRatio,a=e.naturalWidth,s=e.naturalHeight,h=e.rotate,c=void 0===h?0:h,l=e.scaleX,d=void 0===l?1:l,u=e.scaleY,p=void 0===u?1:u,g=i.aspectRatio,f=i.naturalWidth,m=i.naturalHeight,v=n.fillColor,w=void 0===v?"transparent":v,y=n.imageSmoothingEnabled,b=void 0===y||y,x=n.imageSmoothingQuality,M=void 0===x?"low":x,C=n.maxWidth,E=void 0===C?1/0:C,B=n.maxHeight,T=void 0===B?1/0:B,D=n.minWidth,A=void 0===D?0:D,N=n.minHeight,k=void 0===N?0:N,R=document.createElement("canvas"),I=R.getContext("2d"),L=Ot({aspectRatio:g,width:E,height:T}),P=Ot({aspectRatio:g,width:A,height:k},"cover"),S=Math.min(L.width,Math.max(P.width,f)),O=Math.min(L.height,Math.max(P.height,m)),H=Ot({aspectRatio:r,width:E,height:T}),z=Ot({aspectRatio:r,width:A,height:k},"cover"),Y=Math.min(H.width,Math.max(z.width,a)),U=Math.min(H.height,Math.max(z.height,s)),W=[-Y/2,-U/2,Y,U];return R.width=gt(S),R.height=gt(O),I.fillStyle=w,I.fillRect(0,0,S,O),I.save(),I.translate(S/2,O/2),I.rotate(c*Math.PI/180),I.scale(d,p),I.imageSmoothingEnabled=b,I.imageSmoothingQuality=M,I.drawImage.apply(I,[t].concat(o(W.map((function(t){return Math.floor(gt(t))}))))),I.restore(),R}var zt=String.fromCharCode;var Yt=/^data:.*,/;function Ut(t){var e,i=new DataView(t);try{var n,r,a;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var o=i.byteLength,s=2;s+1<o;){if(255===i.getUint8(s)&&225===i.getUint8(s+1)){r=s;break}s+=1}if(r){var h=r+10;if("Exif"===function(t,e,i){var n="";i+=e;for(var r=e;r<i;r+=1)n+=zt(t.getUint8(r));return n}(i,r+4,4)){var c=i.getUint16(h);if(((n=18761===c)||19789===c)&&42===i.getUint16(h+2,n)){var l=i.getUint32(h+4,n);l>=8&&(a=h+l)}}}if(a){var d,u,p=i.getUint16(a,n);for(u=0;u<p;u+=1)if(d=a+12*u+2,274===i.getUint16(d,n)){d+=8,e=i.getUint16(d,n),i.setUint16(d,1,n);break}}}catch(t){e=1}return e}var Wt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,n=this.cropper,r=Number(e.minContainerWidth),a=Number(e.minContainerHeight);vt(n,D),wt(t,D);var o={width:Math.max(i.offsetWidth,r>=0?r:200),height:Math.max(i.offsetHeight,a>=0?a:100)};this.containerData=o,mt(n,{width:o.width,height:o.height}),vt(t,D),wt(n,D)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,r=n?e.naturalHeight:e.naturalWidth,a=n?e.naturalWidth:e.naturalHeight,o=r/a,s=t.width,h=t.height;t.height*o>t.width?3===i?s=t.height*o:h=t.width/o:3===i?h=t.width/o:s=t.height*o;var c={aspectRatio:o,naturalWidth:r,naturalHeight:a,width:s,height:h};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=ut({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,r=this.canvasData,a=this.cropBoxData,o=i.viewMode,s=r.aspectRatio,h=this.cropped&&a;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;o>1?(c=Math.max(c,n.width),l=Math.max(l,n.height),3===o&&(l*s>c?c=l*s:l=c/s)):o>0&&(c?c=Math.max(c,h?a.width:0):l?l=Math.max(l,h?a.height:0):h&&(c=a.width,(l=a.height)*s>c?c=l*s:l=c/s));var d=Ot({aspectRatio:s,width:c,height:l});c=d.width,l=d.height,r.minWidth=c,r.minHeight=l,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(o>(h?0:1)){var u=n.width-r.width,p=n.height-r.height;r.minLeft=Math.min(0,u),r.minTop=Math.min(0,p),r.maxLeft=Math.max(0,u),r.maxTop=Math.max(0,p),h&&this.limited&&(r.minLeft=Math.min(a.left,a.left+(a.width-r.width)),r.minTop=Math.min(a.top,a.top+(a.height-r.height)),r.maxLeft=a.left,r.maxTop=a.top,2===o&&(r.width>=n.width&&(r.minLeft=Math.min(0,u),r.maxLeft=Math.max(0,u)),r.height>=n.height&&(r.minTop=Math.min(0,p),r.maxTop=Math.max(0,p))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var r=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var r=n%90*Math.PI/180,a=Math.sin(r),o=Math.cos(r),s=e*o+i*a,h=e*a+i*o;return n>90?{width:h,height:s}:{width:s,height:h}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),a=r.width,o=r.height,s=i.width*(a/i.naturalWidth),h=i.height*(o/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(h-i.height)/2,i.width=s,i.height=h,i.aspectRatio=a/o,i.naturalWidth=a,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,mt(this.canvas,ut({width:i.width,height:i.height},Pt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,n=i.naturalWidth*(e.width/e.naturalWidth),r=i.naturalHeight*(e.height/e.naturalHeight);ut(i,{width:n,height:r,left:(e.width-n)/2,top:(e.height-r)/2}),mt(this.image,ut({width:i.width,height:i.height},Pt(ut({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:e.width,height:e.height};i&&(e.height*i>e.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=e.left+(e.width-r.width)/2,r.top=e.top+(e.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=ut({},r)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,r=this.canvasData,a=this.cropBoxData,o=this.limited,s=i.aspectRatio;if(t){var h=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,d=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;h=Math.min(h,n.width),c=Math.min(c,n.height),s&&(h&&c?c*s>h?c=h/s:h=c*s:h?c=h/s:c&&(h=c*s),d*s>l?d=l/s:l=d*s),a.minWidth=Math.min(h,l),a.minHeight=Math.min(c,d),a.maxWidth=l,a.maxHeight=d}e&&(o?(a.minLeft=Math.max(0,r.left),a.minTop=Math.max(0,r.top),a.maxLeft=Math.min(n.width,r.left+r.width)-a.width,a.maxTop=Math.min(n.height,r.top+r.height)-a.height):(a.minLeft=0,a.minTop=0,a.maxLeft=n.width-a.width,a.maxTop=n.height-a.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Ct(this.face,I,i.width>=e.width&&i.height>=e.height?f:p),mt(this.cropBox,ut({width:i.width,height:i.height},Pt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),At(this.element,H,this.getData())}},jt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",a=document.createElement("img");if(e&&(a.crossOrigin=e),a.src=n,a.alt=r,this.viewBox.appendChild(a),this.viewBoxImage=a,i){var o=i;"string"==typeof i?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,dt(o,(function(t){var i=document.createElement("img");Ct(t,L,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=r,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){dt(this.previews,(function(t){var e=Mt(t,L);mt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(at(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(xt(e)))}(t,L)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,a=t.width,o=t.height,s=i.left-e.left-t.left,h=i.top-e.top-t.top;this.cropped&&!this.disabled&&(mt(this.viewBoxImage,ut({width:a,height:o},Pt(ut({translateX:-s,translateY:-h},t)))),dt(this.previews,(function(e){var i=Mt(e,L),c=i.width,l=i.height,d=c,u=l,p=1;n&&(u=r*(p=c/n)),r&&u>l&&(d=n*(p=l/r),u=l),mt(e,{width:d,height:u}),mt(e.getElementsByTagName("img")[0],ut({width:a*p,height:o*p},Pt(ut({translateX:-s*p,translateY:-h*p},t))))})))}},Xt={bind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Dt(t,U,e.cropstart),ht(e.cropmove)&&Dt(t,Y,e.cropmove),ht(e.cropend)&&Dt(t,z,e.cropend),ht(e.crop)&&Dt(t,H,e.crop),ht(e.zoom)&&Dt(t,_,e.zoom),Dt(i,j,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Dt(i,$,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Dt(i,W,this.onDblclick=this.dblclick.bind(this)),Dt(t.ownerDocument,X,this.onCropMove=this.cropMove.bind(this)),Dt(t.ownerDocument,F,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Dt(window,q,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Tt(t,U,e.cropstart),ht(e.cropmove)&&Tt(t,Y,e.cropmove),ht(e.cropend)&&Tt(t,z,e.cropend),ht(e.crop)&&Tt(t,H,e.crop),ht(e.zoom)&&Tt(t,_,e.zoom),Tt(i,j,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Tt(i,$,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Tt(i,W,this.onDblclick),Tt(t.ownerDocument,X,this.onCropMove),Tt(t.ownerDocument,F,this.onCropEnd),e.responsive&&Tt(window,q,this.onResize)}},Ft={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,r=this.containerData,a=n.offsetWidth/r.width,o=n.offsetHeight/r.height,s=Math.abs(a-1)>Math.abs(o-1)?a:o;1!==s&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(dt(t,(function(e,i){t[i]=e*s}))),this.setCropBoxData(dt(e,(function(t,i){e[i]=t*s})))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===O||this.setDragMode((t=this.dragBox,e=B,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?S:P))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(it(e)&&1!==e||it(i)&&0!==i||t.ctrlKey))){var n,r=this.options,a=this.pointers;t.changedTouches?dt(t.changedTouches,(function(t){a[t.identifier]=St(t)})):a[t.pointerId||0]=St(t),n=Object.keys(a).length>1&&r.zoomable&&r.zoomOnTouch?m:Mt(t.target,I),Q.test(n)&&!1!==At(this.element,U,{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,n===g&&(this.cropping=!0,vt(this.dragBox,k)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==At(this.element,Y,{originalEvent:t,action:e})&&(t.changedTouches?dt(t.changedTouches,(function(t){ut(i[t.identifier]||{},St(t,!0))})):ut(i[t.pointerId||0]||{},St(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?dt(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,yt(this.dragBox,k,this.cropped&&this.options.modal)),At(this.element,z,{originalEvent:t,action:e}))}}},Kt={change:function(t){var i,n=this.options,r=this.canvasData,a=this.containerData,o=this.cropBoxData,s=this.pointers,h=this.action,c=n.aspectRatio,l=o.left,d=o.top,u=o.width,B=o.height,T=l+u,A=d+B,N=0,k=0,R=a.width,I=a.height,L=!0;!c&&t.shiftKey&&(c=u&&B?u/B:1),this.limited&&(N=o.minLeft,k=o.minTop,R=N+Math.min(a.width,r.width,r.left+r.width),I=k+Math.min(a.height,r.height,r.top+r.height));var P=s[Object.keys(s)[0]],S={x:P.endX-P.startX,y:P.endY-P.startY},O=function(t){switch(t){case v:T+S.x>R&&(S.x=R-T);break;case w:l+S.x<N&&(S.x=N-l);break;case b:d+S.y<k&&(S.y=k-d);break;case y:A+S.y>I&&(S.y=I-A)}};switch(h){case p:l+=S.x,d+=S.y;break;case v:if(S.x>=0&&(T>=R||c&&(d<=k||A>=I))){L=!1;break}O(v),(u+=S.x)<0&&(h=w,l-=u=-u),c&&(B=u/c,d+=(o.height-B)/2);break;case b:if(S.y<=0&&(d<=k||c&&(l<=N||T>=R))){L=!1;break}O(b),B-=S.y,d+=S.y,B<0&&(h=y,d-=B=-B),c&&(u=B*c,l+=(o.width-u)/2);break;case w:if(S.x<=0&&(l<=N||c&&(d<=k||A>=I))){L=!1;break}O(w),u-=S.x,l+=S.x,u<0&&(h=v,l-=u=-u),c&&(B=u/c,d+=(o.height-B)/2);break;case y:if(S.y>=0&&(A>=I||c&&(l<=N||T>=R))){L=!1;break}O(y),(B+=S.y)<0&&(h=b,d-=B=-B),c&&(u=B*c,l+=(o.width-u)/2);break;case x:if(c){if(S.y<=0&&(d<=k||T>=R)){L=!1;break}O(b),B-=S.y,d+=S.y,u=B*c}else O(b),O(v),S.x>=0?T<R?u+=S.x:S.y<=0&&d<=k&&(L=!1):u+=S.x,S.y<=0?d>k&&(B-=S.y,d+=S.y):(B-=S.y,d+=S.y);u<0&&B<0?(h=E,d-=B=-B,l-=u=-u):u<0?(h=M,l-=u=-u):B<0&&(h=C,d-=B=-B);break;case M:if(c){if(S.y<=0&&(d<=k||l<=N)){L=!1;break}O(b),B-=S.y,d+=S.y,u=B*c,l+=o.width-u}else O(b),O(w),S.x<=0?l>N?(u-=S.x,l+=S.x):S.y<=0&&d<=k&&(L=!1):(u-=S.x,l+=S.x),S.y<=0?d>k&&(B-=S.y,d+=S.y):(B-=S.y,d+=S.y);u<0&&B<0?(h=C,d-=B=-B,l-=u=-u):u<0?(h=x,l-=u=-u):B<0&&(h=E,d-=B=-B);break;case E:if(c){if(S.x<=0&&(l<=N||A>=I)){L=!1;break}O(w),u-=S.x,l+=S.x,B=u/c}else O(y),O(w),S.x<=0?l>N?(u-=S.x,l+=S.x):S.y>=0&&A>=I&&(L=!1):(u-=S.x,l+=S.x),S.y>=0?A<I&&(B+=S.y):B+=S.y;u<0&&B<0?(h=x,d-=B=-B,l-=u=-u):u<0?(h=C,l-=u=-u):B<0&&(h=M,d-=B=-B);break;case C:if(c){if(S.x>=0&&(T>=R||A>=I)){L=!1;break}O(v),B=(u+=S.x)/c}else O(y),O(v),S.x>=0?T<R?u+=S.x:S.y>=0&&A>=I&&(L=!1):u+=S.x,S.y>=0?A<I&&(B+=S.y):B+=S.y;u<0&&B<0?(h=M,d-=B=-B,l-=u=-u):u<0?(h=E,l-=u=-u):B<0&&(h=x,d-=B=-B);break;case f:this.move(S.x,S.y),L=!1;break;case m:this.zoom(function(t){var i=e({},t),n=0;return dt(t,(function(t,e){delete i[e],dt(i,(function(e){var i=Math.abs(t.startX-e.startX),r=Math.abs(t.startY-e.startY),a=Math.abs(t.endX-e.endX),o=Math.abs(t.endY-e.endY),s=Math.sqrt(i*i+r*r),h=(Math.sqrt(a*a+o*o)-s)/s;Math.abs(h)>Math.abs(n)&&(n=h)}))})),n}(s),t),L=!1;break;case g:if(!S.x||!S.y){L=!1;break}i=Nt(this.cropper),l=P.startX-i.left,d=P.startY-i.top,u=o.minWidth,B=o.minHeight,S.x>0?h=S.y>0?C:x:S.x<0&&(l-=u,h=S.y>0?E:M),S.y<0&&(d-=B),this.cropped||(wt(this.cropBox,D),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}L&&(o.width=u,o.height=B,o.left=l,o.top=d,this.action=h,this.renderCropBox()),dt(s,(function(t){t.startX=t.endX,t.startY=t.endY}))}},qt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&vt(this.dragBox,k),wt(this.cropBox,D),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ut({},this.initialImageData),this.canvasData=ut({},this.initialCanvasData),this.cropBoxData=ut({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ut(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),wt(this.dragBox,k),vt(this.cropBox,D)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,dt(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,wt(this.cropper,T)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,vt(this.cropper,T)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(rt(t)?t:n+Number(t),rt(e)?e:r+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(it(t)&&(i.left=t,n=!0),it(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,r=this.canvasData,a=r.width,o=r.height,s=r.naturalWidth,h=r.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,l=h*t;if(!1===At(this.element,_,{ratio:t,oldRatio:a/s,originalEvent:i}))return this;if(i){var d=this.pointers,u=Nt(this.cropper),p=d&&Object.keys(d).length?function(t){var e=0,i=0,n=0;return dt(t,(function(t){var r=t.startX,a=t.startY;e+=r,i+=a,n+=1})),{pageX:e/=n,pageY:i/=n}}(d):{pageX:i.pageX,pageY:i.pageY};r.left-=(c-a)*((p.pageX-u.left-r.left)/a),r.top-=(l-o)*((p.pageY-u.top-r.top)/o)}else st(e)&&it(e.x)&&it(e.y)?(r.left-=(c-a)*((e.x-r.left)/a),r.top-=(l-o)*((e.y-r.top)/o)):(r.left-=(c-a)/2,r.top-=(l-o)/2);r.width=c,r.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return it(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,it(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(it(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(it(t)&&(i.scaleX=t,n=!0),it(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,r=this.canvasData,a=this.cropBoxData;if(this.ready&&this.cropped){t={x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height};var o=n.width/n.naturalWidth;if(dt(t,(function(e,i){t[i]=e/o})),e){var s=Math.round(t.y+t.height),h=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=h-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&st(t)){var a=!1;e.rotatable&&it(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,a=!0),e.scalable&&(it(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,a=!0),it(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,a=!0)),a&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;it(t.x)&&(r.left=t.x*o+n.left),it(t.y)&&(r.top=t.y*o+n.top),it(t.width)&&(r.width=t.width*o),it(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?ut({},this.containerData):{}},getImageData:function(){return this.sized?ut({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&dt(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&st(t)&&(it(t.left)&&(e.left=t.left),it(t.top)&&(e.top=t.top),it(t.width)?(e.width=t.width,e.height=t.width/i):it(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,r=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&st(t)&&(it(t.left)&&(n.left=t.left),it(t.top)&&(n.top=t.top),it(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),it(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),r&&(e?n.height=n.width/r:i&&(n.width=n.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=Ht(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),r=n.x,a=n.y,s=n.width,h=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(r*=c,a*=c,s*=c,h*=c);var l=s/h,d=Ot({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),u=Ot({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=Ot({aspectRatio:l,width:t.width||(1!==c?i.width:s),height:t.height||(1!==c?i.height:h)}),g=p.width,f=p.height;g=Math.min(d.width,Math.max(u.width,g)),f=Math.min(d.height,Math.max(u.height,f));var m=document.createElement("canvas"),v=m.getContext("2d");m.width=gt(g),m.height=gt(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,g,f);var w=t.imageSmoothingEnabled,y=void 0===w||w,b=t.imageSmoothingQuality;v.imageSmoothingEnabled=y,b&&(v.imageSmoothingQuality=b);var x,M,C,E,B,T,D=i.width,A=i.height,N=r,k=a;N<=-s||N>D?(N=0,x=0,C=0,B=0):N<=0?(C=-N,N=0,B=x=Math.min(D,s+N)):N<=D&&(C=0,B=x=Math.min(s,D-N)),x<=0||k<=-h||k>A?(k=0,M=0,E=0,T=0):k<=0?(E=-k,k=0,T=M=Math.min(A,h+k)):k<=A&&(E=0,T=M=Math.min(h,A-k));var R=[N,k,x,M];if(B>0&&T>0){var I=g/s;R.push(C*I,E*I,B*I,T*I)}return v.drawImage.apply(v,[i].concat(o(R.map((function(t){return Math.floor(gt(t))}))))),m},setAspectRatio:function(t){var e=this.options;return this.disabled||rt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===P,a=e.movable&&t===S;t=r||a?t:O,e.dragMode=t,Ct(i,I,t),yt(i,B,r),yt(i,R,a),e.cropBoxMovable||(Ct(n,I,t),yt(n,B,r),yt(n,R,a))}return this}},$t=c.Cropper,_t=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,t),!e||!G.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=ut({},tt,st(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return e=t,a=[{key:"noConflict",value:function(){return window.Cropper=$t,t}},{key:"setDefaults",value:function(t){ut(tt,st(t)&&t)}}],(i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e,i,n,r,a=this;if(t){this.url=t,this.imageData={};var o=this.element,s=this.options;if(s.rotatable||s.scalable||(s.checkOrientation=!1),s.checkOrientation&&window.ArrayBuffer)if(V.test(t))Z.test(t)?this.read((e=t.replace(Yt,""),i=atob(e),n=new ArrayBuffer(i.length),dt(r=new Uint8Array(n),(function(t,e){r[e]=i.charCodeAt(e)})),n)):this.clone();else{var h=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=h,h.onabort=c,h.onerror=c,h.ontimeout=c,h.onprogress=function(){h.getResponseHeader("content-type")!==J&&h.abort()},h.onload=function(){a.read(h.response)},h.onloadend=function(){a.reloading=!1,a.xhr=null},s.checkCrossOrigin&&It(t)&&o.crossOrigin&&(t=Lt(t)),h.open("GET",t,!0),h.responseType="arraybuffer",h.withCredentials="use-credentials"===o.crossOrigin,h.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=Ut(t),r=0,a=1,o=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(zt.apply(null,lt(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,J);var s=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);r=s.rotate,a=s.scaleX,o=s.scaleY}e.rotatable&&(i.rotate=r),e.scalable&&(i.scaleX=a,i.scaleY=o),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&It(e)&&(i||(i="anonymous"),n=Lt(e)),this.crossOrigin=i,this.crossOriginUrl=n;var r=document.createElement("img");i&&(r.crossOrigin=i),r.src=n||e,r.alt=t.alt||"The image to crop",this.image=r,r.onload=this.start.bind(this),r.onerror=this.stop.bind(this),vt(r,A),t.parentNode.insertBefore(r,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),n=function(e,i){ut(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=ut({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var r=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=r,r.onload=function(){n(r.width,r.height),i||a.removeChild(r)},r.src=e.src,i||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(r))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,r=document.createElement("div");r.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var a=r.querySelector(".".concat(u,"-container")),o=a.querySelector(".".concat(u,"-canvas")),s=a.querySelector(".".concat(u,"-drag-box")),h=a.querySelector(".".concat(u,"-crop-box")),c=h.querySelector(".".concat(u,"-face"));this.container=n,this.cropper=a,this.canvas=o,this.dragBox=s,this.cropBox=h,this.viewBox=a.querySelector(".".concat(u,"-view-box")),this.face=c,o.appendChild(i),vt(t,D),n.insertBefore(a,t.nextSibling),wt(i,A),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,vt(h,D),e.guides||vt(h.getElementsByClassName("".concat(u,"-dashed")),D),e.center||vt(h.getElementsByClassName("".concat(u,"-center")),D),e.background&&vt(a,"".concat(u,"-bg")),e.highlight||vt(c,N),e.cropBoxMovable&&(vt(c,R),Ct(c,I,p)),e.cropBoxResizable||(vt(h.getElementsByClassName("".concat(u,"-line")),D),vt(h.getElementsByClassName("".concat(u,"-point")),D)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),ht(e.ready)&&Dt(t,K,e.ready,{once:!0}),At(t,K)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),wt(this.element,D)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&r(e.prototype,i),a&&r(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t;var e,i,a}();return ut(_t.prototype,Wt,jt,Xt,Ft,Kt,qt),_t}()},65987:t=>{"use strict";var e={single_source_shortest_paths:function(t,i,n){var r={},a={};a[i]=0;var o,s,h,c,l,d,u,p=e.PriorityQueue.make();for(p.push(i,0);!p.empty();)for(h in s=(o=p.pop()).value,c=o.cost,l=t[s]||{})l.hasOwnProperty(h)&&(d=c+l[h],u=a[h],(void 0===a[h]||u>d)&&(a[h]=d,p.push(h,d),r[h]=s));if(void 0!==n&&void 0===a[n]){var g=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(g)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(t){var i,n=e.PriorityQueue,r={};for(i in t=t||{},n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var i={value:t,cost:e};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},62378:t=>{"use strict";t.exports=function(t){for(var e=[],i=t.length,n=0;n<i;n++){var r=t.charCodeAt(n);if(r>=55296&&r<=56319&&i>n+1){var a=t.charCodeAt(n+1);a>=56320&&a<=57343&&(r=1024*(r-55296)+a-56320+65536,n+=1)}r<128?e.push(r):r<2048?(e.push(r>>6|192),e.push(63&r|128)):r<55296||r>=57344&&r<65536?(e.push(r>>12|224),e.push(r>>6&63|128),e.push(63&r|128)):r>=65536&&r<=1114111?(e.push(r>>18|240),e.push(r>>12&63|128),e.push(r>>6&63|128),e.push(63&r|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}},92592:(t,e,i)=>{const n=i(47138),r=i(95115),a=i(6907),o=i(93776);function s(t,e,i,a,o){const s=[].slice.call(arguments,1),h=s.length,c="function"==typeof s[h-1];if(!c&&!n())throw new Error("Callback required as last argument");if(!c){if(h<1)throw new Error("Too few arguments provided");return 1===h?(i=e,e=a=void 0):2!==h||e.getContext||(a=i,i=e,e=void 0),new Promise((function(n,o){try{const o=r.create(i,a);n(t(o,e,a))}catch(t){o(t)}}))}if(h<2)throw new Error("Too few arguments provided");2===h?(o=i,i=e,e=a=void 0):3===h&&(e.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=i,i=e,e=void 0));try{const n=r.create(i,a);o(null,t(n,e,a))}catch(t){o(t)}}r.create,e.rT=s.bind(null,a.render),e.hz=s.bind(null,a.renderToDataURL),e.toString=s.bind(null,(function(t,e,i){return o.render(t,i)}))},47138:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},21845:(t,e,i)=>{const n=i(10242).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,i=n(t),r=145===i?26:2*Math.ceil((i-13)/(2*e-2)),a=[i-7];for(let t=1;t<e-1;t++)a[t]=a[t-1]-r;return a.push(6),a.reverse()},e.getPositions=function(t){const i=[],n=e.getRowColCoords(t),r=n.length;for(let t=0;t<r;t++)for(let e=0;e<r;e++)0===t&&0===e||0===t&&e===r-1||t===r-1&&0===e||i.push([n[t],n[e]]);return i}},8260:(t,e,i)=>{const n=i(76910),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(t){this.mode=n.ALPHANUMERIC,this.data=t}a.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let i=45*r.indexOf(this.data[e]);i+=r.indexOf(this.data[e+1]),t.put(i,11)}this.data.length%2&&t.put(r.indexOf(this.data[e]),6)},t.exports=a},97245:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let i=0;i<e;i++)this.putBit(1==(t>>>e-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},73280:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,i,n){const r=t*this.size+e;this.data[r]=i,n&&(this.reservedBit[r]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},43424:(t,e,i)=>{const n=i(62378),r=i(76910);function a(t){this.mode=r.BYTE,"string"==typeof t&&(t=n(t)),this.data=new Uint8Array(t)}a.getBitsLength=function(t){return 8*t},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)},t.exports=a},26245:(t,e,i)=>{const n=i(64908),r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case n.L:return r[4*(t-1)+0];case n.M:return r[4*(t-1)+1];case n.Q:return r[4*(t-1)+2];case n.H:return r[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return a[4*(t-1)+0];case n.M:return a[4*(t-1)+1];case n.Q:return a[4*(t-1)+2];case n.H:return a[4*(t-1)+3];default:return}}},64908:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return i}}},76526:(t,e,i)=>{const n=i(10242).getSymbolSize;e.getPositions=function(t){const e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},61642:(t,e,i)=>{const n=i(10242),r=n.getBCHDigit(1335);e.getEncodedBits=function(t,e){const i=t.bit<<3|e;let a=i<<10;for(;n.getBCHDigit(a)-r>=0;)a^=1335<<n.getBCHDigit(a)-r;return 21522^(i<<10|a)}},69729:(t,e)=>{const i=new Uint8Array(512),n=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)i[e]=t,n[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)i[t]=i[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return n[t]},e.exp=function(t){return i[t]},e.mul=function(t,e){return 0===t||0===e?0:i[n[t]+n[e]]}},35442:(t,e,i)=>{const n=i(76910),r=i(10242);function a(t){this.mode=n.KANJI,this.data=t}a.getBitsLength=function(t){return 13*t},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let i=r.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),t.put(i,13)}},t.exports=a},27126:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function i(t,i,n){switch(t){case e.Patterns.PATTERN000:return(i+n)%2==0;case e.Patterns.PATTERN001:return i%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(i+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return i*n%2+i*n%3==0;case e.Patterns.PATTERN110:return(i*n%2+i*n%3)%2==0;case e.Patterns.PATTERN111:return(i*n%3+(i+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let i=0,n=0,r=0,a=null,o=null;for(let s=0;s<e;s++){n=r=0,a=o=null;for(let h=0;h<e;h++){let e=t.get(s,h);e===a?n++:(n>=5&&(i+=n-5+3),a=e,n=1),e=t.get(h,s),e===o?r++:(r>=5&&(i+=r-5+3),o=e,r=1)}n>=5&&(i+=n-5+3),r>=5&&(i+=r-5+3)}return i},e.getPenaltyN2=function(t){const e=t.size;let i=0;for(let n=0;n<e-1;n++)for(let r=0;r<e-1;r++){const e=t.get(n,r)+t.get(n,r+1)+t.get(n+1,r)+t.get(n+1,r+1);4!==e&&0!==e||i++}return 3*i},e.getPenaltyN3=function(t){const e=t.size;let i=0,n=0,r=0;for(let a=0;a<e;a++){n=r=0;for(let o=0;o<e;o++)n=n<<1&2047|t.get(a,o),o>=10&&(1488===n||93===n)&&i++,r=r<<1&2047|t.get(o,a),o>=10&&(1488===r||93===r)&&i++}return 40*i},e.getPenaltyN4=function(t){let e=0;const i=t.data.length;for(let n=0;n<i;n++)e+=t.data[n];return 10*Math.abs(Math.ceil(100*e/i/5)-10)},e.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let a=0;a<n;a++)e.isReserved(a,r)||e.xor(a,r,i(t,a,r))},e.getBestMask=function(t,i){const n=Object.keys(e.Patterns).length;let r=0,a=1/0;for(let o=0;o<n;o++){i(o),e.applyMask(o,t);const n=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),n<a&&(a=n,r=o)}return r}},76910:(t,e,i)=>{const n=i(43114),r=i(7007);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return r.testNumeric(t)?e.NUMERIC:r.testAlphanumeric(t)?e.ALPHANUMERIC:r.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return i}}},41085:(t,e,i)=>{const n=i(76910);function r(t){this.mode=n.NUMERIC,this.data=t.toString()}r.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let e,i,n;for(e=0;e+3<=this.data.length;e+=3)i=this.data.substr(e,3),n=parseInt(i,10),t.put(n,10);const r=this.data.length-e;r>0&&(i=this.data.substr(e),n=parseInt(i,10),t.put(n,3*r+1))},t.exports=r},26143:(t,e,i)=>{const n=i(69729);e.mul=function(t,e){const i=new Uint8Array(t.length+e.length-1);for(let r=0;r<t.length;r++)for(let a=0;a<e.length;a++)i[r+a]^=n.mul(t[r],e[a]);return i},e.mod=function(t,e){let i=new Uint8Array(t);for(;i.length-e.length>=0;){const t=i[0];for(let r=0;r<e.length;r++)i[r]^=n.mul(e[r],t);let r=0;for(;r<i.length&&0===i[r];)r++;i=i.slice(r)}return i},e.generateECPolynomial=function(t){let i=new Uint8Array([1]);for(let r=0;r<t;r++)i=e.mul(i,new Uint8Array([1,n.exp(r)]));return i}},95115:(t,e,i)=>{const n=i(10242),r=i(64908),a=i(97245),o=i(73280),s=i(21845),h=i(76526),c=i(27126),l=i(26245),d=i(52882),u=i(23103),p=i(61642),g=i(76910),f=i(16130);function m(t,e,i){const n=t.size,r=p.getEncodedBits(e,i);let a,o;for(a=0;a<15;a++)o=1==(r>>a&1),a<6?t.set(a,8,o,!0):a<8?t.set(a+1,8,o,!0):t.set(n-15+a,8,o,!0),a<8?t.set(8,n-a-1,o,!0):a<9?t.set(8,15-a-1+1,o,!0):t.set(8,15-a-1,o,!0);t.set(n-8,8,1,!0)}function v(t,e,i,r){let p;if(Array.isArray(t))p=f.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let n=e;if(!n){const e=f.rawSplit(t);n=u.getBestVersionForData(e,i)}p=f.fromString(t,n||40)}}const v=u.getBestVersionForData(p,i);if(!v)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<v)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+v+".\n")}else e=v;const w=function(t,e,i){const r=new a;i.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(r)}));const o=8*(n.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const s=(o-r.getLengthInBits())/8;for(let t=0;t<s;t++)r.put(t%2?17:236,8);return function(t,e,i){const r=n.getSymbolTotalCodewords(e),a=r-l.getTotalCodewordsCount(e,i),o=l.getBlocksCount(e,i),s=o-r%o,h=Math.floor(r/o),c=Math.floor(a/o),u=c+1,p=h-c,g=new d(p);let f=0;const m=new Array(o),v=new Array(o);let w=0;const y=new Uint8Array(t.buffer);for(let t=0;t<o;t++){const e=t<s?c:u;m[t]=y.slice(f,f+e),v[t]=g.encode(m[t]),f+=e,w=Math.max(w,e)}const b=new Uint8Array(r);let x,M,C=0;for(x=0;x<w;x++)for(M=0;M<o;M++)x<m[M].length&&(b[C++]=m[M][x]);for(x=0;x<p;x++)for(M=0;M<o;M++)b[C++]=v[M][x];return b}(r,t,e)}(e,i,p),y=n.getSymbolSize(e),b=new o(y);return function(t,e){const i=t.size,n=h.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],a=n[e][1];for(let e=-1;e<=7;e++)if(!(r+e<=-1||i<=r+e))for(let n=-1;n<=7;n++)a+n<=-1||i<=a+n||(e>=0&&e<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===e||6===e)||e>=2&&e<=4&&n>=2&&n<=4?t.set(r+e,a+n,!0,!0):t.set(r+e,a+n,!1,!0))}}(b,e),function(t){const e=t.size;for(let i=8;i<e-8;i++){const e=i%2==0;t.set(i,6,e,!0),t.set(6,i,e,!0)}}(b),function(t,e){const i=s.getPositions(e);for(let e=0;e<i.length;e++){const n=i[e][0],r=i[e][1];for(let e=-2;e<=2;e++)for(let i=-2;i<=2;i++)-2===e||2===e||-2===i||2===i||0===e&&0===i?t.set(n+e,r+i,!0,!0):t.set(n+e,r+i,!1,!0)}}(b,e),m(b,i,0),e>=7&&function(t,e){const i=t.size,n=u.getEncodedBits(e);let r,a,o;for(let e=0;e<18;e++)r=Math.floor(e/3),a=e%3+i-8-3,o=1==(n>>e&1),t.set(r,a,o,!0),t.set(a,r,o,!0)}(b,e),function(t,e){const i=t.size;let n=-1,r=i-1,a=7,o=0;for(let s=i-1;s>0;s-=2)for(6===s&&s--;;){for(let i=0;i<2;i++)if(!t.isReserved(r,s-i)){let n=!1;o<e.length&&(n=1==(e[o]>>>a&1)),t.set(r,s-i,n),a--,-1===a&&(o++,a=7)}if(r+=n,r<0||i<=r){r-=n,n=-n;break}}}(b,w),isNaN(r)&&(r=c.getBestMask(b,m.bind(null,b,i))),c.applyMask(r,b),m(b,i,r),{modules:b,version:e,errorCorrectionLevel:i,maskPattern:r,segments:p}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let i,a,o=r.M;return void 0!==e&&(o=r.from(e.errorCorrectionLevel,r.M),i=u.from(e.version),a=c.from(e.maskPattern),e.toSJISFunc&&n.setToSJISFunction(e.toSJISFunc)),v(t,i,o,a)}},52882:(t,e,i)=>{const n=i(26143);function r(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(t){this.degree=t,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const i=n.mod(e,this.genPoly),r=this.degree-i.length;if(r>0){const t=new Uint8Array(this.degree);return t.set(i,r),t}return i},t.exports=r},7007:(t,e)=>{let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";e.KANJI=new RegExp(i,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(n,"g"),e.NUMERIC=new RegExp("[0-9]+","g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+i+"$"),a=new RegExp("^[0-9]+$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return r.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return o.test(t)}},16130:(t,e,i)=>{const n=i(76910),r=i(41085),a=i(8260),o=i(43424),s=i(35442),h=i(7007),c=i(10242),l=i(65987);function d(t){return unescape(encodeURIComponent(t)).length}function u(t,e,i){const n=[];let r;for(;null!==(r=t.exec(i));)n.push({data:r[0],index:r.index,mode:e,length:r[0].length});return n}function p(t){const e=u(h.NUMERIC,n.NUMERIC,t),i=u(h.ALPHANUMERIC,n.ALPHANUMERIC,t);let r,a;return c.isKanjiModeEnabled()?(r=u(h.BYTE,n.BYTE,t),a=u(h.KANJI,n.KANJI,t)):(r=u(h.BYTE_KANJI,n.BYTE,t),a=[]),e.concat(i,r,a).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function g(t,e){switch(e){case n.NUMERIC:return r.getBitsLength(t);case n.ALPHANUMERIC:return a.getBitsLength(t);case n.KANJI:return s.getBitsLength(t);case n.BYTE:return o.getBitsLength(t)}}function f(t,e){let i;const h=n.getBestModeForData(t);if(i=n.from(e,h),i!==n.BYTE&&i.bit<h.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(i)+".\n Suggested mode is: "+n.toString(h));switch(i!==n.KANJI||c.isKanjiModeEnabled()||(i=n.BYTE),i){case n.NUMERIC:return new r(t);case n.ALPHANUMERIC:return new a(t);case n.KANJI:return new s(t);case n.BYTE:return new o(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(f(e,null)):e.data&&t.push(f(e.data,e.mode)),t}),[])},e.fromString=function(t,i){const r=function(t){const e=[];for(let i=0;i<t.length;i++){const r=t[i];switch(r.mode){case n.NUMERIC:e.push([r,{data:r.data,mode:n.ALPHANUMERIC,length:r.length},{data:r.data,mode:n.BYTE,length:r.length}]);break;case n.ALPHANUMERIC:e.push([r,{data:r.data,mode:n.BYTE,length:r.length}]);break;case n.KANJI:e.push([r,{data:r.data,mode:n.BYTE,length:d(r.data)}]);break;case n.BYTE:e.push([{data:r.data,mode:n.BYTE,length:d(r.data)}])}}return e}(p(t,c.isKanjiModeEnabled())),a=function(t,e){const i={},r={start:{}};let a=["start"];for(let o=0;o<t.length;o++){const s=t[o],h=[];for(let t=0;t<s.length;t++){const c=s[t],l=""+o+t;h.push(l),i[l]={node:c,lastCount:0},r[l]={};for(let t=0;t<a.length;t++){const o=a[t];i[o]&&i[o].node.mode===c.mode?(r[o][l]=g(i[o].lastCount+c.length,c.mode)-g(i[o].lastCount,c.mode),i[o].lastCount+=c.length):(i[o]&&(i[o].lastCount=c.length),r[o][l]=g(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,e))}}a=h}for(let t=0;t<a.length;t++)r[a[t]].end=0;return{map:r,table:i}}(r,i),o=l.find_path(a.map,"start","end"),s=[];for(let t=1;t<o.length-1;t++)s.push(a.table[o[t]].node);return e.fromArray(s.reduce((function(t,e){const i=t.length-1>=0?t[t.length-1]:null;return i&&i.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(p(t,c.isKanjiModeEnabled()))}},10242:(t,e)=>{let i;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return n[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');i=t},e.isKanjiModeEnabled=function(){return void 0!==i},e.toSJIS=function(t){return i(t)}},43114:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},23103:(t,e,i)=>{const n=i(10242),r=i(26245),a=i(64908),o=i(76910),s=i(43114),h=n.getBCHDigit(7973);function c(t,e){return o.getCharCountIndicator(t,e)+4}function l(t,e){let i=0;return t.forEach((function(t){const n=c(t.mode,e);i+=n+t.getBitsLength()})),i}e.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,i){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===i&&(i=o.BYTE);const a=8*(n.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(i===o.MIXED)return a;const h=a-c(i,t);switch(i){case o.NUMERIC:return Math.floor(h/10*3);case o.ALPHANUMERIC:return Math.floor(h/11*2);case o.KANJI:return Math.floor(h/13);case o.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(t,i){let n;const r=a.from(i,a.M);if(Array.isArray(t)){if(t.length>1)return function(t,i){for(let n=1;n<=40;n++)if(l(t,n)<=e.getCapacity(n,i,o.MIXED))return n}(t,r);if(0===t.length)return 1;n=t[0]}else n=t;return function(t,i,n){for(let r=1;r<=40;r++)if(i<=e.getCapacity(r,n,t))return r}(n.mode,n.getLength(),r)},e.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;n.getBCHDigit(e)-h>=0;)e^=7973<<n.getBCHDigit(e)-h;return t<<12|e}},6907:(t,e,i)=>{const n=i(89653);e.render=function(t,e,i){let r=i,a=e;void 0!==r||e&&e.getContext||(r=e,e=void 0),e||(a=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=n.getOptions(r);const o=n.getImageWidth(t.modules.size,r),s=a.getContext("2d"),h=s.createImageData(o,o);return n.qrToImageData(h.data,t,r),function(t,e,i){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=i,e.width=i,e.style.height=i+"px",e.style.width=i+"px"}(s,a,o),s.putImageData(h,0,0),a},e.renderToDataURL=function(t,i,n){let r=n;void 0!==r||i&&i.getContext||(r=i,i=void 0),r||(r={});const a=e.render(t,i,r),o=r.type||"image/png",s=r.rendererOpts||{};return a.toDataURL(o,s.quality)}},93776:(t,e,i)=>{const n=i(89653);function r(t,e){const i=t.a/255,n=e+'="'+t.hex+'"';return i<1?n+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function a(t,e,i){let n=t+e;return void 0!==i&&(n+=" "+i),n}e.render=function(t,e,i){const o=n.getOptions(e),s=t.modules.size,h=t.modules.data,c=s+2*o.margin,l=o.color.light.a?"<path "+r(o.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+r(o.color.dark,"stroke")+' d="'+function(t,e,i){let n="",r=0,o=!1,s=0;for(let h=0;h<t.length;h++){const c=Math.floor(h%e),l=Math.floor(h/e);c||o||(o=!0),t[h]?(s++,h>0&&c>0&&t[h-1]||(n+=o?a("M",c+i,.5+l+i):a("m",r,0),r=0,o=!1),c+1<e&&t[h+1]||(n+=a("h",s),s=0)):r++}return n}(h,s,o.margin)+'"/>',u='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+d+"</svg>\n";return"function"==typeof i&&i(null,p),p}},89653:(t,e)=>{function i(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const i=parseInt(e.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,r=t.scale||4;return{width:n,scale:n?4:r,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,i){const n=e.getScale(t,i);return Math.floor((t+2*i.margin)*n)},e.qrToImageData=function(t,i,n){const r=i.modules.size,a=i.modules.data,o=e.getScale(r,n),s=Math.floor((r+2*n.margin)*o),h=n.margin*o,c=[n.color.light,n.color.dark];for(let e=0;e<s;e++)for(let i=0;i<s;i++){let l=4*(e*s+i),d=n.color.light;e>=h&&i>=h&&e<s-h&&i<s-h&&(d=c[a[Math.floor((e-h)/o)*r+Math.floor((i-h)/o)]?1:0]),t[l++]=d.r,t[l++]=d.g,t[l++]=d.b,t[l]=d.a}}}}]);
3 //# sourceMappingURL=48.b5ecdbc517423af07ca4.js.map