PageSourceSearch

https://assets-ab.periodica.press/site-assets/component---src-page…ucts-gift-index-tsx-840caa0405e4b85808eb.js

js periodica.press collected 2026-10-02 14:59:17 UTC 526,283 bytes, 3 lines download raw bytes

1/*! For license information please see component---src-pages-products-gift-index-tsx-840caa0405e4b85808eb.js.LICENSE.txt */
2(self.webpackChunk_periodica_site=self.webpackChunk_periodica_site||[]).push([[5593],{4607:function(e,t,i){"use strict";i.d(t,{G:function(){return r}});i(14293);const r=e=>e?e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1 "):null},6035:function(e,t,i){"use strict";i.d(t,{OK:function(){return n},vQ:function(){return r}});const r={id:2,text:"Москва",value:2,courier:!0,pickup:!0,name:"Москва",displayOrder:1,region:"Москва"},n="FIVE_POST"},6131:function(e,t,i){var r=i(86403),n=i(41580),s=i(51187),a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=o.test(e);return i||l.test(e)?u(e.slice(2),i?2:8):a.test(e)?NaN:+e}},7212:function(e,t,i){"use strict";var r=i(5613),n=i(1942),s=i(16453),a=i(5234),o=i(5604),l=i(14188),u=i(97964),c=i(48787),d=i(97509),h=s&&s.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!s&&a((function(){h.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,o("Promise")),i=l(e);return this.then(i?function(i){return c(t,e()).then((function(){return i}))}:e,i?function(i){return c(t,e()).then((function(){throw i}))}:e)}}),!n&&l(s)){var p=o("Promise").prototype.finally;h.finally!==p&&d(h,"finally",p,{unsafe:!0})}},7969:function(e){e.exports=function(){var e={},t=e._fns={};return e.emit=function(e,i,r,n,s,a,o){var l=function(e){var i=t[e]?t[e]:[],r=e.indexOf(":"),n=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],s=Object.keys(t),a=0,o=s.length;for(;a<o;a++){var l=s[a];if("*"===l&&(i=i.concat(t[l])),2===n.length&&n[0]===l){i=i.concat(t[l]);break}}return i}(e);l.length&&function(e,t,i){var r=0,n=t.length;for(;r<n&&t[r];r++)t[r].event=e,t[r].apply(t[r],i)}(e,l,[i,r,n,s,a,o])},e.on=function(e,i){t[e]||(t[e]=[]),t[e].push(i)},e.once=function(t,i){this.on(t,(function r(){i.apply(this,arguments),e.off(t,r)}))},e.off=function(e,t){var i=[];if(e&&t)for(var r=this._fns[e],n=0,s=r?r.length:0;n<s;n++)r[n]!==t&&i.push(r[n]);i.length?this._fns[e]=i:delete this._fns[e]},e}},8870:function(e,t,i){var r=i(65650),n=Object.prototype,s=n.hasOwnProperty,a=n.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,o),i=e[o];try{e[o]=void 0;var r=!0}catch(l){}var n=a.call(e);return r&&(t?e[o]=i:delete e[o]),n}},9540:function(e,t,i){e.exports=i(11130)},10876:function(e,t,i){"use strict";i.d(t,{PR:function(){return c},sr:function(){return u}});i(14293),i(31716);var r=i(42722),n=i.n(r),s=i(96885);const a="https://api.periodica.press/api",o={"Content-Type":"application/json","Accept-Version":"v4"},l=["CERT_CUSTOM","CERT_COLLECT_BOOK"],u=async()=>(await n()({method:"GET",url:`${a}/templates/gift_card`,headers:o})).data.filter((e=>-1===l.indexOf(e.name))).map(((e,t)=>({template_id:e.id,slideId:t,image:e.preview_url,backImage:e.back_page_layout,frontLayout:e.preview,isTextEnabled:e.has_text}))),c=async(e,t,i,r,l,u,c,d,h,p,m,g,f,D,y,v)=>{const M=d.replaceAll("\n","<br/>");let b=null;c?b=c:y===s.ND&&v===s.c3&&(b=i);const w={template_id:e,client_newsletter_agreed:m,gift_card_info:{name:t,phone:i,email:r,to_name:l,to_email:u||r,...b&&{to_phone:b},message:M||" "},price:h,...p&&{preview_url:p},...g&&f&&{schedule_info:{date_time:g,timezone:f}},payment_type:D};return(await n()({method:"POST",url:`${a}/gift/order`,data:w,headers:o})).data}},11130:function(e,t,i){var r=i(71676);t.operation=function(e){var i=t.timeouts(e);return new r(i,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var i in e)t[i]=e[i];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<t.retries;n++)r.push(this.createTimeout(n,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(n,t)),r.sort((function(e,t){return e-t})),r},t.createTimeout=function(e,t){var i=t.randomize?Math.random()+1:1,r=Math.round(i*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout)},t.wrap=function(e,i,r){if(i instanceof Array&&(r=i,i=null),!r)for(var n in r=[],e)"function"==typeof e[n]&&r.push(n);for(var s=0;s<r.length;s++){var a=r[s],o=e[a];e[a]=function(r){var n=t.operation(i),s=Array.prototype.slice.call(arguments,1
2),a=s.pop();s.push((function(e){n.retry(e)||(e&&(arguments[0]=n.mainError()),a.apply(this,arguments))})),n.attempt((function(){r.apply(e,s)}))}.bind(e,o),e[a].options=i}}},12239:function(e,t){"use strict";t.A="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuMzMzMDEgMy4zMzMzMUwxMi42NjYzIDEyLjY2NjYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPHBhdGggZD0iTTMuMzMzMDEgMTIuNjY2NkwxMi42NjYzIDMuMzMzMzEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+"},12784:function(e,t,i){var r=i(41580),n=i(94495),s=i(6131),a=Math.max,o=Math.min;e.exports=function(e,t,i){var l,u,c,d,h,p,m=0,g=!1,f=!1,D=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var i=l,r=u;return l=u=void 0,m=t,d=e.apply(r,i)}function v(e){var i=e-p;return void 0===p||i>=t||i<0||f&&e-m>=c}function M(){var e=n();if(v(e))return b(e);h=setTimeout(M,function(e){var i=t-(e-p);return f?o(i,c-(e-m)):i}(e))}function b(e){return h=void 0,D&&l?y(e):(l=u=void 0,d)}function w(){var e=n(),i=v(e);if(l=arguments,u=this,p=e,i){if(void 0===h)return function(e){return m=e,h=setTimeout(M,t),g?y(e):d}(p);if(f)return clearTimeout(h),h=setTimeout(M,t),y(p)}return void 0===h&&(h=setTimeout(M,t)),d}return t=s(t)||0,r(i)&&(g=!!i.leading,c=(f="maxWait"in i)?a(s(i.maxWait)||0,t):c,D="trailing"in i?!!i.trailing:D),w.cancel=function(){void 0!==h&&clearTimeout(h),m=0,l=p=u=h=void 0},w.flush=function(){return void 0===h?d:b(n())},w}},14582:function(e,t,i){"use strict";var r=i(5234),n=i(39123);e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},16453:function(e,t,i){"use strict";var r=i(79117);e.exports=r.Promise},17340:function(e,t,i){"use strict";var r=i(98060).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},17970:function(e,t,i){"use strict";var r=i(14041);t.A=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=r.useRef();return r.useEffect((()=>{t.forEach((e=>{e&&("function"==typeof e?e(n.current):e.current=n.current)}))}),[t]),n}},22609:function(e,t,i){i(36554),i(68472),e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e){return l(e)||u(e)||c(e)||h()}function l(e){if(Array.isArray(e))return d(e)}function u(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function c(e,t){if(e){if("string"==typeof e)return d(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p="undefined"!=typeof window&&void 0!==window.document,m=p?window:{},g=!(!p||!m.document.documentElement)&&"ontouchstart"in m.document.documentElement,f=!!p&&"PointerEvent"in m,D="cropper",y="all",v="crop",M="move",b="zoom",w="e",N="w",E="s",T="n",C="ne",I="nw",F="se",x="sw",A="".concat(D,"-crop"),j="".concat(D,"-disabled"),S="".concat(D,"-hidden"),z="".concat(D,"-hide"),O="".concat(D,"-invisible"),k="".concat(D,"-modal"),P="".concat(D,"-move"),L="".concat(D,"Action"),_="".concat(D,"Preview"),U="crop",B="move",R="none",Y="crop",Q="cropend",H="cropmove",V="cropstart",W="dblclick",Z=g?"touchstart":"mousedown",$=g?"touchmove":"mousemove",G=g?"touchend touchcancel":"mouseup",q=f?"pointerdown":Z,X=f?"pointermove":$,J=f?"pointerup pointercancel":G,K="ready",ee="resize",te="wheel",ie="zoom",re="image/jpeg",ne=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,se=/^data:/,ae=/^data:image\/jpeg;base64,/,oe=/^img|canvas$/i,le={viewMode:0,dragMode:U,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}
vendor: 10,819 bytes, line 2
2,ue='<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>',ce=Number.isNaN||m.isNaN;function de(e){return"number"==typeof e&&!ce(e)}var he=function(e){return e>0&&e<1/0};function pe(e){return void 0===e}function me(t){return"object"===e(t)&&null!==t}var ge=Object.prototype.hasOwnProperty;function fe(e){if(!me(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&ge.call(i,"isPrototypeOf")}catch(r){return!1}}function De(e){return"function"==typeof e}var ye=Array.prototype.slice;function ve(e){return Array.from?Array.from(e):ye.call(e)}function Me(e,t){return e&&De(t)&&(Array.isArray(e)||de(e.length)?ve(e).forEach((function(i,r){t.call(e,i,r,e)})):me(e)&&Object.keys(e).forEach((function(i){t.call(e,e[i],i,e)}))),e}var be=Object.assign||function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return me(e)&&i.length>0&&i.forEach((function(t){me(t)&&Object.keys(t).forEach((function(i){e[i]=t[i]}))})),e},we=/\.\d*(?:0|9){12}\d*$/;function Ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return we.test(e)?Math.round(e*t)/t:e}var Ee=/^width|height|left|top|marginLeft|marginTop$/;function Te(e,t){var i=e.style;Me(t,(function(e,t){Ee.test(t)&&de(e)&&(e="".concat(e,"px")),i[t]=e}))}function Ce(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Ie(e,t){if(t)if(de(e.length))Me(e,(function(e){Ie(e,t)}));else if(e.classList)e.classList.add(t);else{var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function Fe(e,t){t&&(de(e.length)?Me(e,(function(e){Fe(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function xe(e,t,i){t&&(de(e.length)?Me(e,(function(e){xe(e,t,i)})):i?Ie(e,t):Fe(e,t))}var Ae=/([a-z\d])([A-Z])/g;function je(e){return e.replace(Ae,"$1-$2").toLowerCase()}function Se(e,t){return me(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(je(t)))}function ze(e,t,i){me(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(je(t)),i)}function Oe(e,t){if(me(e[t]))try{delete e[t]}catch(i){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(i){e.dataset[t]=void 0}else e.removeAttribute("data-".concat(je(t)))}var ke=/\s\s*/,Pe=function(){var e=!1;if(p){var t=!1,i=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});m.addEventListener("test",i,r),m.removeEventListener("test",i,r)}return e}();function Le(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;t.trim().split(ke).forEach((function(t){if(!Pe){var s=e.listeners;s&&s[t]&&s[t][i]&&(n=s[t][i],delete s[t][i],0===Object.keys(s[t]).length&&delete s[t],0===Object.keys(s).length&&delete e.listeners)}e.removeEventListener(t,n,r)}))}function _e(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;t.trim().split(ke).forEach((function(t){if(r.once&&!Pe){var s=e.listeners,a=void 0===s?{}:s;n=function(){delete a[t][i],e.removeEventListener(t,n,r);for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];i.apply(e,o)},a[t]||(a[t]={}),a[t][i]&&e.removeEventListener(t,a[t][i],r),a[t][i]=n,e.listeners=a}e.addEventListener(t,n,r)}))}function Ue(e,t,i){var r;return De(Event)&&De(CustomEvent)?r=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,i),e.dispatchEvent(r)}function Be(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Re=m.location,Ye=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Qe(e){var t=e.match(Ye);return null!==t&&(t[1]!==Re.protocol||t[2]!==Re.hostname||t[3]!==Re.port)}function He(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function Ve(e){var t=e.rotate,i=e.scaleX,r=e.scaleY,n=e.translateX,s=e.translateY,a=[];de(n)&&0!==n&&a.push("translateX(".concat(n,"px)")),de(s)&&0!==s&&a.push("translateY(".concat(s,"px)")),de(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),de(i)&&1!==i&&a.push("scaleX(".concat(i,")")),de(r)&&1!==r&&a.push("scaleY(".concat(r,")"));var o=a.length?a.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function We(e){var t=a({},e),i=[];return Me(e,(function(e,r){delete t[r],Me(t,(function(t){var r=Math.abs(e.startX-t.startX),n=Math.abs(e.startY-t.startY),s=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),o=Math.sqrt(r*r+n*n),l=(Math.sqrt(s*s+a*a)-o)/o;i.push(l)}))})),i.sort((function(e,t){return Math.abs(e)<Math.abs(t)})),i[0]}function Ze(e,t){var i=e.pageX,r=e.pageY,n={endX:i,endY:r};return t?n:a({startX:i,startY:r},n)}function $e(e){var t=0,i=0,r=0;return Me(e,(function(e){var n=e.startX,s=e.startY;t+=n,i+=s,r+=1})),{pageX:t/=r,pageY:i/=r}}function Ge(e){var t=e.aspectRatio,i=e.height,r=e.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",s=he(r),a=he(i);if(s&&a){var o=i*t;"contain"===n&&o>r||"cover"===n&&o<r?i=r/t:r=i*t}else s?i=r/t:a&&(r=i*t);return{width:r,height:i}}function qe(e){var t=e.width,i=e.height,r=e.degree;if(90==(r=Math.abs(r)%180))return{width:i,height:t};var n=r%90*Math.PI/180,s=Math.sin(n),a=Math.cos(n),o=t*a+i*s,l=t*s+i*a;return r>90?{width:l,height:o}:{width:o,height:l}}function Xe(e,t,i,r){var n=t.aspectRatio,s=t.naturalWidth,a=t.naturalHeight,l=t.rotate,u=void 0===l?0:l,c=t.scaleX,d=void 0===c?1:c,h=t.scaleY,p=void 0===h?1:h,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,D=r.fillColor,y=void 0===D?"transparent":D,v=r.imageSmoothingEnabled,M=void 0===v||v,b=r.imageSmoothingQuality,w=void 0===b?"low":b,N=r.maxWidth,E=void 0===N?1/0:N,T=r.maxHeight,C=void 0===T?1/0:T,I=r.minWidth,F=void 0===I?0:I,x=r.minHeight,A=void 0===x?0:x,j=document.createElement("canvas"),S=j.getContext("2d"),z=Ge({aspectRatio:m,width:E,height:C}),O=Ge({aspectRatio:m,width:F,height:A},"cover"),k=Math.min(z.width,Math.max(O.width,g)),P=Math.min(z.height,Math.max(O.height,f)),L=Ge({aspectRatio:n,width:E,height:C}),_=Ge({aspectRatio:n,width:F,height:A},"cover"),U=Math.min(L.width,Math.max(_.width,s)),B=Math.min(L.height,Math.max(_.height,a)),R=[-U/2,-B/2,U,B];return j.width=Ne(k),j.height=Ne(P),S.fillStyle=y,S.fillRect(0,0,k,P),S.save(),S.translate(k/2,P/2),S.rotate(u*Math.PI/180),S.scale(d,p),S.imageSmoothingEnabled=M,S.imageSmoothingQuality=w,S.drawImage.apply(S,[e].concat(o(R.map((function(e){return Math.floor(Ne(e))}))))),S.restore(),j}var Je=String.fromCharCode;function Ke(e,t,i){var r="";i+=t;for(var n=t;n<i;n+=1)r+=Je(e.getUint8(n));return r}var et=/^data:.*,/;function tt(e){var t=e.replace(et,""),i=atob(t),r=new ArrayBuffer(i.length),n=new Uint8Array(r);return Me(n,(function(e,t){n[t]=i.charCodeAt(t)})),r}function it(e,t){for(var i=[],r=8192,n=new Uint8Array(e);n.length>0;)i.push(Je.apply(null,ve(n.subarray(0,r)))),n=n.subarray(r);return"data:".concat(t,";base64,").concat(btoa(i.join("")))}function rt(e){var t,i=new DataView(e);try{var r,n,s;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var a=i.byteLength,o=2;o+1<a;){if(255===i.getUint8(o)&&225===i.getUint8(o+1)){n=o;break}o+=1}if(n){var l=n+10;if("Exif"===Ke(i,n+4,4)){var u=i.getUint16(l);if(((r=18761===u)||19789===u)&&42===i.getUint16(l+2,r)){var c=i.getUint32(l+4,r);c>=8&&(s=l+c)}}}if(s){var d,h,p=i.getUint16(s,r);for(h=0;h<p;h+=1)if(d=s+12*h+2,274===i.getUint16(d,r)){d+=8,t=i.getUint16(d,r),i.setUint16(d,1,r);break}}}catch(m){t=1}return t}function nt(e){var t=0,i=1,r=1;switch(e){case 2:i=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,i=-1;break;case 8:t=-90}return{rotate:t,scaleX:i,scaleY:r}}var st={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,i=this.container,r=this.cropper;Ie(r,S),Fe(e,S);var n={width:Math.max(i.offsetWidth,Number(t.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(t.minContainerHeight)||100)};this.containerData=n,Te(r,{width:n.width,height:n.height}),Ie(e,S),Fe(r,S)},initCanvas:function(){var e=this.containerData,t=this.imageData,i=this.options.viewMode,r=Math.abs(t.rotate)%180==90,n=r?t.naturalHeight:t.naturalWidth,s=r?t.naturalWidth:t.naturalHeight,a=n/s,o=e.width,l=e.height;e.height*a>e.width?3===i?o=e.height*a:l=e.width/a:3===i?l=e.width/a:o=e.height*a;var u={aspectRatio:a,naturalWidth:n,naturalHeight:s,width:o,height:l};u.left=(e.width-o)/2,u.top=(e.height-l)/2,u.oldLeft=u.left,u.oldTop=u.top,this.canvasData=u,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=be({},t),this.initialCanvasData=be({},u)},limitCanvas:function(e,t){var i=this.options,r=this.containerData,n=this.canvasData,s=this.cropBoxData,a=i.viewMode,o=n.aspectRatio,l=this.cropped&&s;if(e){var u=Number(i.minCanvasWidth)||0,c=Number(i.minCanvasHeight)||0;a>1?(u=Math.max(u,r.width),c=Math.max(c,r.height),3===a&&(c*o>u?u=c*o:c=u/o)):a>0&&(u?u=Math.max(u,l?s.width:0):c?c=Math.max(c,l?s.height:0):l&&(u=s.width,(c=s.height)*o>u?u=c*o:c=u/o));var d=Ge({aspectRatio:o,width:u,height:c});u=d.width,c=d.height,n.minWidth=u,n.minHeight=c,n.maxWidth=1/0,n.maxHeight=1/0}if(t)if(a>(l?0:1)){var h=r.width-n.width,p=r.height-n.height;n.minLeft=Math.min(0,h),n.minTop=Math.min(0,p),n.maxLeft=Math.max(0,h),n.maxTop=Math.max(0,p),l&&this.limited&&(n.minLeft=Math.min(s.left,s.left+(s.width-n.width)),n.minTop=Math.min(s.top,s.top+(s.height-n.height)),n.maxLeft=s.left,n.maxTop=s.top,2===a&&(n.width>=r.width&&(n.minLeft=Math.min(0,h),n.maxLeft=Math.max(0,h)),n.height>
vendor: 8,605 bytes, line 2
2=r.height&&(n.minTop=Math.min(0,p),n.maxTop=Math.max(0,p))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=r.width,n.maxTop=r.height},renderCanvas:function(e,t){var i=this.canvasData,r=this.imageData;if(t){var n=qe({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),s=n.width,a=n.height,o=i.width*(s/i.naturalWidth),l=i.height*(a/i.naturalHeight);i.left-=(o-i.width)/2,i.top-=(l-i.height)/2,i.width=o,i.height=l,i.aspectRatio=s/a,i.naturalWidth=s,i.naturalHeight=a,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,Te(this.canvas,be({width:i.width,height:i.height},Ve({translateX:i.left,translateY:i.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,i=this.imageData,r=i.naturalWidth*(t.width/t.naturalWidth),n=i.naturalHeight*(t.height/t.naturalHeight);be(i,{width:r,height:n,left:(t.width-r)/2,top:(t.height-n)/2}),Te(this.image,be({width:i.width,height:i.height},Ve(be({translateX:i.left,translateY:i.top},i)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,i=e.aspectRatio||e.initialAspectRatio,r=Number(e.autoCropArea)||.8,n={width:t.width,height:t.height};i&&(t.height*i>t.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*r),n.height=Math.max(n.minHeight,n.height*r),n.left=t.left+(t.width-n.width)/2,n.top=t.top+(t.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=be({},n)},limitCropBox:function(e,t){var i=this.options,r=this.containerData,n=this.canvasData,s=this.cropBoxData,a=this.limited,o=i.aspectRatio;if(e){var l=Number(i.minCropBoxWidth)||0,u=Number(i.minCropBoxHeight)||0,c=a?Math.min(r.width,n.width,n.width+n.left,r.width-n.left):r.width,d=a?Math.min(r.height,n.height,n.height+n.top,r.height-n.top):r.height;l=Math.min(l,r.width),u=Math.min(u,r.height),o&&(l&&u?u*o>l?u=l/o:l=u*o:l?u=l/o:u&&(l=u*o),d*o>c?d=c/o:c=d*o),s.minWidth=Math.min(l,c),s.minHeight=Math.min(u,d),s.maxWidth=c,s.maxHeight=d}t&&(a?(s.minLeft=Math.max(0,n.left),s.minTop=Math.max(0,n.top),s.maxLeft=Math.min(r.width,n.left+n.width)-s.width,s.maxTop=Math.min(r.height,n.top+n.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=r.width-s.width,s.maxTop=r.height-s.height))},renderCropBox:function(){var e=this.options,t=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,e.movable&&e.cropBoxMovable&&ze(this.face,L,i.width>=t.width&&i.height>=t.height?M:y),Te(this.cropBox,be({width:i.width,height:i.height},Ve({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Ue(this.element,Y,this.getData())}},at={initPreview:function(){var e=this.element,t=this.crossOrigin,i=this.options.preview,r=t?this.crossOriginUrl:this.url,n=e.alt||"The image to preview",s=document.createElement("img");if(t&&(s.crossOrigin=t),s.src=r,s.alt=n,this.viewBox.appendChild(s),this.viewBoxImage=s,i){var a=i;"string"==typeof i?a=e.ownerDocument.querySelectorAll(i):i.querySelector&&(a=[i]),this.previews=a,Me(a,(function(e){var i=document.createElement("img");ze(e,_,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(i.crossOrigin=t),i.src=r,i.alt=n,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;"',e.innerHTML="",e.appendChild(i)}))}},resetPreview:function(){Me(this.previews,(function(e){var t=Se(e,_);Te(e,{width:t.width,height:t.height}),e.innerHTML=t.html,Oe(e,_)}))},preview:function(){var e=this.imageData,t=this.canvasData,i=this.cropBoxData,r=i.width,n=i.height,s=e.width,a=e.height,o=i.left-t.left-e.left,l=i.top-t.top-e.top;this.cropped&&!this.disabled&&(Te(this.viewBoxImage,be({width:s,height:a},Ve(be({translateX:-o,translateY:-l},e)))),Me(this.previews,(function(t){var i=Se(t,_),u=i.width,c=i.height,d=u,h=c,p=1;r&&(h=n*(p=u/r)),n&&h>c&&(d=r*(p=c/n),h=c),Te(t,{width:d,height:h}),Te(t.getElementsByTagName("img")[0],be({width:s*p,height:a*p},Ve(be({translateX:-o*p,translateY:-l*p},e))))})))}},ot={bind:function(){var e=this.element,t=this.options,i=this.cropper;De(t.cropstart)&&_e(e,V,t.cropstart),De(t.cropmove)&&_e(e,H,t.cropmove),De(t.cropend)&&_e(e,Q,t.cropend),De(t.crop)&&_e(e,Y,t.crop),De(t.zoom)&&_e(e,ie,t.zoom),_e(i,q,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&_e(i,te,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&_e(i,W,this.onDblclick=this.dblclick.bind(this)),_e(e.ownerDocument,X,this.onCropMove=this.cropMove.bind(this)),_e(e.ownerDocument,J,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&_e(window,ee,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,i=this.cropper;De(t.cropstart)&&Le(e,V,t.cropstart),De(t.cropmove)&&Le(e,H,t.cropmove),De(t.cropend)&&Le(e,Q,t.cropend),De(t.crop)&&Le(e,Y,t.crop),De(t.zoom)&&Le(e,ie,t.zoom),Le(i,q,this.onCropStart),t.zoomable&&t.zoomOnWheel&&Le(i,te,this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&Le(i,W,this.onDblclick),Le(e.ownerDocument,X,this.onCropMove),Le(e.ownerDocument,J,this.onCropEnd),t.responsive&&Le(window,ee,this.onResize)}},lt={resize:function(){if(!this.disabled){var e,t,i=this.options,r=this.container,n=this.containerData,s=r.offsetWidth/n.width;1===s&&r.offsetHeight===n.height||(i.restore&&(e=this.getCanvasData(),t=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(Me(e,(function(t,i){e[i]=t*s}))),this.setCropBoxData(Me(t,(function(e,i){t[i]=e*s})))))}},dblclick:function(){this.disabled||this.options.dragMode===R||this.setDragMode(Ce(this.dragBox,A)?B:U)},wheel:function(e){var t=this,i=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*i,e)))},cropStart:function(e){var t=e.buttons,i=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(de(t)&&1!==t||de(i)&&0!==i||e.ctrlKey))){var r,n=this.options,s=this.pointers;e.changedTouches?Me(e.changedTouches,(function(e){s[e.identifier]=Ze(e)})):s[e.pointerId||0]=Ze(e),r=Object.keys(s).length>1&&n.zoomable&&n.zoomOnTouch?b:Se(e.target,L),ne.test(r)&&!1!==Ue(this.element,V,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,r===v&&(this.cropping=!0,Ie(this.dragBox,k)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var i=this.pointers;e.preventDefault(),!1!==Ue(this.element,H,{originalEvent:e,action:t})&&(e.changedTouches?Me(e.changedTouches,(function(e){be(i[e.identifier]||{},Ze(e,!0))})):be(i[e.pointerId||0]||{},Ze(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,i=this.pointers;e.changedTouches?Me(e.changedTouches,(function(e){delete i[e.identifier]})):delete i[e.pointerId||0],t&&(e.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,xe(this.dragBox,k,this.cropped&&this.options.modal)),Ue(this.element,Q,{originalEvent:e,action:t}))}}},ut={change:function(e){var t,i=this.options,r=this.canvasData,n=this.containerData,s=this.cropBoxData,a=this.pointers,o=this.action,l=i.aspectRatio,u=s.left,c=s.top,d=s.width,h=s.height,p=u+d,m=c+h,g=0,f=0,D=n.width,A=n.height,j=!0;!l&&e.shiftKey&&(l=d&&h?d/h:1),this.limited&&(g=s.minLeft,f=s.minTop,D=g+Math.min(n.width,r.width,r.left+r.width),A=f+Math.min(n.height,r.height,r.top+r.height));
vendor: 11,896 bytes, line 2
2var z=a[Object.keys(a)[0]],O={x:z.endX-z.startX,y:z.endY-z.startY},k=function(e){switch(e){case w:p+O.x>D&&(O.x=D-p);break;case N:u+O.x<g&&(O.x=g-u);break;case T:c+O.y<f&&(O.y=f-c);break;case E:m+O.y>A&&(O.y=A-m)}};switch(o){case y:u+=O.x,c+=O.y;break;case w:if(O.x>=0&&(p>=D||l&&(c<=f||m>=A))){j=!1;break}k(w),(d+=O.x)<0&&(o=N,u-=d=-d),l&&(h=d/l,c+=(s.height-h)/2);break;case T:if(O.y<=0&&(c<=f||l&&(u<=g||p>=D))){j=!1;break}k(T),h-=O.y,c+=O.y,h<0&&(o=E,c-=h=-h),l&&(d=h*l,u+=(s.width-d)/2);break;case N:if(O.x<=0&&(u<=g||l&&(c<=f||m>=A))){j=!1;break}k(N),d-=O.x,u+=O.x,d<0&&(o=w,u-=d=-d),l&&(h=d/l,c+=(s.height-h)/2);break;case E:if(O.y>=0&&(m>=A||l&&(u<=g||p>=D))){j=!1;break}k(E),(h+=O.y)<0&&(o=T,c-=h=-h),l&&(d=h*l,u+=(s.width-d)/2);break;case C:if(l){if(O.y<=0&&(c<=f||p>=D)){j=!1;break}k(T),h-=O.y,c+=O.y,d=h*l}else k(T),k(w),O.x>=0?p<D?d+=O.x:O.y<=0&&c<=f&&(j=!1):d+=O.x,O.y<=0?c>f&&(h-=O.y,c+=O.y):(h-=O.y,c+=O.y);d<0&&h<0?(o=x,c-=h=-h,u-=d=-d):d<0?(o=I,u-=d=-d):h<0&&(o=F,c-=h=-h);break;case I:if(l){if(O.y<=0&&(c<=f||u<=g)){j=!1;break}k(T),h-=O.y,c+=O.y,d=h*l,u+=s.width-d}else k(T),k(N),O.x<=0?u>g?(d-=O.x,u+=O.x):O.y<=0&&c<=f&&(j=!1):(d-=O.x,u+=O.x),O.y<=0?c>f&&(h-=O.y,c+=O.y):(h-=O.y,c+=O.y);d<0&&h<0?(o=F,c-=h=-h,u-=d=-d):d<0?(o=C,u-=d=-d):h<0&&(o=x,c-=h=-h);break;case x:if(l){if(O.x<=0&&(u<=g||m>=A)){j=!1;break}k(N),d-=O.x,u+=O.x,h=d/l}else k(E),k(N),O.x<=0?u>g?(d-=O.x,u+=O.x):O.y>=0&&m>=A&&(j=!1):(d-=O.x,u+=O.x),O.y>=0?m<A&&(h+=O.y):h+=O.y;d<0&&h<0?(o=C,c-=h=-h,u-=d=-d):d<0?(o=F,u-=d=-d):h<0&&(o=I,c-=h=-h);break;case F:if(l){if(O.x>=0&&(p>=D||m>=A)){j=!1;break}k(w),h=(d+=O.x)/l}else k(E),k(w),O.x>=0?p<D?d+=O.x:O.y>=0&&m>=A&&(j=!1):d+=O.x,O.y>=0?m<A&&(h+=O.y):h+=O.y;d<0&&h<0?(o=I,c-=h=-h,u-=d=-d):d<0?(o=x,u-=d=-d):h<0&&(o=C,c-=h=-h);break;case M:this.move(O.x,O.y),j=!1;break;case b:this.zoom(We(a),e),j=!1;break;case v:if(!O.x||!O.y){j=!1;break}t=Be(this.cropper),u=z.startX-t.left,c=z.startY-t.top,d=s.minWidth,h=s.minHeight,O.x>0?o=O.y>0?F:C:O.x<0&&(u-=d,o=O.y>0?x:I),O.y<0&&(c-=h),this.cropped||(Fe(this.cropBox,S),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}j&&(s.width=d,s.height=h,s.left=u,s.top=c,this.action=o,this.renderCropBox()),Me(a,(function(e){e.startX=e.endX,e.startY=e.endY}))}},ct={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Ie(this.dragBox,k),Fe(this.cropBox,S),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=be({},this.initialImageData),this.canvasData=be({},this.initialCanvasData),this.cropBoxData=be({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(be(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Fe(this.dragBox,k),Ie(this.cropBox,S)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,Me(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Fe(this.cropper,j)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Ie(this.cropper,j)),this},destroy:function(){var e=this.element;return e[D]?(e[D]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.canvasData,r=i.left,n=i.top;return this.moveTo(pe(e)?e:r+Number(e),pe(t)?t:n+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(de(e)&&(i.left=e,r=!0),de(t)&&(i.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var i=this.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,null,t)},zoomTo:function(e,t,i){var r=this.options,n=this.canvasData,s=n.width,a=n.height,o=n.naturalWidth,l=n.naturalHeight;if((e=Number(e))>=0&&this.ready&&!this.disabled&&r.zoomable){var u=o*e,c=l*e;if(!1===Ue(this.element,ie,{ratio:e,oldRatio:s/o,originalEvent:i}))return this;if(i){var d=this.pointers,h=Be(this.cropper),p=d&&Object.keys(d).length?$e(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(u-s)*((p.pageX-h.left-n.left)/s),n.top-=(c-a)*((p.pageY-h.top-n.top)/a)}else fe(t)&&de(t.x)&&de(t.y)?(n.left-=(u-s)*((t.x-n.left)/s),n.top-=(c-a)*((t.y-n.top)/a)):(n.left-=(u-s)/2,n.top-=(c-a)/2);n.width=u,n.height=c,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return de(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,de(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(de(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(de(e)&&(i.scaleX=e,r=!0),de(t)&&(i.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,r=this.imageData,n=this.canvasData,s=this.cropBoxData;if(this.ready&&this.cropped){e={x:s.left-n.left,y:s.top-n.top,width:s.width,height:s.height};var a=r.width/r.naturalWidth;if(Me(e,(function(t,i){e[i]=t/a})),t){var o=Math.round(e.y+e.height),l=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=l-e.x,e.height=o-e.y}}else e={x:0,y:0,width:0,height:0};return i.rotatable&&(e.rotate=r.rotate||0),i.scalable&&(e.scaleX=r.scaleX||1,e.scaleY=r.scaleY||1),e},setData:function(e){var t=this.options,i=this.imageData,r=this.canvasData,n={};if(this.ready&&!this.disabled&&fe(e)){var s=!1;t.rotatable&&de(e.rotate)&&e.rotate!==i.rotate&&(i.rotate=e.rotate,s=!0),t.scalable&&(de(e.scaleX)&&e.scaleX!==i.scaleX&&(i.scaleX=e.scaleX,s=!0),de(e.scaleY)&&e.scaleY!==i.scaleY&&(i.scaleY=e.scaleY,s=!0)),s&&this.renderCanvas(!0,!0);var a=i.width/i.naturalWidth;de(e.x)&&(n.left=e.x*a+r.left),de(e.y)&&(n.top=e.y*a+r.top),de(e.width)&&(n.width=e.width*a),de(e.height)&&(n.height=e.height*a),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?be({},this.containerData):{}},getImageData:function(){return this.sized?be({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&Me(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){t[i]=e[i]})),t},setCanvasData:function(e){var t=this.canvasData,i=t.aspectRatio;return this.ready&&!this.disabled&&fe(e)&&(de(e.left)&&(t.left=e.left),de(e.top)&&(t.top=e.top),de(e.width)?(t.width=e.width,t.height=e.width/i):de(e.height)&&(t.height=e.height,t.width=e.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,i,r=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&fe(e)&&(de(e.left)&&(r.left=e.left),de(e.top)&&(r.top=e.top),de(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),de(e.height)&&e.height!==r.height&&(i=!0,r.height=e.height),n&&(t?r.height=r.width/n:i&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,i=Xe(this.image,this.imageData,t,e);if(!this.cropped)return i;var r=this.getData(),n=r.x,s=r.y,a=r.width,l=r.height,u=i.width/Math.floor(t.naturalWidth);1!==u&&(n*=u,s*=u,a*=u,l*=u);var c=a/l,d=Ge({aspectRatio:c,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),h=Ge({aspectRatio:c,width:e.minWidth||0,height:e.minHeight||0},"cover"),p=Ge({aspectRatio:c,width:e.width||(1!==u?i.width:a),height:e.height||(1!==u?i.height:l)}),m=p.width,g=p.height;m=Math.min(d.width,Math.max(h.width,m)),g=Math.min(d.height,Math.max(h.height,g));var f=document.createElement("canvas"),D=f.getContext("2d");f.width=Ne(m),f.height=Ne(g),D.fillStyle=e.fillColor||"transparent",D.fillRect(0,0,m,g);var y=e.imageSmoothingEnabled,v=void 0===y||y,M=e.imageSmoothingQuality;D.imageSmoothingEnabled=v,M&&(D.imageSmoothingQuality=M);var b,w,N,E,T,C,I=i.width,F=i.height,x=n,A=s;x<=-a||x>I?(x=0,b=0,N=0,T=0):x<=0?(N=-x,x=0,T=b=Math.min(I,a+x)):x<=I&&(N=0,T=b=Math.min(a,I-x)),b<=0||A<=-l||A>F?(A=0,w=0,E=0,C=0):A<=0?(E=-A,A=0,C=w=Math.min(F,l+A)):A<=F&&(E=0,C=w=Math.min(l,F-A));var j=[x,A,b,w];if(T>0&&C>0){var S=m/a;j.push(N*S,E*S,T*S,C*S)}return D.drawImage.apply(D,[i].concat(o(j.map((function(e){return Math.floor(Ne(e))}))))),f},setAspectRatio:function(e){var t=this.options;return this.disabled||pe(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,i=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var n=e===U,s=t.movable&&e===B;e=n||s?e:R,t.dragMode=e,ze(i,L,e),xe(i,A,n),xe(i,P,s),t.cropBoxMovable||(ze(r,L,e),xe(r,A,n),xe(r,P,s))}return this}},dt=m.Cropper,ht=function(){function e(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,e),!i||!oe.test(i.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=i,this.options=be({},le,fe(r)&&r),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 r(e,[{key:"init",value:function(){var e,t=this.element,i=t.tagName.toLowerCase();if(!t[D]){if(t[D]=this,"img"===i){if(this.isImg=!0,e=t.getAttribute("src")||"",this.originalUrl=e,!e)return;e=t.src}else"canvas"===i&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var i=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(se.test(e))ae.test(e)?this.read(tt(e)):this.clone();else{var n=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=s,n.onerror=s,n.ontimeout=s,n.onprogress=function(){n.getResponseHeader("content-type")!==re&&n.abort()},n.onload=function(){t.read(n.response)},n.onloadend=function(){t.reloading=!1,t.xhr=null},r.checkCrossOrigin&&Qe(e)&&i.crossOrigin&&(e=He(e)),n.open("GET",e),n.responseType="arraybuffer",n.withCredentials="use-credentials"===i.crossOrigin,n.send()}else this.clone()}}},{key:"read",value:function(e){var t=this.options,i=this.imageData,r=rt(e),n=0,s=1,a=1;if(r>1){this.url=it(e,re);var o=nt(r);n=o.rotate,s=o.scaleX,a=o.scaleY}t.rotatable&&(i.rotate=n),t.scalable&&(i.scaleX=s,i.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,i=e.crossOrigin,r=t;this.options.checkCrossOrigin&&Qe(t)&&(i||(i="anonymous"),r=He(t)),this.crossOrigin=i,this.crossOriginUrl=r;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=r||t,n.alt=e.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),Ie(n,z),e.parentNode.insertBefore(n,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var i=m.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(m.navigator.userAgent),r=function(t,i){be(e.imageData,{naturalWi
2dth:t,naturalHeight:i,aspectRatio:t/i}),e.sizing=!1,e.sized=!0,e.build()};if(!t.naturalWidth||i){var n=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){r(n.width,n.height),i||s.removeChild(n)},n.src=t.src,i||(n.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;",s.appendChild(n))}else r(t.naturalWidth,t.naturalHeight)}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var e=this.element,t=this.options,i=this.image,r=e.parentNode,n=document.createElement("div");n.innerHTML=ue;var s=n.querySelector(".".concat(D,"-container")),a=s.querySelector(".".concat(D,"-canvas")),o=s.querySelector(".".concat(D,"-drag-box")),l=s.querySelector(".".concat(D,"-crop-box")),u=l.querySelector(".".concat(D,"-face"));this.container=r,this.cropper=s,this.canvas=a,this.dragBox=o,this.cropBox=l,this.viewBox=s.querySelector(".".concat(D,"-view-box")),this.face=u,a.appendChild(i),Ie(e,S),r.insertBefore(s,e.nextSibling),this.isImg||Fe(i,z),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,Ie(l,S),t.guides||Ie(l.getElementsByClassName("".concat(D,"-dashed")),S),t.center||Ie(l.getElementsByClassName("".concat(D,"-center")),S),t.background&&Ie(s,"".concat(D,"-bg")),t.highlight||Ie(u,O),t.cropBoxMovable&&(Ie(u,P),ze(u,L,y)),t.cropBoxResizable||(Ie(l.getElementsByClassName("".concat(D,"-line")),S),Ie(l.getElementsByClassName("".concat(D,"-point")),S)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),De(t.ready)&&_e(e,K,t.ready,{once:!0}),Ue(e,K)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Fe(this.element,S))}},{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()}}],[{key:"noConflict",value:function(){return window.Cropper=dt,e}},{key:"setDefaults",value:function(e){be(le,fe(e)&&e)}}]),e}();return be(ht.prototype,st,at,ot,lt,ut,ct),ht}()},24307:function(e){"use strict";e.exports=function(e){if("number"!=typeof e||Number.isNaN(e))throw new TypeError("Expected a number, got "+typeof e);const t=e<0,i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";const r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1);e=Number(e/1024**r);const n=i[r];return e>=10||e%1==0?`${(t?"-":"")+e.toFixed(0)} ${n}`:`${(t?"-":"")+e.toFixed(1)} ${n}`}},26988:function(e,t,i){"use strict";i.d(t,{w:function(){return n}});var r=i(14041);function n(){return r.createElement("span",null,"₽")}},29005:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},32222:function(e,t,i){"use strict";var r=i(98060).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},36554:function(e,t,i){"use strict";var r=i(79117),n=i(39944),s=i(47223),a=i(69389),o=i(57584),l=i(83628),u=i(5234),c=r.RangeError,d=r.Int8Array,h=d&&d.prototype,p=h&&h.set,m=s.aTypedArray,g=s.exportTypedArrayMethod,f=!u((function(){var e=new Uint8ClampedArray(2);return n(p,e,{length:1,0:3},1),3!==e[1]})),D=f&&s.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));g("set",(function(e){m(this);var t=o(arguments.length>1?arguments[1]:void 0,1),i=l(e);if(f)return n(p,this,i,t);var r=this.length,s=a(i),u=0;if(s+t>r)throw new c("Wrong length");for(;u<s;)this[t+u]=i[u++]}),!f||D)},39064:function(e,t,i){"use strict";i(48390)},41580:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},44473:function(e,t,i){"use strict";i.d(t,{B:function(){return o}});var r=i(14041),n=i(41059),s=i.n(n),a="styles-module--fullWidthBlock--8f736";function o(e){let{children:t,className:i=""}=e;return r.createElement("div",{className:s()([a,i])},t)}},46298:function(e,t,i){"use strict";i.d(t,{h$:function(){return u},zz:function(){return d},D4:function(){return c}});var r=i(93256);let n=1990;const s=new Date(2025,8,12),a=new Date(2025,8,15);var o,l;o=s,l=a,(0,r.T)(o,new Date)+(0,r.T)(new Date,l)===2&&(n=890);const u=n,c="sfzv-promo-20260522",d=.55*n},46431:function(e,t,i){var r=i(51545),n=/[\/\+\.]/;e.exports=function(e,t){function i(t){var i=r(t,e,n);return i&&i.length>=2}return t?i(t.split(";")[0]):i}},47223:function(e,t,i){"use strict";var r,n,s,a=i(58732),o=i(96893),l=i(79117),u=i(14188),c=i(80831),d=i(74418),h=i(65438),p=i(13174),m=i(88088),g=i(97509),f=i(10997),D=i(4578),y=i(91786),v=i(5054),M=i(4282),b=i(66209),w=i(43086),N=w.enforce,E=w.get,T=l.Int8Array,C=T&&T.prototype,I=l.Uint8ClampedArray,F=I&&I.prototype,x=T&&y(T),A=C&&y(C),j=Object.prototype,S=l.TypeError,z=M("toStringTag"),O=b
2("TYPED_ARRAY_TAG"),k="TypedArrayConstructor",P=a&&!!v&&"Opera"!==h(l.opera),L=!1,_={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},B=function(e){var t=y(e);if(c(t)){var i=E(t);return i&&d(i,k)?i[k]:B(t)}},R=function(e){if(!c(e))return!1;var t=h(e);return d(_,t)||d(U,t)};for(r in _)(s=(n=l[r])&&n.prototype)?N(s)[k]=n:P=!1;for(r in U)(s=(n=l[r])&&n.prototype)&&(N(s)[k]=n);if((!P||!u(x)||x===Function.prototype)&&(x=function(){throw new S("Incorrect invocation")},P))for(r in _)l[r]&&v(l[r],x);if((!P||!A||A===j)&&(A=x.prototype,P))for(r in _)l[r]&&v(l[r].prototype,A);if(P&&y(F)!==A&&v(F,A),o&&!d(A,z))for(r in L=!0,f(A,z,{configurable:!0,get:function(){return c(this)?this[O]:void 0}}),_)l[r]&&m(l[r],O,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:L&&O,aTypedArray:function(e){if(R(e))return e;throw new S("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!v||D(x,e)))return e;throw new S(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,r){if(o){if(i)for(var n in _){var s=l[n];if(s&&d(s.prototype,e))try{delete s.prototype[e]}catch(a){try{s.prototype[e]=t}catch(u){}}}A[e]&&!i||g(A,e,i?t:P&&C[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,i){var r,n;if(o){if(v){if(i)for(r in _)if((n=l[r])&&d(n,e))try{delete n[e]}catch(s){}if(x[e]&&!i)return;try{return g(x,e,i?t:P&&x[e]||t)}catch(s){}}for(r in _)!(n=l[r])||n[e]&&!i||g(n,e,t)}},getTypedArrayConstructor:B,isView:function(e){if(!c(e))return!1;var t=h(e);return"DataView"===t||d(_,t)||d(U,t)},isTypedArray:R,TypedArray:x,TypedArrayPrototype:A}},48390:function(e,t,i){"use strict";var r=i(5613),n=i(4578),s=i(91786),a=i(5054),o=i(98657),l=i(77065),u=i(88088),c=i(39123),d=i(98257),h=i(75382),p=i(38873),m=i(69866),g=i(4282)("toStringTag"),f=Error,D=[].push,y=function(e,t){var i,r=n(v,this);a?i=a(new f,r?s(this):v):(i=r?this:l(v),u(i,g,"Error")),void 0!==t&&u(i,"message",m(t)),h(i,y,i.stack,1),arguments.length>2&&d(i,arguments[2]);var o=[];return p(e,D,{that:o}),u(i,"errors",o),i};a?a(y,f):o(y,f,{name:!0});var v=y.prototype=l(f.prototype,{constructor:c(1,y),message:c(1,""),name:c(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:y})},48787:function(e,t,i){"use strict";var r=i(3770),n=i(80831),s=i(59444);e.exports=function(e,t){if(r(e),n(t)&&t.constructor===e)return t;var i=s.f(e);return(0,i.resolve)(t),i.promise}},51187:function(e,t,i){var r=i(87379),n=i(80547);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==r(e)}},51545:function(e){"use strict";function t(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}t.prototype.match=function(e){var t,i,r=!0,n=this.parts,s=n.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(i=(e||"").split(this.separator),t=0;r&&t<s;t++)"*"!==n[t]&&(r=t<i.length&&n[t]===i[t]);r=r&&i}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},e.exports=function(e,i,r){var n=new t(e,r||/[\/\.]/);return void 0!==i?n.match(i):n}},56965:function(e,t,i){"use strict";i(39064)},57584:function(e,t,i){"use strict";var r=i(80939),n=RangeError;e.exports=function(e,t){var i=r(e);if(i%t)throw new n("Wrong offset");return i}},58732:function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},59444:function(e,t,i){"use strict";var r=i(44977),n=TypeError,s=function(e){var t,i;this.promise=new e((function(e,r){if(void 0!==t||void 0!==i)throw new n("Bad Promise constructor");t=e,i=r})),this.resolve=r(t),this.reject=r(i)};e.exports.f=function(e){return new s(e)}},62030:function(e,t,i){"use strict";i.d(t,{J:function(){return y},H:function(){return D}});var r=i(14041),n=i(41059),s=i.n(n),a=i(93256),o=i(4607),l=i(26988),u=i(46439),c="GiftBonusBlock-module--bonusBlock--b3ecc",d="GiftBonusBlock-module--bonusBlockContent--b6fcf",h="GiftBonusBlock-module--bonusBlockItem--d364a",p="GiftBonusBlock-module--emphasized--5c3a1",m="GiftBonusBlock-module--sale--6a0ce";const g=new Date(2025,5,20),f=new Date(2025,6,1),D=e=>{if((0,a.T)(g,new Date)+(0,a.T)(new Date,f)===2){if(e>=1e4&&e<3e4)return.08;if(e>=3e4&&e<5e4)return.09;if(e>=5e4)return.1}return 0};function y(e){let{sum:t=0,toPay:i=!1}=e;const n=Math.round(D(t)*t);return n?r.createElement("div",{className:s()([c])},r.createElement("div",{className:d},r.createElement("div",{className:s()([h,m])},r.createElement(u.fz,{size:"inherit"},"Вы получите бонус*"),r.createElement(u.fz,{size:"inherit"},"+ ",(0,o.G)(n)," ",r.createElement(l.w,null))),i?r.createElement(r.Fragment,null,r.createElement("div",{className:h},r.createElement(u.fz,{size:"inherit"},"Номинал сертификата"),r.createElement(u.fz,{size:"inherit"},(0,o.G)(t+n)," ",r.createElement(l.w,null))),r.createElement("div",{className:s()([h,p])},r.createElement(u.DZ,{variant:"h3",customTag:"p"},"К оплате"),r.createElement(u.DZ,{variant:"h3",customTag:"p"},(0,o.G)(t)," ",r.createElement(l.w,null)))):r.createElement("div",{className:h},r.createElement(u.DZ,{variant:"h3",customTag:"p"},"Номинал сертификата"),r.createElement(u.DZ,{variant:"h3",customTag:"p"},(0,o.G)(t+n)," ",r.createElement(l.w,null))),r.createElement(u.fz,{size:"small",color:"secondary"},"Дарим дополнительные бонусы при покупке сертификатов! На сумму от 10 000 ₽ — начисляем 8% от номинала, от 30 000 ₽ — 9%, а от 50 000 ₽ и выше — 10%. Чем больше сумма, тем больше бонусов!"))):null}},62945:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},65650:function(e,t,i){var r=i(78942).Symbol;e.exports=r},68472:function(e,t,i){"use strict";var r=i(79117),n=i(95691),s=i(5234),a=i(44977),o=i(9295),l=i(47223),u=i(32222),c=i(84598),d=i(63008),h=i(17340),p=l.aTypedArray,m=l.exp
2ortTypedArrayMethod,g=r.Uint16Array,f=g&&n(g.prototype.sort),D=!(!f||s((function(){f(new g(2),null)}))&&s((function(){f(new g(2),{})}))),y=!!f&&!s((function(){if(d)return d<74;if(u)return u<67;if(c)return!0;if(h)return h<602;var e,t,i=new g(516),r=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,r[e]=e-2*t+3;for(f(i,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(i[e]!==r[e])return!0}));m("sort",(function(e){return void 0!==e&&a(e),y?f(this,e):o(p(this),function(e){return function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i}}(e))}),!y||D)},69866:function(e,t,i){"use strict";var r=i(92618);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},71676:function(e){function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var i=this._timeouts.shift();if(void 0===i){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),i=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),i),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var i=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){i._operationTimeoutCb()}),i._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,i=0,r=0;r<this._errors.length;r++){var n=this._errors[r],s=n.message,a=(e[s]||0)+1;e[s]=a,a>=i&&(t=n,i=a)}return t}},74113:function(e,t,i){"use strict";i.d(t,{h$:function(){return r.h$},x6:function(){return a},ID:function(){return s},BL:function(){return n}});i(6035);var r=i(46298);const n="product-components.page-option",s="product-components.misc-option",a="product-components.any-string-option"},74685:function(e,t,i){"use strict";i.r(t),i.d(t,{Head:function(){return sv},default:function(){return av}});var r=i(14041),n=i.t(r,2),s=i(46242),a=i(12398),o=i(69374),l=i(20289),u=i(27064),c=i(97165),d=i(46439),h=i(19508),p=i(7643),m=(i(14293),i(47010),i(50290));function g(){return Object.assign({},(0,m.q)())}function f(e,t){const i=function(e){y[e]||(y[e]=M?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));return y[e]}(t);return"formatToParts"in i?function(e,t){try{const i=e.formatToParts(t),r=[];for(let e=0;e<i.length;e++){const t=D[i[e].type];void 0!==t&&(r[t]=parseInt(i[e].value,10))}return r}catch(i){if(i instanceof RangeError)return[NaN];throw i}}(i,e):function(e,t){const i=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(i);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}(i,e)}const D={year:0,month:1,day:2,hour:3,minute:4,second:5};const y={},v=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/Ne
2w_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),M="06/25/2014, 00:00:00"===v||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===v;function b(e,t,i,r,n,s,a){const o=new Date(0);return o.setUTCFullYear(e,t,i),o.setUTCHours(r,n,s,a),o}const w=36e5,N={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function E(e,t,i){if(!e)return 0;let r,n,s=N.timezoneZ.exec(e);if(s)return 0;if(s=N.timezoneHH.exec(e),s)return r=parseInt(s[1],10),C(r)?-r*w:NaN;if(s=N.timezoneHHMM.exec(e),s){r=parseInt(s[2],10);const e=parseInt(s[3],10);return C(r,e)?(n=Math.abs(r)*w+6e4*e,"+"===s[1]?-n:n):NaN}if(function(e){if(I[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),I[e]=!0,!0}catch(t){return!1}}(e)){t=new Date(t||Date.now());const r=i?t:function(e){return b(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),n=T(r,e),s=i?n:function(e,t,i){const r=e.getTime();let n=r-t;const s=T(new Date(n),i);if(t===s)return t;n-=s-t;const a=T(new Date(n),i);if(s===a)return s;return Math.max(s,a)}(t,n,e);return-s}return NaN}function T(e,t){const i=f(e,t),r=b(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5],0).getTime();let n=e.getTime();const s=n%1e3;return n-=s>=0?s:1e3+s,r-n}function C(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const I={};function F(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const x=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,A=36e5,j=6e4,S={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:x};function z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const i=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let i,r=S.dateTimePattern.exec(e);r?(t.date=r[1],i=r[3]):(r=S.datePattern.exec(e),r?(t.date=r[1],i=r[2]):(t.date=null,i=e));if(i){const e=S.timeZone.exec(i);e?(t.time=i.replace(e[1],""),t.timeZone=e[1].trim()):t.time=i}return t}(e),{year:n,restDateString:s}=function(e,t){if(e){const i=S.YYY[t],r=S.YYYYY[t];let n=S.YYYY.exec(e)||r.exec(e);if(n){const t=n[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(n=S.YY.exec(e)||i.exec(e),n){const t=n[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,i),a=function(e,t){if(null===t)return null;let i,r,n;if(!e||!e.length)return i=new Date(0),i.setUTCFullYear(t),i;let s=S.MM.exec(e);if(s)return i=new Date(0),r=parseInt(s[1],10)-1,_(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(s=S.DDD.exec(e),s){i=new Date(0);const e=parseInt(s[1],10);return function(e,t){if(t<1)return!1;const i=L(e);if(i&&t>366)return!1;if(!i&&t>365)return!1;return!0}(t,e)?(i.setUTCFullYear(t,0,e),i):new Date(NaN)}if(s=S.MMDD.exec(e),s){i=new Date(0),r=parseInt(s[1],10)-1;const e=parseInt(s[2],10);return _(t,r,e)?(i.setUTCFullYear(t,r,e),i):new Date(NaN)}if(s=S.Www.exec(e),s)return n=parseInt(s[1],10)-1,U(n)?O(t,n):new Date(NaN);if(s=S.WwwD.exec(e),s){n=parseInt(s[1],10)-1;const e=parseInt(s[2],10)-1;return U(n,e)?O(t,n,e):new Date(NaN)}return null}(s,n);if(null===a||isNaN(a.getTime()))return new Date(NaN);if(a){const e=a.getTime();let i,n=0;if(r.time&&(n=function(e){let t,i,r=S.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),B(t)?t%24*A:NaN;if(r=S.HHMM.exec(e),r)return t=parseInt(r[1],10),i=parseFloat(r[2].replace(",",".")),B(t,i)?t%24*A+i*j:NaN;if(r=S.HHMMSS.exec(e),r){t=parseInt(r[1],10),i=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return B(t,i,e)?t%24*A+i*j+1e3*e:NaN}return null}(r.time),null===n||isNaN(n)))return new Date(NaN);if(r.timeZone||t.timeZone){if(i=E(r.timeZone||t.timeZone,new Date(e+n)),isNaN(i))return new Date(NaN)}else i=F(new Date(e+n)),i=F(new Date(e+n+i));return new Date(e+n+i)}return new Date(NaN)}function O(e,t,i){t=t||0,i=i||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const n=7*t+i+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+n),r}const k=[31,28,31,30,31,30,31,31,30,31,30,31],P=[31,29,31,30,31,30,31,31,30,31,30,31];function L(e){return e%400==0||e%4==0&&e%100!=0}function _(e,t,i){if(t<0||t>11)return!1;if(null!=i){if(i<1)return!1;const r=L(e);if(r&&i>P[t])return!1;if(!r&&i>k[t])return!1}return!0}function U(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function B(e,t,i){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==i||!(i<0||i>=60)))}var R=e=>"checkbox"===e.type,Y=e=>e instanceof Date,Q=e=>null==e;const H=e=>"object"==typeof e;var V=e=>!Q(e)&&!Array.isArray(e)&&H(e)&&!Y(e),W=e=>V(e)&&e.target?R(e.target)?e.target.checked:e.target.value:e,Z=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),$="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function G(e){let t;const i=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if($&&(e instanceof Blob||e instanceof FileList)||!i&&!V(e))return e;if(t=i?[]:{},i||(e=>{const t=e.constructor&&e.constructor.prototype;return V(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const i in e)e.hasOwnProperty(i)&&(t[i]=G(e[i]));else t=e}return t}var q=e=>Array.isArray(e)?e.filter(Boolean):[],X=e=>void 0===e,J=(e,t,i)=>{if(!t||!V(e))return i;const r=q(t.split(/[,[\].]+?/)).reduce(((e,t)=>Q(e)?e:e[t]),e);return X(r)||r===e?X(e[t])?i:e[t]:r},K=e=>"boolean"==typeof e,ee=e=>/^\w*$/.test(e),te=e=>q(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ie=(e,t,i)=>{let r=-1;const n=ee(t)?[t]:te(t),s=n.length,a=s-1;for(;++r<s;){const t=n[r];let s=i;if(r!==a){const i=e[t];s=V(i)||Array.isArray(i)?i:isNaN(+n[r+1])?{}:[]}if("__proto__"===t)return;e[t]=s,e=e[t]}return e};const re="blur",ne="focusout",se="change",ae="onBlur",oe="onChange",le="onSubmit",ue="onTouched",ce="all",de="max",he="min",pe="maxLength",me="minLength",ge="pattern",fe="required",De="validate",ye=r.createContext(null),ve=()=>r.useContext(ye);var Me=function(e,t,i){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const n={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(n,s,{get:()=>{const n=s;return t._proxyFormState[n]!==ce&&(t._proxyFormState[n]=!r||ce),i&&(i[n]=!0),e[n]}});return n},be=e=>V(e)&&!Object.keys(e).length,we=(e,t,i,r)=>{i(e);const{name:n,...s}=e;return be(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find((e=>t[e]===(!r||ce)))},Ne=e=>Array.isArray(e)?e:[e],Ee=(e,t,i)=>!e||!t||e===t||Ne(e).some((e=>e&&(i?e===t:e.startsWith(t)||t.startsWith(e))));function Te(e){const t=r.useRef(e);t.current=e,r.useEffect((()=>{const i=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{i&&i.unsubscribe()}}),[e.disabled])}var Ce=e=>"string"==typeof e,Ie=(e,t,i,r,n)=>Ce(e)?(r&&t.watch.add(e),J(i,e,n)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),J(i,e)))):(r&&(t.watchAll=!0),i);function Fe(e){const t=ve(),{name:i,disabled:n,control:s=t.control,shouldUnregister:a}=e,o=Z(s._names.array,i),l=function(e){const t=ve(),{control:i=t.control,name:n,defaultValue:s,disabled:a,exact:o}=e||{},l=r.useRef(n);l.current=n,Te({disabled:a,subject:i._subjects.values,next:e=>{Ee(l.current,e.name,o)&&c(G(Ie(l.current,i._names,e.values||i._formValues,!1,s)))}});const[u,c]=r.useState(i._getWatch(n,s));return r.useEffect((()=>i._removeUnmounted())),u}({control:s,name:i,defaultValue:J(s._formValues,i,J(s._defaultValues,i,e.defaultValue)),exact:!0}),u=function(e){const t=ve(),{control:i=t.control,disabled:n,name:s,exact:a}=e||{},[o,l]=r.useState(i._formState),u=r.useRef(!0),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=r.useRef(s);return d.current=s,Te({disabled:n,next:e=>u.current&&Ee(d.current,e.name,a)&&we(e,c.current,i._updateFormState)&&l({...i._formState,...e}),subject:i._subjects.state}),r.useEffect((()=>
vendor: 14,709 bytes, line 2
2(u.current=!0,c.current.isValid&&i._updateValid(!0),()=>{u.current=!1})),[i]),Me(o,i,c.current,!1)}({control:s,name:i}),c=r.useRef(s.register(i,{...e.rules,value:l,...K(e.disabled)?{disabled:e.disabled}:{}}));return r.useEffect((()=>{const e=s._options.shouldUnregister||a,t=(e,t)=>{const i=J(s._fields,e);i&&i._f&&(i._f.mount=t)};if(t(i,!0),e){const e=G(J(s._options.defaultValues,i));ie(s._defaultValues,i,e),X(J(s._formValues,i))&&ie(s._formValues,i,e)}return()=>{(o?e&&!s._state.action:e)?s.unregister(i):t(i,!1)}}),[i,s,o,a]),r.useEffect((()=>{J(s._fields,i)&&s._updateDisabledField({disabled:n,fields:s._fields,name:i,value:J(s._fields,i)._f.value})}),[n,i,s]),{field:{name:i,value:l,...K(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:r.useCallback((e=>c.current.onChange({target:{value:W(e),name:i},type:se})),[i]),onBlur:r.useCallback((()=>c.current.onBlur({target:{value:J(s._formValues,i),name:i},type:re})),[i,s]),ref:e=>{const t=J(s._fields,i);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(u.errors,i)},isDirty:{enumerable:!0,get:()=>!!J(u.dirtyFields,i)},isTouched:{enumerable:!0,get:()=>!!J(u.touchedFields,i)},isValidating:{enumerable:!0,get:()=>!!J(u.validatingFields,i)},error:{enumerable:!0,get:()=>J(u.errors,i)}})}}const xe=e=>e.render(Fe(e));var Ae=(e,t,i,r,n)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[r]:n||!0}}:{},je=e=>({isOnSubmit:!e||e===le,isOnBlur:e===ae,isOnChange:e===oe,isOnAll:e===ce,isOnTouch:e===ue}),Se=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const ze=(e,t,i,r)=>{for(const n of i||Object.keys(e)){const i=J(e,n);if(i){const{_f:e,...s}=i;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],n)&&!r)break;if(e.ref&&t(e.ref,e.name)&&!r)break;ze(s,t)}else V(s)&&ze(s,t)}}};var Oe=(e,t,i)=>{const r=q(J(e,i));return ie(r,"root",t[i]),ie(e,i,r),e},ke=e=>"file"===e.type,Pe=e=>"function"==typeof e,Le=e=>{if(!$)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},_e=e=>Ce(e),Ue=e=>"radio"===e.type,Be=e=>e instanceof RegExp;const Re={value:!1,isValid:!1},Ye={value:!0,isValid:!0};var Qe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!X(e[0].attributes.value)?X(e[0].value)||""===e[0].value?Ye:{value:e[0].value,isValid:!0}:Ye:Re}return Re};const He={isValid:!1,value:null};var Ve=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),He):He;function We(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"validate";if(_e(e)||Array.isArray(e)&&e.every(_e)||K(e)&&!e)return{type:i,message:_e(e)?e:"",ref:t}}var Ze=e=>V(e)&&!Be(e)?e:{value:e,message:""},$e=async(e,t,i,r,n)=>{const{ref:s,refs:a,required:o,maxLength:l,minLength:u,min:c,max:d,pattern:h,validate:p,name:m,valueAsNumber:g,mount:f,disabled:D}=e._f,y=J(t,m);if(!f||D)return{};const v=a?a[0]:s,M=e=>{r&&v.reportValidity&&(v.setCustomValidity(K(e)?"":e||""),v.reportValidity())},b={},w=Ue(s),N=R(s),E=w||N,T=(g||ke(s))&&X(s.value)&&X(y)||Le(s)&&""===s.value||""===y||Array.isArray(y)&&!y.length,C=Ae.bind(null,m,i,b),I=function(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:pe,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:me;const a=e?t:i;b[m]={type:e?r:n,message:a,ref:s,...C(e?r:n,a)}};if(n?!Array.isArray(y)||!y.length:o&&(!E&&(T||Q(y))||K(y)&&!y||N&&!Qe(a).isValid||w&&!Ve(a).isValid)){const{value:e,message:t}=_e(o)?{value:!!o,message:o}:Ze(o);if(e&&(b[m]={type:fe,message:t,ref:v,...C(fe,t)},!i))return M(t),b}if(!(T||Q(c)&&Q(d))){let e,t;const r=Ze(d),n=Ze(c);if(Q(y)||isNaN(y)){const i=s.valueAsDate||new Date(y),a=e=>new Date((new Date).toDateString()+" "+e),o="time"==s.type,l="week"==s.type;Ce(r.value)&&y&&(e=o?a(y)>a(r.value):l?y>r.value:i>new Date(r.value)),Ce(n.value)&&y&&(t=o?a(y)<a(n.value):l?y<n.value:i<new Date(n.value))}else{const i=s.valueAsNumber||(y?+y:y);Q(r.value)||(e=i>r.value),Q(n.value)||(t=i<n.value)}if((e||t)&&(I(!!e,r.message,n.message,de,he),!i))return M(b[m].message),b}if((l||u)&&!T&&(Ce(y)||n&&Array.isArray(y))){const e=Ze(l),t=Ze(u),r=!Q(e.value)&&y.length>+e.value,n=!Q(t.value)&&y.length<+t.value;if((r||n)&&(I(r,e.message,t.message),!i))return M(b[m].message),b}if(h&&!T&&Ce(y)){const{value:e,message:t}=Ze(h);if(Be(e)&&!y.match(e)&&(b[m]={type:ge,message:t,ref:s,...C(ge,t)},!i))return M(t),b}if(p)if(Pe(p)){const e=We(await p(y,t),v);if(e&&(b[m]={...e,...C(De,e.message)},!i))return M(e.message),b}else if(V(p)){let e={};for(const r in p){if(!be(e)&&!i)break;const n=We(await p[r](y,t),v,r);n&&(e={...n,...C(r,n.message)},M(n.message),i&&(b[m]=e))}if(!be(e)&&(b[m]={ref:v,...e},!i))return b}return M(!0),b};function Ge(e,t){const i=Array.isArray(t)?t:ee(t)?[t]:te(t),r=1===i.length?e:function(e,t){const i=t.slice(0,-1).length;let r=0;for(;r<i;)e=X(e)?r++:e[t[r++]];return e}(e,i),n=i.length-1,s=i[n];return r&&delete r[s],0!==n&&(V(r)&&be(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!X(e[t]))return!1;return!0}(r))&&Ge(e,i.slice(0,-1)),e}var qe=()=>{let e=[];return{get observers(){return e},next:t=>{for(const i of e)i.next&&i.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Xe=e=>Q(e)||!H(e);function Je(e,t){if(Xe(e)||Xe(t))return e===t;if(Y(e)&&Y(t))return e.getTime()===t.getTime();const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(const n of i){const i=e[n];if(!r.includes(n))return!1;if("ref"!==n){const e=t[n];if(Y(i)&&Y(e)||V(i)&&V(e)||Array.isArray(i)&&Array.isArray(e)?!Je(i,e):i!==e)return!1}}return!0}var Ke=e=>"select-multiple"===e.type,et=e=>Le(e)&&e.isConnected,tt=e=>{for(const t in e)if(Pe(e[t]))return!0;return!1};function it(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Array.isArray(e);if(V(e)||i)for(const r in e)Array.isArray(e[r])||V(e[r])&&!tt(e[r])?(t[r]=Array.isArray(e[r])?[]:{},it(e[r],t[r])):Q(e[r])||(t[r]=!0);return t}function rt(e,t,i){const r=Array.isArray(e);if(V(e)||r)for(const n in e)Array.isArray(e[n])||V(e[n])&&!tt(e[n])?X(t)||Xe(i[n])?i[n]=Array.isArray(e[n])?it(e[n],[]):{...it(e[n])}:rt(e[n],Q(t)?{}:t[n],i[n]):i[n]=!Je(e[n],t[n]);return i}var nt=(e,t)=>rt(e,t,it(t)),st=(e,t)=>{let{valueAsNumber:i,valueAsDate:r,setValueAs:n}=t;return X(e)?e:i?""===e?NaN:e?+e:e:r&&Ce(e)?new Date(e):n?n(e):e};function at(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return ke(t)?t.files:Ue(t)?Ve(e.refs).value:Ke(t)?[...t.selectedOptions].map((e=>{let{value:t}=e;return t})):R(t)?Qe(e.refs).value:st(X(t.value)?e.ref.value:t.value,e)}var ot=e=>X(e)?e:Be(e)?e.source:V(e)?Be(e.value)?e.value.source:e.value:e;function lt(e,t,i){const r=J(e,i);if(r||ee(i))return{error:r,name:i};const n=i.split(".");for(;n.length;){const r=n.join("."),s=J(t,r),a=J(e,r);if(s&&!Array.isArray(s)&&i!==r)return{name:i};if(a&&a.type)return{name:r,error:a};n.pop()}return{name:i}}const ut={mode:le,reValidateMode:oe,shouldFocusError:!0};function ct(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={...ut,...t},r={submitCount:0,isDirty:!1,isLoading:Pe(i.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:i.errors||{},disabled:i.disabled||!1},n={},s=(V(i.defaultValues)||V(i.values))&&G(i.defaultValues||i.values)||{},a=i.shouldUnregister?{}:G(s),o={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:qe(),array:qe(),state:qe()},h=je(i.mode),p=je(i.reValidateMode),m=i.criteriaMode===ce,g=async e=>{if(c.isValid||e){const e=i.resolver?be((await M()).errors):await b(n,!0);e!==r.isValid&&d.state.next({isValid:e})}},f=(e,t)=>{(c.isValidating||c.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?ie(r.validatingFields,e,t):Ge(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!be(r.validatingFields)}))},D=(e,t,i,r)=>{const l=J(n,e);if(l){const n=J(a,e,X(i)?J(s,e):i);X(n)||r&&r.defaultChecked||t?ie(a,e,t?n:at(l._f)):E(e,n),o.mount&&g()}},y=(e,t,i,a,o)=>{let l=!1,u=!1;const h={name:e},p=!!(J(n,e)&&J(n,e)._f&&J(n,e)._f.disabled);if(!i||a){c.isDirty&&(u=r.isDirty,r.isDirty=h.isDirty=w(),l=u!==h.isDirty);const i=p||Je(J(s,e),t);u=!(p||!J(r.dirtyFields,e)),i||p?Ge(r.dirtyFields,e):ie(r.dirtyFields,e,!0),h.dirtyFields=r.dirtyFields,l=l||c.dirtyFields&&u!==!i}if(i){const t=J(r.touchedFields,e);t||(ie(r.touchedFields,e,i),h.touchedFields=r.touchedFields,l=l||c.touchedFields&&t!==i)}return l&&o&&d.state.next(h),l?h:{}},v=(i,n,s,a)=>{const o=J(r.errors,i),l=c.isValid&&K(n)&&r.isValid!==n;var h;if(t.delayError&&s?(h=()=>((e,t)=>{ie(r.errors,e,t),d.state.next({errors:r.errors})})(i,s),e=e=>{clearTimeout(u),u=setTimeout(h,e)},e(t.delayError)):(clearTimeout(u),e=null,s?ie(r.errors,i,s):Ge(r.errors,i)),(s?!Je(o,s):o)||!be(a)||l){const e={...a,...l&&K(n)?{isValid:n}:{},errors:r.errors,name:i};r={...r,...e},d.state.next(e)}},M=async e=>{f(e,!0);const t=await i.resolver(a,i.context,((e,t,i,r)=>{const n={};for(const s of e){const e=J(t,s);e&&ie(n,s,e._f)}return{criteriaMode:i,names:[...e],fields:n,shouldUseNativeValidation:r}})(e||l.mount,n,i.criteriaMode,i.shouldUseNativeValidation));return f(e),t},b=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{valid:!0};for(const s in e){const o=e[s];if(o){const{_f:e,...u}=o;if(e){const u=l.array.has(e.name);f([s],!0);const c=await $e(o,a,m,i.shouldUseNativeValidation&&!t,u);if(f([s]),c[e.name]&&(n.valid=!1,t))break;!t&&(J(c,e.name)?u?Oe(r.errors,c,e.name):ie(r.errors,e.name,c[e.name]):Ge(r.errors,e.name))}u&&await b(u,t,n)}}return n.valid},w=(e,t)=>(e&&t&&ie(a,e,t),!Je(A(),s)),N=(e,t,i)=>Ie(e,l,{...o.mount?a:X(t)?s:Ce(e)?{[e]:t}:t},i,t),E=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=J(n,e);let s=t;if(r){const i=r._f;i&&(!i.disabled&&ie(a,e,st(t,i)),s=Le(i.ref)&&Q(t)?"":t,Ke(i.ref)?[...i.ref.options].forEach((e=>e.selected=s.includes(e.value))):i.refs?R(i.ref)?i.refs.length>1?i.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(s)?!!s.find((t=>t===e.value)):s===e.value))):i.refs[0]&&(i.refs[0].checked=!!s):i.refs.forEach((e=>e.checked=e.value===s)):ke(i.ref)?i.ref.value="":(i.ref.value=s,i.ref.type||d.values.next({name:e,values:{...a}})))}(i.shouldDirty||i.shouldTouch)&&y(e,s,i.shouldTouch,i.shouldDirty,!0),i.shouldValidate&&x(e)},T=(e,t,i)=>{for(const r in t){const s=t[r],a=`${e}.${r}`,o=J(n,a);!l.array.has(e)&&Xe(s)&&(!o||o._f)||Y(s)?E(a,s,i):T(a,s,i)}},C=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const u=J(n,e),h=l.array.has(e),p=G(t);ie(a,e,p),h?(d.array.next({name:e,values:{...a}}),(c.isDirty||c.dirtyFields)&&i.shouldDirty&&d.state.next({name:e,dirtyFields:nt(s,a),isDirty:w(e,p)})):!u||u._f||Q(p)?E(e,p,i):T(e,p,i),Se(e,l)&&d.state.next({...r}),d.values.next({name:o.mount?e:void 0,values:{...a}})},I=async t=>{o.mount=!0;const s=t.target;let u=s.name,D=!0;const w=J(n,u),N=e=>{D=Number.isNaN(e)||e===J(a,u,e)};if(w){let o,T;const C=s.type?at(w._f):W(t),I=t.type===re||t.type===ne,F=!((E=w._f).mount&&(E.required||E.min||E.max||E.maxLength||E.minLength||E.pattern||E.validate)||i.resolver||J(r.errors,u)||w._f.deps)||((e,t,i,r,n)=>!n.isOnAll&&(!i&&n.isOnTouch?!(t||e):(i?r.isOnBlur:n.isOnBlur)?!e:!(i?r.isOnChange:n.isOnChange)||e))(I,J(r.touchedFields,u),r.isSubmitted,p,h),A=Se(u,l,I);ie(a,u,C),I?(w._f.onBlur&&w._f.onBlur(t),e&&e(0)):w._f.onChange&&w._f.onChange(t);const j=y(u,C,I,!1),S=!be(j)||A;if(!I&&d.values.next({name:u,type:t.type,values:{...a}}),F)return c.isValid&&g(),S&&d.state.next({name:u,...A?{}:j});if(!I&&A&&d.state.next({...r}),i.resolver){const{errors:e}=await M([u]);if(N(C),D){const t=lt(r.errors,n,u),i=lt(e,n,t.name||u);o=i.error,u=i.name,T=be(e)}}else f([u],!0),o=(await $e(w,a,m,i.shouldUseNativeValidation))[u],f([u]),N(C),D&&(o?T=!1:c.isValid&&(T=await b(n,!0)));D&&(w._f.deps&&x(w._f.deps),v(u,T,o,j))}var E},F=(e,t)=>{if(J(r.errors,t)&&e.focus)return e.focus(),1},x=async function(e){let t,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=Ne(e);if(i.resolver){const i=await(async e=>{const{errors:t}=await M(e);if(e)for(const i of e){const e=J(t,i);e?ie(r.errors,i,e):Ge(r.errors,i)}else r.errors=t;return t})(X(e)?e:o);t=be(i),s=e?!o.some((e=>J(i,e))):t}else e?(s=(await Promise.all(o.map((async e=>{const t=J(n,e);return await b(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&g()):s=t=await b(n);return d.state.next({...!Ce(e)||c.isValid&&t!==r.isValid?{}:{name:e},...i.resolver||!e?{isValid:t}:{},errors:r.errors}),a.shouldFocus&&!s&&ze(n,F,e?o:l.mount),s},A=e=>{const t={...o.mount?a:s};return X(e)?t:Ce(e)?J(t,e):e.map((e=>J(t,e)))},j=(e,t)=>({invalid:!!J((t||r).errors,e),isDirty:!!J((t||r).dirtyFields,e),error:J((t||r).errors,e),isValidating:!!J(r.validatingFields,e),isTouched:!!J((t||r).touchedFields,e)}),S=(e,t,i)=>{const s=(J(n,e,{_f:{}})._f||{}).ref,a=J(r.errors,e)||{},{ref:o,message:l,type:u,...c}=a;ie(r.errors,e,{...c,...t,ref:s}),d.state.next({name:e,errors:r.errors,isValid:!1}),i&&i.shouldFocus&&s&&s.focus&&s.focus()},z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(const o of e?Ne(e):l.mount)l.mount.delete(o),l.array.delete(o),t.keepValue||(Ge(n,o),Ge(a,o)),!t.keepError&&Ge(r.errors,o),!t.keepDirty&&Ge(r.dirtyFields,o),!t.keepTouched&&Ge(r.touchedFields,o),!t.keepIsValidating&&Ge(r.validatingFields,o),!i.shouldUnregister&&!t.keepDefaultValue&&Ge(s,o);d.values.next({values:{...a}}),d.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},O=e=>{let{disabled:t,name:i,field:r,fields:n,value:s}=e;if(K(t)&&o.mount||t){const e=t?void 0:X(s)?at(r?r._f:J(n,i)._f):s;ie(a,i,e),y(i,e,!1,!1,!0)}},k=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=J(n,e);const a=K(t.disabled);return ie(n,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?O({field:r,disabled:t.disabled,name:e,value:t.value}):D(e,!0,t.value),{...a?{disabled:t.disabled}:{},...i.progressive?{required:!!t.required,min:ot(t.min),max:ot(t.max),minLength:ot(t.minLength),maxLength:ot(t.maxLength),pattern:ot(t.pattern)}:{}
2,name:e,onChange:I,onBlur:I,ref:a=>{if(a){k(e,t),r=J(n,e);const i=X(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,o=(e=>Ue(e)||R(e))(i),l=r._f.refs||[];if(o?l.find((e=>e===i)):i===r._f.ref)return;ie(n,e,{_f:{...r._f,...o?{refs:[...l.filter(et),i,...Array.isArray(J(s,e))?[{}]:[]],ref:{type:i.type,name:e}}:{ref:i}}}),D(e,!1,void 0,i)}else r=J(n,e,{}),r._f&&(r._f.mount=!1),(i.shouldUnregister||t.shouldUnregister)&&(!Z(l.array,e)||!o.action)&&l.unMount.add(e)}}},P=()=>i.shouldFocusError&&ze(n,F,l.mount),L=(e,t)=>async s=>{let o;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let l=G(a);if(d.state.next({isSubmitting:!0}),i.resolver){const{errors:e,values:t}=await M();r.errors=e,l=t}else await b(n);if(Ge(r.errors,"root"),be(r.errors)){d.state.next({errors:{}});try{await e(l,s)}catch(u){o=u}}else t&&await t({...r.errors},s),P(),setTimeout(P);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:be(r.errors)&&!o,submitCount:r.submitCount+1,errors:r.errors}),o)throw o},_=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const u=e?G(e):s,h=G(u),p=be(e),m=p?s:h;if(i.keepDefaultValues||(s=u),!i.keepValues){if(i.keepDirtyValues)for(const e of l.mount)J(r.dirtyFields,e)?ie(m,e,J(a,e)):C(e,J(m,e));else{if($&&X(e))for(const e of l.mount){const t=J(n,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Le(e)){const t=e.closest("form");if(t){t.reset();break}}}}n={}}a=t.shouldUnregister?i.keepDefaultValues?G(s):{}:G(m),d.array.next({values:{...m}}),d.values.next({values:{...m}})}l={mount:i.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!c.isValid||!!i.keepIsValid||!!i.keepDirtyValues,o.watch=!!t.shouldUnregister,d.state.next({submitCount:i.keepSubmitCount?r.submitCount:0,isDirty:!p&&(i.keepDirty?r.isDirty:!(!i.keepDefaultValues||Je(e,s))),isSubmitted:!!i.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?[]:i.keepDirtyValues?i.keepDefaultValues&&a?nt(s,a):r.dirtyFields:i.keepDefaultValues&&e?nt(s,e):i.keepDirty?r.dirtyFields:{},touchedFields:i.keepTouched?r.touchedFields:{},errors:i.keepErrors?r.errors:{},isSubmitSuccessful:!!i.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},U=(e,t)=>_(Pe(e)?e(a):e,t);return{control:{register:k,unregister:z,getFieldState:j,handleSubmit:L,setError:S,_executeSchema:M,_getWatch:N,_getDirty:w,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=J(n,e);t&&(t._f.refs?t._f.refs.every((e=>!et(e))):!et(t._f.ref))&&z(e)}l.unMount=new Set},_updateFieldArray:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,u=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],h=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(l&&i){if(o.action=!0,h&&Array.isArray(J(n,e))){const t=i(J(n,e),l.argA,l.argB);u&&ie(n,e,t)}if(h&&Array.isArray(J(r.errors,e))){const t=i(J(r.errors,e),l.argA,l.argB);u&&ie(r.errors,e,t),((e,t)=>{!q(J(e,t)).length&&Ge(e,t)})(r.errors,e)}if(c.touchedFields&&h&&Array.isArray(J(r.touchedFields,e))){const t=i(J(r.touchedFields,e),l.argA,l.argB);u&&ie(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=nt(s,a)),d.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ie(a,e,t)},_updateDisabledField:O,_getFieldArray:e=>q(J(o.mount?a:s,e,t.shouldUnregister?J(s,e,[]):[])),_reset:_,_resetDefaultValues:()=>Pe(i.defaultValues)&&i.defaultValues().then((e=>{U(e,i.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{K(e)&&(d.state.next({disabled:e}),ze(n,((t,i)=>{const r=J(n,i);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return s},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return i},set _options(e){i={...i,...e}}},trigger:x,register:k,handleSubmit:L,watch:(e,t)=>Pe(e)?d.values.subscribe({next:i=>e(N(void 0,t),i)}):N(e,t,!0),setValue:C,getValues:A,reset:U,resetField:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};J(n,e)&&(X(t.defaultValue)?C(e,G(J(s,e))):(C(e,t.defaultValue),ie(s,e,G(t.defaultValue))),t.keepTouched||Ge(r.touchedFields,e),t.keepDirty||(Ge(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,G(J(s,e))):w()),t.keepError||(Ge(r.errors,e),c.isValid&&g()),d.state.next({...r}))},clearErrors:e=>{e&&Ne(e).forEach((e=>Ge(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:z,setError:S,setFocus:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=J(n,e),r=i&&i._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:j}}var dt=i(36385),ht=i(85173),pt=i(86369),mt=i(97304),gt=i(23483);function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function Dt(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ft(t)?t:t+""}function yt(e,t,i){return(t=Dt(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function vt(e,t){const i=t instanceof Date?(0,dt.w)(t,0):new t(0);return i.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),i}class Mt{constructor(){yt(this,"subPriority",0)}validate(e,t){return!0}}class bt extends Mt{constructor(e,t,i,r,n){super(),this.value=e,this.validateValue=t,this.setValue=i,this.priority=r,n&&(this.subPriority=n)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,i){return this.setValue(e,t,this.value,i)}}class wt extends Mt{constructor(){super(...arguments),yt(this,"priority",10),yt(this,"subPriority",-1)}set(e,t){return t.timestampIsSet?e:(0,dt.w)(e,vt(e,Date))}}class Nt{run(e,t,i,r){const n=this.parse(e,t,i,r);return n?{setter:new bt(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}validate(e,t,i){return!0}}var Et=i(28737);const Tt=/^(1[0-2]|0?\d)/,Ct=/^(3[0-1]|[0-2]?\d)/,It=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ft=/^(5[0-3]|[0-4]?\d)/,xt=/^(2[0-3]|[0-1]?\d)/,At=/^(2[0-4]|[0-1]?\d)/,jt=/^(1[0-1]|0?\d)/,St=/^(1[0-2]|0?\d)/,zt=
2/^[0-5]?\d/,Ot=/^[0-5]?\d/,kt=/^\d/,Pt=/^\d{1,2}/,Lt=/^\d{1,3}/,_t=/^\d{1,4}/,Ut=/^-?\d+/,Bt=/^-?\d/,Rt=/^-?\d{1,2}/,Yt=/^-?\d{1,3}/,Qt=/^-?\d{1,4}/,Ht=/^([+-])(\d{2})(\d{2})?|Z/,Vt=/^([+-])(\d{2})(\d{2})|Z/,Wt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Zt=/^([+-])(\d{2}):(\d{2})|Z/,$t=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Gt(e,t){return e?{value:t(e.value),rest:e.rest}:e}function qt(e,t){const i=t.match(e);return i?{value:parseInt(i[0],10),rest:t.slice(i[0].length)}:null}function Xt(e,t){const i=t.match(e);if(!i)return null;if("Z"===i[0])return{value:0,rest:t.slice(1)};const r="+"===i[1]?1:-1,n=i[2]?parseInt(i[2],10):0,s=i[3]?parseInt(i[3],10):0,a=i[5]?parseInt(i[5],10):0;return{value:r*(n*Et.s0+s*Et.Cg+a*Et._m),rest:t.slice(i[0].length)}}function Jt(e){return qt(Ut,e)}function Kt(e,t){switch(e){case 1:return qt(kt,t);case 2:return qt(Pt,t);case 3:return qt(Lt,t);case 4:return qt(_t,t);default:return qt(new RegExp("^\\d{1,"+e+"}"),t)}}function ei(e,t){switch(e){case 1:return qt(Bt,t);case 2:return qt(Rt,t);case 3:return qt(Yt,t);case 4:return qt(Qt,t);default:return qt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ti(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function ii(e,t){const i=t>0,r=i?t:1-t;let n;if(r<=50)n=e||100;else{const t=r+50;n=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return i?n:1-n}function ri(e){return e%400==0||e%4==0&&e%100!=0}var ni=i(77581),si=i(47553);var ai=i(27992);var oi=i(44575);function li(e,t,i){const r=(0,pt.a)(e),n=(0,oi.N)(r,i)-t;return r.setDate(r.getDate()-7*n),r}var ui=i(52199);function ci(e,t){const i=(0,pt.a)(e),r=(0,ui.s)(i)-t;return i.setDate(i.getDate()-7*r),i}const di=[31,28,31,30,31,30,31,31,30,31,30,31],hi=[31,29,31,30,31,30,31,31,30,31,30,31];function pi(e,t){const i=(0,pt.a)(e);return isNaN(t)?(0,dt.w)(e,NaN):t?(i.setDate(i.getDate()+t),i):i}function mi(e,t,i){var r,n,s,a,o,l;const u=(0,m.q)(),c=null!==(r=null!==(n=null!==(s=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(o=i.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==n?n:null===(l=u.locale)||void 0===l||null===(l=l.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:0,d=(0,pt.a)(e),h=d.getDay(),p=7-c;return pi(d,t<0||t>6?t-(h+p)%7:((t%7+7)%7+p)%7-(h+p)%7)}function gi(e){let t=(0,pt.a)(e).getDay();return 0===t&&(t=7),t}function fi(e,t){const i=(0,pt.a)(e);return pi(i,t-gi(i))}var Di=i(4112);const yi={G:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",140),yt(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,i){switch(t){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,t,i){return t.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},y:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",130),yt(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,i){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Gt(Kt(4,e),r);case"yo":return Gt(i.ordinalNumber(e,{unit:"year"}),r);default:return Gt(Kt(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,i){const r=e.getFullYear();if(i.isTwoDigitYear){const t=ii(i.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const n="era"in t&&1!==t.era?1-i.year:i.year;return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}},Y:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",130),yt(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,i){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Gt(Kt(4,e),r);case"Yo":return Gt(i.ordinalNumber(e,{unit:"year"}),r);default:return Gt(Kt(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,i,r){const n=(0,ni.h)(e,r);if(i.isTwoDigitYear){const t=ii(i.year,n);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,si.k)(e,r)}const s="era"in t&&1!==t.era?1-i.year:i.year;return e.setFullYear(s,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,si.k)(e,r)}},R:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",130),yt(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return ei("R"===t?4:t.length,e)}set(e,t,i){const r=(0,dt.w)(e,0);return r.setFullYear(i,0,4),r.setHours(0,0,0,0),(0,ai.b)(r)}},u:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",130),yt(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return ei("u"===t?4:t.length,e)}set(e,t,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Q:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",120),yt(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,i){switch(t){case"Q":case"QQ":return Kt(t.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,i){return e.setMonth(3*(i-1),1),e.setHours(0,0,0,0),e}},q:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",120),yt(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,i){switch(t){case"q":case"qq":return Kt(t.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,i){return e.setMonth(3*(i-1),1),e.setHours(0,0,0,0),e}},M:new class extends Nt{constructor(){super(...arguments),yt(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),yt(this,"priority",110)}parse(e,t,i){const r=e=>e-1;switch(t){case"M":return Gt(qt(Tt,e),r);case"MM":return Gt(Kt(2,e),r);case"Mo":return Gt(i.ordinalNumber(e,{unit:"month"}),r);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}},L:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",110),yt(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,i){const r=e=>e-1;switch(t){case"L":return Gt(qt(Tt,e),r);case"LL":return Gt(Kt(2,e),r);case"Lo":return Gt(i.ordinalNumber(e,{unit:"month"}),r);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}},w:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",100),yt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,i){switch(t){case"w":return qt(Ft,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return Kt(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,i,r){return(0,si.k)(li(e,i,r),r)}},I:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",100),yt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,i){switch(t){case"I":return qt(Ft,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return Kt(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,i){return(0,ai.b)(ci(e,i))}},d:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",90),yt(this,"subPriority",1),yt(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,i){switch(t){case"d":return qt(Ct,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return Kt(t.length,e)}}validate(e,t){const i=ri(e.getFullYear()),r=e.getMonth();return i?t>=1&&t<=hi[r]:t>=1&&t<=di[r]}set(e,t,i){return e.setDate(i),e.setHours(0,0,0,0),e}},D:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",90),yt(this,"subpriority",1),yt(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,i){switch(t){case"D":case"DD":return qt(It,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return Kt(t.length,e)}}validate(e,t){return ri(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}},E:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",90),yt(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,i){switch(t){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,i,r){return(e=mi(e,i,r)).setHours(0,0,0,0),e}},e:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",90),yt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,i,r){const n=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Gt(Kt(t.length,e),n);case"eo":return Gt(i.ordinalNumber(e,{unit:"day"}),n);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,i,r){return(e=mi(e,i,r)).setHours(0,0,0,0),e}},c:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",90),yt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,i,r){const n=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Gt(Kt(t.length,e),n);case"co":return Gt(i.ordinalNumber(e,{unit:"day"}),n);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,i,r){return(e=mi(e,i,r)).setHours(0,0,0,0),e}},i:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",90),yt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,i){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Kt(t.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return Gt(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Gt(i.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Gt(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),r);default:return Gt(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,i){return(e=fi(e,i)).setHours(0,0,0,0),e}},a:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",80),yt(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,i){switch(t){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,i){return e.setHours(ti(i),0,0,0),e}},b:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",80),yt(this,"incompatibleTokens",["a","B","H","k","t","T"])}
2parse(e,t,i){switch(t){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,i){return e.setHours(ti(i),0,0,0),e}},B:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",80),yt(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,i){switch(t){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,i){return e.setHours(ti(i),0,0,0),e}},h:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",70),yt(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,i){switch(t){case"h":return qt(St,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return Kt(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,i){const r=e.getHours()>=12;return r&&i<12?e.setHours(i+12,0,0,0):r||12!==i?e.setHours(i,0,0,0):e.setHours(0,0,0,0),e}},H:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",70),yt(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,i){switch(t){case"H":return qt(xt,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return Kt(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,i){return e.setHours(i,0,0,0),e}},K:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",70),yt(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,i){switch(t){case"K":return qt(jt,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return Kt(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}},k:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",70),yt(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,i){switch(t){case"k":return qt(At,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return Kt(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,i){const r=i<=24?i%24:i;return e.setHours(r,0,0,0),e}},m:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",60),yt(this,"incompatibleTokens",["t","T"])}parse(e,t,i){switch(t){case"m":return qt(zt,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return Kt(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,i){return e.setMinutes(i,0,0),e}},s:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",50),yt(this,"incompatibleTokens",["t","T"])}parse(e,t,i){switch(t){case"s":return qt(Ot,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return Kt(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,i){return e.setSeconds(i,0),e}},S:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",30),yt(this,"incompatibleTokens",["t","T"])}parse(e,t){return Gt(Kt(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,i){return e.setMilliseconds(i),e}},X:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",10),yt(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Xt(Ht,e);case"XX":return Xt(Vt,e);case"XXXX":return Xt(Wt,e);case"XXXXX":return Xt($t,e);default:return Xt(Zt,e)}}set(e,t,i){return t.timestampIsSet?e:(0,dt.w)(e,e.getTime()-(0,Di.G)(e)-i)}},x:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",10),yt(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Xt(Ht,e);case"xx":return Xt(Vt,e);case"xxxx":return Xt(Wt,e);case"xxxxx":return Xt($t,e);default:return Xt(Zt,e)}}set(e,t,i){return t.timestampIsSet?e:(0,dt.w)(e,e.getTime()-(0,Di.G)(e)-i)}},t:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",40),yt(this,"incompatibleTokens","*")}parse(e){return Jt(e)}set(e,t,i){return[(0,dt.w)(e,1e3*i),{timestampIsSet:!0}]}},T:new class extends Nt{constructor(){super(...arguments),yt(this,"priority",20),yt(this,"incompatibleTokens","*")}parse(e){return Jt(e)}set(e,t,i){return[(0,dt.w)(e,i),{timestampIsSet:!0}]}}},vi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bi=/^'([^]*?)'?$/,wi=/''/g,Ni=/\S/,Ei=/[a-zA-Z]/;function Ti(e,t,i,r){var n,s,a,o,l,u,c,d,h,p,m,f,D,y;const v=g(),M=null!==(n=null!==(s=null==r?void 0:r.locale)&&void 0!==s?s:v.locale)&&void 0!==n?n:ht.c,b=null!==(a=null!==(o=null!==(l=null!==(u=null==r?void 0:r.firstWeekContainsDate)&&void 0!==u?u:null==r||null===(c=r.locale)||void 0===c||null===(c=c.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==l?l:v.firstWeekContainsDate)&&void 0!==o?o:null===(d=v.locale)||void 0===d||null===(d=d.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:1,w=null!==(h=null!==(p=null!==(m=null!==(f=null==r?void 0:r.weekStartsOn)&&void 0!==f?f:null==r||null===(D=r.locale)||void 0===D||null===(D=D.options)||void 0===D?void 0:D.weekStartsOn)&&void 0!==m?m:v.weekStartsOn)&&void 0!==p?p:null===(y=v.locale)||void 0===y||null===(y=y.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==h?h:0;if(""===t)return""===e?(0,pt.a)(i):(0,dt.w)(i,NaN);const N={firstWeekContainsDate:b,weekStartsOn:w,locale:M},E=[new wt],T=t.match(Mi).map((e=>{const t=e[0];if(t in mt.m){return(0,mt.m[t])(e,M.formatLong)}return e}
2)).join("").match(vi),C=[];for(let g of T){null!=r&&r.useAdditionalWeekYearTokens||!(0,gt.xM)(g)||(0,gt.Ss)(g,t,e),null!=r&&r.useAdditionalDayOfYearTokens||!(0,gt.ef)(g)||(0,gt.Ss)(g,t,e);const n=g[0],s=yi[n];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=C.find((e=>t.includes(e.token)||e.token===n));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${g}\` at the same time`)}else if("*"===s.incompatibleTokens&&C.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);C.push({token:n,fullToken:g});const r=s.run(e,g,M.match,N);if(!r)return(0,dt.w)(i,NaN);E.push(r.setter),e=r.rest}else{if(n.match(Ei))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===g?g="'":"'"===n&&(g=g.match(bi)[1].replace(wi,"'")),0!==e.indexOf(g))return(0,dt.w)(i,NaN);e=e.slice(g.length)}}if(e.length>0&&Ni.test(e))return(0,dt.w)(i,NaN);const I=E.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,i)=>i.indexOf(e)===t)).map((e=>E.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let F=(0,pt.a)(i);if(isNaN(F.getTime()))return(0,dt.w)(i,NaN);const x={};for(const g of I){if(!g.validate(F,N))return(0,dt.w)(i,NaN);const e=g.set(F,x,N);Array.isArray(e)?(F=e[0],Object.assign(x,e[1])):F=e}return(0,dt.w)(i,F)}var Ci=i(90033);function Ii(e,t){const i=(0,pt.a)(e);if(isNaN(t))return(0,dt.w)(e,NaN);if(!t)return i;const r=i.getDate(),n=(0,dt.w)(e,i.getTime());n.setMonth(i.getMonth()+t+1,0);return r>=n.getDate()?n:(i.setFullYear(n.getFullYear(),n.getMonth(),r),i)}function Fi(e,t){return Ii(e,12*t)}function xi(e,t){return+(0,pt.a)(e)<+(0,pt.a)(t)}function Ai(e,t){const i=(0,pt.a)(e),r=(0,pt.a)(t);return i.getTime()>r.getTime()}function ji(e,t){const i=+(0,pt.a)(e);return(0,dt.w)(e,i+t)}function Si(e,t){return ji(e,t*Et.Cg)}var zi=i(96691),Oi=i(86862),ki=i(46837),Pi=i(28182),Li=i(46298),_i=i(24099);const Ui=function(e,t){void 0===t&&(t="book");return("prints"===t?_i.ld:_i.Bd)(e)};var Bi=i(91083),Ri=i(90318);i(56965);function Yi(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Qi=0;function Hi(e){return"__private_"+Qi+++"_"+e}function Vi(e,t,i){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,n)=>{""!==e&&r.push(e),t<n.length-1&&r.push(i)})))),r}function Wi(e,t){const i=/\$/g;let r=[e];if(null==t)return r;for(const n of Object.keys(t))if("_"!==n){let e=t[n];"string"==typeof e&&(e=i[Symbol.replace](e,"$$$$")),r=Vi(r,new RegExp(`%\\{${n}\\}`,"g"),e)}return r}const Zi=e=>{throw new Error(`missing string: ${e}`)};var $i=Hi("onMissingKey"),Gi=Hi("apply");class qi{constructor(e,t){let{onMissingKey:i=Zi}=void 0===t?{}:t;Object.defineProperty(this,Gi,{value:Xi}),Object.defineProperty(this,$i,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(e){return 1===e?0:1}},Array.isArray(e)?e.forEach(Yi(this,Gi)[Gi],this):Yi(this,Gi)[Gi](e),Yi(this,$i)[$i]=i}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let i=this.locale.strings[e];null==i&&(Yi(this,$i)[$i](e),i=e);if("object"==typeof i){if(t&&void 0!==t.smart_count){return Wi(i[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof i)throw new Error("string was not a string");return Wi(i,t)}}function Xi(e){if(null==e||!e.strings)return;const t=this.locale;Object.assign(this.locale,{strings:{...t.strings,...e.strings},pluralize:e.pluralize||t.pluralize})}var Ji=i(7969),Ki=i.n(Ji);var er=i(97331),tr=i.n(er);function ir(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var rr=0;function nr(e){return"__private_"+rr+++"_"+e}var sr=nr("callbacks"),ar=nr("publish");class or{constructor(){Object.defineProperty(this,ar,{value:lr}),this.state={},Object.defineProperty(this,sr,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},i={...this.state,...e};this.state=i,ir(this,ar)[ar](t,i,e)}subscribe(e){return ir(this,sr)[sr].add(e),()=>{ir(this,sr)[sr].delete(e)}}}function lr(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];ir(this,sr)[sr].forEach((e=>{e(...t)}))}or.VERSION="3.2.2";var ur=or;function cr(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var dr={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function hr(e){var t;if(e.type)return e.type;const i=e.name?null==(t=cr(e.name).extension)?void 0:t.toLowerCase():null;return i&&i in dr?dr[i]:"application/octet-stream"}function pr(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}function mr(e,t){if(function(e){return!(!e.isRemote||!e.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}(e))return e.id;const i=hr(e);return function(e,t){let i=t||"uppy";return"string"==typeof e.name&&(i+=`-${pr(e.name.toLowerCase())}`),void 0!==e.type&&(i+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(i+=`-${pr(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(i+=`-${e.data.size}`),void 0!==e.data.lastModified&&(i+=`-${e.data.lastModified}`),i}({...e,type:i},t)}function gr(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const i=t[1].split(".",2),r=parseInt(i[0],10),n=parseInt(i[1],10);return r<15||15===r&&n<15063||(r>18||18===r&&n>=18218)}function fr(e){return e<10?`0${e}`:e.toString()}function Dr(){const e=new Date;return`${fr(e.getHours())}:${fr(e.getMinutes())}:${fr(e.getSeconds())}`}const yr={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${Dr()}]`,...t)}},vr={debug:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.debug(`[Uppy] [${Dr()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.warn(`[Uppy] [${Dr()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${Dr()}]`,...t)}};var Mr=i(24307),br=i.n(Mr),wr=i(46431),Nr=i.n(wr);const Er={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};
2class Tr extends Error{constructor(e,t){var i;super(e),this.isRestriction=!0,this.isUserFacing=null==(i=null==t?void 0:t.isUserFacing)||i,null!=t&&t.file&&(this.file=t.file)}}class Cr{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var t;const i=e();if(null!=(null==(t=i.restrictions)?void 0:t.allowedFileTypes)&&!Array.isArray(i.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return i}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:i,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r){const i=e.filter((e=>!e.isGhost));if(i.length+t.length>r)throw new Tr(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`)}if(i){const r=[...e,...t].reduce(((e,t)=>{var i;return e+(null!=(i=t.size)?i:0)}),0);if(r>i)throw new Tr(this.getI18n()("aggregateExceedsSize",{sizeAllowed:br()(i),size:br()(r)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:i,allowedFileTypes:r}=this.getOpts().restrictions;if(r){if(!r.some((t=>t.includes("/")?!!e.type&&Nr()(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()))){const t=r.join(", ");throw new Tr(this.getI18n()("youCanOnlyUploadFileTypes",{types:t}),{file:e})}}if(t&&null!=e.size&&e.size>t)throw new Tr(this.getI18n()("exceedsSize",{size:br()(t),file:e.name}),{file:e});if(i&&null!=e.size&&e.size<i)throw new Tr(this.getI18n()("inferiorSize",{size:br()(i)}),{file:e})}validate(e,t){t.forEach((e=>{this.validateSingleFile(e)})),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new Tr(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new Tr(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:i}=this.getOpts().restrictions,r=[];for(const n of i)Object.hasOwn(e.meta,n)&&""!==e.meta[n]||r.push(n);return{missingFields:r,error:t}}}var Ir={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed"}};let Fr,xr;function Ar(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var jr=0;function Sr(e){return"__private_"+jr+++"_"+e}const zr={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var Or=Sr("plugins"),kr=Sr("restricter"),Pr=Sr("storeUnsubscribe"),Lr=Sr("emitter"),_r=Sr("preProcessors"),Ur=Sr("uploaders"),Br=Sr("postProcessors"),Rr=Sr("informAndEmit"),Yr=Sr("checkRequiredMetaFieldsOnFile"),Qr=Sr("checkRequiredMetaFields"),Hr=Sr("assertNewUploadAllowed"),Vr=Sr("transformFile"),Wr=Sr("startIfAutoProceed"),Zr=Sr("checkAndUpdateFileState"),$r=Sr("addListeners"),Gr=Sr("updateOnlineStatus"),qr=Sr("requestClientById"),Xr=Sr("createUpload"),Jr=Sr("getUpload"),Kr=Sr("removeUpload"),en=Sr("runUpload");Fr=Symbol.for("uppy test: getPlugins"),xr=Symbol.for("uppy test: createUpload");class tn{constructor(e){Object.defineProperty(this,en,{value:mn}),Object.defineProperty(this,Kr,{value:pn}),Object.defineProperty(this,Jr,{value:hn}),Object.defineProperty(this,Xr,{value:dn}),Object.defineProperty(this,$r,{value:cn}),Object.defineProperty(this,Zr,{value:un}),Object.defineProperty(this,Wr,{value:ln}),Object.defineProperty(this,Vr,{value:on}),Object.defineProperty(this,Hr,{value:an}),Object.defineProperty(this,Qr,{value:sn}),Object.defineProperty(this,Yr,{value:nn}),Object.defineProperty(this,Rr,{value:rn}),Object.defineProperty(this,Or,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,kr,{writable:!0,value:void 0}),Object.defineProperty(this,Pr,{writable:!0,value:void 0}),Object.defineProperty(this,Lr,{writable:!0,value:Ki()()}),Object.defineProperty(this,_r,{writable:!0,value:new Set}),Object.defineProperty(this,Ur,{writable:!0,value:new Set}),Object.defineProperty(this,Br,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=tr()(((e,t)=>{const i=this.getFile(null==e?void 0:e.id);if(null==e||!i)return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);if(100===i.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);const r=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...i.progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:r?Math.round(t.bytesUploaded/t.bytesTotal*100):0}
2}),this.calculateTotalProgress()}),500,{leading:!0,trailing:!0}),Object.defineProperty(this,Gr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,qr,{writable:!0,value:new Map}),this.defaultLocale=Ir;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Er,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new ur,logger:yr,infoTimeout:5e3},i={...t,...e};this.opts={...i,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=vr),this.log(`Using Core v${tn.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...zr,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:gr(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),Ar(this,kr)[kr]=new Cr((()=>this.opts),(()=>this.i18n)),Ar(this,Pr)[Pr]=this.store.subscribe(((e,t,i)=>{this.emit("state-update",e,t,i),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),Ar(this,$r)[$r]()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];Ar(this,Lr)[Lr].emit(e,...i)}on(e,t){return Ar(this,Lr)[Lr].on(e,t),this}once(e,t){return Ar(this,Lr)[Lr].once(e,t),this}off(e,t){return Ar(this,Lr)[Lr].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map((e=>{let[i,r]=e;return[i,{...t[i],...r}]})))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=new qi([this.defaultLocale,this.opts.locale],{onMissingKey:e=>this.log(`Missing i18n string: ${e}`,"error")});this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...null==e?void 0:e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((t=>{t.setOptions(e)})),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},i={};Object.keys(t).forEach((r=>{i[r]={...t[r],progress:{...t[r].progress,...e}}})),this.setState({files:i,...zr}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...zr,files:{}})}addPreProcessor(e){Ar(this,_r)[_r].add(e)}removePreProcessor(e){return Ar(this,_r)[_r].delete(e)}addPostProcessor(e){Ar(this,Br)[Br].add(e)}removePostProcessor(e){return Ar(this,Br)[Br].delete(e)}addUploader(e){Ar(this,Ur)[Ur].add(e)}removeUploader(e){return Ar(this,Ur)[Ur].delete(e)}setMeta(e){const t={...this.getState().meta,...e},i={...this.getState().files};
2Object.keys(i).forEach((t=>{i[t]={...i[t],meta:{...i[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:i})}setFileMeta(e,t){const i={...this.getState().files};if(!i[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...i[e].meta,...t};i[e]={...i[e],meta:r},this.setState({files:i})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map((e=>this.getFile(e)))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:i}=this.getState(),r=Object.values(e),n=[],s=[],a=[],o=[],l=[],u=[],c=[],d=[],h=[];for(const p of r){const{progress:e}=p;!e.uploadComplete&&e.uploadStarted&&(n.push(p),p.isPaused||d.push(p)),e.uploadStarted||s.push(p),(e.uploadStarted||e.preprocess||e.postprocess)&&a.push(p),e.uploadStarted&&o.push(p),p.isPaused&&l.push(p),e.uploadComplete&&u.push(p),p.error&&c.push(p),(e.preprocess||e.postprocess)&&h.push(p)}return{newFiles:s,startedFiles:a,uploadStartedFiles:o,pausedFiles:l,completeFiles:u,erroredFiles:c,inProgressFiles:n,inProgressNotPausedFiles:d,processingFiles:h,isUploadStarted:o.length>0,isAllComplete:100===t&&u.length===r.length&&0===h.length,isAllErrored:!!i&&c.length===r.length,isAllPaused:0!==n.length&&l.length===n.length,isUploadInProgress:n.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{Ar(this,kr)[kr].validate(t,[e])}catch(i){return i}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){Ar(this,Hr)[Hr](e);const{nextFilesState:t,validFilesToAdd:i,errors:r}=Ar(this,Zr)[Zr]([e]),n=r.filter((e=>e.isRestriction));if(Ar(this,Rr)[Rr](n),r.length>0)throw r[0];this.setState({files:t});const[s]=i;return this.emit("file-added",s),this.emit("files-added",i),this.log(`Added file: ${s.name}, ${s.id}, mime type: ${s.type}`),Ar(this,Wr)[Wr](),s.id}addFiles(e){Ar(this,Hr)[Hr]();const{nextFilesState:t,validFilesToAdd:i,errors:r}=Ar(this,Zr)[Zr](e),n=r.filter((e=>e.isRestriction));Ar(this,Rr)[Rr](n);const s=r.filter((e=>!e.isRestriction));if(s.length>0){let e="Multiple errors occurred while adding files:\n";if(s.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(s,e);{const t=new Error(e);throw t.errors=s,t}}this.setState({files:t}),i.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",i),i.length>5?this.log(`Added batch of ${i.length} files`):Object.values(i).forEach((e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)})),i.length>0&&Ar(this,Wr)[Wr]()}removeFiles(e,t){const{files:i,currentUploads:r}=this.getState(),n={...i},s={...r},a=Object.create(null);function o(e){return void 0===a[e]}e.forEach((e=>{i[e]&&(a[e]=i[e],delete n[e])})),Object.keys(s).forEach((e=>{const t=r[e].fileIDs.filter(o);if(0===t.length)return void delete s[e];const{capabilities:i}=this.getState();if(t.length!==r[e].fileIDs.length&&!i.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");s[e]={...r[e],fileIDs:t}}));const l={currentUploads:s,files:n};0===Object.keys(n).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const u=Object.keys(a);u.forEach((e=>{this.emit("file-removed",a[e],t)})),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(e,t){this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!0};e[t]=i})),this.setState({files:e}
2),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const i=Ar(this,Xr)[Xr](t,{forceAllowNewUpload:!0});return Ar(this,en)[en](i)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState(zr)}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=Ar(this,Xr)[Xr]([e],{forceAllowNewUpload:!0});return Ar(this,en)[en](t)}logout(){this.iteratePlugins((e=>{var t;null==(t=e.provider)||null==t.logout||t.logout()}))}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),i=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=i.reduce(((e,t)=>e+t.progress.percentage),0),n=Math.round(r/t*100);return void this.setState({totalProgress:n})}let r=t.reduce(((e,t)=>{var i;return e+(null!=(i=t.progress.bytesTotal)?i:0)}),0);const n=r/t.length;r+=n*i.length;let s=0;t.forEach((e=>{s+=e.progress.bytesUploaded})),i.forEach((e=>{s+=n*(e.progress.percentage||0)/100}));let a=0===r?0:Math.round(s/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){var e;
vendor: 2,432 bytes, line 2
2null==(e=window.navigator.onLine)||e?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const i=new e(this,t),r=i.id;if(!r)throw new Error("Your plugin must have an id");if(!i.type)throw new Error("Your plugin must have a type");const n=this.getPlugin(r);if(n){const e=`Already found a plugin named '${n.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),i.type in Ar(this,Or)[Or]?Ar(this,Or)[Or][i.type].push(i):Ar(this,Or)[Or][i.type]=[i],i.install(),this.emit("plugin-added",i),this}getPlugin(e){for(const t of Object.values(Ar(this,Or)[Or])){const i=t.find((t=>t.id===e));if(null!=i)return i}}[Fr](e){return Ar(this,Or)[Or][e]}iteratePlugins(e){Object.values(Ar(this,Or)[Or]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=Ar(this,Or)[Or][e.type],i=t.findIndex((t=>t.id===e.id));-1!==i&&t.splice(i,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),Ar(this,Pr)[Pr](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",Ar(this,Gr)[Gr]),window.removeEventListener("offline",Ar(this,Gr)[Gr]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,i){void 0===t&&(t="info"),void 0===i&&(i=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),i),this.emit("info-visible")}log(e,t){const{logger:i}=this.opts;switch(t){case"error":i.error(e);break;case"warning":i.warn(e);break;default:i.debug(e)}}registerRequestClient(e,t){Ar(this,qr)[qr].set(e,t)}
2getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=Ar(this,qr)[qr].get(e.remote.requestClientId);if(null==t)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?Ar(this,en)[en](e):(Ar(this,Kr)[Kr](e),Promise.reject(new Error("Nonexistent upload")))}[xr](){return Ar(this,Xr)[Xr](...arguments)}addResultData(e,t){if(!Ar(this,Jr)[Jr](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:i}=this.getState(),r={...i[e],result:{...i[e].result,...t}};this.setState({currentUploads:{...i,[e]:r}})}upload(){var e;null!=(e=Ar(this,Or)[Or].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const i=this.opts.onBeforeUpload(t);return!1===i?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(i&&"object"==typeof i&&(t=i,this.setState({files:t})),Promise.resolve().then((()=>Ar(this,kr)[kr].validateMinNumberOfFiles(t))).catch((e=>{throw Ar(this,Rr)[Rr]([e]),e})).then((()=>
2{if(!Ar(this,Qr)[Qr](t))throw new Tr(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),i=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==i.indexOf(e)||r.push(t.id)}));const n=Ar(this,Xr)[Xr](r);return Ar(this,en)[en](n)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function rn(e){for(const n of e)n.isRestriction?this.emit("restriction-failed",n.file,n):this.emit("error",n,n.file),this.log(n,"warning");const t=e.filter((e=>e.isUserFacing)),i=t.slice(0,4),r=t.slice(4);i.forEach((e=>{let{message:t,details:i=""}=e;this.info({message:t,details:i},"error",this.opts.infoTimeout)})),r.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:r.length})})}function nn(e){const{missingFields:t,error:i}=Ar(this,kr)[kr].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(i.message),this.emit("restriction-failed",e,i),!1)}function sn(e){let t=!0;for(const i of Object.values(e))Ar(this,Yr)[Yr](i)||(t=!1);return t}function an(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new Tr(this.i18n("noMoreFilesAllowed"),{file:e});throw Ar(this,Rr)[Rr]([t]),t}}function on(e){const t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e}:e,i=hr(t),r=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}(i,t),n=cr(r).extension,s=mr(t,this.getID()),a=t.meta||{};a.name=r,a.type=i;const o=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||"",id:s,name:r,extension:n||"",meta:{...this.getState().meta,...a},type:i,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:o,uploadComplete:!1,uploadStarted:null},size:o,isGhost:!1,isRemote:t.isRemote||!1,remote:t.remote||"",preview:t.preview}}function ln(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function un(e){const{files:t}=this.getState(),i={...t},r=[],n=[];for(const o of e)try{var s;let e=Ar(this,Vr)[Vr](o);const n=null==(s=t[e.id])?void 0:s.isGhost;if(n){e={...t[e.id],isGhost:!1,data:o.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`)}const a=this.opts.onBeforeFileAdded(e,i);if(!a&&this.checkIfFileAlreadyExists(e.id))throw new Tr(this.i18n("noDuplicates",{fileName:e.name}),{file:o});if(!1===a&&!n)throw new Tr("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:o});"object"==typeof a&&null!==a&&(e=a),Ar(this,kr)[kr].validateSingleFile(e),i[e.id]=e,r.push(e)}catch(a){n.push(a)}try{Ar(this,kr)[kr].validateAggregateRestrictions(Object.values(t),r)}catch(a){return n.push(a),{nextFilesState:t,validFilesToAdd:[],errors:n}}return{nextFilesState:i,validFilesToAdd:r,errors:n}}function cn(){const e=(e,t,i)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:i})};this.on("error",e),this.on("upload-error",((t,i,r)=>{if(e(i,t,r),"object"==typeof i&&i.message){var n;this.log(i.message,"error");const e=new Error(this.i18n("failedToUpload",{file:null!=(n=null==t?void 0:t.name)?n:""}));e.isUserFacing=!0,e.details=i.message,i.details&&(e.details+=` ${i.details}`),Ar(this,Rr)[Rr]([e])}else Ar(this,Rr)[Rr]([i])}));let t=null;this.on("upload-stalled",((e,i)=>{const{message:r}=e,n=i.map((e=>e.meta.name)).join(", ");t||(this.info({message:r,details:n},"warning",this.opts.infoTimeout),t=setTimeout((()=>{t=null}),this.opts.infoTimeout)),this.log(`${r} ${n}`.trim(),"warning")})),this.on("upload",(()=>{this.setState({error:null})}));const i=e=>{const t=e.filter((e=>{const t=null!=e&&this.getFile(e.id);return t||this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`),t})),i=Object.fromEntries(t.map((e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}])));this.patchFilesState(i)};this.on("upload-start",(e=>{e.forEach((e=>
2{this.emit("upload-started",e)})),i(e)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const i=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...i,postprocess:Ar(this,Br)[Br].size>0?{mode:"indeterminate"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||i.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&Ar(this,Yr)[Yr](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",Ar(this,Gr)[Gr]),window.addEventListener("offline",Ar(this,Gr)[Gr]),setTimeout(Ar(this,Gr)[Gr],3e3))}function dn(e,t){void 0===t&&(t={});const{forceAllowNewUpload:i=!1}=t,{allowNewUpload:r,currentUploads:n}=this.getState();if(!r&&!i)throw new Error("Cannot create a new upload: already uploading.");const s=function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}();return this.emit("upload",{id:s,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...n,[s]:{fileIDs:e,step:0,result:{}}}}),s}function hn(e){const{currentUploads:t}=this.getState();return t[e]}function pn(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function mn(e){const t=()=>{const{currentUploads:t}=this.getState();return t[e]};let i=t();const r=[...Ar(this,_r)[_r],...Ar(this,Ur)[Ur],...Ar(this,Br)[Br]];try{for(let n=i.step||0;n<r.length&&i;n++){const s=r[n];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...i,step:n}}});const{fileIDs:a}=i;await s(a,e),i=t()}}catch(s){throw Ar(this,Kr)[Kr](e),s}if(i){i.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=i.fileIDs.map((e=>this.getFile(e))),n=r.filter((e=>!e.error)),s=r.filter((e=>e.error));this.addResultData(e,{successful:n,failed:s,uploadID:e}),i=t()}let n;return i&&(n=i.result,this.emit("complete",n),Ar(this,Kr)[Kr](e)),null==n&&this.log(`Not setting result for an upload that has been removed: ${e}`),n}tn.VERSION="3.13.0";var gn,fn,Dn,yn,vn,Mn,bn,wn,Nn,En,Tn,Cn,In,Fn,xn=tn,An={},jn=[],Sn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,zn=Array.isArray;function On(e,t){for(var i in t)e[i]=t[i];return e}function kn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Pn(e,t,i){var r,n,s,a={};for(s in t)"key"==s?r=t[s]:"ref"==s?n=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?gn.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return Ln(e,a,r,n,null)}function Ln(e,t,i,r,n){var s={type:e,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==n?++Dn:n,__i:-1,__u:0};return null==n&&null!=fn.vnode&&fn.vnode(s),s}function _n(e){return e.children}function Un(e,t){this.props=e,this.context=t}function Bn(e,t){if(null==t)return e.__?Bn(e.__,e.__i+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?Bn(e):null}function Rn(e){if(e.__P&&e.__d){var t=e.__v,i=t.__e,r=[],n=[],s=On({},t);s.__v=t.__v+1,fn.vnode&&fn.vnode(s),Kn(e.__P,s,t,e.__n,e.__P.namespaceURI,32&t.__u?[i]:null,r,null==i?Bn(t):i,!!(32&t.__u),n),s.__v=t.__v,s.__.__k[s.__i]=s,ts(r,s,n),t.__e=t.__=null,s.__e!=i&&Yn(s)}}function Yn(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some((function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e})),Yn(e)}function Qn(e){(!e.__d&&(e.__d=!0)&&yn.push(e)&&!Hn.__r++||vn!=fn.debounceRendering)&&((v
vendor: 6,106 bytes, line 2
2n=fn.debounceRendering)||Mn)(Hn)}function Hn(){try{for(var e,t=1;yn.length;)yn.length>t&&yn.sort(bn),e=yn.shift(),t=yn.length,Rn(e)}finally{yn.length=Hn.__r=0}}function Vn(e,t,i,r,n,s,a,o,l,u,c){var d,h,p,m,g,f,D,y=r&&r.__k||jn,v=t.length;for(l=Wn(i,t,y,l,v),d=0;d<v;d++)null!=(p=i.__k[d])&&(h=-1!=p.__i&&y[p.__i]||An,p.__i=d,f=Kn(e,p,h,n,s,a,o,l,u,c),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&ns(h.ref,null,p),c.push(p.ref,p.__c||m,p)),null==g&&null!=m&&(g=m),(D=!!(4&p.__u))||h.__k===p.__k?(l=Zn(p,l,e,D),D&&h.__e&&(h.__e=null)):"function"==typeof p.type&&void 0!==f?l=f:m&&(l=m.nextSibling),p.__u&=-7);return i.__e=g,l}function Wn(e,t,i,r,n){var s,a,o,l,u,c=i.length,d=c,h=0;for(e.__k=new Array(n),s=0;s<n;s++)null!=(a=t[s])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[s]=Ln(null,a,null,null,null):zn(a)?a=e.__k[s]=Ln(_n,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[s]=Ln(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,l=s+h,a.__=e,a.__b=e.__b+1,o=null,-1!=(u=a.__i=Gn(a,i,l,d))&&(d--,(o=i[u])&&(o.__u|=2)),null==o||null==o.__v?(-1==u&&(n>c?h--:n<c&&h++),"function"!=typeof a.type&&(a.__u|=4)):u!=l&&(u==l-1?h--:u==l+1?h++:(u>l?h--:h++,a.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<c;s++)null!=(o=i[s])&&!(2&o.__u)&&(o.__e==r&&(r=Bn(o)),ss(o,o));return r}function Zn(e,t,i,r){var n,s;if("function"==typeof e.type){for(n=e.__k,s=0;n&&s<n.length;s++)n[s]&&(n[s].__=e,t=Zn(n[s],t,i,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Bn(e)),i.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function $n(e,t){return t=t||[],null==e||"boolean"==typeof e||(zn(e)?e.some((function(e){$n(e,t)})):t.push(e)),t}function Gn(e,t,i,r){var n,s,a,o=e.key,l=e.type,u=t[i],c=null!=u&&!(2&u.__u);if(null===u&&null==o||c&&o==u.key&&l==u.type)return i;if(r>(c?1:0))for(n=i-1,s=i+1;n>=0||s<t.length;)if(null!=(u=t[a=n>=0?n--:s++])&&!(2&u.__u)&&o==u.key&&l==u.type)return a;return-1}function qn(e,t,i){"-"==t[0]?e.setProperty(t,null==i?"":i):e[t]=null==i?"":"number"!=typeof i||Sn.test(t)?i:i+"px"}function Xn(e,t,i,r,n){var s,a;e:if("style"==t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)i&&t in i||qn(e.style,t,"");if(i)for(t in i)r&&i[t]==r[t]||qn(e.style,t,i[t])}else if("o"==t[0]&&"n"==t[1])s=t!=(t=t.replace(Tn,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=i,i?r?i[En]=r[En]:(i[En]=Cn,e.addEventListener(t,s?Fn:In,s)):e.removeEventListener(t,s?Fn:In,s);else{if("http://www.w3.org/2000/svg"==n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==i?"":i;break e}catch(e){}"function"==typeof i||(null==i||!1===i&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==i?"":i))}}function Jn(e){return function(t){if(this.l){var i=this.l[t.type+e];if(null==t[Nn])t[Nn]=Cn++;else if(t[Nn]<i[En])return;return i(fn.event?fn.event(t):t)}}}function Kn(e,t,i,r,n,s,a,o,l,u){var c,d,h,p,m,g,f,D,y,v,M,b,w,N,E,T=t.type;if(void 0!==t.constructor)return null;128&i.__u&&(l=!!(32&i.__u),s=[o=t.__e=i.__e]),(c=fn.__b)&&c(t);e:if("function"==typeof T)try{if(D=t.props,y=T.prototype&&T.prototype.render,v=(c=T.contextType)&&r[c.__c],M=c?v?v.props.value:c.__:r,i.__c?f=(d=t.__c=i.__c).__=d.__E:(y?t.__c=d=new T(D,M):(t.__c=d=new Un(D,M),d.constructor=T,d.render=as),v&&v.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=On({},d.__s)),On(d.__s,T.getDerivedStateFromProps(D,d.__s))),p=d.props,m=d.state,d.__v=t,h)y&&null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==T.getDerivedStateFromProps&&D!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(D,M),t.__v==i.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(D,d.__s,M)){t.__v!=i.__v&&(d.props=D,d.state=d.__s,d.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.some((function(e){e&&(e.__=t)})),jn.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(D,d.__s,M),y&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,m,g)}))}if(d.context=M,d.props=D,d.__P=e,d.__e=!1,b=fn.__r,w=0,y)d.state=d.__s,d.__d=!1,b&&b(t),c=d.render(d.props,d.state,d.context),jn.push.apply(d.__h,d._sb),d._sb=[];else do{d.__d=!1,b&&b(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=On(On({},r),d.getChildContext())),y&&!h&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(p,m)),N=null!=c&&c.type===_n&&null==c.key?is(c.props.children):c,o=Vn(e,zn(N)?N:[N],t,i,r,n,s,a,o,l,u),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),f&&(d.__E=d.__=null)}catch(e){if(t.__v=null,l||null!=s)if(e.then){for(t.__u|=l?160:128;o&&8==o.nodeType&&o.nextSibling;)o=o.nextSibling;s[s.indexOf(o)]=null,t.__e=o}else{for(E=s.length;E--;)kn(s[E]);es(t)}else t.__e=i.__e,t.__k=i.__k,e.then||es(t);fn.__e(e,t,i)}else null==s&&t.__v==i.__v?(t.__k=i.__k,t.__e=i.__e):o=t.__e=rs(i.__e,t,i,r,n,s,a,l,u);return(c=fn.diffed)&&c(t),128&t.__u?void 0:o}function es(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(es))}function ts(e,t,i){for(var r=0;r<i.length;r++)ns(i[r],i[++r],i[++r]);fn.__c&&fn.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){fn.__e(e,t.__v)}}))}function is(e){return"object"!=typeof e||null==e||e.__b>0?e:zn(e)?e.map(is):void 0!==e.constructor?null:On({},e)}function rs(e,t,i,r,n,s,a,o,l){var u,c,d,h,p,m,g,f=i.props||An,D=t.props,y=t.type;if("svg"==y?n="http://www.w3.org/2000/svg":"math"==y?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),null!=s)for(u=0;
vendor: 3,230 bytes, line 2
2u<s.length;u++)if((p=s[u])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,s[u]=null;break}if(null==e){if(null==y)return document.createTextNode(D);e=document.createElementNS(n,y,D.is&&D),o&&(fn.__m&&fn.__m(t,s),o=!1),s=null}if(null==y)f===D||o&&e.data==D||(e.data=D);else{if(s="textarea"==y&&null!=D.defaultValue?null:s&&gn.call(e.childNodes),!o&&null!=s)for(f={},u=0;u<e.attributes.length;u++)f[(p=e.attributes[u]).name]=p.value;for(u in f)p=f[u],"dangerouslySetInnerHTML"==u?d=p:"children"==u||u in D||"value"==u&&"defaultValue"in D||"checked"==u&&"defaultChecked"in D||Xn(e,u,null,p,n);for(u in D)p=D[u],"children"==u?h=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?m=p:"checked"==u?g=p:o&&"function"!=typeof p||f[u]===p||Xn(e,u,p,f[u],n);if(c)o||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),Vn("template"==t.type?e.content:e,zn(h)?h:[h],t,i,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":n,s,a,s?s[0]:i.__k&&Bn(i,0),o,l),null!=s)for(u=s.length;u--;)kn(s[u]);o&&"textarea"!=y||(u="value","progress"==y&&null==m?e.removeAttribute("value"):null!=m&&(m!==e[u]||"progress"==y&&!m||"option"==y&&m!=f[u])&&Xn(e,u,m,f[u],n),u="checked",null!=g&&g!=e[u]&&Xn(e,u,g,f[u],n))}return e}function ns(e,t,i){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){fn.__e(e,i)}}function ss(e,t,i){var r,n;if(fn.unmount&&fn.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ns(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){fn.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&ss(r[n],t,i||"function"!=typeof e.type);i||kn(e.__e),e.__c=e.__=e.__e=void 0}function as(e,t,i){return this.constructor(e,i)}function os(e,t,i){var r,n,s,a;t==document&&(t=document.documentElement),fn.__&&fn.__(e,t),n=(r="function"==typeof i)?null:i&&i.__k||t.__k,s=[],a=[],Kn(t,e=(!r&&i||t).__k=Pn(_n,null,[e]),n||An,An,t.namespaceURI,!r&&i?[i]:n?null:t.firstChild?gn.call(t.childNodes):null,s,!r&&i?i:n?n.__e:t.firstChild,r,a),ts(s,e,a)}function ls(e,t,i){var r,n,s,a,o=On({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?r=t[s]:"ref"==s?n=t[s]:o[s]=void 0===t[s]&&null!=a?a[s]:t[s];return arguments.length>2&&(o.children=arguments.length>3?gn.call(arguments,2):i),Ln(e.type,o,r||e.key,n||e.ref,null)}function us(e){return"object"==typeof e&&null!==e&&("nodeType"in e&&e.nodeType===Node.ELEMENT_NODE)}gn=jn.slice,fn={__e:function(e,t,i,r){for(var n,s,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((s=n.constructor)&&null!=s.getDerivedStateFromError&&(n.setState(s.getDerivedStateFromError(e)),a=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,r||{}),a=n.__d),a)return n.__E=n}catch(t){e=t}throw e}},Dn=0,Un.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=On({},this.state),"function"==typeof e&&(e=e(On({},i),this.props)),e&&On(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),Qn(this))},Un.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qn(this))},Un.prototype.render=_n,yn=[],Mn="function"==typeof Promise?Promise.prototype.then.bind(Prom
2ise.resolve()):setTimeout,bn=function(e,t){return e.__v.__b-t.__v.__b},Hn.__r=0,wn=Math.random().toString(8),Nn="__d"+wn,En="__a"+wn,Tn=/(PointerCapture)$|Capture$/i,Cn=0,In=Jn(!1),Fn=Jn(!0);var cs=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):us(e)?e:null};var ds=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir};class hs{constructor(e,t){this.uppy=e,this.opts=null!=t?t:{}}getPluginState(){const{plugins:e}=this.uppy.getState();return(null==e?void 0:e[this.id])||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const e=new qi([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}}function ps(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ms=0;function gs(e){return"__private_"+ms+++"_"+e}var fs=gs("updateUI");class Ds extends hs{constructor(){super(...arguments),Object.defineProperty(this,fs,{writable:!0,value:void 0})}getTargetPlugin(e){let t;if("function"==typeof(null==e?void 0:e.addTarget))t=e,t instanceof Ds||console.warn(new Error("The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.",{cause:{targetPlugin:t,UIPlugin:Ds}}));else if("function"==typeof e){const i=e;this.uppy.iteratePlugins((e=>{e instanceof i&&(t=e)}))}return t}mount(e,t){const i=t.id,r=cs(e);if(r){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),ps(this,fs)[fs]=function(e){let t,i=null;return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return t=n,i||(i=Promise.resolve().then((()=>(i=null,e(...t))))),i}}((e=>{this.uppy.getPlugin(this.id)&&(os(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${i} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),os(this.render(this.uppy.getState()),t),this.el=t,r.appendChild(t),t.dir=this.opts.direction||ds(t)||"ltr",this.onMount(),this.el}const n=this.getTargetPlugin(e);
2if(n)return this.uppy.log(`Installing ${i} to ${n.id}`),this.parent=n,this.el=n.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${i}`);let s=`Invalid target option given to ${i}.`;throw s+="function"==typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(s)}render(e){throw new Error("Extend the render method to add your plugin to a DOM element")}update(e){var t,i;null!=this.el&&(null==(t=(i=ps(this,fs))[fs])||t.call(i,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}var ys=Ds;function vs(e,t,i,r){return 0===i||e===t?e:0===r?t:e+(t-e)*2**(-r/i)}var Ms={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"},bs=i(41059),ws=i.n(bs);function Ns(e){const t=[];let i,r="indeterminate";for(const{progress:n}of Object.values(e)){const{preprocess:e,postprocess:s}=n;null==i&&(e||s)&&({mode:r,message:i}=e||s),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==s?void 0:s.mode)&&t.push(s.value)}return{mode:r,message:i,value:t.reduce(((e,i)=>e+i/t.length),0)}}function Es(e){const t=(i=e,{hours:Math.floor(i/3600)%24,minutes:Math.floor(i/60)%60,seconds:Math.floor(i%60)});var i;return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`}function Ts(e){const{newFiles:t,isUploadStarted:i,recoveredState:r,i18n:n,uploadState:s,isSomeGhost:a,startUpload:o}=e,l=ws()("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":s===Ms.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":a}),u=n(t&&i&&!r?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return Pn("button",{type:"button",className:l,"aria-label":n("uploadXFiles",{smart_count:t}),onClick:o,disabled:a,"data-uppy-super-focusable":!0},u)}function Cs(e){const{i18n:t,uppy:i}=e;return Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>i.retryAll().catch((()=>{})),"data-uppy-super-focusable":!0,"data-cy":"retry"},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},Pn("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t("retry"))}function Is(e){const{i18n:t,uppy:i}=e;return Pn("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>i.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},Pn("g",{fill:"none",fillRule:"evenodd"},Pn("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),Pn("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))}function Fs(e){const{isAllPaused:t,i18n:i,isAllComplete:r,resumableUploads:n,uppy:s}=e,a=i(t?"resume":"pause");return Pn("button",{title:a,"aria-label":a,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){r||(n?t?s.resumeAll():s.pauseAll():s.cancelAll())},"data-cy":"togglePauseResume","data-uppy-super-focusable":!0},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},Pn("g",{fill:"none",fillRule:"evenodd"},Pn("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),Pn("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))}function xs(e){const{i18n:t,doneButtonHandler:i}=e;return Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:i,"data-uppy-super-focusable":!0},t("done"))}function As(){return Pn("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},Pn("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function js(e){const{progress:t}=e,{value:i,mode:r,message:n}=t;return Pn("div",{className:"uppy-StatusBar-content"},Pn(As,null),"determinate"===r?`${Math.round(100*i)}% · `:"",n)}function Ss(e){const{numUploads:t,complete:i,totalUploadedSize:r,totalSize:n,totalETA:s,i18n:a}=e,o=t>1;return Pn("div",{className:"uppy-StatusBar-statusSecondary"},o&&a("filesUploadedOfTotal",{complete:i,smart_count:t}),Pn("span",{className:"uppy-StatusBar-additionalInfo"},o&&" · ",a("dataUploadedOfTotal",{complete:br()(r),total:br()(n)})," · ",a("xTimeLeft",{time:Es(s)})))}function zs(e){const{i18n:t,complete:i,numUploads:r}=e;return Pn("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:i,smart_count:r}))}function Os(e){const{i18n:t,newFiles:i,startUpload:r}=e,n=ws()("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return Pn("div",{className:"uppy-StatusBar-statusSecondary"},Pn("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:i})),Pn("button",{type:"button",className:n,"aria-label":t("uploadXFiles",{smart_count:i}),onClick:r},t("upload")))}
2function ks(e){const{i18n:t,supportsUploadProgress:i,totalProgress:r,showProgressDetails:n,isUploadStarted:s,isAllComplete:a,isAllPaused:o,newFiles:l,numUploads:u,complete:c,totalUploadedSize:d,totalSize:h,totalETA:p,startUpload:m}=e,g=l&&s;if(!s||a)return null;const f=t(o?"paused":"uploading");return Pn("div",{className:"uppy-StatusBar-content","aria-label":f,title:f},o?null:Pn(As,null),Pn("div",{className:"uppy-StatusBar-status"},Pn("div",{className:"uppy-StatusBar-statusPrimary"},i?`${f}: ${r}%`:f),o||g||!n?null:i?Pn(Ss,{numUploads:u,complete:c,totalUploadedSize:d,totalSize:h,totalETA:p,i18n:t}):Pn(zs,{i18n:t,complete:c,numUploads:u}),g?Pn(Os,{i18n:t,newFiles:l,startUpload:m}):null))}function Ps(e){const{i18n:t}=e;return Pn("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},Pn("div",{className:"uppy-StatusBar-status"},Pn("div",{className:"uppy-StatusBar-statusPrimary"},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},Pn("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))}function Ls(e){const{error:t,i18n:i,complete:r,numUploads:n}=e;return Pn("div",{className:"uppy-StatusBar-content",title:i("uploadFailed")},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},Pn("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),Pn("div",{className:"uppy-StatusBar-status"},Pn("div",{className:"uppy-StatusBar-statusPrimary"},i("uploadFailed"),Pn("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":i("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${i("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),Pn(zs,{i18n:i,complete:r,numUploads:n})))}const{STATE_ERROR:_s,STATE_WAITING:Us,STATE_PREPROCESSING:Bs,STATE_UPLOADING:Rs,STATE_POSTPROCESSING:Ys,STATE_COMPLETE:Qs}=Ms;function Hs(e){const{newFiles:t,allowNewUpload:i,isUploadInProgress:r,isAllPaused:n,resumableUploads:s,error:a,hideUploadButton:o,hidePauseResumeButton:l,hideCancelButton:u,hideRetryButton:c,recoveredState:d,uploadState:h,totalProgress:p,files:m,supportsUploadProgress:g,hideAfterFinish:f,isSomeGhost:D,doneButtonHandler:y,isUploadStarted:v,i18n:M,startUpload:b,uppy:w,isAllComplete:N,showProgressDetails:E,numUploads:T,complete:C,totalSize:I,totalETA:F,totalUploadedSize:x}=e;const A=function(){switch(h){case Ys:case Bs:{const e=Ns(m);return"determinate"===e.mode?100*e.value:p}case _s:return null;case Rs:return g?p:null;default:return p}}(),j=function(){if(d)return!1;switch(h){case Us:return o||0===t;case Qs:return f;default:return!1}}(),S=null!=A?A:100,z=!a&&t&&!r&&!n&&i&&!o,O=!u&&h!==Us&&h!==Qs,k=s&&!l&&h===Rs,P=a&&!N&&!c,L=y&&h===Qs,_=ws()("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(h){case Ys:case Bs:{const{mode:e}=Ns(m);return"indeterminate"===e}case Rs:return!g;default:return!1}}()});return Pn("div",{className:ws()("uppy-StatusBar",`is-${h}`,{"has-ghosts":D}),"aria-hidden":j},Pn("div",{className:_,style:{width:`${S}%`},role:"progressbar","aria-label":`${S}%`,"aria-valuetext":`${S}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":A}),(()=>{switch(h){case Bs:case Ys:return Pn(js,{progress:Ns(m)});case Qs:return Pn(Ps,{i18n:M});case _s:return Pn(Ls,{error:a,i18n:M,numUploads:T,complete:C});case Rs:return Pn(ks,{i18n:M,supportsUploadProgress:g,totalProgress:p,showProgressDetails:E,isUploadStarted:v,isAllComplete:N,isAllPaused:n,newFiles:t,numUploads:T,complete:C,totalUploadedSize:x,totalSize:I,totalETA:F,startUpload:b});default:return null}})(),Pn("div",{className:"uppy-StatusBar-actions"},d||z?Pn(Ts,{newFiles:t,isUploadStarted:v,recoveredState:d,i18n:M,isSomeGhost:D,startUpload:b,uploadState:h}):null,P?Pn(Cs,{i18n:M,uppy:w}):null,k?Pn(Fs,{isAllPaused:n,i18n:M,isAllComplete:N,resumableUploads:s,uppy:w}):null,O?Pn(Is,{i18n:M,uppy:w}):null,L?Pn(xs,{i18n:M,doneButtonHandler:y}):null))}Hs.defaultProps={doneButtonHandler:void 0,hideAfterFinish:!1,hideCancelButton:!1,hidePauseResumeButton:!1,hideRetryButton:!1,hideUploadButton:void 0,showProgressDetail
2s:void 0};var Vs={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};function Ws(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Zs=0;function $s(e){return"__private_"+Zs+++"_"+e}function Gs(e,t,i,r){if(e)return Ms.STATE_ERROR;if(t)return Ms.STATE_COMPLETE;if(i)return Ms.STATE_WAITING;let n=Ms.STATE_WAITING;const s=Object.keys(r);for(let a=0;a<s.length;a++){const{progress:e}=r[s[a]];if(e.uploadStarted&&!e.uploadComplete)return Ms.STATE_UPLOADING;e.preprocess&&(n=Ms.STATE_PREPROCESSING),e.postprocess&&n!==Ms.STATE_PREPROCESSING&&(n=Ms.STATE_POSTPROCESSING)}return n}const qs={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};var Xs=$s("lastUpdateTime"),Js=$s("previousUploadedBytes"),Ks=$s("previousSpeed"),ea=$s("previousETA"),ta=$s("computeSmoothETA"),ia=$s("onUploadStart");class ra extends ys{constructor(e,t){super(e,{...qs,...t}),Object.defineProperty(this,ta,{value:na}),Object.defineProperty(this,Xs,{writable:!0,value:void 0}),Object.defineProperty(this,Js,{writable:!0,value:void 0}),Object.defineProperty(this,Ks,{writable:!0,value:void 0}),Object.defineProperty(this,ea,{writable:!0,value:void 0}),this.startUpload=()=>this.uppy.upload().catch((()=>{})),Object.defineProperty(this,ia,{writable:!0,value:()=>{const{recoveredState:e}=this.uppy.getState();if(Ws(this,Ks)[Ks]=null,Ws(this,ea)[ea]=null,e)return Ws(this,Js)[Js]=Object.values(e.files).reduce(((e,t)=>{let{progress:i}=t;return e+i.bytesUploaded}),0),void this.uppy.emit("restore-confirmed");Ws(this,Xs)[Xs]=performance.now(),Ws(this,Js)[Js]=0}}),this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=Vs,this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:i,allowNewUpload:r,totalProgress:n,error:s,recoveredState:a}=e,{newFiles:o,startedFiles:l,completeFiles:u,isUploadStarted:c,isAllComplete:d,isAllErrored:h,isAllPaused:p,isUploadInProgress:m,isSomeGhost:g}=this.uppy.getObjectOfFilesPerState(),f=a?Object.values(i):o,D=!!t.resumableUploads,y=!1!==t.uploadProgress;let v=0,M=0;l.forEach((e=>{v+=e.progress.bytesTotal||0,M+=e.progress.bytesUploaded||0}));const b=Ws(this,ta)[ta]({uploaded:M,total:v,remaining:v-M});return Hs({error:s,uploadState:Gs(s,d,a,e.files||{}),allowNewUpload:r,totalProgress:n,totalSize:v,totalUploadedSize:M,isAllComplete:!1,isAllPaused:p,isAllErrored:h,isUploadStarted:c,isUploadInProgress:m,isSomeGhost:g,recoveredState:a,complete:u.length,newFiles:f.length,numUploads:l.length,totalETA:b,files:i,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:D,supportsUploadProgress:y,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;ds(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this),this.uppy.on("upload",Ws(this,ia)[ia]),Ws(this,Xs)[Xs]=performance.now(),Ws(this,Js)[Js]=this.uppy.getFiles().reduce(((e,t)=>e+t.progress.bytesUploaded),0)}uninstall(){this.unmount(),this.uppy.off("upload",Ws(this,ia)[ia])}}function na(e){var t;if(0===e.total||0===e.remaining)return 0;
2null!=(t=Ws(this,Xs))[Xs]||(t[Xs]=performance.now());const i=performance.now()-Ws(this,Xs)[Xs];var r;if(0===i)return Math.round((null!=(r=Ws(this,ea)[ea])?r:0)/100)/10;const n=e.uploaded-Ws(this,Js)[Js];var s;if(Ws(this,Js)[Js]=e.uploaded,n<=0)return Math.round((null!=(s=Ws(this,ea)[ea])?s:0)/100)/10;const a=n/i,o=null==Ws(this,Ks)[Ks]?a:vs(a,Ws(this,Ks)[Ks],2e3,i);Ws(this,Ks)[Ks]=o;const l=e.remaining/o,u=Math.max(Ws(this,ea)[ea]-i,0),c=null==Ws(this,ea)[ea]?l:vs(l,u,2e3,i);return Ws(this,ea)[ea]=c,Ws(this,Xs)[Xs]=performance.now(),Math.round(c/100)/10}ra.VERSION="3.3.3";class sa extends Un{constructor(){super(...arguments),this.ref={current:null}}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,300)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,300)}render(){const{children:e}=this.props;return Pn("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}function aa(e){const t={};for(let s=0;s<e.length;s++)if(null!=e[s]){t[(i=e[s],r=s.toString(36),n=void 0,null!=(n=null==i?void 0:i.key)?n:r)]=e[s]}var i,r,n;return t}function oa(e,t){e=e||{},t=t||{};const i=i=>t.hasOwnProperty(i)?t[i]:e[i],r={};let n=[];for(const a in e)t.hasOwnProperty(a)?n.length&&(r[a]=n,n=[]):n.push(a);const s={};for(const a in t){if(r.hasOwnProperty(a))for(let e=0;e<r[a].length;e++){const t=r[a][e];s[r[a][e]]=i(t)}s[a]=i(a)}for(let a=0;a<n.length;a++)s[n[a]]=i(n[a]);return s}class la extends Un{constructor(e,t){super(e,t),this.refs={},this.state={children:aa($n($n(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const e=this.state.children;for(const t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){const t=aa($n(e.children)||[]),i=this.state.children;let r;for(r in this.setState((e=>({children:oa(e.children,t)}))),t)if(t.hasOwnProperty(r)){const e=i&&i.hasOwnProperty(r);t[r]&&e&&this.currentlyTransitioningKeys[r]?(this.keysToEnter.push(r),this.keysToAbortLeave.push(r)):!t[r]||e||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in i)if(i.hasOwnProperty(r)){const e=t&&t.hasOwnProperty(r);!i[r]||e||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}}componentDidUpdate(){const{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);const{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){const t=this.keysToAbortLeave.indexOf(e);-1!==t&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];null!=t&&t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){const t=this.refs[e];null!=t&&t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const i=aa($n(this.props.children)||[]);i&&i.hasOwnProperty(e)||this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];null!=t&&t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){const t=this.refs[e];null!=t&&t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const i=aa($n(this.props.children)||[]);i&&i.hasOwnProperty(e)||this.performLeave(e)}performLeave(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];null!=t&&t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;const t=this.refs[e];null!=t&&t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];const i=aa($n(this.props.children)||[]);if(i&&i.hasOwnProperty(e))this.performEnter(e);else{const t=(r={},n=this.state.children,Object.assign(r,n));delete t[e],this.setState({children:t})}var r,n}render(e,t){let{childFactory:i,transitionLeave:r,transitionName:n,transitionAppear:s,transitionEnter:a,transitionLeaveTimeout:o,transitionEnterTimeout:l,transitionAppearTimeout:u,component:c,...d}=e,{children:h}=t;const p=Object.entries(h).map((e=>{let[t,r]=e;if(!r)return;const n=function(e,t){const i=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return i[t]||(i[t]=i=>{e.refs[t]=i})}(this,t);return ls(i(r),{ref:n,key:t})}
2)).filter(Boolean);return Pn(c,d,p)}}la.defaultProps={component:"span",childFactory:e=>e};var ua=la;class ca extends ys{constructor(e,t){super(e,t),this.render=e=>Pn("div",{className:"uppy uppy-Informer"},Pn(ua,null,e.info.map((e=>Pn(sa,{key:e.message},Pn("p",{role:"alert"},e.message," ",e.details&&Pn("span",{"aria-label":e.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${e.message} \n\n ${e.details}`)},"?"))))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer"}install(){const{target:e}=this.opts;e&&this.mount(e,this)}}ca.VERSION="3.1.0";i(36554),i(68472);const da=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;var ha=function(e,t,i){var r,n;const s=da.exec(e),a=null!=(r=null!=(n=t.mimeType)?n:null==s?void 0:s[1])?r:"plain/text";let o;if(null!=(null==s?void 0:s[2])){const e=atob(decodeURIComponent(s[3])),t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);o=[t]}else null!=(null==s?void 0:s[3])&&(o=[decodeURIComponent(s[3])]);return i?new File(o,t.name||"",{type:a}):new Blob(o,{type:a})};function pa(e){return e.startsWith("blob:")}function ma(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}function ga(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var fa="undefined"!=typeof self?self:i.g;const Da="undefined"!=typeof navigator,ya=Da&&"undefined"==typeof HTMLImageElement,va=!(void 0===i.g||"undefined"==typeof process||!process.versions||!process.versions.node),Ma=fa.Buffer,ba=!!Ma,wa=e=>void 0!==e;function Na(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(wa).length)}function Ea(e){let t=new Error(e);throw delete t.stack,t}function Ta(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const Ca=e=>String.fromCharCode.apply(null,e),Ia="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class Fa{static from(e,t){return e instanceof this&&e.le===t?e:new Fa(e,void 0,void 0,t)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("boolean"==typeof r&&(this.le=r),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===i&&(i=e.byteLength-t);let r=new DataView(e,t,i);this._swapDataView(r)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof Fa){void 0===i&&(i=e.byteLength-t),(t+=e.byteOffset)+i>e.byteOffset+e.byteLength&&Ea("Creating view outside of available memory in ArrayBuffer");let r=new DataView(e.buffer,t,i);this._swapDataView(r)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else Ea("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fa;return e instanceof DataView||e instanceof Fa?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||Ea("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new i(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new Fa(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength;return i=this.getUint8Array(e,t),Ia?Ia.decode(i):ba?Buffer.from(i).toString("utf8"):decodeURIComponent(escape(Ca(i)));var i}getLatin1String(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength,i=this.getUint8Array(e,t);return Ca(i)}getUnicodeString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.byteLength;const i=[];for(let r=0;r<t&&e+r<this.byteLength;r+=2)i.push(this.getUint16(e+r));return Ca(i)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt16(e,t)}getInt32(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getInt32(e,t)}getUint16(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint16(e,t)}getUint32(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getUint32(e,t)}getFloat32(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(e,t)}getFloat64(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(e,t)}getFloat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat32(e,t)}getDouble(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.le;return this.dataView.getFloat64(e,t)}getUintBytes(e,t,i){switch(t){case 1:return this.getUint8(e,i);case 2:return this.getUint16(e,i);case 4:return this.getUint32(e,i);case 8:return this.getUint64&&this.getUint64(e,i)}}getUint(e,t,i){switch(t){case 8:return this.getUint8(e,i);case 16:return this.getUint16(e,i);case 32:return this.getUint32(e,i);case 64:return this.getUint64&&this.getUint64(e,i)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function xa(e,t){Ea(`${e} '${t}' was not loaded, try using full build of exifr.`)}class Aa extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||xa(this.kind,e),t&&(e in t||function(e,t){Ea(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||xa(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var ja=new Aa("file parser"),Sa=new Aa("segment parser"),za=new Aa("file reader");let Oa=fa.fetch;function ka(e,t){return(i=e).startsWith("data:")||i.length>1e4?La(e,t,"base64"):va&&e.includes("://")?Pa(e,t,"url",_a):va?La(e,t,"fs"):Da?Pa(e,t,"url",_a):void Ea("Invalid input argument");var i}async function Pa(e,t,i,r){return za.has(i)?La(e,t,i):r?async function(e,t){let i=await t(e);return new Fa(i)}
vendor: 1,359 bytes, line 2
2(e,r):void Ea(`Parser ${i} is not loaded`)}async function La(e,t,i){let r=new(za.get(i))(e,t);return await r.read(),r}const _a=e=>Oa(e).then((e=>e.arrayBuffer())),Ua=e=>new Promise(((t,i)=>{let r=new FileReader;r.onloadend=()=>t(r.result||new ArrayBuffer),r.onerror=i,r.readAsArrayBuffer(e)}));class Ba extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function Ra(e,t,i){let r=new Ba;for(let[n,s]of i)r.set(n,s);if(Array.isArray(t))for(let n of t)e.set(n,r);else e.set(t,r);return r}function Ya(e,t,i){let r,n=e.get(t);for(r of i)n.set(r[0],r[1])}const Qa=new Map,Ha=new Map,Va=new Map,Wa=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],Za=["jfif","xmp","icc","iptc","ihdr"],$a=["tiff",...Za],Ga=["ifd0","ifd1","exif","gps","interop"],qa=[...$a,...Ga],Xa=["makerNote","userComment"],Ja=["translateKeys","translateValues","reviveValues","multiSegment"],Ka=[...Ja,"sanitize","mergeOutput","silentErrors"];class eo{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class to extends eo{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,i,r){if(super(),ga(this,"enabled",!1),ga(this,"skip",new Set),ga(this,"pick",
vendor: 19,556 bytes, line 2
2new Set),ga(this,"deps",new Set),ga(this,"translateKeys",!1),ga(this,"translateValues",!1),ga(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(r),this.canBeFiltered=Ga.includes(e),this.canBeFiltered&&(this.dict=Qa.get(e)),void 0!==i)if(Array.isArray(i))this.parse=this.enabled=!0,this.canBeFiltered&&i.length>0&&this.translateTagSet(i,this.pick);else if("object"==typeof i){if(this.enabled=!0,this.parse=!1!==i.parse,this.canBeFiltered){let{pick:e,skip:t}=i;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(i)}else!0===i||!1===i?this.parse=this.enabled=i:Ea(`Invalid options argument: ${i}`)}applyInheritables(e){let t,i;for(t of Ja)i=e[t],void 0!==i&&(this[t]=i)}translateTagSet(e,t){if(this.dict){let i,r,{tagKeys:n,tagValues:s}=this.dict;for(i of e)"string"==typeof i?(r=s.indexOf(i),-1===r&&(r=n.indexOf(Number(i))),-1!==r&&t.add(Number(n[r]))):t.add(i)}else for(let i of e)t.add(i)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,oo(this.pick,this.deps)):this.enabled&&this.pick.size>0&&oo(this.pick,this.deps)}}var io={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},ro=new Map;class no extends eo{static useCached(e){let t=ro.get(e);return void 0!==t||(t=new this(e),ro.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):Ea(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=Da?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of Wa)this[e]=io[e];for(e of Ka)this[e]=io[e];for(e of Xa)this[e]=io[e];for(e of qa)this[e]=new to(e,io[e],void 0,this)}setupFromTrue(){let e;for(e of Wa)this[e]=io[e];for(e of Ka)this[e]=io[e];for(e of Xa)this[e]=!0;for(e of qa)this[e]=new to(e,!0,void 0,this)}setupFromArray(e){let t;for(t of Wa)this[t]=io[t];for(t of Ka)this[t]=io[t];for(t of Xa)this[t]=io[t];for(t of qa)this[t]=new to(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,Ga)}setupFromObject(e){let t;for(t of(Ga.ifd0=Ga.ifd0||Ga.image,Ga.ifd1=Ga.ifd1||Ga.thumbnail,Object.assign(this,e),Wa))this[t]=ao(e[t],io[t]);for(t of Ka)this[t]=ao(e[t],io[t]);for(t of Xa)this[t]=ao(e[t],io[t]);for(t of $a)this[t]=new to(t,io[t],e[t],this);for(t of Ga)this[t]=new to(t,io[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,Ga,qa),!0===e.tiff?this.batchEnableWithBool(Ga,!0):!1===e.tiff?this.batchEnableWithUserValue(Ga,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,Ga):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,Ga)}batchEnableWithBool(e,t){for(let i of e)this[i].enabled=t}batchEnableWithUserValue(e,t){for(let i of e){let e=t[i];this[i].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;if(e&&e.length){for(let e of r)this[e].enabled=!1;let t=so(e,i);for(let[e,i]of t)oo(this[e].pick,i),this[e].enabled=!0}else if(t&&t.length){let e=so(t,i);for(let[t,i]of e)oo(this[t].skip,i)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:i,iptc:r,icc:n}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),i.enabled||e.skip.add(700),r.enabled||e.skip.add(33723),n.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:i,interop:r}=this;r.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),i.needed&&e.deps.add(34853),this.tiff.enabled=Ga.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let n of Ga)this[n].finalizeFilters()}get onlyTiff(){return!Za.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of $a)this[e].enabled&&!Sa.has(e)&&xa("segment parser",e)}}function so(e,t){let i,r,n,s,a=[];for(n of t){for(s of(i=Qa.get(n),r=[],i))(e.includes(s[0])||e.includes(s[1]))&&r.push(s[0]);r.length&&a.push([n,r])}return a}function ao(e,t){return void 0!==e?e:void 0!==t?t:void 0}function oo(e,t){for(let i of t)e.add(i)}ga(no,"default",io);class lo{constructor(e){ga(this,"parsers",{}),ga(this,"output",{}),ga(this,"errors",[]),ga(this,"pushToErrors",(e=>this.errors.push(e))),this.options=no.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?ka(e,t):Da&&!ya&&e instanceof HTMLImageElement?ka(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new Fa(e):Da&&e instanceof Blob?Pa(e,t,"blob",Ua):void Ea("Invalid input argument")}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[i,r]of ja)if(r.canHandle(e,t))return this.fileParser=new r(this.options,this.file,this.parsers),e[i]=!0;this.file.close&&this.file.close(),Ea("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),Na(i=e)?void 0:i;var i}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let i=await t.parse();t.assignToOutput(e,i)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,i=Sa.get("tiff",e);var r;if(t.tiff?r={start:0,type:"tiff"}:t.jpeg&&(r=await this.fileParser.getOrFindSegment("tiff")),void 0===r)return;let n=await this.fileParser.ensureSegmentChunk(r),s=this.parsers.tiff=new i(n,e,t),a=await s.extractThumbnail();return t.close&&t.close(),a}}async function uo(e,t){let i=new lo(t);return await i.read(e),i.parse()}var co=Object.freeze({__proto__:null,parse:uo,Exifr:lo,fileParsers:ja,segmentParsers:Sa,fileReaders:za,tagKeys:Qa,tagValues:Ha,tagRevivers:Va,createDictionary:Ra,extendDictionary:Ya,fetchUrlAsArrayBuffer:_a,readBlobAsArrayBuffer:Ua,chunkedProps:Wa,otherSegments:Za,segments:$a,tiffBlocks:Ga,segmentsAndBlocks:qa,tiffExtractables:Xa,inheritables:Ja,allFormatters:Ka,Options:no});class ho{static findPosition(e,t){let i=e.getUint16(t+2)+2,r="function"==typeof this.headerLength?this.headerLength(e,t,i):this.headerLength,n=t+r,s=i-r;return{offset:t,length:i,headerLength:r,start:n,size:s,end:n+s}}static parse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new this(e,new no({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof Fa?e:new Fa(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;ga(this,"errors",[]),ga(this,"raw",new Map),ga(this,"handleError",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=i,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let i=Va.get(t),r=Ha.get(t),n=Qa.get(t),s=this.options[t],a=s.reviveValues&&!!i,o=s.translateValues&&!!r,l=s.translateKeys&&!!n,u={};for(let[c,d]of e)a&&i.has(c)?d=i.get(c)(d):o&&r.has(c)&&(d=this.translateValue(d,r.get(c))),l&&n.has(c)&&(c=n.get(c)||c),u[c]=d;return u}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,i){if(this.globalOptions.mergeOutput)return Object.assign(e,i);e[t]?Object.assign(e[t],i):e[t]=i}}function po(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function mo(e){return e>=224&&e<=239}function go(e,t,i){for(let[r,n]of Sa)if(n.canHandle(e,t,i))return r}ga(ho,"headerLength",4),ga(ho,"type",void 0),ga(ho,"multiSegment",!1),ga(ho,"canHandle",(()=>!1));class fo extends class{constructor(e,t,i){ga(this,"errors",[]),ga(this,"ensureSegmentChunk",(async e=>{let t=e.start,i=e.size||65536;if(this.file.chunked)if(this.file.available(t,i))e.chunk=this.file.subarray(t,i);else try{e.chunk=await this.file.readChunk(t,i)}catch(t){Ea(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+i?e.chunk=this.file.subarray(t,i):void 0===e.size?e.chunk=this.file.subarray(t):Ea("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=i}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let i=new(Sa.get(e))(t,this.options,this.file);return this.parsers[e]=i}createParsers(e){for(let t of e){let{type:e,chunk:i}=t,r=this.options[e];if(r&&r.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,i)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(){super(...arguments),ga(this,"appSegments",[]),ga(this,"jpegSegments",[]),ga(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(Sa.keyList())):(e=void 0===e?Sa.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&Sa.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;this.setupSegmentFinderArgs(t);let{file:i,findAll:r,wanted:n,remaining:s}=this;if(!r&&this.file.chunked&&(r=Array.from(n).some((e=>{let t=Sa.get(e),i=this.options[e];return t.multiSegment&&i.multiSegment})),r&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,i.byteLength),!this.options.onlyTiff&&i.chunked){let t=!1;for(;s.size>0&&!t&&(i.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:r}=i,n=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>r&&!n?!await i.readNextChunk(e):!await i.readNextChunk(r),void 0===(e=this.findAppSegmentsInRange(e,i.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let i,r,n,s,a,o,{file:l,findAll:u,wanted:c,remaining:d,options:h}=this;for(;e<t;e++)if(255===l.getUint8(e))if(i=l.getUint8(e+1),mo(i)){if(r=l.getUint16(e+2),n=go(l,e,r),n&&c.has(n)&&(s=Sa.get(n),a=s.findPosition(l,e),o=h[n],a.type=n,this.appSegments.push(a),!u&&(s.multiSegment&&o.multiSegment?(this.unfinishedMultiSegment=a.chunkNumber<a.chunkCount,this.unfinishedMultiSegment||d.delete(n)):d.delete(n),0===d.size)))break;h.recordUnknownSegments&&(a=ho.findPosition(l,e),a.marker=i,this.unknownSegments.push(a)),e+=r+1}else if(po(i)){if(r=l.getUint16(e+2),218===i&&!1!==h.stopAfterSos)return;h.recordJpegSegments&&this.jpegSegments.push({offset:e,length:r,marker:i}),e+=r+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e){let t,i,r,n=new Map;for(let s=0;s<e.length;s++)t=e[s],i=t.type,n.has(i)?r=n.get(i):n.set(i,r=[]),r.push(t);return Array.from(n)}(this.appSegments);this.mergedAppSegments=e.map((e=>{let[t,i]=e,r=Sa.get(t,this.options);return r.handleMultiSegments?{type:t,chunk:r.handleMultiSegments(i)}:i[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}ga(fo,"type","jpeg"),ja.set("jpeg",fo);const Do=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class yo extends ho{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,{pick:r,skip:n}=this.options[t];r=new Set(r);let s=r.size>0,a=0===n.size,o=this.chunk.getUint16(e);e+=2;for(let l=0;l<o;l++){let o=this.chunk.getUint16(e);if(s){if(r.has(o)&&(i.set(o,this.parseTag(e,o,t)),r.delete(o),0===r.size))break}else!a&&n.has(o)||i.set(o,this.parseTag(e,o,t));e+=12}return i}parseTag(e,t,i){let{chunk:r}=this,n=r.getUint16(e+2),s=r.getUint32(e+4),a=Do[n];if(a*s<=4?e+=8:e=r.getUint32(e+8),(n<1||n>13)&&Ea(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>r.byteLength&&Ea(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e} is outside of chunk size ${r.byteLength}`),1===n)return r.getUint8Array(e,s);if(2===n)return""===(o=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(o=r.getString(e,s)).trim())?void 0:o;var o;if(7===n)return r.getUint8Array(e,s);if(1===s)return this.parseTagValue(n,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(n))(s),i=a;for(let r=0;r<s;r++)t[r]=this.parseTagValue(n,e),e+=i;return t}}parseTagValue(e,t){let{chunk:i}=this;switch(e){case 1:return i.getUint8(t);case 3:return i.getUint16(t);case 4:case 13:return i.getUint32(t);case 5:return i.getUint32(t)/i.getUint32(t+4);case 6:return i.getInt8(t);case 8:return i.getInt16(t);case 9:return i.getInt32(t);case 10:return i.getInt32(t)/i.getInt32(t+4);case 11:return i.getFloat(t);case 12:return i.getDouble(t);default:Ea(`Invalid tiff type ${e}`)}}}class vo extends yo{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let i=new Map;return this[t]=i,this.parseTags(e,t,i),i}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&Ea("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&Ea(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,Ta(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,Ta(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let i=e.get(t);i&&1===i.length&&e.set(t,i[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",Mo(...e.get(2),e.get(1))),e.set("longitude",Mo(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,i,r={};for(t of Ga)if(e=this[t],!Na(e))if(i=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(r,i)}else r[t]=i;return this.makerNote&&(r.makerNote=this.makerNote),this.userComment&&(r.userComment=this.userComment),r}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[i,r]of Object.entries(t))this.assignObjectToOutput(e,i,r)}}function Mo(e,t,i,r){var n=e+t/60+i/3600;return"S"!==r&&"W"!==r||(n*=-1),n}ga(vo,"type","tiff"),ga(vo,"headerLength",10),Sa.set("tiff",vo);Object.freeze({__proto__:null,default:co,Exifr:lo,fileParsers:ja,segmentParsers:Sa,fileReaders:za,tagKeys:Qa,tagValues:Ha,tagRevivers:Va,createDictionary:Ra,extendDictionary:Ya,fetchUrlAsArrayBuffer:_a,readBlobAsArrayBuffer:Ua,chunkedProps:Wa,otherSegments:Za,segments:$a,tiffBlocks:Ga,segmentsAndBlocks:qa,tiffExtractables:Xa,inheritables:Ja,allFormatters:Ka,Options:no,parse:uo});const bo={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1};Object.assign({},bo,{firstChunkSize:4e4,gps:[1,2,3,4]});Object.assign({},bo,{tiff:!1,ifd1:!0,mergeOutput:!1});const wo=Object.assign({},bo,{firstChunkSize:4e4,ifd0:[274]});const No=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let Eo=!0,To=!0;if("object"==typeof navigator){let e=navigator.userAgent;if(e.includes("iPad")||e.includes("iPhone")){let t=e.match(/OS (\d+)_(\d+)/);if(t){let[,e,i]=t,r=Number(e)+.1*Number(i);Eo=r<13.4,To=!1}}else if(e.includes("OS X 10")){let[,t]=e.match(/OS X 10[_.](\d+)/);
2Eo=To=Number(t)<15}if(e.includes("Chrome/")){let[,t]=e.match(/Chrome\/(\d+)/);Eo=To=Number(t)<81}else if(e.includes("Firefox/")){let[,t]=e.match(/Firefox\/(\d+)/);Eo=To=Number(t)<77}}async function Co(e){let t=await async function(e){let t=new lo(wo);await t.read(e);let i=await t.parse();if(i&&i.ifd0)return i.ifd0[274]}(e);return Object.assign({canvas:Eo,css:To},No[t])}class Io extends Fa{constructor(){super(...arguments),ga(this,"ranges",new Fo),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,i){if(0===e&&0===this.byteLength&&i){let e=new DataView(i.buffer||i,i.byteOffset,i.byteLength);this._swapDataView(e)}else{let i=e+t;if(i>this.byteLength){let{dataView:e}=this._extend(i);this._swapDataView(e)}}}_extend(e){let t;t=ba?Ma.allocUnsafe(e):new Uint8Array(e);let i=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:i}}subarray(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t=t||this._lengthToEnd(e),i&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&this._tryExtend(t,e.byteLength,e);let i=super.set(e,t);return this.ranges.add(t,i.byteLength),i}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class Fo{constructor(){ga(this,"list",[])}get length(){return this.list.length}add(e,t){let i=e+t,r=this.list.filter((t=>xo(e,t.offset,i)||xo(e,t.end,i)));if(r.length>0){e=Math.min(e,...r.map((e=>e.offset))),i=Math.max(i,...r.map((e=>e.end))),t=i-e;let n=r.shift();n.offset=e,n.length=t,n.end=i,this.list=this.list.filter((e=>!r.includes(e)))}else this.list.push({offset:e,length:t,end:i})}available(e,t){let i=e+t;return this.list.some((t=>t.offset<=e&&i<=t.end))}}function xo(e,t,i){return e<=t&&t<=i}class Ao extends Io{constructor(e,t){super(0),ga(this,"chunksRead",0),this.input=e,this.options=t}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.nextChunkOffset;if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,i=await this.readChunk(e,t);return!!i&&i.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}za.set("blob",class extends Ao{async readWhole(){this.chunked=!1;let e=await Ua(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let i=t?e+t:void 0,r=this.input.slice(e,i),n=await Ua(r);return this.set(n,e,!0)}});var jo={strings:{generatingThumbnails:"Generating thumbnails..."}};const So={thumbnailWidth:null,thumbnailHeight:null,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,lazy:!1};class zo extends ys{constructor(e,t){if(super(e,{...So,...t}),this.onFileAdded=e=>{!e.preview&&e.data&&ma(e.type)&&!e.isRemote&&this.addToQueue(e.id)},this.onCancelRequest=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1)},this.onFileRemoved=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1),e.preview&&pa(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!pa(e.preview)||this.addToQueue(e.id)}))},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=e=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})}));const t=()=>{e.forEach((e=>{const t=this.uppy.getFile(e);
vendor: 4,443 bytes, line 2
2this.uppy.emit("preprocess-complete",t)}))};return new Promise((e=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",(()=>{t(),e()})):(t(),e())}))},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType,this.defaultLocale=jo,this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,i){const r=URL.createObjectURL(e.data),n=new Promise(((e,t)=>{const i=new Image;i.src=r,i.addEventListener("load",(()=>{URL.revokeObjectURL(r),e(i)})),i.addEventListener("error",(e=>{URL.revokeObjectURL(r),t(e.error||new Error("Could not create thumbnail"))}))})),s=Co(e.data).catch((()=>1));return Promise.all([n,s]).then((e=>{let[r,n]=e;const s=this.getProportionalDimensions(r,t,i,n.deg),a=function(e,t){let i=e.width,r=e.height;90!==t.deg&&270!==t.deg||(i=e.height,r=e.width);const n=document.createElement("canvas");n.width=i,n.height=r;const s=n.getContext("2d");return s.translate(i/2,r/2),t.canvas&&(s.rotate(t.rad),s.scale(t.scaleX,t.scaleY)),s.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),n}(r,n);return function(e,t,i){try{e.getContext("2d").getImageData(0,0,1,1)}catch(r){if(18===r.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise((r=>{e.toBlob(r,t,i)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>ha(e.toDataURL(t,i),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))}(this.resizeImage(a,s.width,s.height),this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,i,r){let n=e.width/e.height;return 90!==r&&270!==r||(n=e.height/e.width),null!=t?{width:t,height:Math.round(t/n)}:null!=i?{width:Math.round(i*n),height:i}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/n)}}resizeImage(e,t,i){let r=function(e){const t=e.width/e.height,i=5e6,r=4096;let n=Math.floor(Math.sqrt(i*t)),s=Math.floor(i/Math.sqrt(i*t));if(n>r&&(n=r,s=Math.round(n/t)),s>r&&(s=r,n=Math.round(t*s)),e.width>n){const t=document.createElement("canvas");return t.width=n,t.height=s,t.getContext("2d").drawImage(e,0,0,n,s),t}return e}(e),n=Math.ceil(Math.log2(r.width/t));n<1&&(n=1);let s=t*2**(n-1),a=i*2**(n-1);for(;n--;){const e=document.createElement("canvas");e.width=s,e.height=a,e.getContext("2d").drawImage(r,0,0,s,a),r=e,s=Math.round(s/2),a=Math.round(a/2)}return r}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((()=>{})).then((()=>this.processQueue())):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return ma(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)})).catch((t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)})):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}
2uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}}zo.VERSION="3.1.0";var Oo=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&us(e)?[e]:null},ko=Array.from;function Po(e,t,i,r){let{onSuccess:n}=r;e.readEntries((r=>{const s=[...t,...r];r.length?queueMicrotask((()=>{Po(e,s,i,{onSuccess:n})})):n(s)}),(e=>{i(e),n(t)}))}function Lo(e,t){return null==e?e:{kind:e.isFile?"file":e.isDirectory?"directory":void 0,name:e.name,getFile(){return new Promise(((t,i)=>e.file(t,i)))},async*values(){const i=e.createReader(),r=await new Promise((e=>{Po(i,[],t,{onSuccess:i=>e(i.map((e=>Lo(e,t))))})}));yield*r},isSameEntry:void 0}}function _o(e,t,i){try{return void 0===i&&(i=void 0),async function*(){const r=()=>`${t}/${e.name}`;if("file"===e.kind){const n=await e.getFile();null!=n?(n.relativePath=t?r():null,yield n):null!=i&&(yield i)}else if("directory"===e.kind)for await(const i of e.values())yield*_o(i,t?r():e.name);else null!=i&&(yield i)}()}catch(bn){return Promise.reject(bn)}}async function Uo(e,t){var i;const r=null!=(i=null==t?void 0:t.logDropError)?i:Function.prototype;try{const t=[];for await(const i of async function*(e,t){const i=await Promise.all(Array.from(e.items,(async e=>{let i;return null!=i||(i=Lo("function"==typeof e.getAsEntry?e.getAsEntry():e.webkitGetAsEntry(),t)),{fileSystemHandle:i,lastResortFile:e.getAsFile()}})));for(const{lastResortFile:n,fileSystemHandle:s}of i)if(null!=s)try{yield*_o(s,"",n)}catch(r){null!=n?yield n:t(r)}else null!=n&&(yield n)}(e,r))t.push(i);return t}catch{return function(e){const t=ko(e.files);return Promise.resolve(t)}(e)}}var Bo=i(97274),Ro=i.n(Bo);class Yo extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Qo extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Ho=e=>void 0===globalThis.DOMException?new Qo(e):new DOMException(e),Vo=e=>{const t=void 0===e.reason?Ho("This operation was aborted."):e.reason;return t instanceof Error?t:Ho(t)};var Wo,Zo=function(e,t,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(e):r?r.value:t.get(e)};Wo=new WeakMap;var $o,Go,qo,Xo,Jo,Ko,el,tl,il,rl,nl,sl,al,ol,ll,ul,cl,dl,hl,pl,ml,gl,fl,Dl,yl,vl,Ml=class{constructor(){Wo.set(this,[])}enqueue(e,t){const i={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&Zo(this,Wo,"f")[this.size-1].priority>=t.priority)return void Zo(this,Wo,"f").push(i);const r=function(e,t,i){let r=0,n=e.length;for(;n>0;){const s=Math.trunc(n/2);let a=r+s;i(e[a],t)<=0?(r=++a,n-=s+1):n=s}return r}(Zo(this,Wo,"f"),i,((e,t)=>t.priority-e.priority));Zo(this,Wo,"f").splice(r,0,i)}dequeue(){const e=Zo(this,Wo,"f").shift();return null==e?void 0:e.run}filter(e){return Zo(this,Wo,"f").filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return Zo(this,Wo,"f").length}},bl=function(e,t,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,i):n?n.value=i:t.set(e,i),i},wl=function(e,t,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(e):r?r.value:t.get(e)};
2class Nl extends Error{}class El extends(Ro()){constructor(e){var t,i,r,n;if(super(),$o.add(this),Go.set(this,void 0),qo.set(this,void 0),Xo.set(this,0),Jo.set(this,void 0),Ko.set(this,void 0),el.set(this,0),tl.set(this,void 0),il.set(this,void 0),rl.set(this,void 0),nl.set(this,void 0),sl.set(this,0),al.set(this,void 0),ol.set(this,void 0),ll.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Ml,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(i=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==i?i:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(n=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==n?n:""}\` (${typeof e.interval})`);bl(this,Go,e.carryoverConcurrencyCount,"f"),bl(this,qo,e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,"f"),bl(this,Jo,e.intervalCap,"f"),bl(this,Ko,e.interval,"f"),bl(this,rl,new e.queueClass,"f"),bl(this,nl,e.queueClass,"f"),this.concurrency=e.concurrency,this.timeout=e.timeout,bl(this,ll,!0===e.throwOnTimeout,"f"),bl(this,ol,!1===e.autoStart,"f")}get concurrency(){return wl(this,al,"f")}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);bl(this,al,e,"f"),wl(this,$o,"m",Dl).call(this)}async add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t={timeout:this.timeout,throwOnTimeout:wl(this,ll,"f"),...t},new Promise(((i,r)=>{wl(this,rl,"f").enqueue((async()=>{var n,s,a;bl(this,sl,(s=wl(this,sl,"f"),++s),"f"),bl(this,Xo,(a=wl(this,Xo,"f"),++a),"f");try{if(null===(n=t.signal)||void 0===n?void 0:n.aborted)throw new Nl("The task was aborted.");let r=e({signal:t.signal});t.timeout&&(r=function(e,t,i,r){let n;const s=new Promise(((s,a)=>
2{if("number"!=typeof t||1!==Math.sign(t))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t!==Number.POSITIVE_INFINITY){if((r={customTimers:{setTimeout:setTimeout,clearTimeout:clearTimeout},...r}).signal){const{signal:e}=r;e.aborted&&a(Vo(e)),e.addEventListener("abort",(()=>{a(Vo(e))}))}n=r.customTimers.setTimeout.call(void 0,(()=>{if("function"==typeof i){try{s(i())}catch(n){a(n)}return}const r=i instanceof Error?i:new Yo("string"==typeof i?i:`Promise timed out after ${t} milliseconds`);"function"==typeof e.cancel&&e.cancel(),a(r)}),t),(async()=>{try{s(await e)}catch(t){a(t)}finally{r.customTimers.clearTimeout.call(void 0,n)}})()}else s(e)}));return s.clear=()=>{clearTimeout(n),n=void 0},s}(Promise.resolve(r),t.timeout)),t.signal&&(r=Promise.race([r,wl(this,$o,"m",yl).call(this,t.signal)]));const s=await r;i(s),this.emit("completed",s)}catch(o){if(o instanceof Yo&&!t.throwOnTimeout)return void i();r(o),this.emit("error",o)}finally{wl(this,$o,"m",dl).call(this)}}),t),this.emit("add"),wl(this,$o,"m",ml).call(this)}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return wl(this,ol,"f")?(bl(this,ol,!1,"f"),wl(this,$o,"m",Dl).call(this),this):this}pause(){bl(this,ol,!0,"f")}clear(){bl(this,rl,new(wl(this,nl,"f")),"f")}async onEmpty(){0!==wl(this,rl,"f").size&&await wl(this,$o,"m",vl).call(this,"empty")}async onSizeLessThan(e){wl(this,rl,"f").size<e||await wl(this,$o,"m",vl).call(this,"next",(()=>wl(this,rl,"f").size<e))}async onIdle(){0===wl(this,sl,"f")&&0===wl(this,rl,"f").size||await wl(this,$o,"m",vl).call(this,"idle")}get size(){return wl(this,rl,"f").size}sizeBy(e){return wl(this,rl,"f").filter(e).length}get pending(){return wl(this,sl,"f")}get isPaused(){return wl(this,ol,"f")}}Go=new WeakMap,qo=new WeakMap,Xo=new WeakMap,Jo=new WeakMap,Ko=new WeakMap,el=new WeakMap,tl=new WeakMap,il=new WeakMap,rl=new WeakMap,nl=new WeakMap,sl=new WeakMap,al=new WeakMap,ol=new WeakMap,ll=new WeakMap,$o=new WeakSet,ul=function(){return wl(this,qo,"f")||wl(this,Xo,"f")<wl(this,Jo,"f")},cl=function(){return wl(this,sl,"f")<wl(this,al,"f")},dl=function(){var e;bl(this,sl,(e=wl(this,sl,"f"),--e),"f"),wl(this,$o,"m",ml).call(this),this.emit("next")},hl=function(){wl(this,$o,"m",fl).call(this),wl(this,$o,"m",gl).call(this),bl(this,il,void 0,"f")},pl=function(){const e=Date.now();if(void 0===wl(this,tl,"f")){const t=wl(this,el,"f")-e;if(!(t<0))return void 0===wl(this,il,"f")&&bl(this,il,setTimeout((()=>{wl(this,$o,"m",hl).call(this)}),t),"f"),!0;bl(this,Xo,wl(this,Go,"f")?wl(this,sl,"f"):0,"f")}return!1},ml=function(){if(0===wl(this,rl,"f").size)return wl(this,tl,"f")&&clearInterval(wl(this,tl,"f")),bl(this,tl,void 0,"f"),this.emit("empty"),0===wl(this,sl,"f")&&this.emit("idle"),!1;if(!wl(this,ol,"f")){const e=!wl(this,$o,"a",pl);if(wl(this,$o,"a",ul)&&wl(this,$o,"a",cl)){const t=wl(this,rl,"f").dequeue();
2return!!t&&(this.emit("active"),t(),e&&wl(this,$o,"m",gl).call(this),!0)}}return!1},gl=function(){wl(this,qo,"f")||void 0!==wl(this,tl,"f")||(bl(this,tl,setInterval((()=>{wl(this,$o,"m",fl).call(this)}),wl(this,Ko,"f")),"f"),bl(this,el,Date.now()+wl(this,Ko,"f"),"f"))},fl=function(){0===wl(this,Xo,"f")&&0===wl(this,sl,"f")&&wl(this,tl,"f")&&(clearInterval(wl(this,tl,"f")),bl(this,tl,void 0,"f")),bl(this,Xo,wl(this,Go,"f")?wl(this,sl,"f"):0,"f"),wl(this,$o,"m",Dl).call(this)},Dl=function(){for(;wl(this,$o,"m",ml).call(this););},yl=async function(e){return new Promise(((t,i)=>{e.addEventListener("abort",(()=>{i(new Nl("The task was aborted."))}),{once:!0})}))},vl=async function(e,t){return new Promise((i=>{const r=()=>{t&&!t()||(this.off(e,r),i())};this.on(e,r)}))};var Tl,Cl,Il,Fl,xl=El,Al=0,jl=[],Sl=fn,zl=Sl.__b,Ol=Sl.__r,kl=Sl.diffed,Pl=Sl.__c,Ll=Sl.unmount,_l=Sl.__;function Ul(e,t){Sl.__h&&Sl.__h(Cl,e,Al||t),Al=0;var i=Cl.__H||(Cl.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function Bl(e){return Al=1,function(e,t,i){var r=Ul(Tl++,2);if(r.t=e,!r.__c&&(r.__=[i?i(t):Xl(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],i=r.t(t,e);t!==i&&(r.__N=[i,r.__[1]],r.__c.setState({}))}],r.__c=Cl,!Cl.__f)){var n=function(e,t,i){if(!r.__c.__H)return!0;var n=r.__c.__H.__.filter((function(e){return e.__c}));if(n.every((function(e){return!e.__N})))return!s||s.call(this,e,t,i);var a=r.__c.props!==e;return n.some((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),s&&s.call(this,e,t,i)||a};Cl.__f=!0;var s=Cl.shouldComponentUpdate,a=Cl.componentWillUpdate;Cl.componentWillUpdate=function(e,t,i){if(this.__e){var r=s;s=void 0,n(e,t,i),s=r}a&&a.call(this,e,t,i)},Cl.shouldComponentUpdate=n}return r.__N||r.__}(Xl,e)}function Rl(e,t){var i=Ul(Tl++,3);!Sl.__s&&ql(i.__H,t)&&(i.__=e,i.u=t,Cl.__H.__h.push(i))}function Yl(e){return Al=5,Ql((function(){return{current:e}}),[])}function Ql(e,t){var i=Ul(Tl++,7);return ql(i.__H,t)&&(i.__=e(),i.__H=t,i.__h=e),i.__}function Hl(e,t){return Al=8,Ql((function(){return e}),t)}function Vl(){for(var e;e=jl.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some($l),t.__h.some(Gl),t.__h=[]}catch(vn){t.__h=[],Sl.__e(vn,e.__v)}}}Sl.__b=function(e){Cl=null,zl&&zl(e)},Sl.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_l&&_l(e,t)},Sl.__r=function(e){Ol&&Ol(e),Tl=0;var t=(Cl=e.__c).__H;t&&(Il===Cl?(t.__h=[],Cl.__h=[],t.__.some((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.some($l),t.__h.some(Gl),t.__h=[],Tl=0)),Il=Cl},Sl.diffed=function(e){kl&&kl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==jl.push(t)&&Fl===Sl.requestAnimationFrame||((Fl=Sl.requestAnimationFrame)||Zl)(Vl)),t.__H.__.some((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),Il=Cl=null},Sl.__c=function(e,t){t.some((function(e){try{e.__h.some($l),e.__h=e.__h.filter((function(e){return!e.__||Gl(e)}))}catch(vn){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Sl.__e(vn,e.__v)}})),Pl&&Pl(e,t)},Sl.unmount=function(e){Ll&&Ll(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.some((function(e){try{$l(e)}catch(e){t=e}})),i.__H=void 0,t&&Sl.__e(t,i.__v))};var Wl="function"==typeof requestAnimationFrame;function Zl(e){var t,i=function(){clearTimeout(r),Wl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(i,35);Wl&&(t=requestAnimationFrame(i))}function $l(e){var t=Cl,i=e.__c;"function"==typeof i&&(e.__c=void 0,i()),Cl=t}function Gl(e){var t=Cl;e.__c=e.__(),Cl=t}function ql(e,t){return!e||e.length!==t.length||t.some((function(t,i){return t!==e[i]}))}function Xl(e,t){return"function"==typeof t?t(e):t}function Jl(){return Pn("svg",{width:"26",height:"26",viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"},Pn("g",{fill:"none","fill-rule":"evenodd"},Pn("circle",{fill:"#FFF",cx:"13",cy:"13",r:"13"}),Pn("path",{d:"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4","fill-rule":"nonzero"}),Pn("path",{d:"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",fill:"#34A853","fill-rule":"nonzero"}),Pn("path",{d:"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.99
26 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",fill:"#FBBC05","fill-rule":"nonzero"}),Pn("path",{d:"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",fill:"#EA4335","fill-rule":"nonzero"}),Pn("path",{d:"M4 4h18v18H4z"})))}function Kl(e){let{pluginName:t,i18n:i,onAuth:r}=e;const n="Google Drive"===t,s=Hl((e=>{e.preventDefault(),r()}),[r]);return Pn("form",{onSubmit:s},n?Pn("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google","data-uppy-super-focusable":!0},Pn(Jl,null),i("signInWithGoogle")):Pn("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn","data-uppy-super-focusable":!0},i("authenticateWith",{pluginName:t})))}const eu=e=>{let{pluginName:t,i18n:i,onAuth:r}=e;return Pn(Kl,{pluginName:t,i18n:i,onAuth:r})};function tu(e){const{loading:t,pluginName:i,pluginIcon:r,i18n:n,handleAuth:s,renderForm:a=eu}=e;return Pn("div",{className:"uppy-Provider-auth"},Pn("div",{className:"uppy-Provider-authIcon"},r()),Pn("div",{className:"uppy-Provider-authTitle"},n("authenticateWithTitle",{pluginName:i})),Pn("div",{className:"uppy-Provider-authForm"},a({pluginName:i,i18n:n,loading:t,onAuth:s})))}function iu(e){let{i18n:t,logout:i,username:r}=e;return Pn(_n,null,Pn("span",{className:"uppy-ProviderBrowser-user",key:"username"},r),Pn("button",{type:"button",onClick:i,className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowser-userLogout",key:"logout"},t("logOut")))}const ru=e=>{const{getFolder:t,title:i,isLast:r}=e;return Pn(_n,null,Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn",onClick:t},i),r?"":" / ")};function nu(e){const{getFolder:t,title:i,breadcrumbsIcon:r,breadcrumbs:n}=e;return Pn("div",{className:"uppy-Provider-breadcrumbs"},Pn("div",{className:"uppy-Provider-breadcrumbsIcon"},r),n.map(((e,r)=>Pn(ru,{key:e.id,getFolder:()=>t(e.requestPath,e.name),title:0===r?i:e.name,isLast:r+1===n.length}))))}function su(e){return Pn(_n,null,e.showBreadcrumbs&&Pn(nu,{getFolder:e.getFolder,breadcrumbs:e.breadcrumbs,breadcrumbsIcon:e.pluginIcon&&e.pluginIcon(),title:e.title}),Pn(iu,{logout:e.logout,username:e.username,i18n:e.i18n}))}function au(e){return{...e,type:e.mimeType,extension:e.name?cr(e.name).extension:null}}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},ou.apply(this,arguments)}const lu={position:"relative",width:"100%",minHeight:"100%"},uu={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};var cu=class extends Un{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:i,renderRow:r,overscanCount:n=10,...s}=e;const{offset:a,height:o}=this.state;let l=Math.floor(a/i),u=Math.floor(o/i);n&&(l=Math.max(0,l-l%n),u+=n);const c=l+u+4,d=t.slice(l,c),h={...lu,height:t.length*i},p={...uu,top:l*i};return Pn("div",ou({onScroll:this.handleScroll},s),Pn("div",{role:"presentation",style:h},Pn("div",{role:"presentation",style:p},d.map(r))))}};function du(e){const{search:t,searchOnInput:i,searchTerm:r,showButton:n,inputLabel:s,clearSearchLabel:a,buttonLabel:o,clearSearch:l,inputClassName:u,buttonCSSClassName:c}=e,[d,h]=Bl(null!=r?r:""),p=Hl((e=>{e.preventDefault(),t(d)}),[t,d]),m=Hl((e=>{const r=e.target.value;h(r),i&&t(r)}),[h,i,t]),[g]=Bl((()=>{const e=document.createElement("form");return e.setAttribute("tabindex","-1"),e.id=function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}(),e}));return Rl((()=>(document.body.appendChild(g),g.addEventListener("submit",p),()=>{g.removeEventListener("submit",p),document.body.removeChild(g)}
2)),[g,p]),Pn(_n,null,Pn("input",{className:`uppy-u-reset ${u}`,type:"search","aria-label":s,placeholder:s,value:d,onInput:m,form:g.id,"data-uppy-super-focusable":!0}),!n&&Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-ProviderBrowser-searchFilterIcon",width:"12",height:"12",viewBox:"0 0 12 12"},Pn("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})),!n&&d&&Pn("button",{className:"uppy-u-reset uppy-ProviderBrowser-searchFilterReset",type:"button","aria-label":a,title:a,onClick:()=>{h(""),l&&l()}},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",viewBox:"0 0 19 19"},Pn("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"}))),n&&Pn("button",{className:`uppy-u-reset uppy-c-btn uppy-c-btn-primary ${c}`,type:"submit",form:g.id},o))}function hu(e){let{cancel:t,done:i,i18n:r,selected:n}=e;return Pn("div",{className:"uppy-ProviderBrowser-footer"},Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary",onClick:i,type:"button"},r("selectX",{smart_count:n})),Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onClick:t,type:"button"},r("cancel")))}function pu(){return Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:11,height:14.5,viewBox:"0 0 44 58"},Pn("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"}))}function mu(){return Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",style:{minWidth:16,marginRight:3},viewBox:"0 0 276.157 276.157"},Pn("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"}))}function gu(){return Pn("svg",{"aria-hidden":"true",focusable:"false",style:{width:16,marginRight:4},viewBox:"0 0 58 58"},Pn("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),Pn("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"}))}function fu(e){const{itemIconString:t}=e;if(null===t)return null;switch(t){case"file":return Pn(pu,null);case"folder":return Pn(mu,null);case"video":return Pn(gu,null);default:{const{alt:i}=e;return Pn("img",{src:t,alt:i,referrerPolicy:"no-referrer",loading:"lazy",width:16,height:16})}}}var Du=function(e){const{className:t,isDisabled:i,restrictionError:r,isChecked:n,title:s,itemIconEl:a,showTitles:o,toggleCheckbox:l,recordShiftKeyPress:u,id:c,children:d}=e,h=ws()("uppy-u-reset","uppy-ProviderBrowserItem-checkbox","uppy-ProviderBrowserItem-checkbox--grid",{"uppy-ProviderBrowserItem-checkbox--is-checked":n});
2return Pn("li",{className:t,title:i?null==r?void 0:r.message:void 0},Pn("input",{type:"checkbox",className:h,onChange:l,onKeyDown:u,onMouseDown:u,name:"listitem",id:c,checked:n,disabled:i,"data-uppy-super-focusable":!0}),Pn("label",{htmlFor:c,"aria-label":s,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},a,o&&s,d))};function yu(e){const{className:t,isDisabled:i,restrictionError:r,isCheckboxDisabled:n,isChecked:s,toggleCheckbox:a,recordShiftKeyPress:o,type:l,id:u,itemIconEl:c,title:d,handleFolderClick:h,showTitles:p,i18n:m}=e;return Pn("li",{className:t,title:i?null==r?void 0:r.message:void 0},n?null:Pn("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox "+(s?"uppy-ProviderBrowserItem-checkbox--is-checked":""),onChange:a,onKeyDown:o,onMouseDown:o,name:"listitem",id:u,checked:s,"aria-label":"file"===l?null:m("allFilesFromFolderNamed",{name:d}),disabled:i,"data-uppy-super-focusable":!0}),"file"===l?Pn("label",{htmlFor:u,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},Pn("div",{className:"uppy-ProviderBrowserItem-iconWrap"},c),p&&d):Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowserItem-inner",onClick:h,"aria-label":m("openFolderNamed",{name:d})},Pn("div",{className:"uppy-ProviderBrowserItem-iconWrap"},c),p&&d?Pn("span",null,d):m("unnamed")))}function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},vu.apply(this,arguments)}function Mu(e){const{author:t,getItemIcon:i,isChecked:r,isDisabled:n,viewType:s}=e,a=i(),o=ws()("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--selected":r},{"uppy-ProviderBrowserItem--disabled":n},{"uppy-ProviderBrowserItem--noPreview":"video"===a}),l=Pn(fu,{itemIconString:a});switch(s){case"grid":return Pn(Du,vu({},e,{className:o,itemIconEl:l}));case"list":return Pn(yu,vu({},e,{className:o,itemIconEl:l}));case"unsplash":return Pn(Du,vu({},e,{className:o,itemIconEl:l}),Pn("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",className:"uppy-ProviderBrowserItem-author",tabIndex:-1},t.name));default:throw new Error(`There is no such type ${s}`)}}function bu(e){const{currentSelection:t,uppyFiles:i,viewType:r,isChecked:n,toggleCheckbox:s,recordShiftKeyPress:a,showTitles:o,i18n:l,validateRestrictions:u,getNextFolder:c,f:d}=e;if(d.isFolder)return Mu({showTitles:o,viewType:r,i18n:l,id:d.id,title:d.name,getItemIcon:()=>d.icon,isChecked:n(d),toggleCheckbox:e=>s(e,d),recordShiftKeyPress:a,type:"folder",isDisabled:!1,isCheckboxDisabled:"shared-with-me"===d.id,handleFolderClick:()=>c(d)});const h=u(au(d),[...i,...t]);return Mu({id:d.id,title:d.name,author:d.author,getItemIcon:()=>"grid"===r&&d.thumbnail?d.thumbnail:d.icon,isChecked:n(d),toggleCheckbox:e=>s(e,d),isCheckboxDisabled:!1,recordShiftKeyPress:a,showTitles:o,viewType:r,i18n:l,type:"file",isDisabled:Boolean(h)&&!n(d),restrictionError:h})}var wu=function(e){const{currentSelection:t,folders:i,files:r,uppyFiles:n,viewType:s,headerComponent:a,showBreadcrumbs:o,isChecked:l,toggleCheckbox:u,recordShiftKeyPress:c,handleScroll:d,showTitles:h,i18n:p,validateRestrictions:m,isLoading:g,showSearchFilter:f,search:D,searchTerm:y,clearSearch:v,searchOnInput:M,searchInputLabel:b,clearSearchLabel:w,getNextFolder:N,cancel:E,done:T,noResultsLabel:C,virtualList:I}=e,F=t.length,x=Ql((()=>[...i,...r]),[i,r]);return Pn("div",{className:ws()("uppy-ProviderBrowser",`uppy-ProviderBrowser-viewType--${s}`)},a&&Pn("div",{className:"uppy-ProviderBrowser-header"},Pn("div",{className:ws()("uppy-ProviderBrowser-headerBar",!o&&"uppy-ProviderBrowser-headerBar--simple")},a)),f&&Pn("div",{class:"uppy-ProviderBrowser-searchFilter"},Pn(du,{search:D,searchTerm:y,clearSearch:v,inputLabel:b,clearSearchLabel:w,inputClassName:"uppy-ProviderBrowser-searchFilterInput",searchOnInput:M})),g?Pn("div",{className:"uppy-Provider-loading"},Pn("span",null,"string"==typeof g?g:p("loading"))):i.length||r.length?Pn("div",{className:"uppy-ProviderBrowser-body"},I?Pn("ul",{className:"uppy-ProviderBrowser-list"},Pn(cu,{data:x,renderRow:e=>Pn(bu,{currentSelection:t,uppyFiles:n,viewType:s,isChecked:l,toggleCheckbox:u,recordShiftKeyPress:c,showTitles:h,i18n:p,validateRestrictions:m,getNextFolder:N,f:e}),rowHeight:31})):Pn("ul",{className:"uppy-ProviderBrowser-list",onScroll:d,role:"listbox",tabIndex:-1},x.map((e=>Pn(bu,{currentSelection:t,uppyFiles:n,viewType:s,isChecked:l,toggleCheckbox:u,recordShiftKeyPress:c,showTitles:h,i18n:p,validateRestrictions:m,getNextFolder:N,f:e}))))):Pn("div",{className:"uppy-Provider-empty"},C),F>0&&Pn(hu,{selected:F,done:T,cancel:E,i18n:p}))};class Nu extends Un{componentWillUnmount(){const{onUnmount:e}=this.props;e()}render(){const{children:e}=this.props;return $n(e)[0]}}class Eu{constructor(e,t){this.filterItems=e=>{const t=this.plugin.getPluginState();return t.filterInput&&""!==t.filterInput?e.filter((e=>-1!==e.name.toLowerCase().indexOf(t.filterInput.toLowerCase()))):e},this.recordShiftKeyPress=e=>{this.isShiftKeyPressed=e.shiftKey},this.isChecked=e=>{const{currentSelection:t}=this.plugin.getPluginState();return t.some((t=>
2t.id===e.id))},this.plugin=e,this.provider=t.provider,this.opts=t,this.isHandlingScroll=!1,this.preFirstRender=this.preFirstRender.bind(this),this.handleError=this.handleError.bind(this),this.clearSelection=this.clearSelection.bind(this),this.cancelPicking=this.cancelPicking.bind(this)}preFirstRender(){this.plugin.setPluginState({didFirstRender:!0}),this.plugin.onFirstRender()}shouldHandleScroll(e){const{scrollHeight:t,scrollTop:i,offsetHeight:r}=e.target;return t-(i+r)<50&&!this.isHandlingScroll}clearSelection(){this.plugin.setPluginState({currentSelection:[],filterInput:""})}cancelPicking(){this.clearSelection();const e=this.plugin.uppy.getPlugin("Dashboard");e&&e.hideAllPanels()}handleError(e){var t;const{uppy:i}=this.plugin,r=i.i18n("companionError");i.log(e.toString()),e.isAuthError||"AbortError"===(null==(t=e.cause)?void 0:t.name)||i.info({message:r,details:e.toString()},"error",5e3)}registerRequestClient(){this.requestClientId=this.provider.provider,this.plugin.uppy.registerRequestClient(this.requestClientId,this.provider)}getTagFile(e){const t={id:e.id,source:this.plugin.id,name:e.name||e.id,type:e.mimeType,isRemote:!0,data:e,meta:{},body:{fileId:e.id},remote:{companionUrl:this.plugin.opts.companionUrl,url:`${this.provider.fileUrl(e.requestPath)}`,body:{fileId:e.id},providerName:this.provider.name,provider:this.provider.provider,requestClientId:this.requestClientId}};return e.thumbnail&&(t.preview=e.thumbnail),e.author&&(null!=e.author.name&&(t.meta.authorName=String(e.author.name)),e.author.url&&(t.meta.authorUrl=e.author.url)),null!=e.relDirPath&&(t.meta.relativePath=e.relDirPath?`${e.relDirPath}/${t.name}`:null),null!=e.absDirPath&&(t.meta.absolutePath=e.absDirPath?`/${e.absDirPath}/${t.name}`:`/${t.name}`),t}toggleCheckbox(e,t){e.stopPropagation(),e.preventDefault(),e.currentTarget.focus();const{folders:i,files:r}=this.plugin.getPluginState(),n=this.filterItems(i.concat(r));if(this.lastCheckbox&&this.isShiftKeyPressed){const{currentSelection:e}=this.plugin.getPluginState(),i=n.indexOf(this.lastCheckbox),r=n.indexOf(t),s=i<r?n.slice(i,r+1):n.slice(r,i+1),a=[];for(const t of s){const{uppy:e}=this.plugin,i=e.validateRestrictions(au(t),[...e.getFiles(),...a]);i?e.info({message:i.message},"error",e.opts.infoTimeout):a.push(t)}return void this.plugin.setPluginState({currentSelection:[...new Set([...e,...a])]})}this.lastCheckbox=t;const{currentSelection:s}=this.plugin.getPluginState();this.isChecked(t)?this.plugin.setPluginState({currentSelection:s.filter((e=>e.id!==t.id))}):this.plugin.setPluginState({currentSelection:s.concat([t])})}setLoading(e){this.plugin.setPluginState({loading:e})}}function Tu(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Cu=0;function Iu(e){return"__private_"+Cu+++"_"+e}function Fu(e,t){return e?`${e}/${t}`:t}function xu(){return Pn("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},Pn("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}const Au={viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,loadAllFiles:!1,virtualList:!1};var ju=Iu("abortController"),Su=Iu("withAbort"),zu=Iu("list"),Ou=Iu("listFilesAndFolders"),ku=Iu("recursivelyListAllFiles");async function Pu(e){var t;null==(t=Tu(this,ju)[ju])||t.abort();const i=new AbortController;Tu(this,ju)[ju]=i;const r=()=>{i.abort(),this.clearSelection()};try{this.plugin.uppy.on("dashboard:close-panel",r),this.plugin.uppy.on("cancel-all",r),await e(i.signal)}finally{this.plugin.uppy.off("dashboard:close-panel",r),this.plugin.uppy.off("cancel-all",r),Tu(this,ju)[ju]=void 0}}async function Lu(e){let{requestPath:t,absDirPath:i,signal:r}=e;const{username:n,nextPagePath:s,items:a}=await this.provider.list(t,{signal:r});return this.username=n||this.username,{items:a.map((e=>({...e,absDirPath:i}))),nextPagePath:s}}async function _u(e){let{breadcrumbs:t,signal:i}=e;const r=function(e){return e.slice(1).map((e=>e.name)).join("/")}(t),{items:n,nextPagePath:s}=await Tu(this,zu)[zu]({requestPath:this.nextPagePath,absDirPath:r,signal:i});this.nextPagePath=s;const a=[],o=[];
2return n.forEach((e=>{e.isFolder?o.push(e):a.push(e)})),{files:a,folders:o}}async function Uu(e){let{requestPath:t,absDirPath:i,relDirPath:r,queue:n,onFiles:s,signal:a}=e,o=t;for(;o;){const e=await Tu(this,zu)[zu]({requestPath:o,absDirPath:i,signal:a});o=e.nextPagePath;const t=e.items.filter((e=>!e.isFolder)),l=e.items.filter((e=>e.isFolder));s(t);const u=l.map((async e=>n.add((async()=>Tu(this,ku)[ku]({requestPath:e.requestPath,absDirPath:Fu(i,e.name),relDirPath:Fu(r,e.name),queue:n,onFiles:s,signal:a})))));await Promise.all(u)}}function Bu(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(class extends Eu{constructor(e,t){super(e,{...Au,...t}),Object.defineProperty(this,ku,{value:Uu}),Object.defineProperty(this,Ou,{value:_u}),Object.defineProperty(this,zu,{value:Lu}),Object.defineProperty(this,Su,{value:Pu}),Object.defineProperty(this,ju,{writable:!0,value:void 0}),this.filterQuery=this.filterQuery.bind(this),this.clearFilter=this.clearFilter.bind(this),this.getFolder=this.getFolder.bind(this),this.getNextFolder=this.getNextFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({authenticated:void 0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[]}),this.registerRequestClient()}tearDown(){}async getFolder(e,t){this.setLoading(!0);try{await Tu(this,Su)[Su]((async i=>{this.lastCheckbox=void 0;let{breadcrumbs:r}=this.plugin.getPluginState();const n=r.findIndex((t=>e===t.requestPath));r=-1!==n?r.slice(0,n+1):[...r,{requestPath:e,name:t}],this.nextPagePath=e;let s=[],a=[];do{const{files:e,folders:t}=await Tu(this,Ou)[Ou]({breadcrumbs:r,signal:i});s=s.concat(e),a=a.concat(t),this.setLoading(this.plugin.uppy.i18n("loadedXFiles",{numFiles:s.length+a.length}))}while(this.opts.loadAllFiles&&this.nextPagePath);this.plugin.setPluginState({folders:a,files:s,breadcrumbs:r,filterInput:""})}))}catch(i){if("UserFacingApiError"===(null==i?void 0:i.name))return void this.plugin.uppy.info({message:this.plugin.uppy.i18n(i.message)},"warning",5e3);this.handleError(i)}finally{this.setLoading(!1)}}getNextFolder(e){this.getFolder(e.requestPath,e.name),this.lastCheckbox=void 0}async logout(){try{await Tu(this,Su)[Su]((async e=>{const t=await this.provider.logout({signal:e});if(t.ok){if(!t.revoked){const e=this.plugin.uppy.i18n("companionUnauthorizeHint",{provider:this.plugin.title,url:t.manual_revoke_url});this.plugin.uppy.info(e,"info",7e3)}const e={authenticated:!1,files:[],folders:[],breadcrumbs:[],filterInput:""};this.plugin.setPluginState(e)}}))}catch(e){this.handleError(e)}}filterQuery(e){this.plugin.setPluginState({filterInput:e})}clearFilter(){this.plugin.setPluginState({filterInput:""})}async handleAuth(e){try{await Tu(this,Su)[Su]((async t=>{this.setLoading(!0),await this.provider.login({authFormData:e,signal:t}),this.plugin.setPluginState({authenticated:!0}),this.preFirstRender()}))}catch(t){if("UserFacingApiError"===t.name)return void this.plugin.uppy.info({message:this.plugin.uppy.i18n(t.message)},"warning",5e3);this.plugin.uppy.log(`login failed: ${t.message}`)}finally{this.setLoading(!1)}}async handleScroll(e){if(this.shouldHandleScroll(e)&&this.nextPagePath){this.isHandlingScroll=!0;try{await Tu(this,Su)[Su]((async e=>{const{files:t,folders:i,breadcrumbs:r}=this.plugin.getPluginState(),{files:n,folders:s}=await Tu(this,Ou)[Ou]({breadcrumbs:r,signal:e}),a=t.concat(n),o=i.concat(s);this.plugin.setPluginState({folders:o,files:a})}))}catch(t){this.handleError(t)}finally{this.isHandlingScroll=!1}}}async donePicking(){this.setLoading(!0);try{await Tu(this,Su)[Su]((async e=>{const{currentSelection:t}=this.plugin.getPluginState(),i=[],r=[];for(const n of t){const{requestPath:t}=n,s=e=>({...e,relDirPath:e.absDirPath.replace(n.absDirPath,"").replace(/^\//,"")});if(n.isFolder){let a=!0,o=0;const l=new xl({concurrency:6}),u=e=>{for(const t of e){const e=mr(this.getTagFile(t),this.plugin.uppy.getID());this.plugin.uppy.checkIfFileAlreadyExists(e)||(r.push(s(t)),o++,this.setLoading(this.plugin.uppy.i18n("addedNumFiles",{numFiles:o}))),a=!1}};let c;await Tu(this,ku)[ku]({requestPath:t,absDirPath:Fu(n.absDirPath,n.name),relDirPath:n.name,queue:l,onFiles:u,signal:e}),await l.onIdle(),c=a?this.plugin.uppy.i18n("emptyFolderAdded"):0===o?this.plugin.uppy.i18n("folderAlreadyAdded",{folder:n.name}):this.plugin.uppy.i18n("folderAdded",{smart_count:o,folder:n.name}),i.push(c)}else r.push(s(n))}this.plugin.uppy.log("Adding files from a remote provider"),this.plugin.uppy.addFiles(r.map((e=>this.getTagFile(e,this.requestClientId)))),this.plugin.setPluginState({filterInput:""}
2),i.forEach((e=>this.plugin.uppy.info(e))),this.clearSelection()}))}catch(e){this.handleError(e)}finally{this.setLoading(!1)}}render(e,t){var i=this;void 0===t&&(t={});const{authenticated:r,didFirstRender:n}=this.plugin.getPluginState(),{i18n:s}=this.plugin.uppy;n||this.preFirstRender();const a={...this.opts,...t},{files:o,folders:l,filterInput:u,loading:c,currentSelection:d}=this.plugin.getPluginState(),{isChecked:h,recordShiftKeyPress:p,filterItems:m}=this,g=""!==u,f=this.plugin.icon||xu,D={showBreadcrumbs:a.showBreadcrumbs,getFolder:this.getFolder,breadcrumbs:this.plugin.getPluginState().breadcrumbs,pluginIcon:f,title:this.plugin.title,logout:this.logout,username:this.username,i18n:s},y={isChecked:h,toggleCheckbox:this.toggleCheckbox.bind(this),recordShiftKeyPress:p,currentSelection:d,files:g?m(o):o,folders:g?m(l):l,getNextFolder:this.getNextFolder,getFolder:this.getFolder,loadAllFiles:this.opts.loadAllFiles,virtualList:this.opts.virtualList,showSearchFilter:a.showFilter,search:this.filterQuery,clearSearch:this.clearFilter,searchTerm:u,searchOnInput:!0,searchInputLabel:s("filter"),clearSearchLabel:s("resetFilter"),noResultsLabel:s("noFilesFound"),logout:this.logout,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,headerComponent:Pn(su,D),title:this.plugin.title,viewType:a.viewType,showTitles:a.showTitles,showBreadcrumbs:a.showBreadcrumbs,pluginIcon:f,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)},isLoading:c};return Pn(Nu,{onUnmount:this.clearSelection},!1===r?Pn(tu,{pluginName:this.plugin.title,pluginIcon:f,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18nArray,renderForm:this.opts.renderAuthForm,loading:c}):Pn(wu,y))}}).VERSION="3.13.0";var Ru=0;function Yu(e){return"__private_"+Ru+++"_"+e}const Qu={isInputMode:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",currentSelection:[],searchTerm:null},Hu={viewType:"grid",showTitles:!0,showFilter:!0,showBreadcrumbs:!0};var Vu=Yu("updateFilesAndInputMode");function Wu(e,t){this.nextPageQuery=e.nextPageQuery,e.items.forEach((e=>{t.push(e)})),this.plugin.setPluginState({currentSelection:[],isInputMode:!1,files:t,searchTerm:e.searchedFor})}(class extends Eu{constructor(e,t){super(e,{...Hu,...t}),Object.defineProperty(this,Vu,{value:Wu}),this.nextPageQuery=null,this.search=this.search.bind(this),this.clearSearch=this.clearSearch.bind(this),this.resetPluginState=this.resetPluginState.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState(Qu),this.registerRequestClient()}tearDown(){}resetPluginState(){this.plugin.setPluginState(Qu)}async search(e){const{searchTerm:t}=this.plugin.getPluginState();if(!e||e!==t){this.setLoading(!0);try{const t=await this.provider.search(e);Bu(this,Vu)[Vu](t,[])}catch(i){this.handleError(i)}finally{this.setLoading(!1)}}}clearSearch(){this.plugin.setPluginState({currentSelection:[],files:[],searchTerm:null})}async handleScroll(e){const t=this.nextPageQuery||null;if(this.shouldHandleScroll(e)&&t){this.isHandlingScroll=!0;try{const{files:e,searchTerm:i}=this.plugin.getPluginState(),r=await this.provider.search(i,t);Bu(this,Vu)[Vu](r,e)}catch(i){this.handleError(i)}finally{this.isHandlingScroll=!1}}}donePicking(){const{currentSelection:e}=this.plugin.getPluginState();this.plugin.uppy.log("Adding remote search provider files"),this.plugin.uppy.addFiles(e.map((e=>this.getTagFile(e)))),this.resetPluginState()}render(e,t){var i=this;void 0===t&&(t={});const{didFirstRender:r,isInputMode:n,searchTerm:s}=this.plugin.getPluginState(),{i18n:a}=this.plugin.uppy;r||this.preFirstRender();const o={...this.opts,...t},{files:l,folders:u,filterInput:c,loading:d,currentSelection:h}=this.plugin.getPluginState(),{isChecked:p,filterItems:m,recordShiftKeyPress:g}=this,f=""!==c,D={isChecked:p,toggleCheckbox:this.toggleCheckbox.bind(this),recordShiftKeyPress:g,currentSelection:h,files:f?m(l):l,folders:f?m(u):u,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,showSearchFilter:o.showFilter,search:this.search,clearSearch:this.clearSearch,searchTerm:s,searchOnInput:!1,searchInputLabel:a("search"),clearSearchLabel:a("resetSearch"),noResultsLabel:a("noSearchResults"),title:this.plugin.title,viewType:o.viewType,showTitles:o.showTitles,showFilter:o.showFilter,isLoading:d,showBreadcrumbs:o.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:a,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return i.plugin.uppy.validateRestrictions(...arguments)}};return Pn(Nu,{onUnmount:this.resetPluginState},n?Pn("div",{className:"uppy-SearchProvider"},Pn(du,{search:this.search,inputLabel:a("enterTextToSearch"),buttonLabel:a("searchImages"),inputClassName:"uppy-c-textInput uppy-SearchProvider-input",buttonCSSClassName:"uppy-SearchProvider-searchButton",showButton:!0})):Pn(wu,D))}}).VERSION="3.13.0";let Zu=function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e};var $u=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Gu(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(r=e[i],n=t[i],!(r===n||$u(r)&&$u(n)))return!1;var r,n;return!0}function qu(e,t){void 0===t&&(t=Gu);var i=null;function r(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(i&&i.lastThis===this&&t(r,i.lastArgs))return i.lastResult;var s=e.apply(this,r);return i={lastResult:s,lastArgs:r,lastThis:this},s}return r.clear=function(){i=null},r}var Xu=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not
2([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Ju(e,t){if(t){const i=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(i)return i}return e}function Ku(e,t){const i=t[0];i&&(i.focus(),e.preventDefault())}function ec(e,t,i){const r=Ju(i,t),n=ko(r.querySelectorAll(Xu)),s=n.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(r)?Ku(e,n):e.shiftKey&&0===s?function(e,t){const i=t[t.length-1];i&&(i.focus(),e.preventDefault())}(e,n):e.shiftKey||s!==n.length-1||Ku(e,n)}var tc=i(12784),ic=i.n(tc);function rc(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&("FormData"in window&&"FileReader"in window)}var nc=i(76491),sc=i.n(nc);function ac(e){const t={color:"#838999",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("g",{fill:"#A7AFB7",fillRule:"nonzero"},Pn("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),Pn("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const i=e.split("/")[0],r=e.split("/")[1];if("text"===i)return{color:"#5a5e69",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))};if("image"===i)return{color:"#686de0",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("g",{fill:"#686DE0",fillRule:"evenodd"},Pn("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),Pn("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),Pn("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))};if("audio"===i)return{color:"#068dbb",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))};if("video"===i)return{color:"#19af67",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))};if("application"===i&&"pdf"===r)return{color:"#e25149",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))};return"application"===i&&-1!==["zip","x-7z-compressed","x-zip-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(r)?{color:"#00C469",icon:Pn("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},Pn("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:t}function oc(e){const{file:t}=e;if(t.preview)return Pn("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:i,icon:r}=ac(t.type);return Pn("div",{className:"uppy-Dashboard-Item-previewIconWrap"},Pn("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:i}},r),Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},Pn("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}function lc(e){const{file:t,toggleFileCard:i,i18n:r,metaFields:n}=e,{missingRequiredMetaFields:s}=t;if(null==s||!s.length)return null;const a=s.map((e=>((e,t)=>{const i=("function"==typeof t?t():t).filter((t=>
2t.id===e));return i[0].name})(e,n))).join(", ");return Pn("div",{className:"uppy-Dashboard-Item-errorMessage"},r("missingRequiredMetaFields",{smart_count:s.length,fields:a})," ",Pn("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>i(!0,t.id)},r("editFile")))}function uc(e){const{file:t,i18n:i,toggleFileCard:r,metaFields:n,showLinkToFileUploadResult:s}=e;return Pn("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:t.preview?"rgba(255, 255, 255, 0.5)":ac(t.type).color}},s&&t.uploadURL&&Pn("a",{className:"uppy-Dashboard-Item-previewLink",href:t.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":t.meta.name},Pn("span",{hidden:!0},t.meta.name)),Pn(oc,{file:t}),Pn(lc,{file:t,i18n:i,toggleFileCard:r,metaFields:n}))}function cc(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function dc(e){return Pn("div",{className:"uppy-Dashboard-Item-progress"},Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":cc(e),title:cc(e),onClick:()=>function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.resumableUploads&&!e.hidePauseResumeButton?e.uppy.pauseResume(e.file.id):e.individualCancellation&&!e.hideCancelButton&&e.uppy.removeFile(e.file.id):e.uppy.retryUpload(e.file.id))}(e)},e.children))}function hc(e){let{children:t}=e;return Pn("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},t)}function pc(e){let{progress:t}=e;const i=2*Math.PI*15;return Pn("g",null,Pn("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),Pn("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":i,"stroke-dashoffset":i-i/100*t}))}function mc(e){return e.file.progress.uploadStarted?e.isUploaded?Pn("div",{className:"uppy-Dashboard-Item-progress"},Pn("div",{className:"uppy-Dashboard-Item-progressIndicator"},Pn(hc,null,Pn("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),Pn("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):e.recoveredState?void 0:e.error&&!e.hideRetryButton?Pn(dc,e,Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},Pn("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),Pn("path",{d:"M7.9 3H10v2H7.9z"}),Pn("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),Pn("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?Pn(dc,e,Pn(hc,null,Pn(pc,{progress:e.file.progress.percentage}),e.file.isPaused?Pn("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):Pn("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},Pn("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),Pn("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?Pn("div",{className:"uppy-Dashboard-Item-progress"},Pn("div",{className:"uppy-Dashboard-Item-progressIndicator"},Pn(hc,null,Pn(pc,{progress:e.file.progress.percentage})))):Pn(dc,e,Pn(hc,null,Pn(pc,{progress:e.file.progress.percentage}),Pn("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null}const gc="...";function fc(e,t){if(0===t)return"";if(e.length<=t)return e;if(t<=4)return`${e.slice(0,t-1)}…`;const i=t-3,r=Math.ceil(i/2),n=Math.floor(i/2);return e.slice(0,r)+gc+e.slice(-n)}const Dc=e=>{let{file:t,onClick:i}=e;return t.error?Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:i,type:"button"},"?"):null};function yc(e){const{file:t}=e;return Pn("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},Pn("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:i}=e.file.meta;return Pn("div",{className:"uppy-Dashboard-Item-name",title:i},fc(i,e.isSingleFile&&e.containerHeight>=350?90:e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),Pn(Dc,{file:e.file,onClick:()=>alert(e.file.error)})),Pn("div",{className:"uppy-Dashboard-Item-status"},(e=>{var t;const{author:i}=e.file.meta,r=null==(t=e.file.remote)?void 0:t.providerName;return i?Pn("div",{className:"uppy-Dashboard-Item-author"},Pn("a",{href:`${i.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},fc(i.name,13)),r?Pn(_n,null," · ",r," · "):null):null})(e),(e=>e.file.size&&Pn("div",{className:"uppy-Dashboard-Item-statusSize"},br()(e.file.size)))(e),(e=>e.file.isGhost&&Pn("span",null," • ",Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),Pn(lc,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}function vc(e){let{file:t,uploadInProgressOrComplete:i,metaFields:r,canEditFile:n,i18n:s,onClick:a}=e;return!i&&r&&r.length>0||!i&&n(t)?Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":s("editFileWithFilename",{file:t.meta.name}),title:s("editFileWithFilename",{file:t.meta.name}),onClick:()=>a()},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},Pn("g",{fillRule:"evenodd"},Pn("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),Pn("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),Pn("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function Mc(e){let{i18n:t,onClick:i,file:r}=e;return Pn("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:r.meta.name}),title:t("removeFile",{file:r.meta.name}),onClick:()=>i()},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},Pn("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),Pn("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}const bc=(e,t)=>{var i,r;
2(i=t.file.uploadURL,r=t.i18n("copyLinkToClipboardFallback"),void 0===r&&(r="Copy the URL below"),new Promise((e=>{const t=document.createElement("textarea");t.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),t.value=i,document.body.appendChild(t),t.select();const n=()=>{document.body.removeChild(t),window.prompt(r,i),e()};try{return document.execCommand("copy")?(document.body.removeChild(t),e()):n()}catch(s){return document.body.removeChild(t),n()}}))).then((()=>{t.uppy.log("Link copied to clipboard."),t.uppy.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(t.uppy.log).then((()=>e.target.focus({preventScroll:!0})))};function wc(e){const{i18n:t}=e;return Pn("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:t=>bc(t,e)},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},Pn("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}function Nc(e){const{uppy:t,file:i,uploadInProgressOrComplete:r,canEditFile:n,metaFields:s,showLinkToFileUploadResult:a,showRemoveButton:o,i18n:l,toggleFileCard:u,openFileEditor:c}=e;return Pn("div",{className:"uppy-Dashboard-Item-actionWrapper"},Pn(vc,{i18n:l,file:i,uploadInProgressOrComplete:r,canEditFile:n,metaFields:s,onClick:()=>{s&&s.length>0?u(!0,i.id):c(i)}}),a&&i.uploadURL?Pn(wc,{file:i,uppy:t,i18n:l}):null,o?Pn(Mc,{i18n:l,file:i,uppy:t,onClick:()=>t.removeFile(i.id,"removed-by-user")}):null)}class Ec extends Un{componentDidMount(){const{file:e}=this.props;
2e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!sc()(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,i=e.progress.uploadComplete&&!t&&!e.error,r=e.progress.uploadStarted||t,n=e.progress.uploadStarted&&!e.progress.uploadComplete||t,s=e.error||!1,{isGhost:a}=e;let o=(this.props.individualCancellation||!n)&&!i;i&&this.props.showRemoveButtonAfterComplete&&(o=!0);return Pn("div",{className:ws()({"uppy-Dashboard-Item":!0,"is-inprogress":n&&!this.props.recoveredState,"is-processing":t,"is-complete":i,"is-error":!!s,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":a}),id:`uppy_${e.id}`,role:this.props.role},Pn("div",{className:"uppy-Dashboard-Item-preview"},Pn(uc,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),Pn(mc,{uppy:this.props.uppy,file:e,error:s,isUploaded:i,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),Pn("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},Pn(yc,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,containerHeight:this.props.containerHeight,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields,isSingleFile:this.props.isSingleFile}),Pn(Nc,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:o,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:r,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}function Tc(e){let{id:t,error:i,i18n:r,uppy:n,files:s,acquirers:a,resumableUploads:o,hideRetryButton:l,hidePauseResumeButton:u,hideCancelButton:c,showLinkToFileUploadResult:d,showRemoveButtonAfterComplete:h,isWide:p,metaFields:m,isSingleFile:g,toggleFileCard:f,handleRequestThumbn
2ail:D,handleCancelThumbnail:y,recoveredState:v,individualCancellation:M,itemsPerRow:b,openFileEditor:w,canEditFile:N,toggleAddFilesPanel:E,containerWidth:T,containerHeight:C}=e;const I=1===b?71:200,F=Ql((()=>{const e=Object.keys(s);return v&&e.sort(((e,t)=>s[t].isGhost-s[e].isGhost)),function(e,t){const i=[];let r=[];return e.forEach((e=>{r.length<t?r.push(e):(i.push(r),r=[e])})),r.length&&i.push(r),i}(e,b)}),[s,b,v]),x=e=>Pn("div",{class:"uppy-Dashboard-filesInner",role:"presentation",key:e[0]},e.map((e=>Pn(Ec,{key:e,uppy:n,id:t,error:i,i18n:r,acquirers:a,resumableUploads:o,individualCancellation:M,hideRetryButton:l,hidePauseResumeButton:u,hideCancelButton:c,showLinkToFileUploadResult:d,showRemoveButtonAfterComplete:h,isWide:p,metaFields:m,recoveredState:v,isSingleFile:g,containerWidth:T,containerHeight:C,toggleFileCard:f,handleRequestThumbnail:D,handleCancelThumbnail:y,role:"listitem",openFileEditor:w,canEditFile:N,toggleAddFilesPanel:E,file:s[e]}))));return g?Pn("div",{class:"uppy-Dashboard-files"},x(F[0])):Pn(cu,{class:"uppy-Dashboard-files",role:"list",data:F,renderRow:x,rowHeight:I})}let Cc;Cc=Symbol.for("uppy test: disable unused locale key warning");var Ic=class extends Un{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.triggerVideoCameraInputClick=()=>{this.mobileVideoFileInput.click()},this.triggerPhotoCameraInputClick=()=>{this.mobilePhotoFileInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>Pn("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderHiddenCameraInput=(e,t,i)=>{const r={photo:"image/*",video:"video/*"}[e];return Pn("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,type:"file",name:`camera-${e}`,onChange:this.onFileInputChange,capture:t,accept:r,ref:i})},this.renderMyDeviceAcquirer=()=>Pn("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},Pn("div",{className:"uppy-DashboardTab-inner"},Pn("svg",{className:"uppy-DashboardTab-iconMyDevice","aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},Pn("path",{d:"M8.45 22.087l-1.305-6.674h17.678l-1.572 6.674H8.45zm4.975-12.412l1.083 1.765a.823.823 0 00.715.386h7.951V13.5H8.587V9.675h4.838zM26.043 13.5h-1.195v-2.598c0-.463-.336-.75-.798-.75h-8.356l-1.082-1.766A.823.823 0 0013.897 8H7.728c-.462 0-.815.256-.815.718V13.5h-.956a.97.97 0 00-.746.37.972.972 0 00-.19.81l1.724 8.565c.095.44.484.755.933.755H24c.44 0 .824-.3.929-.727l2.043-8.568a.972.972 0 00-.176-.825.967.967 0 00-.753-.38z",fill:"currentcolor","fill-rule":"evenodd"}))),Pn("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderPhotoCamera=()=>Pn("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobilePhotoCamera"},Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerPhotoCameraInputClick},Pn("div",{className:"uppy-DashboardTab-inner"},Pn("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},Pn("path",{d:"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z",fill:"#02B383","fill-rule":"nonzero"}))),Pn("div",{className:"uppy-DashboardTab-name"},this.props.i18n("takePictureBtn")))),this.renderVideoCamera=()=>Pn("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobileVideoCamera"},Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerVideoCameraInputClick},Pn("div",{className:"uppy-DashboardTab-inner"},Pn("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32"},Pn("path",{fill:"#FF675E",fillRule:"nonzero",d:"m21.254 14.277 2.941-2.588c.797-.313 1.243.818 1.09 1.554-.01 2.094.02 4.189-.017 6.282-.126.915-1.145 1.08-1.58.34l-2.434-2.142c-.192.287-.504 1.305-.738.468-.104-1.293-.028-2.596-.05-3.894.047-.312.381.823.426 1.069.063-.384.206-.744.362-1.09zm-12.939-3.73c3.858.013 7.717-.025 11.574.02.912.129 1.492 1.237 1.351 2.217-.019 2.412.04 4.83-.03 7.239-.17 1.025-1.166 1.59-2.029 1.429-3.705-.012-7.41.025-11.114-.019-.913-.129-1.492-1.237-1.352-2.217.018-2.404-.036-4.813.029-7.214.136-.82.83-1.473 1.571-1.454z "}))),Pn("div",{className:"uppy-DashboardTab-name"},this.props.i18n("recordVideoBtn")))),this.renderBrowseButton=(e,t)=>Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===this.props.acquirers.length},e),this.renderDropPasteBrowseTagline=e=>{const t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),i=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),r=this.props.fileManagerSelectionType,n=r.charAt(0).toUpperCase()+r.slice(1);return Pn("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${n}`,{browseFiles:t,browseFolders:i,browse:t}):this.props.i18nArray(`dropPaste${n}`,{browseFiles:t,browseFolders:i,browse:t}))},this.renderAcquirer=e=>{var t;return Pn("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":(null==(t=this.props.activePickerPanel)?void 0:t.id)===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},Pn("div",{className:"uppy-DashboardTab-inner"},e.icon()),Pn("div",{className:"uppy-DashboardTab-name"},e.name)))},this.renderAcquirers=e=>{const t=[...e],i=t.splice(e.length-2,e.length);return Pn(_n,null,t.map((e=>this.renderAcquirer(e))),Pn("span",{role:"presentation",style:{"white-space":"nowrap"}},i.map((e=>this.renderAcquirer(e)))))},this.renderSourcesList=(e,t)=>
2{const{showNativePhotoCameraButton:i,showNativeVideoCameraButton:r}=this.props;let n=[];const s="myDevice";t||n.push({key:s,elements:this.renderMyDeviceAcquirer()}),i&&n.push({key:"nativePhotoCameraButton",elements:this.renderPhotoCamera()}),r&&n.push({key:"nativePhotoCameraButton",elements:this.renderVideoCamera()}),n.push(...e.map((e=>({key:e.id,elements:this.renderAcquirer(e)}))));1===n.length&&n[0].key===s&&(n=[]);const a=[...n],o=a.splice(n.length-2,n.length),l=e=>e.map((e=>{let{key:t,elements:i}=e;return Pn(_n,{key:t},i)}));return Pn(_n,null,this.renderDropPasteBrowseTagline(n.length),Pn("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},l(a),Pn("span",{role:"presentation",style:{"white-space":"nowrap"}},l(o))))}}[Cc](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=Pn("span",null,Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},Pn("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),Pn("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"));return Pn("a",{tabIndex:-1,href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},e("poweredBy",{uppy:t}))}render(){const{showNativePhotoCameraButton:e,showNativeVideoCameraButton:t,nativeCameraFacingMode:i}=this.props;return Pn("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(e=>{this.fileInput=e})),this.renderHiddenInput(!0,(e=>{this.folderInput=e})),e&&this.renderHiddenCameraInput("photo",i,(e=>{this.mobilePhotoFileInput=e})),t&&this.renderHiddenCameraInput("video",i,(e=>{this.mobileVideoFileInput=e})),this.renderSourcesList(this.props.acquirers,this.props.disableLocalFiles),Pn("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&Pn("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}};var Fc=e=>Pn("div",{className:ws()("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":!e.showAddFilesPanel},Pn("div",{className:"uppy-DashboardContent-bar"},Pn("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),Pn("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),Pn(Ic,e));var xc=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()};var Ac=function(e){let{activePickerPanel:t,className:i,hideAllPanels:r,i18n:n,state:s,uppy:a}=e;return Pn("div",{className:ws()("uppy-DashboardContent-panel",i),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${t.id}`,onDragOver:xc,onDragLeave:xc,onDrop:xc,onPaste:xc},Pn("div",{className:"uppy-DashboardContent-bar"},Pn("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},n("importFrom",{name:t.name})),Pn("button",{className:"uppy-DashboardContent-back",type:"button",onClick:r},n("cancel"))),Pn("div",{className:"uppy-DashboardContent-panelBody"},a.getPlugin(t.id).render(s)))};var jc=function(e){const t=e.files[e.fileCardFor];return Pn("div",{className:ws()("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},Pn("div",{className:"uppy-DashboardContent-bar"},Pn("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:Pn("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),Pn("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>{e.uppy.emit("file-editor:cancel",t),e.closeFileEditor()}},e.i18n("cancel")),Pn("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),Pn("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))};const Sc="error",zc="waiting",Oc="preprocessing",kc="uploading",Pc="postprocessing",Lc="complete",_c="paused";function Uc(e){let{files:t,i18n:i,isAllComplete:r,isAllErrored:n,isAllPaused:s,inProgressNotPausedFiles:a,newFiles:o,processingFiles:l}=e;const u=function(e,t,i,r){if(void 0===r&&(r={}),e)return Sc;if(t)return Lc;if(i)return _c;let n=zc;const s=Object.keys(r);for(let a=0;a<s.length;a++){const{progress:e}=r[s[a]];if(e.uploadStarted&&!e.uploadComplete)return kc;
2e.preprocess&&n!==kc&&(n=Oc),e.postprocess&&n!==kc&&n!==Oc&&(n=Pc)}return n}(n,r,s,t);switch(u){case"uploading":return i("uploadingXFiles",{smart_count:a.length});case"preprocessing":case"postprocessing":return i("processingXFiles",{smart_count:l.length});case"paused":return i("uploadPaused");case"waiting":return i("xFilesSelected",{smart_count:o.length});case"complete":return i("uploadComplete");case"error":return i("error")}}var Bc=function(e){const{i18n:t,isAllComplete:i,hideCancelButton:r,maxNumberOfFiles:n,toggleAddFilesPanel:s,uppy:a}=e;let{allowNewUpload:o}=e;return o&&n&&(o=e.totalFileCount<e.maxNumberOfFiles),Pn("div",{className:"uppy-DashboardContent-bar"},i||r?Pn("div",null):Pn("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>a.cancelAll()},t("cancel")),Pn("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},Pn(Uc,e)),o?Pn("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":t("addMoreFiles"),title:t("addMoreFiles"),onClick:()=>s(!0)},Pn("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},Pn("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),Pn("span",{className:"uppy-DashboardContent-addMoreCaption"},t("addMore"))):Pn("div",null))};function Rc(e){const{computedMetaFields:t,requiredMetaFields:i,updateMeta:r,form:n,formState:s}=e,a={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return t.map((e=>{const t=`uppy-Dashboard-FileCard-input-${e.id}`,o=i.includes(e.id);return Pn("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},Pn("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:t},e.name),void 0!==e.render?e.render({value:s[e.id],onChange:t=>r(t,e.id),fieldCSSClasses:a,required:o,form:n.id},Pn):Pn("input",{className:a.text,id:t,form:n.id,type:e.type||"text",required:o,value:s[e.id],placeholder:e.placeholder,onInput:t=>r(t.target.value,e.id),"data-uppy-super-focusable":!0}))}))}function Yc(e){var t;const{files:i,fileCardFor:r,toggleFileCard:n,saveFileCard:s,metaFields:a,requiredMetaFields:o,openFileEditor:l,i18n:u,i18nArray:c,className:d,canEditFile:h}=e,p=i[r],m=null!=(t="function"==typeof a?a(i[r]):a)?t:[],g=h(p),f={};m.forEach((e=>{var t;f[e.id]=null!=(t=p.meta[e.id])?t:""}));const[D,y]=Bl(f),v=Hl((e=>{e.preventDefault(),s(D,r)}),[s,D,r]),M=()=>{n(!1)},[b]=Bl((()=>{const e=document.createElement("form");return e.setAttribute("tabindex","-1"),e.id=Zu(),e}));return Rl((()=>(document.body.appendChild(b),b.addEventListener("submit",v),()=>{b.removeEventListener("submit",v),document.body.removeChild(b)})),[b,v]),Pn("div",{className:ws()("uppy-Dashboard-FileCard",d),"data-uppy-panelType":"FileCard",onDragOver:xc,onDragLeave:xc,onDrop:xc,onPaste:xc},Pn("div",{className:"uppy-DashboardContent-bar"},Pn("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},c("editing",{file:Pn("span",{className:"uppy-DashboardContent-titleFile"},p.meta?p.meta.name:p.name)})),Pn("button",{className:"uppy-DashboardContent-back",type:"button",form:b.id,title:u("finishEditingFile"),onClick:M},u("cancel"))),Pn("div",{className:"uppy-Dashboard-FileCard-inner"},Pn("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:ac(p.type).color}},Pn(oc,{file:p}),g&&Pn("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:e=>{v(e),l(p)}},u("editImage"))),Pn("div",{className:"uppy-Dashboard-FileCard-info"},Pn(Rc,{computedMetaFields:m,requiredMetaFields:o,updateMeta:(e,t)=>{y({...D,[t]:e})},form:b,formState:D})),Pn("div",{className:"uppy-Dashboard-FileCard-actions"},Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"submit",form:b.id},u("saveChanges")),Pn("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:M,form:b.id},u("cancel")))))}
2const Qc="uppy-transition-slideDownUp";var Hc=function(e){let{children:t}=e;const[i,r]=Bl(null),[n,s]=Bl(""),a=Yl(),o=Yl(),l=Yl();return Rl((()=>{const e=$n(t)[0];i!==e&&(e&&!i?(s(`${Qc}-enter`),cancelAnimationFrame(l.current),clearTimeout(o.current),o.current=void 0,l.current=requestAnimationFrame((()=>{s(`${Qc}-enter ${Qc}-enter-active`),a.current=setTimeout((()=>{s("")}),250)}))):!i||e||o.current||(s(`${Qc}-leave`),cancelAnimationFrame(l.current),clearTimeout(a.current),a.current=void 0,l.current=requestAnimationFrame((()=>{s(`${Qc}-leave ${Qc}-leave-active`),o.current=setTimeout((()=>{r(null),s("")}),250)}))),r(e))}),[t,i]),Rl((()=>()=>{clearTimeout(a.current),clearTimeout(o.current),cancelAnimationFrame(l.current)}),[]),i?ls(i,{className:ws()(n,i.props.className)}):null};function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},Vc.apply(this,arguments)}var Wc={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editImage:"Edit image",editing:"Editing %{file}",error:"Error",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},takePictureBtn:"Take Picture",recordVideoBtn:"Record Video"}};function Zc(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var $c=0;function Gc(e){return"__private_"+$c+++"_"+e}const qc=qu.default||qu;function Xc(){const e={};return e.promise=new Promise(((t,i)=>{e.resolve=t,e.reject=i})),e}const Jc={target:"body",metaFields:[],inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:xu,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpen:null,autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1,doneButtonHandler:null,onRequestCloseModal:null};
2var Kc=Gc("disabledNodes"),ed=Gc("generateLargeThumbnailIfSingleFile"),td=Gc("openFileEditorWhenFilesAdded"),id=Gc("attachRenderFunctionToTarget"),rd=Gc("isTargetSupported"),nd=Gc("getAcquirers"),sd=Gc("getProgressIndicators"),ad=Gc("getEditors"),od=Gc("addSpecifiedPluginsFromOptions"),ld=Gc("autoDiscoverPlugins"),ud=Gc("addSupportedPluginIfNoTarget");class cd extends ys{constructor(e,t){var i,r;let n;n=t?void 0===t.autoOpen?t.autoOpenFileEditor?"imageEditor":null:t.autoOpen:null,super(e,{...Jc,...t,autoOpen:n}),Object.defineProperty(this,Kc,{writable:!0,value:void 0}),this.modalName=`uppy-Dashboard-${Zu()}`,this.superFocus=function(){let e=!1;return ic()(((t,i)=>{const r=Ju(t,i),n=r.contains(document.activeElement);if(n&&e)return;const s=r.querySelector("[data-uppy-super-focusable]");if(!n||s)if(s)s.focus({preventScroll:!0}),e=!0;else{const t=r.querySelector(Xu);null==t||t.focus({preventScroll:!0}),e=!1}}),260)}(),this.ifFocusedOnUppyRecently=!1,this.removeTarget=e=>{const t=this.getPluginState().targets.filter((t=>t.id!==e.id));this.setPluginState({targets:t})},this.addTarget=e=>{const t=e.id||e.constructor.name,i=e.title||t,r=e.type;if("acquirer"!==r&&"progressindicator"!==r&&"editor"!==r){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";
2return this.uppy.log(e,"error"),null}const n={id:t,name:i,type:r},s=this.getPluginState().targets.slice();return s.push(n),this.setPluginState({targets:s}),this.el},this.hideAllPanels=()=>{var e;const t=this.getPluginState(),i={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};t.activePickerPanel===i.activePickerPanel&&t.showAddFilesPanel===i.showAddFilesPanel&&t.showFileEditor===i.showFileEditor&&t.activeOverlayType===i.activeOverlayType||(this.setPluginState(i),this.uppy.emit("dashboard:close-panel",null==(e=t.activePickerPanel)?void 0:e.id))},this.showPanel=e=>{const{targets:t}=this.getPluginState(),i=t.find((t=>"acquirer"===t.type&&t.id===e));this.setPluginState({activePickerPanel:i,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",e)},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return Zc(this,ad)[ad](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),i=Zc(this,ad)[ad](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),i.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.closeFileEditor=()=>{const{metaFields:e}=this.getPluginState();e&&e.length>0?this.setPluginState({showFileEditor:!1,activeOverlayType:"FileCard"}):this.setPluginState({showFileEditor:!1,fileCardFor:null,activeOverlayType:"AddFiles"})},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();Zc(this,ad)[ad](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.closeFileEditor()},this.openModal=()=>{const{promise:e,resolve:t}=Xc();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const e=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",e,!1),t()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e},this.closeModal=e=>{var t;const i=null==(t=null==e?void 0:e.manualClose)||t,{isHidden:r,isClosing:n}=this.getPluginState();if(r||n)return;const{promise:s,resolve:a}=Xc();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});const e=()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener("animationend",e,!1),a()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),a();var o;(document.removeEventListener("keydown",this.handleKeyDownInModal),i)&&(this.opts.browserBackButtonClose&&null!=(o=history.state)&&o[this.modalName]&&history.back());
2return this.uppy.emit("dashboard:modal-closed"),s},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,darkMode:e}})},this.handleSystemDarkModeChange=e=>{const t=e.matches;this.uppy.log("[Dashboard] Dark mode is "+(t?"on":"off")),this.setDarkModeCapability(t)},this.toggleFileCard=(e,t)=>{const i=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",i):this.uppy.emit("dashboard:file-edit-complete",i),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})},this.toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||e.webkitRelativePath||null}})));try{this.uppy.addFiles(t)}catch(i){this.uppy.log(i)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver((e=>{const t=e[0],{width:i,height:r}=t.contentRect;this.setPluginState({containerWidth:i,containerHeight:r,areInsidesReadyToBeVisible:!0})})),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((()=>{const e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;e.areInsidesReadyToBeVisible||t||(this.uppy.log("[Dashboard] resize event didn’t fire on time: defaulted to mobile layout","warning"),this.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableInteractiveElements=e=>{var t;const i=null!=(t=Zc(this,Kc)[Kc])?t:ko(this.el.querySelectorAll(["a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[role="button"]:not([disabled])'])).filter((e=>!e.classList.contains("uppy-Dashboard-close")));for(const r of i)"A"===r.tagName?r.setAttribute("aria-disabled",e):r.disabled=e;Zc(this,Kc)[Kc]=e?i:null,this.dashboardIsDisabled=e},this.updateBrowserHistory=()=>{var e;null!=(e=history.state)&&e[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=e=>{var t;!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(t=e.state)&&t[this.modalName]&&history.back()},this.handleKeyDownInModal=e=>{27===e.keyCode&&this.requestCloseModal(),9===e.keyCode&&ec(e,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=e=>{this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootPaste||t.handleRootPaste(e))}));const t=ko(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=ko(e.target.files);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))},this.handleDragOver=e=>{var t,i;e.preventDefault(),e.stopPropagation();const r=(()=>{let t=!0;
2return this.uppy.iteratePlugins((i=>{null!=i.canHandleRootDrop&&i.canHandleRootDrop(e)&&(t=!0)})),t})(),n=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!r&&!n||this.opts.disabled||this.opts.disableLocalFiles&&(n||!r)||!this.uppy.getState().allowNewUpload)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(i=this.opts).onDragOver)||t.call(i,e)},this.handleDragLeave=e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(i=this.opts).onDragLeave)||t.call(i,e)},this.handleDrop=async e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootDrop||t.handleRootDrop(e))}));let r=!1;this.uppy.log("[Dashboard] Processing dropped files");const n=await Uo(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),r||(this.uppy.info(e.message,"error"),r=!0)}});n.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(n)),null==(t=(i=this.opts).onDrop)||t.call(i,e)}
2,this.handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)},this.handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)},this.handleKeyDownInInline=e=>{9===e.keyCode&&function(e,t,i){null===t||ec(e,t,i)}(e,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)},this.handleComplete=e=>{let{failed:t}=e;!this.opts.closeAfterFinish||null!=t&&t.length||this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,ed,{writable:!0,value:()=>{if(this.opts.disableThumbnailGenerator)return;const e=this.uppy.getFiles();if(1===e.length){const t=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);null==t||t.setOptions({thumbnailWidth:600});const i={...e[0],preview:void 0};null==t||t.requestThumbnail(i).then((()=>{null==t||t.setOptions({thumbnailWidth:this.opts.thumbnailWidth})}))}}}),Object.defineProperty(this,td,{writable:!0,value:e=>{const t=e[0],{metaFields:i}=this.getPluginState(),r=i&&i.length>0,n=this.canEditFile(t);r&&"metaEditor"===this.opts.autoOpen?this.toggleFileCard(!0,t.id):n&&"imageEditor"===this.opts.autoOpen&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=Oo(this.opts.trigger);e?e.forEach((e=>e.addEventListener("click",this.openModal))):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openM
2odal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",Zc(this,ud)[ud]),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",Zc(this,ed)[ed]),this.uppy.on("file-removed",Zc(this,ed)[ed]),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on("files-added",Zc(this,td)[td])},this.removeEvents=()=>{const e=Oo(this.opts.trigger);!this.opts.inline&&e&&e.forEach((e=>e.removeEventListener("click",this.openModal))),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-added",Zc(this,ud)[ud]),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",Zc(this,ed)[ed]),this.uppy.off("file-removed",Zc(this,ed)[ed]),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off("files-added",Zc(this,td)[td])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,i=0===this.uppy.getState().info.length,r=!this.opts.inline;i&&(r||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()):this.disableInteractiveElements(!0)},this.saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)},Object.defineProperty(this,id,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return{...e,icon:t.icon||this.opts.defaultPickerIcon,render:t.render}}}),Object.defineProperty(this,rd,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,nd,{writable:!0,value:qc((e=>e.filter((e=>"acquirer"===e.type&&Zc(this,rd)[rd](e))).map(Zc(this,id)[id])))}),Object.defineProperty(this,sd,{writable:!0,value:qc((e=>e.filter((e=>"progressindicator"===e.type)).map(Zc(this,id)[id])))}),Object.defineProperty(this,ad,{writable:!0,value:qc((e=>e.filter((e=>"editor"===e.type)).map(Zc(this,id)[id])))}),this.render=e=>{const t=this.getPluginState(),{files:i,capabilities:r,allowNewUpload:n}=e,{newFiles:s,uploadStartedFiles:a,completeFiles:o,erroredFiles:l,inProgressFiles:u,inProgressNotPausedFiles:c,processingFiles:d,isUploadStarted:h,isAllComplete:p,isAllErrored:m,isAllPaused:g}=this.uppy.getObjectOfFilesPerState(),f=Zc(this,nd)[nd](t.targets),D=Zc(this,sd)[sd](t.targets),y=Zc(this,ad)[ad](t.targets);let v;return v="auto"===this.opts.theme?r.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),function(e){const t=0===e.totalFileCount,i=1===e.totalFileCount,r=e.containerWidth>576,n=e.containerHeight>330,s=ws()({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":e.disabled,"uppy-Dashboard--animateOpenClose":e.animateOpenClose,"uppy-Dashboard--isClosing":e.isClosing,"uppy-Dashboard--isDraggingOver":e.isDraggingOver,"uppy-Dashboard--modal":!e.inline,"uppy-size--md":e.containerWidth>576,"uppy-size--lg":e.containerWidth>700,"uppy-size--xl":e.containerWidth>900,"uppy-size--height-md":e.containerHeight>330,"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible,"uppy-Dashboard--singleFile":e.singleFileFullScreen&&i&&n});let a=1;e.containerWidth>900?a=5:e.containerWidth>700?a=4:e.containerWidth>576&&(a=3);const o=e.showSelectedFiles&&!t,l=e.recoveredState?Object.keys(e.recoveredState.files).length:null,u=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null;return Pn("div",{className:s,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&rc(),"aria-hidden":e.inline?"false":e.isHidden,"aria-disabled":e.disabled,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onPaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},Pn("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),Pn("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:e.inline?void 0:"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:Pn("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},Pn("span",{"aria-hidden":"true"},"×")),Pn("div",{className:"uppy-Dashboard-innerWrap"},Pn("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),o&&Pn(Bc,e),l&&Pn("div",{className:"uppy-Dashboard-serviceMsg"},Pn("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},Pn("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},Pn("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),Pn("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),Pn("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),Pn("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),Pn("div",{className:"uppy-Dashboard-serviceMsg-text"},u>0?e.i18n("recoveredXFiles",{smart_count:u}):e.i18n("recoveredAllFiles"))),o?Pn(Tc,{id:e.id,error:e.error,i18n:e.i18n,uppy:e.uppy,files:e.files,acquirers:e.acquirers,resumableUploads:e.resumableUploads,hideRetryButton:e.hideRetryButton,hidePauseResumeButton:e.hidePauseResumeButton,hideCancelButton:e.hideCancelButton,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButtonAfterComplete:e.showRemoveButtonAfterComplete,isWide:e.isWide,metaFields:e.metaFields,toggleFileCard:e.toggleFileCard,handleRequestThumbn
2ail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail,recoveredState:e.recoveredState,individualCancellation:e.individualCancellation,openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,isSingleFile:i,itemsPerRow:a}):Pn(Ic,Vc({},e,{isSizeMD:r})),Pn(Hc,null,e.showAddFilesPanel?Pn(Fc,Vc({key:"AddFiles"},e,{isSizeMD:r})):null),Pn(Hc,null,e.fileCardFor?Pn(Yc,Vc({key:"FileCard"},e)):null),Pn(Hc,null,e.activePickerPanel?Pn(Ac,Vc({key:"Picker"},e)):null),Pn(Hc,null,e.showFileEditor?Pn(jc,Vc({key:"Editor"},e)):null),Pn("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))))}({state:e,isHidden:t.isHidden,files:i,newFiles:s,uploadStartedFiles:a,completeFiles:o,erroredFiles:l,inProgressFiles:u,inProgressNotPausedFiles:c,processingFiles:d,isUploadStarted:h,isAllComplete:p,isAllErrored:m,isAllPaused:g,totalFileCount:Object.keys(i).length,totalProgress:e.totalProgress,allowNewUpload:n,acquirers:f,theme:v,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:D,editors:y,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:r.resumableUploads||!1,individualCancellation:r.individualCancellation,isMobileDevice:r.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleCancelRestore:this.handleCancelRestore,handleRequestThumbn
2ail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},Object.defineProperty(this,od,{writable:!0,value:()=>{(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t?t.mount(this,t):this.uppy.log(`[Uppy] Dashboard could not find plugin '${e}', make sure to uppy.use() the plugins you are specifying`,"warning")}))}}),Object.defineProperty(this,ld,{writable:!0,value:()=>{this.uppy.iteratePlugins(Zc(this,ud)[ud])}}),Object.defineProperty(this,ud,{writable:!0,value:e=>{var t;if(e&&(null==(t=e.opts)||!t.target)&&["acquirer","editor"].includes(e.type)){this.getPluginState().targets.some((t=>e.id===t.id))||e.mount(this,e)}}}),this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:i,allowMultipleUploadBatches:r}=this.uppy.opts;(i||r)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:n}=this.opts;n&&this.mount(n,this),this.opts.disableStatusBar||this.uppy.use(ra,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use(ca,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(zo,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery="undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const s=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;var a;(this.uppy.log("[Dashboard] Dark mode is "+(s?"on":"off")),this.setDarkModeCapability(s),"auto"===this.opts.theme)&&(null==(a=this.darkModeMediaQuery)||a.addListener(this.handleSystemDarkModeChange));Zc(this,od)[od](),Zc(this,ld)[ld](),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const e=this.uppy.getPlugin(`${this.id}:Informer`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableStatusBar){const e=this.uppy.getPlugin(`${this.id}:StatusBar`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableThumbnailGenerator){const e=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);e&&this.uppy.removePlugin(e)}var e;((this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()})),"auto"===this.opts.theme)&&(null==(e=this.darkModeMediaQuery)||e.removeListener(this.handleSystemDarkModeChange));this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.defaultLocale=Wc,null!=(i=this.opts).doneButtonHandler||(i.doneButtonHandler=()=>{this.uppy.clearUploadedFiles(),this.requestCloseModal()}),null!=(r=this.opts).onRequestCloseModal||(r.onRequestCloseModal=()=>this.closeModal()),this.i18nInit()}}cd.VERSION="3.9.0";var dd=i(22609),hd=i.n(dd);var pd=function(e,t){const i=e.width/t.width,r=e.height/t.height,n=Math.min(i,r),s=t.width*n,a=t.height*n;return{width:s,height:a,left:(e.width-s)/2,top:(e.height-a)/2}};
2var md=function(e,t,i){const r=Math.abs(i*(Math.PI/180));return Math.max((Math.sin(r)*e+Math.cos(r)*t)/t,(Math.sin(r)*t+Math.cos(r)*e)/e)};var gd=function(e,t,i){return t.left<e.left?{left:e.left,width:i.width}:t.top<e.top?{top:e.top,height:i.height}:t.left+t.width>e.left+e.width?{left:e.left+e.width-i.width,width:i.width}:t.top+t.height>e.top+e.height?{top:e.top+e.height-i.height,height:i.height}:null};var fd=function(e,t,i){return t.left<e.left?{left:e.left,width:i.left+i.width-e.left}:t.top<e.top?{top:e.top,height:i.top+i.height-e.top}:t.left+t.width>e.left+e.width?{left:i.left,width:e.left+e.width-i.left}:t.top+t.height>e.top+e.height?{top:i.top,height:e.top+e.height-i.top}:null};class Dd extends Un{constructor(e){super(e),this.onRotate90Deg=()=>{const{angle90Deg:e}=this.state,t=e-90;this.setState({angle90Deg:t,angleGranular:0}),this.cropper.scale(1),this.cropper.rotateTo(t);const i=this.cropper.getCanvasData(),r=this.cropper.getContainerData(),n=pd(r,i);this.cropper.setCanvasData(n),this.cropper.setCropBoxData(n)},this.onRotateGranular=e=>{const t=Number(e.target.value);this.setState({angleGranular:t});const{angle90Deg:i}=this.state,r=i+t;this.cropper.rotateTo(r);const n=this.cropper.getImageData(),s=md(n.naturalWidth,n.naturalHeight,t),a=this.cropper.getImageData().scaleX<0?-s:s;this.cropper.scale(a,s)},this.state={angle90Deg:0,angleGranular:0,prevCropboxData:null},this.storePrevCropboxData=this.storePrevCropboxData.bind(this),this.limitCropboxMovement=this.limitCropboxMovement.bind(this)}componentDidMount(){const{opts:e,storeCropperInstance:t}=this.props;this.cropper=new(hd())(this.imgElement,e.cropperOptions),this.imgElement.addEventListener("cropstart",this.storePrevCropboxData),this.imgElement.addEventListener("cropend",this.limitCropboxMovement),t(this.cropper)}componentWillUnmount(){this.cropper.destroy(),this.imgElement.removeEventListener("cropstart",this.storePrevCropboxData),this.imgElement.removeEventListener("cropend",this.limitCropboxMovement)}storePrevCropboxData(){this.setState({prevCropboxData:this.cropper.getCropBoxData()})}limitCropboxMovement(e){const t=this.cropper.getCanvasData(),i=this.cropper.getCropBoxData(),{prevCropboxData:r}=this.state;if("all"===e.detail.action){const e=gd(t,i,r);e&&this.cropper.setCropBoxData(e)}else{const e=fd(t,i,r);e&&this.cropper.setCropBoxData(e)}}renderGranularRotate(){const{i18n:e}=this.props,{angleGranular:t}=this.state;return Pn("label",{role:"tooltip","aria-label":`${t}º`,"data-microtip-position":"top",className:"uppy-ImageCropper-rangeWrapper"},Pn("input",{className:"uppy-ImageCropper-range uppy-u-reset",type:"range",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:"-45",max:"45","aria-label":e("rotate")}))}renderRevert(){const{i18n:e,opts:t}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("revert"),onClick:()=>{this.cropper.reset(),this.cropper.setAspectRatio(t.cropperOptions.initialAspectRatio),this.setState({angle90Deg:0,angleGranular:0})}},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M0 0h24v24H0z",fill:"none"}),Pn("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})))}renderRotate(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("rotate"),onClick:this.onRotate90Deg},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}),Pn("path",{d:"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z"})))}renderFlip(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("flipHorizontal"),onClick:()=>this.cropper.scaleX(-this.cropper.getData().scaleX||-1)},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M0 0h24v24H0z",fill:"none"}),Pn("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})))}renderZoomIn(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomIn"),onClick:()=>this.cropper.zoom(.1)},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",height:"24",viewBox:"0 0 24 24",width:"24"},Pn("path",{d:"M0 0h24v24H0V0z",fill:"none"}),Pn("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),Pn("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})))}renderZoomOut(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomOut"),onClick:()=>this.cropper.zoom(-.1)},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M0 0h24v24H0V0z",fill:"none"}),Pn("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})))}renderCropSquare(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioSquare"),onClick:()=>this.cropper.setAspectRatio(1)},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M0 0h24v24H0z",fill:"none"}),Pn("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})))}renderCropWidescreen(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioLandscape"),onClick:()=>this.cropper.setAspectRatio(16/9)},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z"}),Pn("path",{fill:"none",d:"M0 0h24v24H0z"})))}renderCropWidescreenVertical(){const{i18n:e}=this.props;return Pn("button",{role:"button tooltip","data-microtip-position":"top",type:"button","aria-label":e("aspectRatioPortrait"),className:"uppy-u-reset uppy-c-btn",onClick:()=>this.cropper.setAspectRatio(9/16)},Pn("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24"},Pn("path",{d:"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0 
2-2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z"}),Pn("path",{d:"M0 0h24v24H0z",fill:"none"})))}render(){const{currentImage:e,opts:t}=this.props,{actions:i}=t,r=URL.createObjectURL(e.data);return Pn("div",{className:"uppy-ImageCropper"},Pn("div",{className:"uppy-ImageCropper-container"},Pn("img",{className:"uppy-ImageCropper-image",alt:e.name,src:r,ref:e=>{this.imgElement=e}})),Pn("div",{className:"uppy-ImageCropper-controls"},i.revert&&this.renderRevert(),i.rotate&&this.renderRotate(),i.granularRotate&&this.renderGranularRotate(),i.flip&&this.renderFlip(),i.zoomIn&&this.renderZoomIn(),i.zoomOut&&this.renderZoomOut(),i.cropSquare&&this.renderCropSquare(),i.cropWidescreen&&this.renderCropWidescreen(),i.cropWidescreenVertical&&this.renderCropWidescreenVertical()))}}var yd={strings:{revert:"Reset",rotate:"Rotate 90°",zoomIn:"Zoom in",zoomOut:"Zoom out",flipHorizontal:"Flip horizontally",aspectRatioSquare:"Crop square",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)"}};const vd={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},Md={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},bd={quality:.8,actions:Md,cropperOptions:vd};class wd extends ys{constructor(e,t){super(e,{...bd,...t,actions:{...Md,...null==t?void 0:t.actions},cropperOptions:{...vd,...null==t?void 0:t.cropperOptions}}),this.save=()=>{const{currentImage:e}=this.getPluginState(),t=this.cropper.getCroppedCanvas({});t.width%2!=0&&this.cropper.setData({width:t.width-1}),t.height%2!=0&&this.cropper.setData({height:t.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob((e=>{const{currentImage:t}=this.getPluginState();this.uppy.setFileState(t.id,{data:new File([e],t.name,{type:e.type}),size:e.size,preview:void 0});const i=this.uppy.getFile(t.id);
2this.uppy.emit("thumbnail:request",i),this.setPluginState({currentImage:i}),this.uppy.emit("file-editor:complete",i)}),e.type,this.opts.quality)},this.storeCropperInstance=e=>{this.cropper=e},this.selectFile=e=>{this.uppy.emit("file-editor:start",e),this.setPluginState({currentImage:e})},this.id=this.opts.id||"ImageEditor",this.title="Image Editor",this.type="editor",this.defaultLocale=yd,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;const t=e.type.split("/")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}install(){this.setPluginState({currentImage:null});const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){const{currentImage:e}=this.getPluginState();if(e){const t=this.uppy.getFile(e.id);this.uppy.emit("file-editor:cancel",t)}this.unmount()}render(){const{currentImage:e}=this.getPluginState();return null===e||e.isRemote?null:Pn(Dd,{currentImage:e,storeCropperInstance:this.storeCropperInstance,save:this.save,opts:this.opts,i18n:this.i18n})}}wd.VERSION="2.4.6";const Nd={strings:{},pluralize(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}};Nd.strings={addBulkFilesFailed:{0:"Не удалось добавить %{smart_count} файл из-за внутренней ошибки",1:"Не удалось добавить %{smart_count} файла из-за внутренней ошибки",2:"Не удалось добавить %{smart_count} файлов из-за внутренней ошибки"},addedNumFiles:{0:"Добавлен %{numFiles} файл",1:"Добавлено %{numFiles} файла",2:"Добавлено %{numFiles} файлов"},addingMoreFiles:"Добавление дополнительных файлов",additionalRestrictionsFailed:{0:"%{count} дополнительное ограничение не было удовлетворено",1:"%{count} дополнительных ограничения не были удовлетворены",2:"%{count} дополнительных ограничений не были удовлетворены"},addMore:"Добавить еще",addMoreFiles:"Добавить еще файлы",allFilesFromFolderNamed:"Все файлы из папки %{name}",allowAccessDescription:"Чтобы сделать фото или записать видео, пожалуйста, разрешите доступ к камере для этого сайта",allowAccessTitle:"Пожалуйста, разрешите доступ к вашей камере",allowAudioAccessDescription:"Чтобы записать аудио, пожалуйста, разрешите доступ к микрофону для этого сайта",allowAudioAccessTitle:"Пожалуйста, разрешите доступ к вашему микрофону",aspectRatioLandscape:"Обрезать альбомный формат (16:9)",aspectRatioPortrait:"Обрезать портрет (9:16)",aspectRatioSquare:"Обрезать квадрат",authAborted:"Аутентификация прервана",authenticateWith:"Подключиться к %{pluginName}",authenticateWithTitle:"Пожалуйста, авторизуйтесь в %{pluginName}, чтобы выбрать файлы",back:"Назад",browse:"выберите",browseFiles:"выберите файлы",cancel:"Отменить",cancelUpload:"Отменить загрузку",chooseFiles:"Выбрать файлы",closeModal:"Закрыть окно",companionError:"Не удалось подключиться к Companion",companionUnauthorizeHint:"Чтобы выйти из вашего аккаунта %{provider}, пожалуйста, перейдите по ссылке %{url}",complete:"Готово",compressedX:"Сохранено %{size} благодаря сжатию изображений",compressingImages:"Сжатие изображений...",connectedToInternet:"Подключено к интернету",copyLink:"Скопировать ссылку",copyLinkToClipboardFallback:"Скопируйте ссылку",copyLinkToClipboardSuccess:"Ссылка скопирована в буфер обмена",creatingAssembly:"Подготовка загрузки...",creatingAssemblyFailed:"Transloadit: не удалось создать Assembly",dashboardTitle:"Загрузчик файлов",dashboardWindowTitle:"Окно загрузчика файлов (нажмите escape, чтобы закрыть)",dataUploadedOfTotal:"%{complete} из %{total}",discardRecordedFile:"Удалить записанный файл",done:"Готово",dropHereOr:"Перетащите файлы или %{browse}",dropHint:"Перетащите файлы сюда",dropPasteBoth:"Перетащите файлы, вставьте или %{browse}",dropPasteFiles:"Перетащите файлы, вставьте или %{browse}",dropPasteFolders:"Перетащите файлы, вставьте или %{browse}",dropPasteImportBoth:"Перетащите файлы, вставьте, %{browse} или импортируйте из:",dropPasteImportFiles:"Перетащите файлы, вставьте, %{browse} или импортируйте из:",dropPasteImportFolders:"Перетащите файлы, вставьте, %{browse} или импортируйте из:",editFile:"Редактировать файл",editImage:"Редактировать изображение",editFileWithFilename:"Редактировать файл %{file}",editing:"Редактируется %{file}",emptyFolderAdded:"Файлы не были добавлены — папка пуста",encoding:"Обработка...",enterCorrectUrl:"Неправильный адрес: пожалуйста, убедитесь что вы используете прямую ссылку на файл",enterTextToSearch:"Введите текст для поиска изображений",enterUrlToImport:"Введите адрес, чтобы импортировать файл",error:"Ошибка",exceedsSize:"Этот файл больше максимально разрешенного размера в %{size}",failedToFetch:"Companion не смог загрузить файл по ссылке, пожалуйста, убедитесь, что адрес верный",failedToUpload:"Ошибка загрузки %{file}",filesUploadedOfTotal:{0:"%{complete} из %{smart_count} файла загружено",1:"%{complete} из %{smart_count} файлов загружено",2:"%{complete} из %{smart_count} файлов загружено"},filter:"Фильтр",finishEditingFile:"Закончить редактирование файла",flipHorizontal:"Повернуть горизонтально",folderAdded:{0:"Добавлен %{smart_count} файл из %{folder}",1:"Добавлено %{smart_count} файла из %{folder}",2:"Добавлено %{smart_count} файлов из %{folder}"},folderAlreadyAdded:'Папка "%{folder}" уже была добавлена',generatingThumbnails:"Создание превью изображений...",import:"Импортировать",importFiles:"Импортировать файлы из:",importFrom:"Импортировать из %{name}",inferiorSize:"Этот файл меньше минимального размера %{size}",loadedXFiles:{0:"Загружен %{numFiles} файл",1:"Загружено %{numFiles} файла",2:"Загружено %{numFiles} файлов"},loading:"Загрузка...",logOut:"Выйти",micDisabled:"Пользователь ограничил доступ к микрофону",missingRequiredMetaField:"Отсутствуют обязательные meta поля",missingRequiredMetaFieldOnFile:"В файле %{fileName} отсутствуют обязательные meta поля",missingRequiredMetaFields:{0:"Отсутствует обязательное meta поле: %{fields}.",1:"Отсутствуют обязательные meta поля: %{fields}.",2:"Отсутствуют обязательные meta поля: %{fields}."},myDevice:"Мое устройство",noAudioDescription:"Пожалуйста, подключите микрофон или другое аудиоустройство, чтобы записывать аудио",noAudioTitle:"Микрофон недоступен",noCameraDescription:"Пожалуйста, подключите камеру, чтобы сделать фото или записать видео",noCameraTitle:"Камера недоступна",noDuplicates:"Нельзя добавить '%{fileName}', файл уже добавлен",noFilesFound:"Здесь нет файлов или папок",noInternetConnection:"Нет подключения к интернету",noMoreFilesAllowed:"Нельзя добавить больше файлов",noSearchResults:"К сожалению, нет результатов для поискового запроса",openFolderNamed:"Открыть папку %{name}",pause:"Поставить на паузу",paused:"На паузе",pauseUpload:"Поставить загрузку на паузу",poweredBy:"Работает на %{uppy}",processingXFiles:{0:"Обрабатывается %{smart_count} файл",1:"Обрабатываются %{smart_count} файла",2:"Обрабатываются %{smart_count} файлов"},recording:"Идет запись",recordingLength:"Длительность записи 
2%{recording_length}",recordingStoppedMaxSize:"Запись остановлена из-за того, что файл достиг максимального размера",recordVideoBtn:"Записать видео",recoveredAllFiles:"Все файлы восстановлены. Вы можете продолжить загрузку.",recoveredXFiles:{0:"Не удалось восстановить %{smart_count} файл. Пожалуйста, выберите его заново и продолжите загрузку.",1:"Не удалось восстановить %{smart_count} файла. Пожалуйста, выберите их заново и продолжите загрузку.",2:"Не удалось восстановить %{smart_count} файлов. Пожалуйста, выберите их заново и продолжите загрузку."},removeFile:"Удалить файл",reSelect:"Выбрать заново",resetFilter:"Сбросить фильтр",resetSearch:"Сбросить поиск",resume:"Продолжить",resumeUpload:"Продолжить загрузку",retry:"Повторить попытку",retryUpload:"Повторить попытку загрузки",revert:"Отменить изменения",rotate:"Повернуть",save:"Сохранить",saveChanges:"Сохранить изменения",search:"Поиск",searchImages:"Поиск изображений",selectX:{0:"Выбрать %{smart_count}",1:"Выбрать %{smart_count}",2:"Выбрать %{smart_count}"},sessionRestored:"Сессия восстановлена",showErrorDetails:"Показать детали ошибки",signInWithGoogle:"Войти с Google",smile:"Улыбнитесь!",
2startAudioRecording:"Начать запись аудио",startCapturing:"Начать запись экрана",startRecording:"Начать запись видео",stopAudioRecording:"Остановить запись аудио",stopCapturing:"Остановить запись экрана",stopRecording:"Закончить запись видео",streamActive:"Активный поток",streamPassive:"Пассивный поток",submitRecordedFile:"Отправить записанный файл",takePicture:"Сделать фотографию",takePictureBtn:"Сделать фотографию",timedOut:"Загрузка остановилась на %{seconds} секунд, отмена",upload:"Загрузить",uploadComplete:"Загрузка завершена",uploadFailed:"Загрузка не удалась",uploadPaused:"Загрузка на паузе",uploadStalled:{0:"Прошла %{seconds} секунда без прогресса в загрузке. Возможно, вы хотите перезапустить ее.",1:"Прошло %{seconds} секунды без прогресса в загрузке. Возможно, вы хотите перезапустить ее.",2:"Прошло %{seconds} секунд без прогресса в загрузке. Возможно, вы хотите перезапустить ее."},uploadXFiles:{0:"Загрузить %{smart_count} файл",1:"Загрузить %{smart_count} файла",2:"Загрузить %{smart_count} файлов"},uploadXNewFiles:{0:"Загрузить +%{smart_count} файл",1:"Загрузить +%{smart_count} файла",2:"Загрузить +%{smart_count} файлов"},uploading:"Загрузка",uploadingXFiles:{0:"Загружается %{smart_count} файл",1:"Загружается %{smart_count} файла",2:"Загружается %{smart_count} файлов"},xFilesSelected:{0:"%{smart_count} файл выбран",1:"%{smart_count} файла выбрано",2:"%{smart_count} файлов выбрано"},xMoreFilesAdded:{0:"%{smart_count} дополнительный файл добавлен",1:"%{smart_count} дополнительных файла добавлено",2:"%{smart_count} дополнительных файлов добавлено"},xTimeLeft:"осталось %{time}",youCanOnlyUploadFileTypes:"Вы можете загрузить только: %{types}",youCanOnlyUploadX:{0:"Вы можете загрузить только %{smart_count} файл",1:"Вы можете загрузить только %{smart_count} файла",2:"Вы можете загрузить только %{smart_count} файлов"},youHaveToAtLeastSelectX:{0:"Вы должны выбрать хотя бы %{smart_count} файл",1:"Вы должны выбрать хотя бы %{smart_count} файла",2:"Вы должны выбрать хотя бы %{smart_count} файлов"},zoomIn:"Приблизить",zoomOut:"Отдалить"},"undefined"!=typeof Uppy&&(globalThis.Uppy.locales.ru_RU=Nd);var Ed=Nd;i(7212);
2class Td extends Error{constructor(){super(...arguments),this.name="UserFacingApiError"}}var Cd=Td,Id=i(9540);const Fd=Object.prototype.toString,xd=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Ad(e){var t;return!(!e||(t=e,"[object Error]"!==Fd.call(t))||"TypeError"!==e.name||"string"!=typeof e.message)&&("Load failed"===e.message?void 0===e.stack:xd.has(e.message))}class jd extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const Sd=(e,t,i)=>{const r=i.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function zd(e,t){return new Promise(((i,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const n=Id.operation(t),s=()=>{var e;n.stop(),r(null===(e=t.signal)||void 0===e?void 0:e.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",s,{once:!0});const a=()=>{var e;null===(e=t.signal)||void 0===e||e.removeEventListener("abort",s),n.stop()};n.attempt((async s=>{try{const t=await e(s);a(),i(t)}catch(o){try{if(!(o instanceof Error))throw new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`);if(o instanceof jd)throw o.originalError;if(o instanceof TypeError&&!Ad(o))throw o;if(Sd(o,s,t),await t.shouldRetry(o)||(n.stop(),r(o)),await t.onFailedAttempt(o),!n.retry(o))throw n.mainError()}catch(l){Sd(l,s,t),a(),r(l)}}}))}))}class Od extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}var kd=Od;function Pd(e,t){return Object.prototype.hasOwnProperty.call(e,t)}class Ld extends Error{constructor(e,t){super(e),this.cause=null==t?void 0:t.cause,this.cause&&Pd(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}var _d=Ld;var Ud=tr()((function(e,t,i){const{progress:r,bytesUploaded:n,bytesTotal:s}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",i,{uploader:e,bytesUploaded:n,bytesTotal:s}))}),300,{leading:!0,trailing:!0});class Bd extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}var Rd=Bd;let Yd;function Qd(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Hd=0;function Vd(e){return"__private_"+Hd+++"_"+e}class Wd extends Error{constructor(e){let{statusCode:t,message:i}=e;super(i),this.name="HttpError",this.statusCode=t}}var Zd=Vd("companionHeaders"),$d=Vd("getUrl"),Gd=Vd("requestSocketToken"),qd=Vd("awaitRemoteFileUpload");Yd=Symbol.for("uppy test: getCompanionHeaders");class Xd{constructor(e,t){Object.defineProperty(this,qd,{value:Kd}),Object.defineProperty(this,$d,{value:Jd}),Object.defineProperty(this,Zd,{writable:!0,value:void 0}),Object.defineProperty(this,Gd,{writable:!0,value:async e=>{var t;let{file:i,postBody:r,signal:n}=e;if(null==(null==(t=i.remote)?void 0:t.url))throw new Error("Cannot connect to an undefined URL");return(await this.post(i.remote.url,{...i.remote.body,...r},{signal:n})).token}}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),Qd(this,Zd)[Zd]=null==t?void 0:t.companionHeaders}setCompanionHeaders(e){Qd(this,Zd)[Zd]=e}[Yd](){return Qd(this,Zd)[Zd]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}async headers(e){void 0===e&&(e=!1);return{...{Accept:"application/json",...e?void 0:{"Content-Type":"application/json"}},...Qd(this,Zd)[Zd]}}onReceiveResponse(e){const{headers:t}=e,i=this.uppy.getState().companion||{},r=this.opts.companionUrl;t.has("i-am")&&t.get("i-am")!==i[r]&&this.uppy.setState({companion:{...i,[r]:t.get("i-am")}})}async request(e){let{path:t,method:i="GET",data:r,skipPostResponse:n,signal:s}=e;try{const e=await this.headers(!r),a=await function(){return fetch(...arguments).catch((e=>{throw"AbortError"===e.name?e:new kd(e)}))}(Qd(this,$d)[$d](t),{method:i,signal:s,headers:e,credentials:this.opts.companionCookiesRule||"same-origin",body:r?JSON.stringify(r):null});
2return n||this.onReceiveResponse(a),await async function(e){if(401===e.status)throw new Rd;if(e.ok)return e.json();let t,i=`Failed request with status: ${e.status}. ${e.statusText}`;try{t=await e.json(),t.message&&(i=`${i} message: ${t.message}`),t.requestId&&(i=`${i} request-Id: ${t.requestId}`)}catch(r){throw new Error(i,{cause:r})}if(e.status>=400&&e.status<=499&&t.message)throw new Cd(t.message);throw new Wd({statusCode:e.status,message:i})}(a)}catch(a){if(a.isAuthError||"UserFacingApiError"===a.name||"AbortError"===a.name)throw a;throw new _d(`Could not ${i} ${Qd(this,$d)[$d](t)}`,{cause:a})}}async get(e,t){return"boolean"==typeof t&&(t={skipPostResponse:t}),this.request({...t,path:e})}async post(e,t,i){return"boolean"==typeof i&&(i={skipPostResponse:i}),this.request({...i,path:e,method:"POST",data:t})}async delete(e,t,i){return"boolean"==typeof i&&(i={skipPostResponse:i}),this.request({...i,path:e,method:"DELETE",data:t})}async uploadRemoteFile(e,t,i){var r=this;try{const{signal:n,getQueue:s}=i||{};return await zd((async()=>{var i;const a=null==(i=this.uppy.getFile(e.id))?void 0:i.serverToken;
2if(null!=a)return this.uppy.log(`Connecting to exiting websocket ${a}`),Qd(this,qd)[qd]({file:e,queue:s(),signal:n});const o=s().wrapPromiseFunction((async function(){try{return await Qd(r,Gd)[Gd](...arguments)}catch(e){if(e.isAuthError)throw new jd(e);if(null==e.cause)throw e;const t=e.cause,i=()=>[408,409,429,418,423].includes(t.statusCode)||t.statusCode>=500&&t.statusCode<=599&&![501,505].includes(t.statusCode);if("HttpError"===t.name&&!i())throw new jd(t);throw t}}),{priority:-1}),l=await o({file:e,postBody:t,signal:n}).abortOn(n);return this.uppy.getFile(e.id)?(this.uppy.setFileState(e.id,{serverToken:l}),Qd(this,qd)[qd]({file:this.uppy.getFile(e.id),queue:s(),signal:n})):void 0}),{retries:10,signal:n,onFailedAttempt:e=>this.uppy.log(`Retrying upload due to: ${e.message}`,"warning")})}catch(n){if("AbortError"===n.name)return;throw this.uppy.emit("upload-error",e,n),n}}}function Jd(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}async function Kd(e){let t,{file:i,queue:r,signal:n}=e;const{capabilities:s}=this.uppy.getState();try{return await new Promise(((e,a)=>{const o=i.serverToken,l=function(e){var t;const i=null==(t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e))?void 0:t[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${i}`}(i.remote.companionUrl);let u,c,d,{isPaused:h}=i;const p=(e,t)=>{var r;null!=u&&u.readyState===u.OPEN?u.send(JSON.stringify({action:e,payload:null!=t?t:{}})):this.uppy.log(`Cannot send "${e}" to socket ${i.id} because the socket state was ${String(null==(r=u)?void 0:r.readyState)}`,"warning")};function m(){s.resumableUploads&&p(h?"pause":"resume")}const g=async()=>{c&&c.abort(),c=new AbortController;const t=e=>{var t;this.uppy.setFileState(i.id,{serverToken:null}),null==(t=c)||null==t.abort||t.abort(),a(e)};function n(){clearTimeout(d),h||(d=setTimeout((()=>t(new Error("Timeout waiting for message from Companion socket"))),3e5))}try{await r.wrapPromiseFunction((async()=>{await zd((async()=>new Promise(((r,s)=>{u=new WebSocket(`${l}/api/${o}`),n(),u.addEventListener("close",(()=>{u=void 0,s(new Error("Socket closed unexpectedly"))})),u.addEventListener("error",(e=>{var t;this.uppy.log(`Companion socket error ${JSON.stringify(e)}, closing socket`,"warning"),null==(t=u)||t.close()})),u.addEventListener("open",(()=>{m()})),u.addEventListener("message",(r=>{n();try{const{action:t,payload:n}=JSON.parse(r.data);switch(t){case"progress":Ud(this,n,this.uppy.getFile(i.id));break;case"success":{var s,a,o,l;const t=null==(s=n.response)?void 0:s.responseText;this.uppy.emit("upload-success",this.uppy.getFile(i.id),{uploadURL:n.url,status:null!=(a=null==(o=n.response)?void 0:o.status)?a:200,body:t?JSON.parse(t):void 0}),null==(l=c)||null==l.abort||l.abort(),e();break}case"error":{const{message:e}=n.error;throw Object.assign(new Error(e),{cause:n.error})}default:this.uppy.log(`Companion socket unknown action ${t}`,"warning")}}catch(u){t(u)}}));const a=()=>{this.uppy.log(`Closing socket ${i.id}`,"info"),clearTimeout(d),u&&u.close(),u=void 0};c.signal.addEventListener("abort",(()=>{a()}))}))),{retries:10,signal:c.signal,onFailedAttempt:()=>{c.signal.aborted||this.uppy.log(`Retrying websocket ${i.id}`,"info")}})}))().abortOn(c.signal)}catch(s){if(c.signal.aborted)return;t(s)}},f=e=>{var t;s.resumableUploads&&(h=e,u&&m(),e?null==(t=c)||null==t.abort||t.abort():g())},D=t=>{var r;s.individualCancellation&&t.id===i.id&&(p("cancel"),null==(r=c)||null==r.abort||r.abort(),this.uppy.log(`upload ${i.id} was removed`,"info"),e())},y=t=>{var r;let{reason:n}=t;"user"===n&&p("cancel"),null==(r=c)||null==r.abort||r.abort(),this.uppy.log(`upload ${i.id} was canceled`,"info"),e()},v=(e,t)=>{e===i.id&&f(t)},M=()=>f(!0),b=()=>f(!1);this.uppy.on("file-removed",D),this.uppy.on("cancel-all",y),this.uppy.on("upload-pause",v),this.uppy.on("pause-all",M),this.uppy.on("resume-all",b),t=()=>{this.uppy.off("file-removed",D),this.uppy.off("cancel-all",y),this.uppy.off("upload-pause",v),this.uppy.off("pause-all",M),this.uppy.off("resume-all",b)},n.addEventListener("abort",(()=>{var e;null==(e=c)||e.abort()})),g()}))}finally{null==t||t()}}Xd.VERSION="3.8.1";let eh,th;eh=Symbol.for("uppy test: getSocket"),th=Symbol.for("uppy test: getQueued");function ih(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var rh=0;function nh(e){return"__private_"+rh+++"_"+e}var sh=nh("uppy"),ah=nh("events");class oh{constructor(e){Object.defineProperty(this,sh,{writable:!0,value:void 0}),Object.defineProperty(this,ah,{writable:!0,value:[]}),ih(this,sh)[sh]=e}on(e,t){return ih(this,ah)[ah].push([e,t]),ih(this,sh)[sh].on(e,t)}remove(){for(const[e,t]of ih(this,ah)[ah].splice(0))ih(this,sh)[sh].off(e,t)}onFilePause(e,t){this.on("upload-pause",((i,r)=>{e===i&&t(r)}))}onFileRemove(e,t){this.on("file-removed",(i=>{e===i.id&&t(i.id)}))}onPause(e,t){this.on("upload-pause",((i,r)=>{e===i&&t(r)}))}onRetry(e,t){this.on("upload-retry",(i=>{e===i&&t()}))}onRetryAll(e,t){this.on("retry-all",(()=>{ih(this,sh)[sh].getFile(e)&&t()}))}onPauseAll(e,t){this.on("pause-all",(()=>{ih(this,sh)[sh].getFile(e)&&t()}))}onCancelAll(e,t){var i=this;this.on("cancel-all",(function(){ih(i,sh)[sh].getFile(e)&&t(...arguments)}))}onResumeAll(e,t){this.on("resume-all",(()=>{ih(this,sh)[sh].getFile(e)&&t()}))}}function lh(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var uh=0;function ch(e){return"__private_"+uh+++"_"+e}function dh(e){if(null!=e){var t;const i=()=>this.abort(e.reason);e.addEventListener("abort",i,{once:!0});const r=()=>{e.removeEventListener("abort",i)};null==(t=this.then)||t.call(this,r,r)}return this}var hh=ch("activeRequests"),ph=ch("queuedHandlers"),mh=ch("paused"),gh=ch("pauseTimer"),fh=ch("downLimit"),Dh=ch("upperLimit"),yh=ch("rateLimitingTimer"),vh=ch("call"),Mh=ch("queueNext"),bh=ch("next"),wh=ch("queue"),Nh=ch("dequeue"),Eh=ch("resume"),Th=ch("increaseLimit");class Ch{constructor(e){Object.defineProperty(this,Nh,{value:jh}),Object.defineProperty(this,wh,{value:Ah}),Object.defineProperty(this,bh,{value:xh}),Object.defineProperty(this,Mh,{value:Fh}
2),Object.defineProperty(this,vh,{value:Ih}),Object.defineProperty(this,hh,{writable:!0,value:0}),Object.defineProperty(this,ph,{writable:!0,value:[]}),Object.defineProperty(this,mh,{writable:!0,value:!1}),Object.defineProperty(this,gh,{writable:!0,value:void 0}),Object.defineProperty(this,fh,{writable:!0,value:1}),Object.defineProperty(this,Dh,{writable:!0,value:void 0}),Object.defineProperty(this,yh,{writable:!0,value:void 0}),Object.defineProperty(this,Eh,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,Th,{writable:!0,value:()=>{if(lh(this,mh)[mh])lh(this,yh)[yh]=setTimeout(lh(this,Th)[Th],0);else{lh(this,fh)[fh]=this.limit,this.limit=Math.ceil((lh(this,Dh)[Dh]+lh(this,fh)[fh])/2);for(let e=lh(this,fh)[fh];e<=this.limit;e++)lh(this,Mh)[Mh]();lh(this,Dh)[Dh]-lh(this,fh)[fh]>3?lh(this,yh)[yh]=setTimeout(lh(this,Th)[Th],2e3):lh(this,fh)[fh]=Math.floor(lh(this,fh)[fh]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return!lh(this,mh)[mh]&&lh(this,hh)[hh]<this.limit?lh(this,vh)[vh](e):lh(this,wh)[wh](e,t)}wrapSyncFunction(e,t){var i=this;return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];const a=i.run((()=>(e(...n),queueMicrotask((()=>a.done())),()=>{})),t);return{abortOn:dh,abort(){a.abort()}}}}wrapPromiseFunction(e,t){var i=this;return function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];let a;const o=new Promise(((r,s)=>{a=i.run((()=>{let t,i;try{i=Promise.resolve(e(...n))}catch(o){i=Promise.reject(o)}return i.then((e=>{t?s(t):(a.done(),r(e))}),(e=>{t?s(t):(a.done(),s(e))})),e=>{t=function(e){return new Error("Cancelled",{cause:e})}(e)}}),t)}));return o.abort=e=>{a.abort(e)},o.abortOn=dh,o}}resume(){lh(this,mh)[mh]=!1,clearTimeout(lh(this,gh)[gh]);for(let e=0;e<this.limit;e++)lh(this,Mh)[Mh]()}pause(e){void 0===e&&(e=null),lh(this,mh)[mh]=!0,clearTimeout(lh(this,gh)[gh]),null!=e&&(lh(this,gh)[gh]=setTimeout(lh(this,Eh)[Eh],e))}rateLimit(e){clearTimeout(lh(this,yh)[yh]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(lh(this,Dh)[Dh]=this.limit-1,this.limit=lh(this,fh)[fh],lh(this,yh)[yh]=setTimeout(lh(this,Th)[Th],e))}get isPaused(){return lh(this,mh)[mh]}}function Ih(e){lh(this,hh)[hh]+=1;let t,i=!1;try{t=e()}catch(r){throw lh(this,hh)[hh]-=1,r}return{abort:e=>{i||(i=!0,lh(this,hh)[hh]-=1,null==t||t(e),lh(this,Mh)[Mh]())},done:()=>{i||(i=!0,lh(this,hh)[hh]-=1,lh(this,Mh)[Mh]())}}}function Fh(){queueMicrotask((()=>lh(this,bh)[bh]()))}function xh(){if(lh(this,mh)[mh]||lh(this,hh)[hh]>=this.limit)return;if(0===lh(this,ph)[ph].length)return;const e=lh(this,ph)[ph].shift();if(null==e)throw new Error("Invariant violation: next is null");const t=lh(this,vh)[vh](e.fn);e.abort=t.abort,e.done=t.done}function Ah(e,t){const i={fn:e,priority:(null==t?void 0:t.priority)||0,abort:()=>{lh(this,Nh)[Nh](i)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=lh(this,ph)[ph].findIndex((e=>i.priority>e.priority));return-1===r?lh(this,ph)[ph].push(i):lh(this,ph)[ph].splice(r,0,i),i}function jh(e){const t=lh(this,ph)[ph].indexOf(e);-1!==t&&lh(this,ph)[ph].splice(t,1)}const Sh=Symbol("__queue");function zh(e){return e.filter((e=>!(e=>"error"in e&&!!e.error)(e)))}function Oh(e){return e.filter((e=>{var t;return!(null!=(t=e.progress)&&t.uploadStarted&&e.isRestored)}))}const{AbortController:kh}=globalThis,{AbortSignal:Ph}=globalThis,Lh=function(e,t){void 0===e&&(e="Aborted");const i=new DOMException(e,"AbortError");return null!=t&&Pd(t,"cause")&&Object.defineProperty(i,"cause",{__proto__:null,configurable:!0,writable:!0,value:t.cause}),i};function _h(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Uh=0;function Bh(e){return"__private_"+Uh+++"_"+e}const Rh={getChunkSize(e){return Math.ceil(e.size/1e4)},onProgress(){},onPartComplete(){},onSuccess(){},onError(e){throw e}};const Yh=Symbol("pausing upload, not an actual error");var Qh=Bh("abortController"),Hh=Bh("chunks"),Vh=Bh("chunkState"),Wh=Bh("data"),Zh=Bh("file"),$h=Bh("uploadHasStarted"),Gh=Bh("onError"),qh=Bh("onSuccess"),Xh=Bh("shouldUseMultipart"),Jh=Bh("isRestoring"),Kh=Bh("onReject"),ep=Bh("maxMultipartParts"),tp=Bh("minPartSize"),ip=Bh("init
2Chunks"),rp=Bh("createUpload"),np=Bh("resumeUpload"),sp=Bh("onPartProgress"),ap=Bh("onPartComplete"),op=Bh("abortUpload");function lp(){const e=_h(this,Wh)[Wh].size,t="function"==typeof _h(this,Xh)[Xh]?_h(this,Xh)[Xh](_h(this,Zh)[Zh]):Boolean(_h(this,Xh)[Xh]);if(t&&e>_h(this,tp)[tp]){let i=Math.max(this.options.getChunkSize(_h(this,Wh)[Wh]),_h(this,tp)[tp]),r=Math.floor(e/i);r>_h(this,ep)[ep]&&(r=_h(this,ep)[ep],i=e/_h(this,ep)[ep]),_h(this,Hh)[Hh]=Array(r);for(let n=0,s=0;n<e;n+=i,s++){const r=Math.min(e,n+i),a=()=>{const e=n;return _h(this,Wh)[Wh].slice(e,r)};if(_h(this,Hh)[Hh][s]={getData:a,onProgress:_h(this,sp)[sp](s),onComplete:_h(this,ap)[ap](s),shouldUseMultipart:t},_h(this,Jh)[Jh]){const t=n+i>e?e-n:i;_h(this,Hh)[Hh][s].setAsUploaded=()=>{_h(this,Hh)[Hh][s]=null,_h(this,Vh)[Vh][s].uploaded=t}}}}else _h(this,Hh)[Hh]=[{getData:()=>_h(this,Wh)[Wh],onProgress:_h(this,sp)[sp](0),onComplete:_h(this,ap)[ap](0),shouldUseMultipart:t}];_h(this,Vh)[Vh]=_h(this,Hh)[Hh].map((()=>({uploaded:0})))}function up(){this.options.companionComm.uploadFile(_h(this,Zh)[Zh],_h(this,Hh)[Hh],_h(this,Qh)[Qh].signal).then(_h(this,qh)[qh],_h(this,Kh)[Kh]),_h(this,$h)[$h]=!0}function cp(){this.options.companionComm.resumeUploadFile(_h(this,Zh)[Zh],_h(this,Hh)[Hh],_h(this,Qh)[Qh].signal).then(_h(this,qh)[qh],_h(this,Kh)[Kh])}function dp(){_h(this,Qh)[Qh].abort(),this.options.companionComm.abortFileUpload(_h(this,Zh)[Zh]).catch((e=>this.options.log(e)))}var hp=class{constructor(e,t){var i;Object.defineProperty(this,op,{value:dp}),Object.defineProperty(this,np,{value:cp}),Object.defineProperty(this,rp,{value:up}),Object.defineProperty(this,ip,{value:lp}),Object.defineProperty(this,Qh,{writable:!0,value:new kh}),Object.defineProperty(this,Hh,{writable:!0,value:void 0}),Object.defineProperty(this,Vh,{writable:!0,value:void 0}),Object.defineProperty(this,Wh,{writable:!0,value:void 0}),Object.defineProperty(this,Zh,{writable:!0,value:void 0}),Object.defineProperty(this,$h,{writable:!0,value:!1}),Object.defineProperty(this,Gh,{writable:!0,value:void 0}),Object.defineProperty(this,qh,{writable:!0,value:void 0}),Object.defineProperty(this,Xh,{writable:!0,value:void 0}),Object.defineProperty(this,Jh,{writable:!0,value:void 0}),Object.defineProperty(this,Kh,{writable:!0,value:e=>(null==e?void 0:e.cause)===Yh?null:_h(this,Gh)[Gh](e)}),Object.defineProperty(this,ep,{writable:!0,value:1e4}),Object.defineProperty(this,tp,{writable:!0,value:5242880}),Object.defineProperty(this,sp,{writable:!0,value:e=>t=>{if(!t.lengthComputable)return;_h(this,Vh)[Vh][e].uploaded=function(e){if("string"==typeof e)return parseInt(e,10);if("number"==typeof e)return e;throw new TypeError("Expected a number")}(t.loaded);const i=_h(this,Vh)[Vh].reduce(((e,t)=>e+t.uploaded),0);this.options.onProgress(i,_h(this,Wh)[Wh].size)}}),Object.defineProperty(this,ap,{writable:!0,value:e=>t=>{_h(this,Hh)[Hh][e]=null,_h(this,Vh)[Vh][e].etag=t,_h(this,Vh)[Vh][e].done=!0;const i={PartNumber:e+1,ETag:t};this.options.onPartComplete(i)}}),this.options={...Rh,...t},null!=(i=this.options).getChunkSize||(i.getChunkSize=Rh.getChunkSize),_h(this,Wh)[Wh]=e,_h(this,Zh)[Zh]=t.file,_h(this,qh)[qh]=this.options.onSuccess,_h(this,Gh)[Gh]=this.options.onError,_h(this,Xh)[Xh]=this.options.shouldUseMultipart,_h(this,Jh)[Jh]=t.uploadId&&t.key,_h(this,ip)[ip]()}start(){_h(this,$h)[$h]?(_h(this,Qh)[Qh].signal.aborted||_h(this,Qh)[Qh].abort(Yh),_h(this,Qh)[Qh]=new kh,_h(this,np)[np]()):_h(this,Jh)[Jh]?(this.options.companionComm.restoreUploadFile(_h(this,Zh)[Zh],{uploadId:this.options.uploadId,key:this.options.key}),_h(this,np)[np]()):_h(this,rp)[rp]()}pause(){_h(this,Qh)[Qh].abort(Yh),_h(this,Qh)[Qh]=new kh}abort(e){null!=e&&e.really?_h(this,op)[op]():this.pause()}get chunkState(){return _h(this,Vh)[Vh]}};function pp(e){if(null!=e&&e.aborted)throw Lh("The operation was aborted",{cause:e.reason})}const mp=new TextEncoder,gp={name:"HMAC",hash:"SHA-256"};function fp(e){const t=new Uint8Array(e);let i="";for(let r=0;r<t.length;r++)i+=t[r].toString(16).padStart(2,"0");return i}async function Dp(e,t){const{subtle:i}=globalThis.crypto;return i.sign(gp,await async function(e){const{subtle:t}=globalThis.crypto;return t.importKey("raw","string"==typeof e?mp.encode(e):e,gp,!1,["sign"])}(e),mp.encode(t))}async function yp(e){let{accountKey:t,accountSecret:i,sessionToken:r,bucketName:n,Key:s,Region:a,expires:o,uploadId:l,partNumber:u}=e;const c="s3",d=`${n}.${c}.${a}.amazonaws.com`,h=`/${encodeURI(s).replace(/[;?:@&=+$,#!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}`,p="UNSIGNED-PAYLOAD",m=(new Date).toISOString().replace(/[-:]|\.\d+/g,""),g=m.slice(0,8),f=`${g}/${a}/${c}/aws4_request`,D=new URL(`https://${d}${h}`);D.searchParams.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),D.searchParams.set("X-Amz-Content-Sha256",p),D.searchParams.set("X-Amz-Credential",`${t}/${f}`),D.searchParams.set("X-Amz-Date",m),D.searchParams.set("X-Amz-Expires",o),D.searchParams.set("X-Amz-Security-Token",r),D.searchParams.set("X-Amz-SignedHeaders","host"),u&&D.searchParams.set("partNumber",u),l&&D.searchParams.set("uploadId",l),D.searchParams.set("x-id",u&&l?"UploadPart":"PutObject");const y=function(e){let{method:t="PUT",CanonicalUri:i="/",CanonicalQueryString:r="",SignedHeaders:n,HashedPayload:s}=e;const a=Object.keys(n).map((e=>e.toLowerCase())).sort();return[t,i,r,...a.map((e=>`${e}:${n[e]}`)),"",a.join(";"),s].join("\n")}({CanonicalUri:h,CanonicalQueryString:D.search.slice(1),SignedHeaders:{host:d},HashedPayload:p}),v=["AWS4-HMAC-SHA256",m,f,fp(await async function(e){const{subtle:t}=globalThis.crypto;return t.digest(gp.hash,mp.encode(e))}(y))].join("\n"),M=await Dp(`AWS4${i}`,g),b=await Dp(M,a),w=await Dp(b,c),N=await Dp(w,"aws4_request"),E=fp(await Dp(N,v));
2return D.searchParams.set("X-Amz-Signature",E),D}function vp(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Mp=0;function bp(e){return"__private_"+Mp+++"_"+e}function wp(e){const t=new URL(e);return t.search="",t.hash="",t.href}var Np=bp("abortMultipartUpload"),Ep=bp("cache"),Tp=bp("createMultipartUpload"),Cp=bp("fetchSignature"),Ip=bp("getUploadParameters"),Fp=bp("listParts"),xp=bp("previousRetryDelay"),Ap=bp("requests"),jp=bp("retryDelays"),Sp=bp("sendCompletionRequest"),zp=bp("setS3MultipartState"),Op=bp("uploadPartBytes"),kp=bp("getFile"),Pp=bp("shouldRetry"),Lp=bp("nonMultipartUpload");class _p{constructor(e,t,i,r){Object.defineProperty(this,Lp,{value:Bp}),Object.defineProperty(this,Pp,{value:Up}),Object.defineProperty(this,Np,{writable:!0,value:void 0}),Object.defineProperty(this,Ep,{writable:!0,value:new WeakMap}),Object.defineProperty(this,Tp,{writable:!0,value:void 0}),Object.defineProperty(this,Cp,{writable:!0,value:void 0}),Object.defineProperty(this,Ip,{writable:!0,value:void 0}),Object.defineProperty(this,Fp,{writable:!0,value:void 0}),Object.defineProperty(this,xp,{writable:!0,value:void 0}),Object.defineProperty(this,Ap,{writable:!0,value:void 0}),Object.defineProperty(this,jp,{writable:!0,value:void 0}),Object.defineProperty(this,Sp,{writable:!0,value:void 0}),Object.defineProperty(this,zp,{writable:!0,value:void 0}),Object.defineProperty(this,Op,{writable:!0,value:void 0}),Object.defineProperty(this,kp,{writable:!0,value:void 0}),vp(this,Ap)[Ap]=e,vp(this,zp)[zp]=i,vp(this,kp)[kp]=r,this.setOptions(t)}setOptions(e){const t=vp(this,Ap)[Ap];var i;("abortMultipartUpload"in e&&(vp(this,Np)[Np]=t.wrapPromiseFunction(e.abortMultipartUpload,{priority:1})),"createMultipartUpload"in e&&(vp(this,Tp)[Tp]=t.wrapPromiseFunction(e.createMultipartUpload,{priority:-1})),"signPart"in e&&(vp(this,Cp)[Cp]=t.wrapPromiseFunction(e.signPart)),"listParts"in e&&(vp(this,Fp)[Fp]=t.wrapPromiseFunction(e.listParts)),"completeMultipartUpload"in e&&(vp(this,Sp)[Sp]=t.wrapPromiseFunction(e.completeMultipartUpload,{priority:1})),"retryDelays"in e)&&(vp(this,jp)[jp]=null!=(i=e.retryDelays)?i:[]);"uploadPartBytes"in e&&(vp(this,Op)[Op]=t.wrapPromiseFunction(e.uploadPartBytes,{priority:1/0})),"getUploadParameters"in e&&(vp(this,Ip)[Ip]=t.wrapPromiseFunction(e.getUploadParameters))}async getUploadId(e,t){let i;for(;null!=(i=vp(this,Ep)[Ep].get(e.data));)try{return await i}catch{}const r=vp(this,Tp)[Tp](vp(this,kp)[kp](e),t),n=()=>{r.abort(t.reason),vp(this,Ep)[Ep].delete(e.data)};return t.addEventListener("abort",n,{once:!0}),vp(this,Ep)[Ep].set(e.data,r),r.then((async i=>{t.removeEventListener("abort",n),vp(this,zp)[zp](e,i),vp(this,Ep)[Ep].set(e.data,i)}),(()=>{t.removeEventListener("abort",n),vp(this,Ep)[Ep].delete(e.data)})),r}async abortFileUpload(e){const t=vp(this,Ep)[Ep].get(e.data);if(null==t)return;let i;vp(this,Ep)[Ep].delete(e.data),vp(this,zp)[zp](e,Object.create(null));try{i=await t}catch{return}await vp(this,Np)[Np](vp(this,kp)[kp](e),i)}async uploadFile(e,t,i){if(pp(i),1===t.length&&!t[0].shouldUseMultipart)return vp(this,Lp)[Lp](e,t[0],i);const{uploadId:r,key:n}=await this.getUploadId(e,i);pp(i);try{const s=await Promise.all(t.map(((t,r)=>this.uploadChunk(e,r+1,t,i))));return pp(i),await vp(this,Sp)[Sp](vp(this,kp)[kp](e),{key:n,uploadId:r,parts:s,signal:i},i).abortOn(i)}catch(s){throw(null==s?void 0:s.cause)!==Yh&&"AbortError"!==(null==s?void 0:s.name)&&this.abortFileUpload(e),s}}restoreUploadFile(e,t){vp(this,Ep)[Ep].set(e.data,t)}async resumeUploadFile(e,t,i){if(pp(i),1===t.length&&null!=t[0]&&!t[0].shouldUseMultipart)return vp(this,Lp)[Lp](e,t[0],i);const{uploadId:r,key:n}=await this.getUploadId(e,i);pp(i);const s=await vp(this,Fp)[Fp](vp(this,kp)[kp](e),{uploadId:r,key:n,signal:i},i).abortOn(i);pp(i);const a=await Promise.all(t.map(((t,r)=>{const n=r+1,a=s.find((e=>{let{PartNumber:t}=e;return t===n}));return null==a?this.uploadChunk(e,n,t,i):(null==t||null==t.setAsUploaded||t.setAsUploaded(),{PartNumber:n,ETag:a.ETag})})));return pp(i),vp(this,Sp)[Sp](vp(this,kp)[kp](e),{key:n,uploadId:r,parts:a,signal:i},i).abortOn(i)}async uploadChunk(e,t,i,r){pp(r);const{uploadId:n,key:s}=await this.getUploadId(e,r),a=vp(this,jp)[jp].values(),o=vp(this,jp)[jp].values(),l=()=>{const e=a.next();return null==e||e.done?null:e.value};for(;;){pp(r);const a=i.getData(),{onProgress:c,onComplete:d}=i;let h;try{h=await vp(this,Cp)[Cp](vp(this,kp)[kp](e),{uploadId:n,key:s,partNumber:t,body:a,signal:r}).abortOn(r)}catch(u){const e=l();if(null==e||r.aborted)throw u;await new Promise((t=>setTimeout(t,e)));continue}pp(r);try{return{PartNumber:t,...await vp(this,Op)[Op]({signature:h,body:a,size:a.size,onProgress:c,onComplete:d,signal:r}).abortOn(r)}}catch(u){if(!await vp(this,Pp)[Pp](u,o))throw u}}}}async function Up(e,t){var i;const r=vp(this,Ap)[Ap],n=null==e||null==(i=e.source)?void 0:i.status;if(null==n)return!1;if(403===n&&"Request has expired"===e.message){if(!r.isPaused){if(1===r.limit||null==vp(this,xp)[xp]){const e=t.next();if(null==e||e.done)return!1;vp(this,xp)[xp]=e.value}r.rateLimit(0),await new Promise((e=>setTimeout(e,vp(this,xp)[xp])))}}else if(429===n){if(!r.isPaused){const e=t.next();if(null==e||e.done)return!1;r.rateLimit(e.value)}}else{if(n>400&&n<500&&409!==n)return!1;if("undefined"!=typeof navigator&&!1===navigator.onLine)r.isPaused||(r.pause(),window.addEventListener("online",(()=>{r.resume()}),{once:!0}));else{const e=t.next();if(null==e||e.done)return!1;await new Promise((t=>setTimeout(t,e.value)))}}return!0}async function Bp(e,t,i){const{method:r="POST",url:n,fields:s,headers:a}=await vp(this,Ip)[Ip](vp(this,kp)[kp](e),{signal:i}).abortOn(i);let o;const l=t.getData();if("POST"===r.toUpperCase()){const e=new FormData;
2Object.entries(s).forEach((t=>{let[i,r]=t;return e.set(i,r)})),e.set("file",l),o=e}else o=l;const{onProgress:u,onComplete:c}=t,d=await vp(this,Op)[Op]({signature:{url:n,headers:a,method:r},body:o,size:l.size,onProgress:u,onComplete:c,signal:i}).abortOn(i);return"location"in d?d:{location:wp(n),...d}}let Rp;function Yp(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Qp=0;function Hp(e){return"__private_"+Qp+++"_"+e}function Vp(e){if(null!=e&&e.error){const t=new Error(e.message);throw Object.assign(t,e.error),t}return e}function Wp(e){const t=e.Expiration;if(t){const e=Math.floor((new Date(t)-Date.now())/1e3);if(e>9)return e}}function Zp(e){let{meta:t,allowedMetaFields:i,querify:r=!1}=e;const n=null!=i?i:Object.keys(t);return t?Object.fromEntries(n.filter((e=>null!=t[e])).map((e=>[r?`metadata[${e}]`:e,String(t[e])]))):{}}const $p={allowedMetaFields:null,limit:6,getTemporarySecurityCredentials:!1,shouldUseMultipart:e=>0!==e.size,retryDelays:[0,1e3,3e3,5e3],companionHeaders:{}};var Gp=Hp("companionCommunicationQueue"),qp=Hp("client"),Xp=Hp("cachedTemporaryCredentials"),Jp=Hp("getTemporarySecurityCredentials"),Kp=Hp("setS3MultipartState"),em=Hp("getFile"),tm=Hp("uploadLocalFile"),im=Hp("getCompanionClientArgs"),rm=Hp("upload"),nm=Hp("setCompanionHeaders"),sm=Hp("setResumableUploadsCapability"),am=Hp("resetResumableCapability");Rp=Symbol.for("uppy test: getClient");class om extends hs{constructor(e,t){var i;super(e,{...$p,uploadPartBytes:om.uploadPartBytes,createMultipartUpload:null,listParts:null,abortMultipartUpload:null,completeMultipartUpload:null,signPart:null,getUploadParameters:null,...t}),Object.defineProperty(this,im,{value:cm}),Object.defineProperty(this,tm,{value:um}),Object.defineProperty(this,Jp,{value:lm}),Object.defineProperty(this,Gp,{writable:!0,value:void 0}),Object.defineProperty(this,qp,{writable:!0,value:void 0}),Object.defineProperty(this,Xp,{writable:!0,value:void 0}),Object.defineProperty(this,Kp,{writable:!0,value:(e,t)=>{let{key:i,uploadId:r}=t;const n=this.uppy.getFile(e.id);null!=n&&this.uppy.setFileState(e.id,{s3Multipart:{...n.s3Multipart,ke
2y:i,uploadId:r}})}}),Object.defineProperty(this,em,{writable:!0,value:e=>this.uppy.getFile(e.id)||e}),Object.defineProperty(this,rm,{writable:!0,value:async e=>{if(0===e.length)return;const t=zh(this.uppy.getFilesByIds(e)),i=Oh(t);this.uppy.emit("upload-start",i);const r=t.map((e=>{if(e.isRemote){const t=()=>this.requests;Yp(this,sm)[sm](!1);const i=new AbortController,r=t=>{t.id===e.id&&i.abort()};this.uppy.on("file-removed",r);const n=this.uppy.getRequestClientForFile(e).uploadRemoteFile(e,Yp(this,im)[im](e),{signal:i.signal,getQueue:t});return this.requests.wrapSyncFunction((()=>{this.uppy.off("file-removed",r)}),{priority:-1})(),n}return Yp(this,tm)[tm](e)})),n=await Promise.all(r);return Yp(this,sm)[sm](!0),n}}),Object.defineProperty(this,nm,{writable:!0,value:()=>{Yp(this,qp)[qp].setCompanionHeaders(this.opts.companionHeaders)}}),Object.defineProperty(this,sm,{writable:!0,value:e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,resumableUploads:e}})}}),Object.defineProperty(this,am,{writable:!0,value:()=>{Yp(this,sm)[sm](!0)}}),this.type="uploader",this.id=this.opts.id||"AwsS3Multipart",this.title="AWS S3 Multipart",Yp(this,qp)[qp]=new Xd(e,t);const r={createMultipartUpload:this.createMultipartUpload,listParts:this.listParts,abortMultipartUpload:this.abortMultipartUpload,completeMultipartUpload:this.completeMultipartUpload,signPart:null!=t&&t.getTemporarySecurityCredentials?this.createSignedURL:this.signPart,getUploadParameters:null!=t&&t.getTemporarySecurityCredentials?this.createSignedURL:this.getUploadParameters};for(const n of Object.keys(r))null==this.opts[n]&&(this.opts[n]=r[n].bind(this));null!=(null==t?void 0:t.prepareUploadParts)&&null==t.signPart&&(this.opts.signPart=async(e,i)=>{let{uploadId:r,key:n,partNumber:s,body:a,signal:o}=i;const{presignedUrls:l,headers:u}=await t.prepareUploadParts(e,{uploadId:r,key:n,parts:[{number:s,chunk:a}],signal:o});return{url:null==l?void 0:l[s],headers:null==u?void 0:u[s]}}),this.requests=null!=(i=this.opts.rateLimitedQueue)?i:new Ch(this.opts.limit),Yp(this,Gp)[Gp]=new _p(this.requests,this.opts,Yp(this,Kp)[Kp],Yp(this,em)[em]),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null),this.uploaderSockets=Object.create(null)}[Rp](){return Yp(this,qp)[qp]}setOptions(e){Yp(this,Gp)[Gp].setOptions(e),super.setOptions(e),Yp(this,nm)[nm]()}resetUploaderReferences(e,t){this.uploaders[e]&&(this.uploaders[e].abort({really:(null==t?void 0:t.abort)||!1}),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)}assertHost(e){if(!this.opts.companionUrl)throw new Error(`Expected a \`companionUrl\` option containing a Companion address, or if you are not using Companion, a custom \`${e}\` implementation.`)}createMultipartUpload(e,t){this.assertHost("createMultipartUpload"),pp(t);const i=Zp({meta:e.meta,allowedMetaFields:this.opts.allowedMetaFields});return Yp(this,qp)[qp].post("s3/multipart",{filename:e.name,type:e.type,metadata:i},{signal:t}).then(Vp)}listParts(e,t,i){let{key:r,uploadId:n,signal:s}=t;null!=s||(s=i),this.assertHost("listParts"),pp(s);const a=encodeURIComponent(r);return Yp(this,qp)[qp].get(`s3/multipart/${n}?key=${a}`,{signal:s}).then(Vp)}completeMultipartUpload(e,t,i){let{key:r,uploadId:n,parts:s,signal:a}=t;null!=a||(a=i),this.assertHost("completeMultipartUpload"),pp(a);const o=encodeURIComponent(r),l=encodeURIComponent(n);return Yp(this,qp)[qp].post(`s3/multipart/${l}/complete?key=${o}`,{parts:s},{signal:a}).then(Vp)}async createSignedURL(e,t){const i=await Yp(this,Jp)[Jp](t),r=Wp(i.credentials)||604800,{uploadId:n,key:s,partNumber:a}=t;return{method:"PUT",expires:r,fields:{},url:`${await yp({accountKey:i.credentials.AccessKeyId,accountSecret:i.credentials.SecretAccessKey,sessionToken:i.credentials.SessionToken,expires:r,bucketName:i.bucket,Region:i.region,Key:null!=s?s:`${crypto.randomUUID()}-${e.name}`,uploadId:n,partNumber:a})}`,headers:{"Content-Type":e.type}}}signPart(e,t){let{uploadId:i,key:r,partNumber:n,signal:s}=t;if(this.assertHost("signPart"),pp(s),null==i||null==r||null==n)throw new Error("Cannot sign without a key, an uploadId, and a partNumber");const a=encodeURIComponent(r);return Yp(this,qp)[qp].get(`s3/multipart/${i}/${n}?key=${a}
2`,{signal:s}).then(Vp)}abortMultipartUpload(e,t,i){let{key:r,uploadId:n,signal:s}=t;null!=s||(s=i),this.assertHost("abortMultipartUpload");const a=encodeURIComponent(r),o=encodeURIComponent(n);return Yp(this,qp)[qp].delete(`s3/multipart/${o}?key=${a}`,void 0,{signal:s}).then(Vp)}getUploadParameters(e,t){const{meta:i}=e,{type:r,name:n}=i,s=Zp({meta:i,allowedMetaFields:this.opts.allowedMetaFields,querify:!0}),a=new URLSearchParams({filename:n,type:r,...s});return Yp(this,qp)[qp].get(`s3/params?${a}`,t)}static async uploadPartBytes(e){let{signature:{url:t,expires:i,headers:r,method:n="PUT"},body:s,size:a=s.size,onProgress:o,onComplete:l,signal:u}=e;if(pp(u),null==t)throw new Error("Cannot upload to an undefined URL");return new Promise(((e,c)=>{const d=new XMLHttpRequest;function h(){d.abort()}function p(){null==u||u.removeEventListener("abort",h)}d.open(n,t,!0),r&&Object.keys(r).forEach((e=>{d.setRequestHeader(e,r[e])})),d.responseType="text","number"==typeof i&&(d.timeout=1e3*i),null==u||u.addEventListener("abort",h),d.upload.addEventListener("progress",(e=>{o(e)})),d.addEventListener("abort",(()=>{p(),c(Lh())})),d.addEventListener("timeout",(()=>{p();const e=new Error("Request has expired");e.source={status:403},c(e)})),d.addEventListener("load",(()=>{if(p(),403===d.status&&d.responseText.includes("<Message>Request has expired</Message>")){const e=new Error("Request has expired");return e.source=d,void c(e)}if(d.status<200||d.status>=300){const e=new Error("Non 2xx");return e.source=d,void c(e)}null==o||o({loaded:a,lengthComputable:!0});const t=d.getAllResponseHeaders().trim().split(/[\r\n]+/),i={__proto__:null};for(const e of t){const t=e.split(": "),r=t.shift(),n=t.join(": ");i[r]=n}const{etag:r,location:s}=i;"POST"===n.toUpperCase()&&null===s&&console.warn("AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."),null!==r?(null==l||l(r),e({...i,ETag:r})):c(new Error("AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."))})),d.addEventListener("error",(e=>{p();const t=new Error("Unknown error");t.source=e.target,c(t)})),d.send(s)}))}install(){Yp(this,sm)[sm](!0),this.uppy.addPreProcessor(Yp(this,nm)[nm]),this.uppy.addUploader(Yp(this,rm)[rm]),this.uppy.on("cancel-all",Yp(this,am)[am])}uninstall(){this.uppy.removePreProcessor(Yp(this,nm)[nm]),this.uppy.removeUploader(Yp(this,rm)[rm]),this.uppy.off("cancel-all",Yp(this,am)[am])}}async function lm(e){return pp(null==e?void 0:e.signal),null==Yp(this,Xp)[Xp]&&(!0===this.opts.getTemporarySecurityCredentials?(this.assertHost("getTemporarySecurityCredentials"),Yp(this,Xp)[Xp]=Yp(this,qp)[qp].get("s3/sts",e).then(Vp)):Yp(this,Xp)[Xp]=this.opts.getTemporarySecurityCredentials(e),Yp(this,Xp)[Xp]=await Yp(this,Xp)[Xp],setTimeout((()=>{Yp(this,Xp)[Xp]=null}),500*(Wp(Yp(this,Xp)[Xp].credentials)||0))),Yp(this,Xp)[Xp]}function um(e){var t=this;return new Promise(((i,r)=>{const n=new hp(e.data,{companionComm:Yp(this,Gp)[Gp],log:function(){return t.uppy.log(...arguments)},getChunkSize:this.opts.getChunkSize?this.opts.getChunkSize.bind(this):null,onProgress:(t,i)=>{this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,bytesUploaded:t,bytesTotal:i})},onError:t=>{this.uppy.log(t),this.uppy.emit("upload-error",e,t),this.resetUploaderReferences(e.id),r(t)},onSuccess:t=>{const r={body:{...t},status:200,uploadURL:t.location};this.resetUploaderReferences(e.id),this.uppy.emit("upload-success",Yp(this,em)[em](e),r),t.location&&this.uppy.log(`Download ${e.name} from ${t.location}`),i()},onPartComplete:t=>{this.uppy.emit("s3-multipart:part-uploaded",Yp(this,em)[em](e),t)},file:e,shouldUseMultipart:this.opts.shouldUseMultipart,...e.s3Multipart});this.uploaders[e.id]=n;const s=new oh(this.uppy);this.uploaderEvents[e.id]=s,s.onFileRemove(e.id,(t=>{n.abort(),this.resetUploaderReferences(e.id,{abort:!0}),i(`upload ${t} was removed`)})),s.onCancelAll(e.id,(t=>{"user"===(null==t?void 0:t.reason)&&(n.abort(),this.resetUploaderReferences(e.id,{abort:!0})),i(`upload ${e.id} was canceled`)})),s.onFilePause(e.id,(e=>{e?n.pause():n.start()})),s.onPauseAll(e.id,(()=>{n.pause()})),s.onResumeAll(e.id,(()=>{n.start()})),n.start()}))}function cm(e){var t;return{...null==(t=e.remote)?void 0:t.body,protocol:"s3-multipart",size:e.data.size,metadata:e.meta}}om.VERSION="3.12.0";function dm(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var hm=0;function pm(e){return"__private_"+hm+++"_"+e}var mm=pm("uppy"),gm=pm("events");class fm{constructor(e){Object.defineProperty(this,mm,{writable:!0,value:void 0}),Object.defineProperty(this,gm,{writable:!0,value:[]}),dm(this,mm)[mm]=e}on(e,t){return dm(this,gm)[gm].push([e,t]),dm(this,mm)[mm].on(e,t)}remove(){for(const[e,t]of dm(this,gm)[gm].splice(0))dm(this,mm)[mm].off(e,t)}onFilePause(e,t){this.on("upload-pause",((i,r)=>{e===i&&t(r)}))}onFileRemove(e,t){this.on("file-removed",(i=>{e===i.id&&t(i.id)}))}onPause(e,t){this.on("upload-pause",((i,r)=>{e===i&&t(r)}))}onRetry(e,t){this.on("upload-retry",(i=>{e===i&&t()}))}onRetryAll(e,t){this.on("retry-all",(()=>{dm(this,mm)[mm].getFile(e)&&t()}))}onPauseAll(e,t){this.on("pause-all",(()=>{dm(this,mm)[mm].getFile(e)&&t()}))}onCancelAll(e,t){var i=this;this.on("cancel-all",(function(){dm(i,mm)[mm].getFile(e)&&t(...arguments)}))}onResumeAll(e,t){this.on("resume-all",(()=>{dm(this,mm)[mm].getFile(e)&&t()}))}}function Dm(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ym=0;function vm(e){return"__private_"+ym+++"_"+e}var Mm=vm("aliveTimer"),bm=vm("isDone"),wm=vm("onTimedOut"),Nm=vm("timeout");var Em=class{constructor(e,t){Object.defineProperty(this,Mm,{writable:!0,value:void 0}),Object.defineProperty(this,bm,{writable:!0,value:!1}),Object.defineProperty(this,wm,{writable:!0,value:void 0}),Object.defineProperty(this,Nm,{writable:!0,value:void 0}),Dm(this,Nm)[Nm]=e,Dm(this,wm)[wm]=()=>t(e)}progress(){Dm(this,bm)[bm]||Dm(this,Nm)[Nm]>0&&(clearTimeout(Dm(this,Mm)[Mm]),Dm(this,Mm)[Mm]=setTimeout(Dm(this,wm)[wm],Dm(this,Nm)[Nm]))}done(){Dm(this,bm)[bm]||(clearTimeout(Dm(this,Mm)[Mm]),Dm(this,Mm)[Mm]=void 0,Dm(this,bm)[bm]=!0)}};var Tm=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)};function Cm(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Im=0;function Fm(e){return"__private_"+Im+++"_"+e}function xm(e,t){if(Tm(e))return new kd(t,e);const i=new _d("Upload error",{cause:t});return i.request=e,i}function Am(e,t){const i=new FormData;!function(e,t,i){(Array.isArray(i.allowedMetaFields)?i.allowedMetaFields:Object.keys(t)).forEac
2h((i=>{e.append(i,t[i])}))}(i,e.meta,t);const r=function(e){return e.data.slice(0,e.data.size,e.meta.type)}(e);return e.name?i.append(t.fieldName,r,e.meta.name):i.append(t.fieldName,r),i}var jm=Fm("addEventHandlerForFile"),Sm=Fm("addEventHandlerIfFileStillExists");class zm{constructor(e,t){Object.defineProperty(this,Sm,{value:km}),Object.defineProperty(this,jm,{value:Om}),this.uppy=e,this.opts={validateStatus(e){return e>=200&&e<300},...t},this.requests=t[Sh],this.uploaderEvents=Object.create(null),this.i18n=t.i18n}getOptions(e){var t;const{uppy:i}=this,r=i.getState().xhrUpload;return{...this.opts,...r||{},...e.xhrUpload||{},headers:{...this.opts.headers,...null==r?void 0:r.headers,...null==(t=e.xhrUpload)?void 0:t.headers}}}uploadLocalFile(e){const t=this.getOptions(e);return new Promise(((i,r)=>{const n=t.formData?Am(e,t):(e=>e.data)(e),s=new XMLHttpRequest;this.uploaderEvents[e.id]=new fm(this.uppy);const a=new Em(t.timeout,(()=>{s.abort(),l.done();const i=new Error(this.i18n("timedOut",{seconds:Math.ceil(t.timeout/1e3)}));
2this.uppy.emit("upload-error",e,i),r(i)})),o=function(){let e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}();s.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[AwsS3/XHRUpload] ${o} started`)})),s.upload.addEventListener("progress",(t=>{this.uppy.log(`[AwsS3/XHRUpload] ${o} progress: ${t.loaded} / ${t.total}`),a.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})})),s.addEventListener("load",(n=>{if(this.uppy.log(`[AwsS3/XHRUpload] ${o} finished`),a.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),t.validateStatus(n.target.status,s.responseText,s)){const r=t.getResponseData(s.responseText,s),a=r[t.responseUrlFieldName],o={status:n.target.status,body:r,uploadURL:a};return this.uppy.emit("upload-success",this.uppy.getFile(e.id),o),a&&this.uppy.log(`Download ${e.name} from ${a}`),i(e)}const u=t.getResponseData(s.responseText,s),c=xm(s,t.getResponseError(s.responseText,s)),d={status:n.target.status,body:u};
2return this.uppy.emit("upload-error",e,c,d),r(c)})),s.addEventListener("error",(()=>{this.uppy.log(`[AwsS3/XHRUpload] ${o} errored`),a.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const i=xm(s,t.getResponseError(s.responseText,s));return this.uppy.emit("upload-error",e,i),r(i)})),s.open(t.method.toUpperCase(),t.endpoint,!0),s.withCredentials=Boolean(t.withCredentials),""!==t.responseType&&(s.responseType=t.responseType),Object.keys(t.headers).forEach((e=>{s.setRequestHeader(e,t.headers[e])}));const l=this.requests.run((()=>(s.send(n),()=>{a.done(),s.abort()})),{priority:1});Cm(this,jm)[jm]("file-removed",e.id,(()=>{l.abort(),r(new Error("File removed"))})),Cm(this,Sm)[Sm]("cancel-all",e.id,(function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))}))}))}}function Om(e,t,i){this.uploaderEvents[t].on(e,(e=>{var r;const n=null!=(r=null==e?void 0:e.id)?r:e;t===n&&i()}))}function km(e,t,i){var r=this;this.uploaderEvents[t].on(e,(function(){r.uppy.getFile(t)&&i(...arguments)}))}var Pm=function(e,t){const i=t.headers?t.headers["content-type"]:t.getResponseHeader("Content-Type");if("string"==typeof i){const t=(r=i,r.replace(/;.*$/,"")).toLowerCase();if("application/xml"===t||"text/xml"===t)return!0;if("text/html"===t&&/^<\?xml /.test(e))return!0}var r;return!1},Lm={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}};let _m;function Um(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Bm=0;function Rm(e){return"__private_"+Bm+++"_"+e}function Ym(e,t){const i=e.indexOf(`<${t}>`),r=e.indexOf(`</${t}>`,i);return-1!==i&&-1!==r?e.slice(i+t.length+2,r):""}function Qm(e){if(e&&e.error){const t=new Error(e.message);throw Object.assign(t,e.error),t}return e}function Hm(e,t){if(!Pm(e,t))return;const i=Ym(e,"Message");return new Error(i)}let Vm=!1;var Wm=Rm("client"),Zm=Rm("requests"),$m=Rm("uploader"),Gm=Rm("handleUpload"),qm=Rm("setCompanionHeaders"),Xm=Rm("getCompanionClientArgs");_m=Symbol.for("uppy test: getClient");class Jm extends hs{constructor(e,t){if(null!=(null==t?void 0:t.shouldUseMultipart))return new om(e,t);super(e,t),Object.defineProperty(this,Wm,{writable:!0,value:void 0}),Object.defineProperty(this,Zm,{writable:!0,value:void 0}),Object.defineProperty(this,$m,{writable:!0,value:void 0}),Object.defineProperty(this,Gm,{writable:!0,value:async e=>{const t=Object.create(null);function i(e){var i;const{id:r}=e;null==(i=t[r])||i.abort()}this.uppy.on("file-removed",i);const r=Oh(zh(this.uppy.getFilesByIds(e)));this.uppy.emit("upload-start",r);const n=Um(this,Zm)[Zm].wrapPromiseFunction((e=>this.opts.getUploadParameters(e))),s=e.length;return Promise.allSettled(e.map(((e,i)=>(t[e]=n(this.uppy.getFile(e)),t[e].then((r=>{delete t[e];const n=this.uppy.getFile(e);!function(e,t){if(null==t||"string"!=typeof t.url||"object"!=typeof t.fields&&null!=t.fields)throw new TypeError(`AwsS3: got incorrect result from 'getUploadParameters()' for file '${e.name}', expected an object '{ url, method, fields, headers }' but got '${JSON.stringify(t)}' instead.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.`);if(null!=t.method&&!/^p(u|os)t$/i.test(t.method))throw new TypeError(`AwsS3: got incorrect method from 'getUploadParameters()' for file '${e.name}', expected  'PUT' or 'POST' but got '${t.method}' instead.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.`)}(n,r);const{method:a="POST",url:o,fields:l,headers:u}=r,c={method:a,formData:"POST"===a.toUpperCase(),endpoint:o,allowedMetaFields:l?Object.keys(l):[]};return u&&(c.headers=u),this.uppy.setFileState(n.id,{meta:{...n.meta,...l},xhrUpload:c}),this.uploadFile(n.id,i,s)})).catch((i=>{delete t[e];const r=this.uppy.getFile(e);
2return this.uppy.emit("upload-error",r,i),Promise.reject(i)})))))).finally((()=>{this.uppy.off("file-removed",i)}))}}),Object.defineProperty(this,qm,{writable:!0,value:()=>(Um(this,Wm)[Wm].setCompanionHeaders(this.opts.companionHeaders),Promise.resolve())}),Object.defineProperty(this,Xm,{writable:!0,value:e=>{const t=Um(this,$m)[$m].getOptions(e),i=Array.isArray(t.allowedMetaFields)?t.allowedMetaFields:Object.keys(e.meta);return{...e.remote.body,protocol:"multipart",endpoint:t.endpoint,size:e.data.size,fieldname:t.fieldName,metadata:Object.fromEntries(i.map((t=>[t,e.meta[t]]))),httpMethod:t.method,useFormData:t.formData,headers:"function"==typeof t.headers?t.headers(e):t.headers}}}),this.type="uploader",this.id=this.opts.id||"AwsS3",this.title="AWS S3",this.defaultLocale=Lm;const i={timeout:3e4,limit:0,allowedMetaFields:[],getUploadParameters:this.getUploadParameters.bind(this),shouldUseMultipart:!1,companionHeaders:{}};if(this.opts={...i,...t},void 0===(null==t?void 0:t.allowedMetaFields)&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.i18nInit(),Um(this,Wm)[Wm]=new Xd(e,t),Um(this,Zm)[Zm]=new Ch(this.opts.limit)}[_m](){return Um(this,Wm)[Wm]}get client(){return Um(this,Wm)[Wm]}set client(e){Um(this,Wm)[Wm]=e}getUploadParameters(e){if(!this.opts.companionUrl)throw new Error("Expected a `companionUrl` option containing a Companion address.");const t=e.meta.name,{type:i}=e.meta,r=Object.fromEntries(this.opts.allowedMetaFields.filter((t=>null!=e.meta[t])).map((t=>[`metadata[${t}]`,e.meta[t].toString()]))),n=new URLSearchParams({filename:t,type:i,...r});return Um(this,Wm)[Wm].get(`s3/params?${n}`).then(Qm)}uploadFile(e,t,i){const r=this.uppy.getFile(e);if(this.uppy.log(`uploading ${t} of ${i}`),r.error)throw new Error(r.error);if(r.isRemote){const e=()=>Um(this,Zm)[Zm],t=new AbortController,i=e=>{e.id===r.id&&t.abort()};this.uppy.on("file-removed",i);
2const n=this.uppy.getRequestClientForFile(r).uploadRemoteFile(r,Um(this,Xm)[Xm](r),{signal:t.signal,getQueue:e});return Um(this,Zm)[Zm].wrapSyncFunction((()=>{this.uppy.off("file-removed",i)}),{priority:-1})(),n}return Um(this,$m)[$m].uploadLocalFile(r,t,i)}install(){const{uppy:e}=this;e.addPreProcessor(Um(this,qm)[qm]),e.addUploader(Um(this,Gm)[Gm]);const t={fieldName:"file",responseUrlFieldName:"location",timeout:this.opts.timeout,[Sh]:Um(this,Zm)[Zm],responseType:"text",getResponseData:this.opts.getResponseData||function(t,i){const r=this;return Pm(t,i)?{location:(n=i.responseURL,s=Ym(t,"Location"),n||s.startsWith("https://")||s.startsWith("http://")||(s=`https://${s}`),new URL(s,n||void 0).toString()),bucket:Ym(t,"Bucket"),key:Ym(t,"Key"),etag:Ym(t,"ETag")}:"POST"===r.method.toUpperCase()?(Vm||(e.log("[AwsS3] No response data found, make sure to set the success_action_status AWS SDK option to 201. See https://uppy.io/docs/aws-s3/#POST-Uploads","warning"),Vm=!0),{location:null}):i.responseURL?{location:i.responseURL.replace(/\?.*$/,"")}:{location:null};var n,s},getResponseError:Hm};t.i18n=this.i18n,Um(this,$m)[$m]=new zm(e,t)}uninstall(){this.uppy.removePreProcessor(Um(this,qm)[qm]),this.uppy.removeUploader(Um(this,Gm)[Gm])}}Jm.VERSION="3.6.2";const Km=function(e){return void 0===e&&(e=12),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"")}(e)},eg=e=>e,tg={autoProceed:!1,allowMultipleUploads:!1,debug:!1,locale:Ed,restrictions:{minNumberOfFiles:1,maxNumberOfFiles:1,maxFileSize:26214400,allowedFileTypes:[".jpg",".jpeg"]},onBeforeFileAdded:e=>{const t=(e=>{const t=new Date;return`uploads/${t.getFullYear()}-${t.getMonth()+1}/${Km(36)}${e?`.${e}`:""}`})(e.extension);return{...e,meta:{...e.meta,name:t},name:t}}},ig={target:cd,quality:1,cropperOptions:{croppedCanvasOptions:{minWidth:836,minHeight:594},aspectRatio:1.4},actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!1},locale:Ed},rg={limit:5,companionUrl:{}.COMPANION_URL||"https://upload.periodica.press/"};class ng{constructor(e){this.uppy=void 0,this.onComplete=void 0;const t={id:`uploader_${Km()}`,...tg,...e,restrictions:{...tg.restrictions,...e&&e.restrictions}};this.onComplete=t.onComplete||eg;this.uppy=new xn(t),this.uppy.use(Jm,{...rg,...e&&e.s3Options}),this.uppy.on("complete",(e=>{const t=e.successful.map((e=>({source:"local",url:e.uploadURL})));this.onComplete(t)})),this.uppy.on("error",(e=>{console.error(`Something went wrong with file upload: ${e.cause}`),console.error(`Stack trace: ${e.stack}`)}))}
2addFile(e,t){try{return this.uppy.addFile({data:e,name:e.name,type:e.type,source:t,isRemote:!1})}catch(i){return""}}close(){this.uppy.close()}useDashboard(e){this.uppy.use(cd,{...e,onRequestCloseModal:()=>{e&&null!=e&&e.onRequestCloseModal&&e.onRequestCloseModal(),this.close()}}).use(wd,{...ig});const t=this.uppy.getPlugin("Dashboard");return{openModal:null==t?void 0:t.openModal,closeModal:null==t?void 0:t.closeModal}}upload(e){e&&(this.onComplete=e),this.uppy.upload()}setOptions(e){this.uppy.setOptions(e)}}function sg(e,t){let{checkForDefaultPrevented:i=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null==e||e(r),!1===i||!r.defaultPrevented)return null==t?void 0:t(r)}}function ag(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return e=>t.forEach((t=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(t,e)))}function og(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r.useCallback(ag(...t),t)}var lg=i(31085);function ug(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=[];const n=()=>{const t=i.map((e=>r.createContext(e)));return function(i){const n=(null==i?void 0:i[e])||t;return r.useMemo((()=>({[`__scope${e}`]:{...i,[e]:n}})),[i,n])}};return n.scopeName=e,[function(t,n){const s=r.createContext(n),a=i.length;function o(t){const{scope:i,children:n,...o}=t,l=(null==i?void 0:i[e][a])||s,u=r.useMemo((()=>o),Object.values(o));return(0,lg.jsx)(l.Provider,{value:u,children:n})}return i=[...i,n],o.displayName=t+"Provider",[o,function(i,o){const l=(null==o?void 0:o[e][a])||s,u=r.useContext(l);if(u)return u;if(void 0!==n)return n;throw new Error(`\`${i}\` must be used within \`${t}\``)}]},cg(n,...t)]}function cg(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=t[0];if(1===t.length)return n;const s=()=>{const e=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const i=e.reduce(((e,i)=>{let{useScope:r,scopeName:n}=i;return{...e,...r(t)[`__scope${n}`]}}),{});return r.useMemo((()=>({[`__scope${n.scopeName}`]:i})),[i])}};return s.scopeName=n.scopeName,s}var dg=i(43144),hg=r.forwardRef(((e,t)=>{const{children:i,...n}=e,s=r.Children.toArray(i),a=s.find(gg);if(a){const e=a.props.children,i=s.map((t=>t===a?r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null:t));return(0,lg.jsx)(pg,{...n,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,i):null})}return(0,lg.jsx)(pg,{...n,ref:t,children:i})}));hg.displayName="Slot";var pg=r.forwardRef(((e,t)=>{const{children:i,...n}=e;if(r.isValidElement(i)){const e=function(e){var t,i;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,n=r&&"isReactWarning"in r&&r.isReactWarning;if(n)return e.ref;if(r=null===(i=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===i?void 0:i.get,n=r&&"isReactWarning"in r&&r.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i);return r.cloneElement(i,{...fg(n,i.props),ref:t?ag(t,e):e})}return r.Children.count(i)>1?r.Children.only(null):null}));pg.displayName="SlotClone";var mg=e=>{let{children:t}=e;return(0,lg.jsx)(lg.Fragment,{children:t})};function gg(e){return r.isValidElement(e)&&e.type===mg}function fg(e,t){const i={...t};for(const r in t){const n=e[r],s=t[r];/^on[A-Z]/.test(r)?n&&s?i[r]=function(){s(...arguments),n(...arguments)}:n&&(i[r]=n):"style"===r?i[r]={...n,...s}:"className"===r&&(i[r]=[n,s].filter(Boolean).join(" "))}return{...e,...i}}var Dg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const i=r.forwardRef(((e,i)=>{const{asChild:r,...n}=e,s=r?hg:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,lg.jsx)(s,{...n,ref:i})}));return i.displayName=`Primitive.${t}`,{...e,[t]:i}}),{});function yg(e){const t=r.useRef(e);return r.useEffect((()=>{t.current=e})),r.useMemo((()=>function(){for(var e,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return null===(e=t.current)||void 0===e?void 0:e.call(t,...r)}),[])}var vg,Mg="dismissableLayer.update",bg="dismissableLayer.pointerDownOutside",wg="dismissableLayer.focusOutside",Ng=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Eg=r.forwardRef(((e,t)=>{var i;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...c}=e,d=r.useContext(Ng),[h,p]=r.useState(null),m=null!==(i=null==h?void 0:h.ownerDocument)&&void 0!==i?i:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,g]=r.useState({}),f=og(t,(e=>p(e))),D=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=D.indexOf(y),M=h?D.indexOf(h):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,w=M>=v,N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const i=yg(e),n=r.useRef(!1),s=r.useRef((()=>{}));return r.useEffect((()=>{const e=e=>{if(e.target&&!n.current){let r=function(){Ig(bg,i,n,{discrete:!0})};const n={originalEvent:e};
vendor: 4,297 bytes, line 2
2"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=r,t.addEventListener("click",s.current,{once:!0})):r()}else t.removeEventListener("click",s.current);n.current=!1},r=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}}),[t,i]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,i=[...d.branches].some((e=>e.contains(t)));w&&!i&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),m),E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const i=yg(e),n=r.useRef(!1);return r.useEffect((()=>{const e=e=>{if(e.target&&!n.current){Ig(wg,i,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,i]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==o||o(e),null==l||l(e),e.defaultPrevented||null==u||u())}),m);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const i=yg(e);r.useEffect((()=>{const e=e=>{"Escape"===e.key&&i(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[i,t])}((e=>{M===d.layers.size-1&&(null==s||s(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),m),r.useEffect((()=>{if(h)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(vg=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Cg(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=vg)}}),[h,m,n,d]),r.useEffect((()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Cg())}),[h,d]),r.useEffect((()=>{const e=()=>g({});return document.addEventListener(Mg,e),()=>document.removeEventListener(Mg,e)}),[]),(0,lg.jsx)(Dg.div,{...c,ref:f,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:sg(e.onFocusCapture,E.onFocusCapture),onBlurCapture:sg(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:sg(e.onPointerDownCapture,N.onPointerDownCapture)})}));Eg.displayName="DismissableLayer";var Tg=r.forwardRef(((e,t)=>{const i=r.useContext(Ng),n=r.useRef(null),s=og(t,n);return r.useEffect((()=>{const e=n.current;if(e)return i.branches.add(e),()=>{i.branches.delete(e)}}),[i.branches]),(0,lg.jsx)(Dg.div,{...e,ref:s})}));function Cg(){const e=new CustomEvent(Mg);document.dispatchEvent(e)}function Ig(e,t,i,r){let{discrete:n}=r;const s=i.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});t&&s.addEventListener(e,t,{once:!0}),n?function(e,t){e&&dg.flushSync((()=>e.dispatchEvent(t)))}(s,a):s.dispatchEvent(a)}Tg.displayName="DismissableLayerBranch";var Fg=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{},xg=n["useId".toString()]||(()=>{}),Ag=0;var jg=i(83744),Sg="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function zg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let i,r,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(r=i;0!=r--;)if(!zg(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),i=n.length,i!==Object.keys(t).length)return!1;for(r=i;0!=r--;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=i;0!=r--;){const i=n[r];if(("_owner"!==i||!e.$$typeof)&&!zg(e[i],t[i]))return!1}return!0}return e!=e&&t!=t}function Og(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kg(e,t){const i=Og(e);return Math.round(t*i)/i}function Pg(e){const t=r.useRef(e);return Sg((()=>{t.current=e})),t}const Lg=e=>({name:"arrow",options:e,fn(t){const{element:i,padding:r}="function"==typeof e?e(t):e;return i&&(n=i,{}.hasOwnProperty.call(n,"current"))?null!=i.current?(0,jg.UE)({element:i.current,padding:r}).fn(t):{}:i?(0,jg.UE)({element:i,padding:r}).fn(t):{};var n}}),_g=(e,t)=>({...(0,jg.BN)(e),options:[e,t]}),Ug=(e,t)=>
2({...(0,jg.ER)(e),options:[e,t]}),Bg=(e,t)=>({...(0,jg.UU)(e),options:[e,t]}),Rg=(e,t)=>({...(0,jg.Ej)(e),options:[e,t]}),Yg=(e,t)=>({...(0,jg.jD)(e),options:[e,t]}),Qg=(e,t)=>({...Lg(e),options:[e,t]});var Hg=r.forwardRef(((e,t)=>{const{children:i,width:r=10,height:n=5,...s}=e;return(0,lg.jsx)(Dg.svg,{...s,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?i:(0,lg.jsx)("polygon",{points:"0,0 30,0 15,10"})})}));Hg.displayName="Arrow";var Vg=Hg;var Wg="Popper",[Zg,$g]=ug(Wg),[Gg,qg]=Zg(Wg),Xg=e=>{const{__scopePopper:t,children:i}=e,[n,s]=r.useState(null);return(0,lg.jsx)(Gg,{scope:t,anchor:n,onAnchorChange:s,children:i})};Xg.displayName=Wg;var Jg="PopperAnchor",Kg=r.forwardRef(((e,t)=>{const{__scopePopper:i,virtualRef:n,...s}=e,a=qg(Jg,i),o=r.useRef(null),l=og(t,o);return r.useEffect((()=>{a.onAnchorChange((null==n?void 0:n.current)||o.current)})),n?null:(0,lg.jsx)(Dg.div,{...s,ref:l})}));Kg.displayName=Jg;var ef="PopperContent",[tf,rf]=Zg(ef),nf=r.forwardRef(((e,t)=>{var i,n,s,a,o,l,u,c;const{__scopePopper:d,side:h="bottom",sideOffset:p=0,align:m="center",alignOffset:g=0,arrowPadding:f=0,avoidCollisions:D=!0,collisionBoundary:y=[],collisionPadding:v=0,sticky:M="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:N,...E}=e,T=qg(ef,d),[C,I]=r.useState(null),F=og(t,(e=>I(e))),[x,A]=r.useState(null),j=function(e){const[t,i]=r.useState(void 0);return Fg((()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let n,s;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,s=t.blockSize}else n=e.offsetWidth,s=e.offsetHeight;i({width:n,height:s})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)}),[e]),t}(x),S=null!==(i=null==j?void 0:j.width)&&void 0!==i?i:0,z=null!==(n=null==j?void 0:j.height)&&void 0!==n?n:0,O=h+("center"!==m?"-"+m:""),k="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},P=Array.isArray(y)?y:[y],L=P.length>0,_={padding:k,boundary:P.filter(lf),altBoundary:L},{refs:U,floatingStyles:B,placement:R,isPositioned:Y,middlewareData:Q}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:n=[],platform:s,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,h]=r.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(n);zg(p,n)||m(n);const[g,f]=r.useState(null),[D,y]=r.useState(null),v=r.useCallback((e=>{e!==N.current&&(N.current=e,f(e))}),[]),M=r.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),b=a||g,w=o||D,N=r.useRef(null),E=r.useRef(null),T=r.useRef(d),C=null!=u,I=Pg(u),F=Pg(s),x=r.useCallback((()=>{if(!N.current||!E.current)return;const e={placement:t,strategy:i,middleware:p};F.current&&(e.platform=F.current),(0,jg.rD)(N.current,E.current,e).then((e=>{const t={...e,isPositioned:!0};A.current&&!zg(T.current,t)&&(T.current=t,dg.flushSync((()=>{h(t)})))}))}),[p,t,i,F]);Sg((()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[c]);const A=r.useRef(!1);Sg((()=>(A.current=!0,()=>{A.current=!1})),[]),Sg((()=>{if(b&&(N.current=b),w&&(E.current=w),b&&w){if(I.current)return I.current(b,w,x);x()}}),[b,w,x,I,C]);const j=r.useMemo((()=>({reference:N,floating:E,setReference:v,setFloating:M})),[v,M]),S=r.useMemo((()=>({reference:b,floating:w})),[b,w]),z=r.useMemo((()=>{const e={position:i,left:0,top:0};if(!S.floating)return e;const t=kg(S.floating,d.x),r=kg(S.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Og(S.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:t,top:r}}),[i,l,S.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:x,refs:j,elements:S,floatingStyles:z})),[d,x,j,S,z])}({strategy:"fixed",placement:O,whileElementsMounted:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,jg.ll)(...t,{animationFrame:"always"===w})},elements:{reference:T.anchor},middleware:[(H={mainAxis:p+z,alignmentAxis:g},{...(0,jg.cY)(H),options:[H,V]}),D&&_g({mainAxis:!0,crossAxis:!1,limiter:"partial"===M?Ug():void 0,..._}),D&&Bg({..._}),Rg({..._,apply:e=>{let{elements:t,rects:i,availableWidth:r,availableHeight:n}=e;const{width:s,height:a}=i.reference,o=t.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${s}px`),o.setProperty("--radix-popper-anchor-height",`${a}px`)}}),x&&Qg({element:x,padding:f}),uf({arrowWidth:S,arrowHeight:z}),b&&Yg({strategy:"referenceHidden",..._})]});var H,V;const[W,Z]=cf(R),$=yg(N);Fg((()=>{Y&&(null==$||$())}),[Y,$]);const G=null===(s=Q.arrow)||void 0===s?void 0:s.x,q=null===(a=Q.arrow)||void 0===a?void 0:a.y,X=0!==(null===(o=Q.arrow)||void 0===o?void 0:o.centerOffset),[J,K]=r.useState();return Fg((()=>{C&&K(window.getComputedStyle(C).zIndex)}),[C]),(0,lg.jsx)("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:Y?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(l=Q.transformOrigin)||void 0===l?void 0:l.x,null===(u=Q.transformOrigin)||void 0===u?void 0:u.y].join(" "),...(null===(c=Q.hide)||void 0===c?void 0:c.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,lg.jsx)(tf,{scope:d,placedSide:W,onArrowChange:A,arrowX:G,arrowY:q,shouldHideArrow:X,children:(0,lg.jsx)(Dg.div,{"data-side":W,"data-align":Z,...E,ref:F,style:{...E.style,animation:Y?void 0:"none"}})})})}));nf.displayName=ef;var sf="PopperArrow",af={top:"bottom",right:"left",bottom:"top",left:"r
2ight"},of=r.forwardRef((function(e,t){const{__scopePopper:i,...r}=e,n=rf(sf,i),s=af[n.placedSide];return(0,lg.jsx)("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:(0,lg.jsx)(Vg,{...r,ref:t,style:{...r.style,display:"block"}})})}));function lf(e){return null!==e}of.displayName=sf;var uf=e=>({name:"transformOrigin",options:e,fn(t){var i,r,n,s,a;const{placement:o,rects:l,middlewareData:u}=t,c=0!==(null===(i=u.arrow)||void 0===i?void 0:i.centerOffset),d=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[p,m]=cf(o),g={start:"0%",center:"50%",end:"100%"}[m],f=(null!==(r=null===(n=u.arrow)||void 0===n?void 0:n.x)&&void 0!==r?r:0)+d/2,D=(null!==(s=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==s?s:0)+h/2;let y="",v="";return"bottom"===p?(y=c?g:`${f}px`,v=-h+"px"):"top"===p?(y=c?g:`${f}px`,v=`${l.floating.height+h}px`):"right"===p?(y=-h+"px",v=c?g:`${D}px`):"left"===p&&(y=`${l.floating.width+h}px`,v=c?g:`${D}px`),{data:{x:y,y:v}}}});function cf(e){const[t,i="center"]=e.split("-");return[t,i]}var df=Xg,hf=Kg,pf=nf,mf=of,gf=r.forwardRef(((e,t)=>{var i;const{container:n,...s}=e,[a,o]=r.useState(!1);Fg((()=>o(!0)),[]);const l=n||a&&(null===globalThis||void 0===globalThis||null===(i=globalThis.document)||void 0===i?void 0:i.body);return l?dg.createPortal((0,lg.jsx)(Dg.div,{...s,ref:t}),l):null}));gf.displayName="Portal";var ff=e=>{const{present:t,children:i}=e,n=function(e){const[t,i]=r.useState(),n=r.useRef({}),s=r.useRef(e),a=r.useRef("none"),o=e?"mounted":"unmounted",[l,u]=function(e,t){return r.useReducer(((e,i)=>{const r=t[e][i];return null!=r?r:e}),e)}(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect((()=>{const e=Df(n.current);a.current="mounted"===l?e:"none"}),[l]),Fg((()=>{const t=n.current,i=s.current;if(i!==e){const r=a.current,n=Df(t);if(e)u("MOUNT");else if("none"===n||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{u(i&&r!==n?"ANIMATION_OUT":"UNMOUNT")}s.current=e}}),[e,u]),Fg((()=>{if(t){const e=e=>{const i=Df(n.current).includes(e.animationName);e.target===t&&i&&dg.flushSync((()=>u("ANIMATION_END")))},i=e=>{e.target===t&&(a.current=Df(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:r.useCallback((e=>{e&&(n.current=getComputedStyle(e)),i(e)}),[])}}(t),s="function"==typeof i?i({present:n.isPresent}):r.Children.only(i),a=og(n.ref,function(e){var t,i;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,n=r&&"isReactWarning"in r&&r.isReactWarning;if(n)return e.ref;if(r=null===(i=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===i?void 0:i.get,n=r&&"isReactWarning"in r&&r.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(s));return"function"==typeof i||n.isPresent?r.cloneElement(s,{ref:a}):null};function Df(e){return(null==e?void 0:e.animationName)||"none"}function yf(e){let{prop:t,defaultProp:i,onChange:n=()=>{}}=e;const[s,a]=function(e){let{defaultProp:t,onChange:i}=e;const n=r.useState(t),[s]=n,a=r.useRef(s),o=yg(i);return r.useEffect((()=>{a.current!==s&&(o(s),a.current=s)}),[s,a,o]),n}({defaultProp:i,onChange:n}),o=void 0!==t,l=o?t:s,u=yg(n);return[l,r.useCallback((e=>{if(o){const i="function"==typeof e?e(t):e;i!==t&&u(i)}else a(e)}),[o,t,a,u])]}ff.displayName="Presence";var vf=r.forwardRef(((e,t)=>(0,lg.jsx)(Dg.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));
vendor: 9,150 bytes, line 2
2vf.displayName="VisuallyHidden";var Mf=vf,[bf,wf]=ug("Tooltip",[$g]),Nf=$g(),Ef="TooltipProvider",Tf=700,Cf="tooltip.open",[If,Ff]=bf(Ef),xf=e=>{const{__scopeTooltip:t,delayDuration:i=Tf,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:a}=e,[o,l]=r.useState(!0),u=r.useRef(!1),c=r.useRef(0);return r.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),(0,lg.jsx)(If,{scope:t,isOpenDelayed:o,delayDuration:i,onOpen:r.useCallback((()=>{window.clearTimeout(c.current),l(!1)}),[]),onClose:r.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>l(!0)),n)}),[n]),isPointerInTransitRef:u,onPointerInTransitChange:r.useCallback((e=>{u.current=e}),[]),disableHoverableContent:s,children:a})};xf.displayName=Ef;var Af="Tooltip",[jf,Sf]=bf(Af),zf=e=>{const{__scopeTooltip:t,children:i,open:n,defaultOpen:s=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:l}=e,u=Ff(Af,e.__scopeTooltip),c=Nf(t),[d,h]=r.useState(null),p=function(e){const[t,i]=r.useState(xg());return Fg((()=>{e||i((e=>null!=e?e:String(Ag++)))}),[e]),e||(t?`radix-${t}`:"")}(),m=r.useRef(0),g=null!=o?o:u.disableHoverableContent,f=null!=l?l:u.delayDuration,D=r.useRef(!1),[y=!1,v]=yf({prop:n,defaultProp:s,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Cf))):u.onClose(),null==a||a(e)}}),M=r.useMemo((()=>y?D.current?"delayed-open":"instant-open":"closed"),[y]),b=r.useCallback((()=>{window.clearTimeout(m.current),D.current=!1,v(!0)}),[v]),w=r.useCallback((()=>{window.clearTimeout(m.current),v(!1)}),[v]),N=r.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{D.current=!0,v(!0)}),f)}),[f,v]);return r.useEffect((()=>()=>window.clearTimeout(m.current)),[]),(0,lg.jsx)(df,{...c,children:(0,lg.jsx)(jf,{scope:t,contentId:p,open:y,stateAttribute:M,trigger:d,onTriggerChange:h,onTriggerEnter:r.useCallback((()=>{u.isOpenDelayed?N():b()}),[u.isOpenDelayed,N,b]),onTriggerLeave:r.useCallback((()=>{g?w():window.clearTimeout(m.current)}),[w,g]),onOpen:b,onClose:w,disableHoverableContent:g,children:i})})};zf.displayName=Af;var Of="TooltipTrigger",kf=r.forwardRef(((e,t)=>{const{__scopeTooltip:i,...n}=e,s=Sf(Of,i),a=Ff(Of,i),o=Nf(i),l=og(t,r.useRef(null),s.onTriggerChange),u=r.useRef(!1),c=r.useRef(!1),d=r.useCallback((()=>u.current=!1),[]);return r.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),(0,lg.jsx)(hf,{asChild:!0,...o,children:(0,lg.jsx)(Dg.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:sg(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||a.isPointerInTransitRef.current||(s.onTriggerEnter(),c.current=!0))})),onPointerLeave:sg(e.onPointerLeave,(()=>{s.onTriggerLeave(),c.current=!1})),onPointerDown:sg(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:sg(e.onFocus,(()=>{u.current||s.onOpen()})),onBlur:sg(e.onBlur,s.onClose),onClick:sg(e.onClick,s.onClose)})})}));kf.displayName=Of;var Pf="TooltipPortal",[Lf,_f]=bf(Pf,{forceMount:void 0}),Uf=e=>{const{__scopeTooltip:t,forceMount:i,children:r,container:n}=e,s=Sf(Pf,t);return(0,lg.jsx)(Lf,{scope:t,forceMount:i,children:(0,lg.jsx)(ff,{present:i||s.open,children:(0,lg.jsx)(gf,{asChild:!0,container:n,children:r})})})};Uf.displayName=Pf;var Bf="TooltipContent",Rf=r.forwardRef(((e,t)=>{const i=_f(Bf,e.__scopeTooltip),{forceMount:r=i.forceMount,side:n="top",...s}=e,a=Sf(Bf,e.__scopeTooltip);return(0,lg.jsx)(ff,{present:r||a.open,children:a.disableHoverableContent?(0,lg.jsx)(Vf,{side:n,...s,ref:t}):(0,lg.jsx)(Yf,{side:n,...s,ref:t})})})),Yf=r.forwardRef(((e,t)=>{const i=Sf(Bf,e.__scopeTooltip),n=Ff(Bf,e.__scopeTooltip),s=r.useRef(null),a=og(t,s),[o,l]=r.useState(null),{trigger:u,onClose:c}=i,d=s.current,{onPointerInTransitChange:h}=n,p=r.useCallback((()=>{l(null),h(!1)}),[h]),m=r.useCallback(((e,t)=>{const i=e.currentTarget,r={x:e.clientX,y:e.clientY},n=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const r=[];switch(t){case"top":r.push({x:e.x-i,y:e.y+i},{x:e.x+i,y:e.y+i});break;case"bottom":r.push({x:e.x-i,y:e.y-i},{x:e.x+i,y:e.y-i});break;case"left":r.push({x:e.x+i,y:e.y-i},{x:e.x+i,y:e.y+i});break;case"right":r.push({x:e.x-i,y:e.y-i},{x:e.x-i,y:e.y+i})}return r}(r,function(e,t){const i=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(i,r,n,s)){case s:return"left";case n:return"right";case i:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,i.getBoundingClientRect())),s=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(i.y-r.y)>=(e.y-r.y)*(i.x-r.x)))break;t.pop()}t.push(i)}t.pop();const i=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;i.length>=2;){const e=i[i.length-1],r=i[i.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;i.pop()}i.push(t)}return i.pop(),1===t.length&&1===i.length&&t[0].x===i[0].x&&t[0].y===i[0].y?t:t.concat(i)}(t)}([...n,...function(e){const{top:t,right:i,bottom:r,left:n}=e;return[{x:n,y:t},{x:i,y:t},{x:i,y:r},{x:n,y:r}]}(t.getBoundingClientRect())]);l(s),h(!0)}),[h]);return r.useEffect((()=>()=>p()),[p]),r.useEffect((()=>{if(u&&d){const e=e=>m(e,d),t=e=>m(e,u);return u.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[u,d,m,p]),r.useEffect((()=>{if(o){const e=e=>{const t=e.target,i={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==d?void 0:d.contains(t)),n=!function(e,t){const{x:i,y:r}=e;let n=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const e=t[s].x,o=t[s].y,l=t[a].x,u=t[a].y;o>r!=u>r&&i<(l-e)*(r-o)/(u-o)+e&&(n=!n)}return n}(i,o);r?p():n&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,d,o,c,p]),(0,lg.jsx)(Vf,{...e,ref:a})})),[Qf,Hf]=bf(Af,{isInside:!1}),Vf=r.forwardRef(((e,t)=>{const{__scopeTooltip:i,children:n,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,u=Sf(Bf,i),c=Nf(i),{onClose:d}=u;return r.useEffect((()=>(document.addEventListener(Cf,d),()=>document.removeEventListener(Cf,d))),[d]),r.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,d]),(0,lg.jsx)(Eg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,lg.jsxs)(pf,{"data-state":u.stateAttribute,...c,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,lg.jsx)(mg,{children:n}),(0,lg.jsx)(Qf,{scope:i,isInside:!0,children:(0,lg.jsx)(Mf,{id:u.contentId,role:"tooltip",children:s||n})})]})})}));Rf.displayName=Bf;var Wf="TooltipArrow",Zf=r.forwardRef(((e,t)=>{const{__scopeTooltip:i,...r}=e,n=Nf(i);return Hf(Wf,i).isInside?null:(0,lg.jsx)(mf,{...n,...r,ref:t})}));Zf.displayName=Wf;var $f=xf,Gf=zf,qf=kf,Xf=Uf,Jf=Rf,Kf=Zf,eD="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Il8vVGlwL0ljb24iPgo8ZyBpZD0iMTYgLyBGaWxsZWQgLyBXYXJuaW5nQ2lyY2xlIiBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzc0MV81MDU0KSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik04IDEuNUM2LjcxNDQyIDEuNSA1LjQ1NzcyIDEuODgxMjIgNC4zODg4IDIuNTk1NDVDMy4zMTk4OCAzLjMwOTY4IDIuNDg2NzYgNC4zMjQ4NCAxLjk5NDc5IDUuNTEyNTZDMS41MDI4MiA2LjcwMDI4IDEuMzc0MDkgOC4wMDcyMSAxLjYyNDkgOS4yNjgwOUMxLjg3NTcgMTAuNTI5IDIuNDk0NzcgMTEuNjg3MiAzLjQwMzgxIDEyLjU5NjJDNC4zMTI4NSAxMy41MDUyIDUuNDcxMDQgMTQuMTI0MyA2LjczMTkyIDE0LjM3NTFDNy45OTI3OSAxNC42MjU5IDkuMjk5NzMgMTQuNDk3MiAxMC40ODc0IDE0LjAwNTJDMTEuNjc1MiAxMy41MTMyIDEyLjY5MDMgMTIuNjgwMSAxMy40MDQ2IDExLjYxMTJDMTQuMTE4OCAxMC41NDIzIDE0LjUgOS4yODU1OCAxNC41IDhDMTQuNDk4MiA2LjI3NjY1IDEzLjgxMjggNC42MjQ0MSAxMi41OTQyIDMuNDA1ODJDMTEuMzc1NiAyLjE4NzIyIDkuNzIzMzUgMS41MDE4MiA4IDEuNVpNNy41IDVDNy41IDQuODY3MzkgNy41NTI2OCA0Ljc0MDIxIDcuNjQ2NDUgNC42NDY0NUM3Ljc0MDIyIDQuNTUyNjggNy44NjczOSA0LjUgOCA0LjVDOC4xMzI2MSA0LjUgOC4yNTk3OSA0LjU1MjY4IDguMzUzNTYgNC42NDY0NUM4LjQ0NzMyIDQuNzQwMjEgOC41IDQuODY3MzkgOC41IDVWOC41QzguNSA4LjYzMjYxIDguNDQ3MzIgOC43NTk3OSA4LjM1MzU2IDguODUzNTVDOC4yNTk3OSA4Ljk0NzMyIDguMTMyNjEgOSA4IDlDNy44NjczOSA5IDcuNzQwMjIgOC45NDczMiA3LjY0NjQ1IDguODUzNTVDNy41NTI2OCA4Ljc1OTc5IDcuNSA4LjYzMjYxIDcuNSA4LjVWNVpNOCAxMS41QzcuODUxNjcgMTEuNSA3LjcwNjY2IDExLjQ1NiA3LjU4MzMzIDExLjM3MzZDNy40NTk5OSAxMS4yOTEyIDcuMzYzODYgMTEuMTc0MSA3LjMwNzA5IDExLjAzN0M3LjI1MDMzIDEwLjkgNy4yMzU0OCAxMC43NDkyI
2DcuMjY0NDEgMTAuNjAzN0M3LjI5MzM1IDEwLjQ1ODIgNy4zNjQ3OCAxMC4zMjQ2IDcuNDY5NjcgMTAuMjE5N0M3LjU3NDU2IDEwLjExNDggNy43MDgyIDEwLjA0MzQgNy44NTM2OCAxMC4wMTQ0QzcuOTk5MTcgOS45ODU0NyA4LjE0OTk3IDEwLjAwMDMgOC4yODcwMSAxMC4wNTcxQzguNDI0MDYgMTAuMTEzOSA4LjU0MTE5IDEwLjIxIDguNjIzNiAxMC4zMzMzQzguNzA2MDIgMTAuNDU2NyA4Ljc1IDEwLjYwMTcgOC43NSAxMC43NUM4Ljc1IDEwLjk0ODkgOC42NzA5OCAxMS4xMzk3IDguNTMwMzMgMTEuMjgwM0M4LjM4OTY4IDExLjQyMSA4LjE5ODkyIDExLjUgOCAxMS41WiIgZmlsbD0iIzY2NjY2NiIvPgo8L2c+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzc0MV81MDU0Ij4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",tD="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzY2ODlfMzIxNSkiPgo8cGF0aCBkPSJNOCAxLjVDNi43MTQ0MiAxLjUgNS40NTc3MiAxLjg4MTIyIDQuMzg4OCAyLjU5NTQ1QzMuMzE5ODggMy4zMDk2OCAyLjQ4Njc2IDQuMzI0ODQgMS45OTQ3OSA1LjUxMjU2QzEuNTAyODIgNi43MDAyOCAxLjM3NDA5IDguMDA3MjEgMS42MjQ5IDkuMjY4MDlDMS44NzU3IDEwLjUyOSAyLjQ5NDc3IDExLjY4NzIgMy40MDM4MSAxMi41OTYyQzQuMzEyODUgMTMuNTA1MiA1LjQ3MTA0IDE0LjEyNDMgNi43MzE5MiAxNC4zNzUxQzcuOTkyNzkgMTQuNjI1OSA5LjI5OTczIDE0LjQ5NzIgMTAuNDg3NCAxNC4wMDUyQzExLjY3NTIgMTMuNTEzMiAxMi42OTAzIDEyLjY4MDEgMTMuNDA0NiAxMS42MTEyQzE0LjExODggMTAuNTQyMyAxNC41IDkuMjg1NTggMTQuNSA4QzE0LjQ5ODIgNi4yNzY2NSAxMy44MTI4IDQuNjI0NDEgMTIuNTk0MiAzLjQwNTgyQzExLjM3NTYgMi4xODcyMiA5LjcyMzM1IDEuNTAxODIgOCAxLjVaTTcuNSA1QzcuNSA0Ljg2NzM5IDcuNTUyNjggNC43NDAyMSA3LjY0NjQ1IDQuNjQ2NDVDNy43NDAyMiA0LjU1MjY4IDcuODY3MzkgNC41IDggNC41QzguMTMyNjEgNC41IDguMjU5NzkgNC41NTI2OCA4LjM1MzU2IDQuNjQ2NDVDOC40NDczMiA0Ljc0MDIxIDguNSA0Ljg2NzM5IDguNSA1VjguNUM4LjUgOC42MzI2MSA4LjQ0NzMyIDguNzU5NzkgOC4zNTM1NiA4Ljg1MzU1QzguMjU5NzkgOC45NDczMiA4LjEzMjYxIDkgOCA5QzcuODY3MzkgOSA3Ljc0MDIyIDguOTQ3MzIgNy42NDY0NSA4Ljg1MzU1QzcuNTUyNjggOC43NTk3OSA3LjUgOC42MzI2MSA3LjUgOC41VjVaTTggMTEuNUM3Ljg1MTY3IDExLjUgNy43MDY2NiAxMS40NTYgNy41ODMzMyAxMS4zNzM2QzcuNDU5OTkgMTEuMjkxMiA3LjM2Mzg2IDExLjE3NDEgNy4zMDcwOSAxMS4wMzdDNy4yNTAzMyAxMC45IDcuMjM1NDggMTAuNzQ5MiA3LjI2NDQxIDEwLjYwMzdDNy4yOTMzNSAxMC40NTgyIDcuMzY0NzggMTAuMzI0NiA3LjQ2OTY3IDEwLjIxOTdDNy41NzQ1NiAxMC4xMTQ4IDcuNzA4MiAxMC4wNDM0IDcuODUzNjggMTAuMDE0NEM3Ljk5OTE3IDkuOTg1NDcgOC4xNDk5NyAxMC4wMDAzIDguMjg3MDEgMTAuMDU3MUM4LjQyNDA2IDEwLjExMzkgOC41NDExOSAxMC4yMSA4LjYyMzYgMTAuMzMzM0M4LjcwNjAyIDEwLjQ1NjcgOC43NSAxMC42MDE3IDguNzUgMTAuNzVDOC43NSAxMC45NDg5IDguNjcwOTggMTEuMTM5NyA4LjUzMDMzIDExLjI4MDNDOC4zODk2OCAxMS40MjEgOC4xOTg5MiAxMS41IDggMTEuNVoiIGZpbGw9IiNBNkE2QTYiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF82Njg5XzMyMTUiPgo8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";function iD(e){let{text:t,onClick:i,icon:n=tD,toggledIcon:s=eD,side:a="bottom",sideOffset:o=0,customIconSize:l=16}=e;const[u,c]=r.useState(!1),d=e=>{c(e)};return r.createElement($f,null,r.createElement(Gf,{open:u},r.createElement(qf,{asChild:!0,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onFocus:()=>d(!0),onBlur:()=>d(!1)},r.createElement("button",{type:"button",className:"IconButton",onClick:()=>{i&&i()}},r.createElement("img",{alt:"Иконка",src:u&&s?s:n,style:{width:`${l}px`,height:`${l}px`}}))),r.createElement(Xf,null,r.createElement(Jf,{className:"TooltipContent",sideOffset:o,side:a},t,r.createElement(Kf,{className:"TooltipArrow"})))))}var rD=i(12239),nD="CertificateImageUpload-module--imageUploadContainer--8ea97",sD="CertificateImageUpload-module--icon--7b38a",aD="CertificateImageUpload-module--title--e8d22",oD="CertificateImageUpload-module--subtitle--ec4b1",lD="CertificateImageUpload-module--customPhotoPreviewContainer--4a563",uD="CertificateImageUpload-module--customPhotoPreview--465f6",cD="CertificateImageUpload-module--customPhotoPreviewControls--281a3",dD="CertificateImageUpload-module--customPhotoPreviewControlsInner--9462d",hD="CertificateImageUpload-module--errorLabel--afbaf";const pD="836 x 594, .JPG/.JPEG до 25 МБ";function mD(e){let{onUploadPhotos:t,uploadedFile:i,onDelete:n,error:s}=e;const a=(e=>{let{options:t,uiOptions:i}=e;return r.useCallback(((e,r,n)=>
2{const s=new ng(t),{openModal:a,closeModal:o}=s.useDashboard({...i});s.setOptions({...r?{restrictions:{maxNumberOfFiles:r}}:{}}),s.onComplete=t=>{e&&(s.onComplete=e),s.onComplete(t),o&&o()},a&&a()}),[t,i])})({uiOptions:{note:pD,showRemoveButtonAfterComplete:!0,autoOpenFileEditor:!0}}),o=r.useCallback((()=>{a((e=>{if(e.length){const{url:i}=e[0];t(`https://imgproxy.periodica.press/insecure/ar:1/q:95/crop:0:0:sm/g:sm/rs:fill-down:836:594/plain/${i}`)}}))}),[a,t]);return r.createElement(r.Fragment,null,!i&&r.createElement("div",{role:"presentation",className:nD,onClick:o},r.createElement("img",{className:sD,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuNzUgMTJIMjAuMjUiIHN0cm9rZT0iI0E2QTZBNiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIgMy43NVYyMC4yNSIgc3Ryb2tlPSIjQTZBNkE2IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",alt:"Добавить фото"}),r.createElement("p",{className:aD},"Нажмите, чтобы загрузить"),r.createElement("p",{className:oD},pD)),i&&r.createElement("div",{className:lD},r.createElement("img",{className:uD,src:i,alt:"Загруженное фото"}),r.createElement("div",{className:cD},r.createElement("div",{className:dD},r.createElement(iD,{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICAgIDxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF82Mzg0XzYyMDMpIj4KICAgICAgICA8cGF0aCBkPSJNMTIuNSA4TDE0IDkuNUwxNS41IDgiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogICAgICAgIDxwYXRoIGQ9Ik0wLjUgOEwyIDYuNUwzLjUgOCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CiAgICAgICAgPHBhdGggZD0iTTIgNi41VjhDMS45OTk1MyA5LjI3MDMyIDIuNDAyMjUgMTAuNTA4IDMuMTUwMTYgMTEuNTM0OEMzLjg5ODA4IDEyLjU2MTYgNC45NTI1OSAxMy4zMjQ1IDYuMTYxODIgMTMuNzEzN0M3LjM3MTA1IDE0LjEwMjkgOC42NzI2IDE0LjA5ODIgOS44NzkwMiAxMy43MDA0QzExLjA4NTQgMTMuMzAyNiAxMi4xMzQ1IDEyLjUzMjEgMTIuODc1IDExLjUiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xNCA5LjQ5OTk4VjcuOTk5OThDMTQuMDAwNSA2LjcyOTY2IDEzLjU5NzggNS40OTE5NyAxMi44NDk4IDQuNDY1MTdDMTIuMTAxOSAzLjQzODM2IDExLjA0NzQgMi42NzU0MyA5LjgzODE4IDIuMjg2MjVDOC42Mjg5NSAxLjg5NzA4IDcuMzI3NCAxLjkwMTczIDYuMTIwOTggMi4yOTk1NkM0LjkxNDU3IDIuNjk3MzggMy44NjU1NCAzLjQ2Nzg0IDMuMTI1IDQuNDk5OTgiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogICAgPC9nPgogICAgPGRlZnM+CiAgICAgICAgPGNsaXBQYXRoIGlkPSJjbGlwMF82Mzg0XzYyMDMiPgogICAgICAgICAgICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CiAgICAgICAgPC9jbGlwUGF0aD4KICAgIDwvZGVmcz4KPC9zdmc+",onClick:o,text:"Заменить"}),r.createElement(iD,{icon:rD.A,onClick:n,text:"Удалить"})))),s&&r.createElement("div",{className:hD},s))}var gD=i(44473);var fD=i(96885),DD=i(39067),yD=i.n(DD),vD=i(47804),MD="Modal-module--modal--43164",bD="Modal-module--overlay--4c7f0",wD="Modal-module--dialog--9b672",ND="Modal-module--modalHeader--4669e",ED="Modal-module--header--8cf41",TD="Modal-module--close--8bfde",CD="Modal-module--closeImg--a955d",ID="Modal-module--done--a5a2f",FD="Modal-module--doneImg--90895",xD="Modal-module--modalContent--2d835",AD="Modal-module--zoomDialog--c58d6",jD="Modal-module--open--bf2e8",SD="Modal-module--opacity--235c3";class zD extends r.Component{constructor(){super(...arguments),this.handleClose=()=>{const{onClose:e}=this.props;e()},this.handleConfirm=()=>{const{onConfirm:e,confirmValue:t}=this.props;return t?(e(),null):null}}componentDidUpdate(){const{show:e}=this.props;document.body.style.overflowY=e?"hidden":"scroll"}componentWillUnmount(){"hidden"===document.body.style.overflowY&&(document.body.style.overflowY="scroll")}render(){const{children:e,show:t,header:i,confirmValue:n,zoom:s,currentProductId:a}=this.props;return"undefined"!=typeof document?dg.createPortal(r.createElement("div",{className:ws()({[MD]:!0,[jD]:t})},r.createElement("div",{role:"dialog",className:bD,onClick:this.handleClose}),r.createElement("div",{className:ws()({[wD]:!0,[AD]:s})},!s&&r.createElement("div",{className:ND},r.createElement("button",{type:"button",className:TD,onClick:this.handleClose},r.createElement("img",{className:CD,alt:"close",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIgMkwxNCAxNCIgc3Ryb2tlPSIjQTZBNkE2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8cGF0aCBkPSJNMiAxNEwxNCAyIiBzdHJva2U9IiNBNkE2QTYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo="})),r.createElement("div",{className:ED},i&&i),r.createElement("button",{type:"button",className:ws()({[ID]:!0,[SD]:!n}),onClick:a?this.handleConfirm:null},r.createElement("img",{className:FD,alt:"close",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTMiIHZpZXdCb3g9IjAgMCAxNiAxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEgNi4zNTY1Mkw1Ljc0NzEzIDEyTDE1IDEiIHN0cm9rZT0iIzI3NDdBRSIvPgo8L3N2Zz4K"}),r.createElement("span",null,"Готово"))),r.createElement("div",{className:xD,"aria-modal":"true",tabIndex:"-1",role:"dialog"},t?e:null))),document.body):null}}zD.propTypes={children:yD().node.isRequired,onClose:yD().func.isRequired,show:yD().bool,header:yD().string,confirmValue:yD().bool,onConfirm:yD().func,zoom:yD().bool},zD.defaultProps={show:!1,zoom:!1,header:void 0,confirmValue:!1,onConfirm:()=>{}};var OD=zD,kD=i(17970),PD="SumSelector-module--sumWrapper--4b519",LD="SumSelector-module--modalContent--3b2d7",_D="SumSelector-module--option--70703",UD="SumSelector-module--active--f4d63",BD="SumSelector-module--optionSum--b16eb",RD="SumSelector-module--optionSumIcon--939a9",YD="SumSelector-module--optionSumTitle--a2ba9",QD="SumSelector-module--optionTitle--2646a",HD="SumSelector-module--productImage--67bd1",VD="SumSelector-module--productMetadata--4314c",WD="SumSelector-module--productName--d5ba7",ZD="SumSelector-module--productDescription--918c1",$D="SumSelector-module--arrow_icon--d7c9e",GD="SumSelector-module--optionProducts--4ae4a",qD="SumSelector-module--product--a6c61",XD="SumSelector-module--nullColor--c08cf";const JD=yD().shape({image:yD().object,title:yD().string,description:yD().string}),KD=yD().shape({id:yD().string.isRequired,sum:yD().number.isRequired,products:yD().arrayOf(JD)});function ey(e){var t,i;let{image:n,title:s,subtitle:a}=e;return r.createElement("div",{className:qD},r.createElement(vD.G,{className:HD,alt:"product icon",image:null==n||null===(t=n.localFile)||void 0===t||null===(i=t.childImageSharp)||void 0===i?void 0:i.gatsbyImageData}),r.createElement("div",{className:VD},r.createElement("p",{className:WD},s),r.createElement("p",{className:ZD},a)))}function ty(e){let{sum:t,products:i,active:n,onClick:s,optionIndex:a}=e;const o=n?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyNiAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTMiIGN5PSIxMyIgcj0iMTIiIHN0cm9rZT0iIzI3NDdBRSIvPgo8Y2lyY2xlIGN4PSIxMyIgY3k9IjEzIiByPSI2IiBmaWxsPSIjMjc0N0FFIi8+Cjwvc3ZnPgo=":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTEuNSIgc3Ryb2tlPSIjQzRDNEM0Ii8+Cjwvc3ZnPgo=";return r.createElement("div",{className:ws()({[_D]:!0,[UD]:n}),onClick:s},r.createElement("div",{className:BD},r.createElement("img",{className:RD,alt:"product icon",src:o}),r.createElement("div",{className:YD},t," ₽")),r.createElement("div",{className:QD},"Можно купить:"),r.createElement("div",{className:GD},i.map(((e,t)=>t>2?null:r.createElement(ey,{key:e.id,title:e.title,subtitle:e.page
2Count,image:e.image}))),a>0&&r.createElement("span",null,"Или любой продукт дешевле")))}ey.propTypes={image:yD().object.isRequired,title:yD().string.isRequired,description:yD().string},ey.defaultProps={description:""},ty.propTypes={sum:yD().number.isRequired,active:yD().bool,products:yD().arrayOf(JD).isRequired,onClick:yD().func.isRequired,optionIndex:yD().number.isRequired},ty.defaultProps={active:!1};const iy=r.forwardRef((function(e,t){let{onChange:i,options:n,value:s,error:a}=e;const[o,l]=(0,r.useState)(!1),[u,c]=(0,r.useState)(s),h=(0,r.useCallback)((()=>{l(!0)}),[]),p=(0,r.useCallback)((e=>()=>{c(e)}),[]),m=(0,r.useCallback)((()=>{l(!1),c(s)}),[s]),g=(0,r.useCallback)((()=>{i(u),l(!1)}),[u,i]),f=(0,r.useRef)(),D=(0,kD.A)(f,t);return r.createElement("div",{className:PD},r.createElement(d.nA,{ref:D,buttonProps:{autoComplete:"off",readOnly:!0},name:"sum",error:a,onClick:h,value:null!=s&&s.sum?r.createElement("span",null,null==s?void 0:s.sum," ₽"):r.createElement("span",{className:XD},"0 ₽"),icon:r.createElement("img",{alt:"button icon",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAzNCAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNSAxMi43NUwxNyAyMS4yNUwyNS41IDEyLjc1IiBzdHJva2U9IiMyNzQ3QUUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",className:$D})}),r.createElement(OD,{show:o,onClose:m,header:"Номинал",onConfirm:g,confirmValue:!(null==u||!u.sum),currentProductId:null==u?void 0:u.id},r.createElement("div",{className:LD},n.map(((e,t)=>r.createElement(ty,{active:e.sum===(null==u?void 0:u.sum),onClick:p(e),key:`option-${e.id}`,sum:e.sum,products:e.products,optionIndex:t}))))))}));iy.propTypes={options:yD().arrayOf(KD).isRequired,onChange:yD().func.isRequired,error:yD().string,value:(0,DD.oneOfType)([yD().string,yD().object,yD().number])},iy.defaultProps={value:void 0,error:void 0};var ry=iy,ny=i(28007);const sy=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var ay="NextArrow-module--next--56b45",oy="NextArrow-module--black--67cfd";function ly(e){let{className:t,style:i,onClick:n,externalClassName:s,black:a}=e;return r.createElement("div",{className:ws()({[ay]:!0,[oy]:a,...t&&{[t]:!0},...s&&{[s]:!0}}),style:{...i},onClick:n},r.createElement("img",{src:a?"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0nc3Ryb2tlLWNvbG9yJyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCA1MCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2LjY2NjcgOC4zMzMyNUwzMy4zMzM0IDI0Ljk5OTlMMTYuNjY2NyA0MS42NjY2IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMiIgLz4KPC9zdmc+Cg==":"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0nc3Ryb2tlLWNvbG9yJyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCA1MCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2LjY2NjcgOC4zMzMyNUwzMy4zMzM0IDI0Ljk5OTlMMTYuNjY2NyA0MS42NjY2IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIC8+Cjwvc3ZnPgo=",alt:"arrow"}))}var uy="PrevArrow-module--prev--a1395",cy="PrevArrow-module--black--2842e";function dy(e){let{className:t,style:i,onClick:n,externalClassName:s,black:a}=e;return r.createElement("div",{className:ws()({[uy]:!0,[cy]:a,...t&&{[t]:!0},...s&&{[s]:!0}}),style:{...i},onClick:n},r.createElement("img",{src:a?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCA1MCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMzLjMzMzQgOC4zMzMyNUwxNi42NjY3IDI0Ljk5OTlMMzMuMzMzNCA0MS42NjY2IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4K":"data:image/svg+xml;base64,PHN2ZyB3aWR
20aD0iNTAiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCA1MCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMzLjMzMzQgOC4zMzMyNUwxNi42NjY3IDI0Ljk5OTlMMzMuMzMzNCA0MS42NjY2IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiLz4KPC9zdmc+Cg==",alt:"arrow"}))}var hy={textarea:"CertificatePatternField-module--textarea--956c2",errorLabel:"CertificatePatternField-module--errorLabel--3b8bc",banners:"CertificatePatternField-module--banners--f4b70",patterns:"CertificatePatternField-module--patterns--5f661",pattern:"CertificatePatternField-module--pattern--e362c",dots:"CertificatePatternField-module--dots--34736",dot:"CertificatePatternField-module--dot--28c18",dotActive:"CertificatePatternField-module--dot-active--728f0",arrow:"CertificatePatternField-module--arrow--df33a"};function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},py.apply(null,arguments)}const my={customPaging:()=>r.createElement("div",{className:hy.dot}),appendDots:e=>r.createElement("div",{className:hy.navigation},r.createElement("ul",{className:hy.dots},e.map((e=>r.createElement("li",{key:e.key,className:ws()({[hy.dot]:!0,[hy.dotActive]:"slick-active"===e.props.className})},e.props.children))))),centerMode:!0,className:"slider",slidesToShow:1,slidesToScroll:1,variableWidth:!0,swipeToSlide:!0,dotsClass:hy.navigation,speed:500,centerPadding:"40px",responsive:[{breakpoint:1280,settings:{variableWidth:!0,centerMode:!0}},{breakpoint:768,settings:{variableWidth:!0,centerMode:!0}},{breakpoint:395,settings:{variableWidth:!0,centerMode:!0}}],nextArrow:r.createElement(ly,{externalClassName:hy.arrow,black:!0}),prevArrow:r.createElement(dy,{externalClassName:hy.arrow,black:!0}),dots:!0,infinite:!0},gy=r.forwardRef((function(e,t){let{patterns:i,onTextChange:n,onSlideChange:s,value:a,label:o,error:l}=e;const u=r.useCallback((e=>{const t=i[e];s(t)}),[i,s]),c={rows:3,cols:14,maxLength:50},d=r.useCallback((e=>{n(e.target.value)}),[n]),h=r.useCallback((e=>{e.target.value=e.target.value.replace(sy,"");let t=e.target.value.split("\n");t=t.slice(0,3),e.target.value=t.join("\n")}),[]);return r.createElement("div",{className:hy.banners},r.createElement("div",{className:hy.patterns},r.createElement(ny.A,py({},my,{initialSlide:(null==a?void 0:a.slideId)||0,afterChange:u}),i.map((e=>r.createElement("div",{key:`pattern-${e.slideId}`},r.createElement("div",{className:hy.pattern,style:{backgroundImage:`url(${e.image})`,backgroundRepeat:"no-repeat",backgroundPosition:"0 0"}},e.isTextEnabled&&r.createElement("textarea",py({id:"text_area",ref:t},c,{className:hy.textarea,placeholder:o,onChange:d,onKeyUp:h,value:null==a?void 0:a.text})))))))),l&&r.createElement("div",{className:hy.errorLabel},l))}));var fy=gy;gy.defaultProps={onTextChange:void 0,onSlideChange:void 0,value:{},label:"Введите ваше пожелание здесь"},gy.propTypes={patterns:yD().arrayOf(yD().shape({id:yD().number,image:yD().string})).isRequired,onTextChange:yD().func,onSlideChange:yD().func,value:yD().shape({id:yD().number,text:yD().string}),label:yD().string};var Dy=i(62030),yy=i(10876),vy={h3:"GiftForm-module--h3--0eabe",sliderLabel:"GiftForm-module--sliderLabel--7f0aa",formWrapper:"GiftForm-module--formWrapper--43ad5",formBlock:"GiftForm-module--formBlock--49b68",sumWrapper:"GiftForm-module--sumWrapper--eb047",customGiftBlock:"GiftForm-module--customGiftBlock--25c40",formSlider:"GiftForm-module--formSlider--09510",submitGroup:"GiftForm-module--submitGroup--5a6b5",giftButtonMargin:"GiftForm-module--giftButtonMargin--dfdee",switcher:"GiftForm-module--switcher--c848e",customPhotoContainer:"GiftForm-module--customPhotoContainer--7bf20",sendCustomTimeBlock:"GiftForm-module--sendCustomTimeBlock--6ad19",popover:"GiftForm-module--popover--9f096",radioGroup:"GiftForm-module--radioGroup--4623b"};function My(e){let{children:t}=e;return r.createElement(d.DZ,{variant:"h2",className:vy.h3},t)}var by=i(56057);const wy=e=>18===e.length||"Неверный формат номера телефона. Введите, пожалуйста, 11 цифр.";function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},Ny.apply(null,arguments)}const Ey=[{id:fD.ND,label:"SMS на телефон",description:"Отправим ссылку на сертификат в SMS"},{id:fD.S7,label:"На E-mail",description:"Отправим сертификат на электронную почту"}],Ty=[{id:fD.Jj,title:"Получателю"},{id:fD.c3,title:"Себе"}];
2function Cy(e){let{control:t,errors:i,setValue:n,deliveryWay:s,deliveryRecipient:a}=e;const[o,l]=(0,r.useState)({emailTo:"",phoneTo:""});return(0,r.useEffect)((()=>{a===fD.Jj&&(s===fD.S7&&o.emailTo&&n("emailTo",o.emailTo),s===fD.ND&&o.phoneTo&&n("phoneTo",o.phoneTo))}),[s,a]),r.createElement("div",{className:vy.formBlock},r.createElement(My,null,"5. Куда отправить сертификат"),r.createElement("div",{className:vy.switcher},r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i}}=e;return r.createElement(Ri.i,{activeOption:i,options:Ty,onSwitch:e=>{u.A.logEvent({name:`e_site_gift_choose_recipient_${e}`}),t(e)}})},control:t,name:"deliveryRecipient"})),r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i}}=e;return r.createElement(by.Kq,{value:i,setValue:e=>{u.A.logEvent({name:`e_site_gift_choose_way_${e}`}),t(e)}},r.createElement(by.YJ,{render:r.createElement("div",{className:vy.radioGroup})},Ey.map((e=>r.createElement(d.mq,Ny({key:e.id},e),r.createElement(by.Ec,{value:e.id,slot:"radio"}))))))},control:t,name:"deliveryWay"}),a===fD.Jj&&(s===fD.S7?r.createElement(xe,{render:e=>{let{field:{onChange:t,value:n,ref:s}}=e;return r.createElement(d.zB,{name:"emailTo",label:"E-mail получателя",error:i&&i.emailTo&&i.emailTo.message},r.createElement(d.A_,{ref:s,name:"emailTo",error:i&&i.emailTo&&i.emailTo.message,onChange:e=>t(e),onBlur:()=>{!n||i&&i.emailTo&&i.emailTo.message||(l((e=>({...e,emailTo:n}))),u.A.logEvent({name:"event_site_gift_enter-mail-to"}))},value:n,type:"email"}))},key:"emailTo",control:t,name:"emailTo",rules:{required:"Введите E-mail получателя",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Введите E-mail в формате [email protected]"}}}):r.createElement(xe,{render:e=>{let{field:{onChange:t,value:n,ref:s}}=e;return r.createElement(d.zB,{name:"phoneTo",label:"Телефон получателя",error:i&&i.phoneTo&&i.phoneTo.message},r.createElement(d.PV,{ref:s,value:n,onChange:t,onBlur:()=>{!n||i&&i.phoneTo&&i.phoneTo.message||(l((e=>({...e,phoneTo:n}))),u.A.logEvent({name:"event_site_gift_enter-phone-to"}))},name:"phoneTo",type:"text",placeholder:"+7 (___) ___-__-__",error:i&&i.phoneTo&&i.phoneTo.message}))},key:"phoneTo",control:t,name:"phoneTo",rules:{required:"Введите телефон получателя",validate:e=>wy(e)}})))}const Iy=[{id:fD.HY,title:"Все сертификаты"},{id:fD.ly,title:"Загрузить свое фото"}],Fy=[{id:fD.Ji,title:"Выбрать из списка"},{id:fD.XE,title:"Указать свой номинал"}],xy=[{id:fD.ls,title:"Сейчас"},{id:fD.im,title:"Выбрать время"}],Ay={"Europe/Moscow":"Московское время","Europe/Kaliningrad":"Калининградское (МСК-1)","Europe/Samara":"Самарское (МСК+1)","Asia/Yekaterinburg":"Екатеринбургское (МСК+2)","Asia/Omsk":"Омское (МСК+3)","Asia/Krasnoyarsk":"Красноярское (МСК+4)","Asia/Irkutsk":"Иркутское (МСК+5)","Asia/Yakutsk":"Якутское (МСК+6)","Asia/Vladivostok":"Владивостокское (МСК+7)","Asia/Srednekolymsk":"Среднеколымское (МСК+8)","Asia/Kamchatka":"Камчатское (МСК+9)"};function jy(e){var t;let{values:i={}}=e;const[n,s]=r.useState({text:"",sum:Number(null==i||null===(t=i.sum)||void 0===t?void 0:t.sum)||fD.WU,giftCards:[],giftPrices:[]}),[a,o]=r.useState(fD.HY),[l,c]=r.useState(fD.Ji),[h,p]=r.useState(fD.ls),[m,g]=r.useState((null==i?void 0:i.sum)||null),[f,D]=r.useState((null==i?void 0:i.customSum)||null),[y,v]=r.useState({customDate:(null==i?void 0:i.customDate)||"",customTime:(null==i?void 0:i.customTime)||"",timezone:(null==i?void 0:i.timezone)||Object.keys(Ay)[0]}),[M,w]=r.useState(!1),N=e=>Ti(e,"dd.MM.yyyy",new Date),T=e=>null==e?void 0:e.find((e=>"book"===e.productType)),{sum:C}=n,{allProducts:I}=(0,Bi.Q)(),F=(e=>{const t=[],i=e.map((e=>{const{id:t,productType:i,title:r,image:n,options:{pageOptions:s}}=e;return{id:t,productType:i,title:r,price:!!s&&s[0].price,image:n,hasSubProducts:!!s&&s.length>1,pageCount:s.length?Ui(s[0].value,i):0,pageOptions:s}})),r=[],n=[];
2i.forEach((e=>{e.hasSubProducts?n.push(e):r.push(e)}));const s=[];n.forEach((e=>{e.pageOptions.forEach((t=>{const i=t.price,r=t.value,n={...e,id:`${e.id}__SUB`,price:i,pageCount:Ui(r,e.productType)};s.push(n)}))}));const a=[...r,...s];a.forEach((e=>{t.push(e.price)}));let o=t.filter(((e,t,i)=>i.indexOf(e)===t)).sort(((e,t)=>e-t));return o=o.map((e=>({id:`${e}__PRICE`,sum:e,products:[]}))),o.map((e=>((e,t)=>{const i=e.filter((e=>e.price===t.sum));return{...t,products:i}})(a,e)))})(I.filter((e=>!["gift","wedding","detskaya","postcard","wrappingPaper"].includes(e.productType)&&!e.isUnavailable))),A=F.find((e=>e.sum===C)),j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=r.useRef(),i=r.useRef(),[n,s]=r.useState({isDirty:!1,isValidating:!1,isLoading:Pe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Pe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...ct(e),formState:n});const a=t.current.control;return a._options=e,Te({subject:a._subjects.state,next:e=>{we(e,a._proxyFormState,a._updateFormState,!0)&&s({...a._formState})}}),r.useEffect((()=>a._disableForm(e.disabled)),[a,e.disabled]),r.useEffect((()=>{if(a._proxyFormState.isDirty){const e=a._getDirty();e!==n.isDirty&&a._subjects.state.next({isDirty:e})}}),[a,n.isDirty]),r.useEffect((()=>{e.values&&!Je(e.values,i.current)?(a._reset(e.values,a._options.resetOptions),i.current=e.values,s((e=>({...e})))):a._resetDefaultValues()}),[e.values,a]),r.useEffect((()=>{e.errors&&a._setErrors(e.errors)}),[e.errors,a]),r.useEffect((()=>
2{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()})),r.useEffect((()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})}),[e.shouldUnregister,a]),t.current.formState=Me(n,a),t.current}({defaultValues:{pattern:{image:(null==i||null===(S=i.pattern)||void 0===S?void 0:S.image)||(null===(O=n.giftCards[0])||void 0===O?void 0:O.image),backImage:(null==i||null===(k=i.pattern)||void 0===k?void 0:k.backImage)||(null===(P=n.giftCards[0])||void 0===P?void 0:P.backImage),frontLayout:(null==i||null===(L=i.pattern)||void 0===L?void 0:L.frontLayout)||(null===(_=n.giftCards[0])||void 0===_?void 0:_.frontLayout),template_id:(null==i||null===(U=i.pattern)||void 0===U?void 0:U.template_id)||(null===(B=n.giftCards[0])||void 0===B?void 0:B.template_id),slideId:(null==i||null===(R=i.pattern)||void 0===R?void 0:R.slideId)||(null===(Y=n.giftCards[0])||void 0===Y?void 0:Y.slideId),text:(null==i||null===(Q=i.pattern)||void 0===Q?void 0:Q.text)||"",isTextEnabled:(null==i||null===(H=i.pattern)||void 0===H?void 0:H.isTextEnabled)||!1},sum:null,customSum:(null==i?void 0:i.customSum)||null,isDesignOn:(null==i?void 0:i.isDesignOn)||!1,email:(null==i?void 0:i.email)||"",emailTo:(null==i?void 0:i.emailTo)||"",nameFrom:(null==i?void 0:i.nameFrom)||"",nameTo:(null==i?void 0:i.nameTo)||"",phoneTo:(null==i?void 0:i.phoneTo)||"",phone:(null==i?void 0:i.phone)||"",deliveryWay:(null==i?void 0:i.deliveryWay)||fD.ND,deliveryRecipient:(null==i?void 0:i.deliveryRecipient)||fD.Jj,previewUrl:(null==i?void 0:i.previewUrl)||null,client_newsletter_agreed:null==i?void 0:i.client_newsletter_agreed,customDate:(null==i?void 0:i.customDate)||"",customTime:(null==i?void 0:i.customTime)||"",timezone:(null==i?void 0:i.timezone)||Object.keys(Ay)[0]},mode:"onSubmit",shouldFocusError:!0,shouldUnregister:!0});var S,O,k,P,L,_,U,B,R,Y,Q,H;const{control:V,formState:{errors:W},handleSubmit:Z,watch:$,setValue:G,trigger:q,getValues:X}=j,J=$("sum"),K=$("isDesignOn")?((null==m?void 0:m.sum)||0)+Li.h$:null==m?void 0:m.sum,ee=e=>{if(5!==e.length)return"Введите время в формате чч:мм";const t=X("customDate"),i=X("timezone");if(!t||!i)return!0;const r=((e,t)=>Ti(e,"HH:mm",t))(e,N(t)),n=function(e,t,i){if("string"==typeof e&&!e.match(x))return z(e,{...i,timeZone:t});const r=b((e=z(e,i)).getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),n=E(t,new Date(r));return new Date(r+n)}(r,i),s=new Date,a=Si(new Date,30);return s>=n?"Введите время в будущем":!(a>=n)||"Введите время не ранее, чем через 30 минут от текущего"};return(0,r.useEffect)((()=>{var e,t,r,s,o;a===fD.HY&&null!=i&&i.previewUrl&&G("pattern",{image:null===(e=n.giftCards[0])||void 0===e?void 0:e.image,backImage:null===(t=n.giftCards[0])||void 0===t?void 0:t.backImage,frontLayout:null===(r=n.giftCards[0])||void 0===r?void 0:r.frontLayout,template_id:null===(s=n.giftCards[0])||void 0===s?void 0:s.template_id,slideId:null===(o=n.giftCards[0])||void 0===o?void 0:o.slideId,text:"",isTextEnabled:!1})}),[a]),(0,r.useEffect)((()=>{G("sum",A),o((null==i?void 0:i.giftType)||fD.HY),g(A),c(null!=i&&i.customSum?fD.XE:fD.Ji),p(null!=i&&i.customDate||null!=i&&i.customTime||null!=i&&i.timezone?fD.im:fD.ls)}),[i]),(0,r.useEffect)((()=>{(async()=>{const e=await(0,yy.sr)();s((t=>({...t,giftCards:e,giftPrices:F})))})()}),[]),r.createElement("form",{noValidate:!0,onSubmit:Z((async e=>{var t;let i;var r,s,o;a===fD.HY?i=null!=e&&null!==(r=e.pattern)&&void 0!==r&&r.image?{...e.pattern}:{...n.giftCards[0],text:e.pattern.text}:i={image:e.previewUrl,frontLayout:(o=(null==e?void 0:e.previewUrl)||"",`<svg viewBox="0 0 418 591" width="849" height="1200" version="1.1" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink" viewport-fill="white">\n    <defs>\n        <style>\n            @import url('https://fonts.googleapis.com/css?family=Open+Sans&amp;display=swap&amp;subset=cyrillic,cyrillic-ext,latin-ext');\n            @import url('https://static.periodica.press/public/fonts/periodica-fonts.css');\n\n            .gift__text {\n                display: none;\n                font-family: 'Aeonik Pro';\n                font-size: 23px;\n                line-height: 120%;\n                color: #FFFFFF;\n                text-align: center;\n                display: -ms-flexbox;\n                display: flex;\n                display: -webkit-box;\n                -ms-flex-align: center;\n                align-items: center;\n                -webkit-box-align: center;\n                -ms-flex-pack: center;\n                justify-content: center;\n                -webkit-box-pack: center;\n                height: 100%;\n            }\n        </style>\n    </defs>\n    <image id="bg" x="0" y="0" width="418" height="297"\n        xlink:href=${o}\n        preserveAspectRatio="xMidYMid slice" />\n    <g>\n        <foreignObject x="97" y="99" width="223" height="94">\n            <div id="text" xmlns="http://www.w3.org/1999/xhtml" class="gift__text" style="opacity: 0">\n                test\n            </div>\n        </foreignObject>\n    </g>\n    <g>\n\n\n        <text id="name_to" x="49" y="349" font-family="Aeonik Pro" fill="#2747AE" font-size="30"\n            text-anchor="start">Мария!</text>\n\n        <text x="50" y="388" font-family="Aeonik Pro" fill="#2747AE" font-size="12" text-anchor="start">Вам дарит\n            сертификат</text>\n        <text id="name_from" x="50" y="412" font-family="Aeonik Pro" fill="#2747AE" font-size="20"\n            text-anchor="start">Елена Игоревна</text>\n\n        <text x="278" y="388" font-family="Aeonik Pro" fill="#2747AE" font-size="12" text-anchor="start">Номинал</text>\n        <text id="sum" x="278" y="412" font-family="Aeonik Pro" fill="#2747AE" font-size="20" text-anchor="start">1290\n            ₽</text>\n\n        <text x="50" y="445" font-family="Aeonik Pro" fill="#2747AE" font-size="12" text-anchor="start">Действие\n            сертификата</text>\n        <text id="date_to" x="50" y="468" font-family="Aeonik Pro" fill="#2747AE" font-size="20" text-anchor="start">до\n            15 июля 2023</text>\n\n    </g>\n    <g>\n        <rect x="50" y="502" width="318" height="51" fill="#2747AE" rx="10" />\n        <text fill="white" xml:space="preserve" style="white-space: pre" font-family="Aeonik Pro" font-size="12"\n            letter-spacing="0em" x="65" y="533">Промокод\n        </text>\n        <text id="promocode" fill="white" xml:space="preserve" style="white-space: pre" font-family="Aeonik Pro"\n            font-size="20" x="356" y="536" text-anchor="end">XYZ-XYZ</text>\n        <text fill="#2747AE" xml:space="preserve" style="white-space: pre" font-family="Parmigiano Text Pro Thin"\n            font-size="10" letter-spacing="0em" x="50" y="567"> Промокод можно применить несколько раз до исчерпания баланса.  \n        </text>\n<text fill="#2747AE" xml:space="preserve" style="white-space: pre" font-family="Parmigiano Text Pro Thin"\n            font-size="10" letter-spacing="0em" x="50" y="580"> Суммируется с другими промокодами\n        </text>\n    </g>\n\n    <g id="logo" transform="translate(278 437)">\n        <path\n            d="M26.4167 3.87383C24.7364 3.87383 23.5314 4.72491 23.0843 5.41139V5.43038L22.8899 3.9896H21.575V16.5316H23.0777V11.5734C23.5248 12.2563 24.7299 13.0983 26.4101 13.0983C29.0626 13.0983 30.9955 11.2451 30.9955 8.48561C31.0021 5.76322 29.118 3.87383 26.4167 3.87383ZM26.2617 11.7597C24.4772 11.7597 23.0843 10.7404 23.0843 8.7479V8.23326C23.0843 6.24348 24.4734 5.2115 26.2617 5.2115C28.2041 5.2115 29.4768 6.45512 29.4768 8.48561C29.4768 10.5161 28.2041 11.7597 26.2617 11.7597V11.7597Z"\n            fill="#2747AE" />\n        <path\n            d="M15.5344 3.87383C12.8106 3.87383 10.8711 5.8003 10.8711 8.48651C10.8711 11.1094 
212.6491 13.0992 15.4179 13.0992C17.9436 13.0992 19.4886 11.7796 19.8577 9.97433H18.3549C18.0441 11.1438 16.9555 11.8076 15.479 11.8076C13.5846 11.8076 12.4575 10.4329 12.4575 8.95411V8.87904H19.9864C20.0061 8.66469 20.0258 8.45847 20.0258 8.26221C20.023 5.83829 18.2836 3.87383 15.5344 3.87383ZM12.542 7.67251C12.6876 6.21363 14.0382 5.14638 15.4959 5.14638C17.04 5.14638 18.2648 6.11957 18.4075 7.67251H12.542Z"\n            fill="#2747AE" />\n        <path d="M0.932861 12.9952H2.4394V5.3146H7.81184V12.9952H9.31744V3.98596H0.932861V12.9952Z" fill="#2747AE" />\n        <path\n            d="M3.20638 1.26353C3.75959 1.26353 4.21606 1.58099 4.82845 2.00246C5.66437 2.6202 6.32465 2.91957 7.11174 2.91957C8.58822 2.91957 9.30767 1.93644 9.30767 0.421488H8.02467C7.97677 1.23549 7.60671 1.65606 7.00466 1.65606C6.40261 1.65606 5.84846 1.16947 5.17878 0.710911C4.57579 0.299388 3.93523 1.52588e-05 3.18666 1.52588e-05C1.83603 1.52588e-05 0.923096 0.92617 0.923096 2.4981H2.21549C2.25494 1.6651 2.66163 1.26353 3.20638 1.26353Z"\n            fill="#2747AE" />\n        <path\n            d="M61.3433 3.98596H54.377L54.115 8.3653C53.9985 10.2646 53.5317 11.3961 53.1241 11.6955H52.1914V15.4091H53.6313V13.0232H61.3837V15.4082H62.8311V11.6946H61.3433V3.98596ZM59.8406 11.6946H54.8147C55.1444 11.236 55.4656 9.96346 55.5661 8.13919L55.7211 5.3146H59.8406V11.6946Z"\n            fill="#2747AE" />\n        <path\n            d="M87.243 3.87383C84.9794 3.87383 83.4926 4.92118 83.2691 6.68937H84.7719C84.9597 5.76322 85.8407 5.16447 87.1622 5.16447C88.6293 5.16447 89.4934 5.87537 89.4934 7.03578V7.66256H86.7443C84.2769 7.66256 82.9751 8.66378 82.9751 10.4663C82.9751 11.8601 84.0627 13.0956 86.1131 13.0956C87.7164 13.0956 88.9599 12.4218 89.5526 11.6168L89.7658 12.9925H90.9999V7.12893C91.0028 5.02428 89.623 3.87383 87.243 3.87383ZM89.4972 9.07531C89.4972 10.6002 88.264 11.8628 86.3301 11.8628C85.0865 11.8628 84.5042 11.2641 84.5042 10.375C84.5042 9.35568 85.2621 8.87814 86.593 8.87814H89.4972V9.07531Z"\n            fill="#2747AE" />\n        <path\n            d="M82.3848 3.98596H80.636L77.7215 7.74666H75.8374V3.98596H74.3318V12.9952H75.8374V9.07529H77.7412L80.8595 12.9952H82.676L78.9744 8.30832L82.3848 3.98596Z"\n            fill="#2747AE" />\n        <path\n            d="M65.5779 10.8055V3.98596H64.1108V12.9952H65.4323L70.863 6.15573V12.9952H72.3395V3.98596H71.018L65.5779 10.8055Z"\n            fill="#2747AE" />\n        <path\n            d="M47.13 3.87383C44.1375 3.87383 42.3398 5.88441 42.3398 8.48651C42.3398 11.0886 44.1366 13.0992 47.13 13.0992C50.1233 13.0992 51.9295 11.0967 51.9295 8.48651C51.9295 5.87627 50.1318 3.87383 47.13 3.87383ZM47.13 11.7787C45.1284 11.7787 43.8652 10.4971 43.8652 8.48561C43.8652 6.47411 45.1284 5.19975 47.13 5.19975C49.1315 5.19975 50.4041 6.48135 50.4041 8.4838C50.4041 10.4862 49.1409 11.7787 47.13 11.7787Z"\n            fill="#2747AE" />\n        <path\n            d="M34.0331 10.8055V3.98596H32.5557V12.9952H33.8772L39.3182 6.15573V12.9952H40.7853V3.98596H39.4638L34.0331 10.8055Z"\n            fill="#2747AE" />\n    </g>\n\n    <text fill="#2747AE" xml:space="preserve" style="white-space: pre" font-family="Aeonik Pro" font-size="12"\n        letter-spacing="0em" x="278" y="468">periodica.press\n    </text>\n</svg>`),template_id:fD.FK,slideId:null===(s=n.giftCards[0])||void 0===s?void 0:s.slideId,text:"",isTextEnabled:!1};const l=!1===(null===(t=i)||void 0===t?void 0:t.isTextEnabled)?"":i.text,c={...i,text:l};u.A.logEvent({name:"event_site_gift_finish-order"}),(0,zi.navigate)("/products/gift/confirmation/",{state:{...e,pattern:c,giftType:a,timezoneTitle:Ay[e.timezone]}})})),id:"giftForm"},r.createElement("div",{className:vy.formWrapper},r.createElement("div",{className:vy.formBlock},r.createElement(My,null,"1. Укажите получателя"),r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i,ref:n}}=e;return r.createElement(d.zB,{label:"Имя получателя",name:"nameTo",error:W&&W.nameTo&&W.nameTo.message},r.createElement(d.A_,{ref:n,name:"nameTo",onChange:e=>t(e),onBlur:()=>i&&u.A.logEvent({name:"event_site_gift_enter-name-to"}),value:i,error:W&&W.nameTo&&W.nameTo.message}))},control:V,name:"nameTo",rules:{required:"Введите Имя получателя"}})),r.createElement("div",{className:vy.formBlock},r.createElement(My,null,"2. Выберите дизайн"),r.createElement("div",{className:vy.switcher},r.createElement(Ri.i,{activeOption:a,options:Iy,onSwitch:e=>{e!==a&&(u.A.logEvent({name:"event_site_gift_select-gift-type"}),o(e))}})),r.createElement(d.fz,{size:"medium",className:vy.sliderLabel},"Выберите фон"+(a===fD.HY?" и добавьте пожелание":"")))),a===fD.HY?r.createElement(gD.B,{className:vy.formSlider},r.createElement(xe,{render:e=>
2{let{field:{onChange:t,value:i,ref:s}}=e;return r.createElement(fy,{ref:s,onSlideChange:e=>{t({...i,image:null==e?void 0:e.image,backImage:null==e?void 0:e.backImage,frontLayout:null==e?void 0:e.frontLayout,template_id:null==e?void 0:e.template_id,slideId:null==e?void 0:e.slideId,isTextEnabled:null==e?void 0:e.isTextEnabled})},onTextChange:e=>t({...i,text:e}),value:i,patterns:n.giftCards,error:W&&W.pattern&&W.pattern.message})},name:"pattern",control:V,rules:{validate:e=>(e=>{var t;return!!(!1===e.isTextEnabled||e&&null!==(t=e.text)&&void 0!==t&&t.trim())||"Введите пожелание"})(e)}})):r.createElement("div",{className:vy.formWrapper},r.createElement("div",{className:vy.customGiftBlock},r.createElement("div",{className:vy.customPhotoContainer},r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i}}=e;return r.createElement(mD,{onUploadPhotos:e=>{t(e)},onDelete:()=>t(null),uploadedFile:i,error:W&&W.previewUrl&&W.previewUrl.message})},name:"previewUrl",control:V,rules:{validate:e=>(e=>!(a!==fD.HY&&!e)||"Пожалуйста, загрузите изображение")(e)}})))),r.createElement("div",{className:vy.formWrapper},r.createElement("div",{className:vy.formBlock},r.createElement(My,null,"3. Выберите номинал"),r.createElement("div",{className:vy.switcher},r.createElement(Ri.i,{activeOption:l,options:Fy,onSwitch:e=>{e!==l&&(e===fD.Ji?G("sum",m):G("customSum",f),T(null==m?void 0:m.products)||G("isDesignOn",!1),u.A.logEvent({name:"event_site_gift_select-gift-sum-type"}),c(e))}})),l===fD.Ji?r.createElement("div",{className:vy.sumWrapper},r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i,ref:s}}=e;return r.createElement(ry,{ref:s,options:n.giftPrices,onChange:e=>{e&&(u.A.logEvent({name:"event_site_gift_select-price"}),g(e)),T(null==e?void 0:e.products)||G("isDesignOn",!1),t(e)},value:i,error:W&&W.sum&&W.sum.message})},name:"sum",control:V,rules:{required:"Выберите номинал сертификата",min:{value:100,message:"Выберите номинал сертификата"}}}),r.createElement(xe,{control:V,name:"isDesignOn",defaultValue:!1,render:e=>{let{field:{onChange:t,value:i}}=e;return T(null==J?void 0:J.products)?r.createElement(ki.OI,{label:"Добавить услугу «Соберем фотокнигу за вас»",description:`за ${Li.h$.toLocaleString("ru-RU")} ₽`,onChange:e=>t(e),checked:i}):null}})):r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i,ref:n}}=e;return r.createElement(d.zB,{label:"Номинал сертификата",name:"customSum",error:W&&W.customSum&&W.customSum.message},r.createElement(d.A_,{ref:n,name:"customSum",error:W&&W.customSum&&W.customSum.message,onChange:e=>{const i=Number(`${e}`.replace(/[^\d]/gi,""));D(i),t(i)},onBlur:()=>i&&u.A.logEvent({name:"event_site_gift_enter-sum"}),value:i||"",type:"text",placeholder:"от 1500 ₽"}))},control:V,name:"customSum",rules:{required:"Введите номинал сертификата",min:{value:1500,message:"Минимальная сумма сертификата 1500 ₽"}}}),r.createElement(Dy.J,{sum:l===fD.Ji?K:f})),r.createElement("div",{className:vy.formBlock},r.createElement(My,null,"4. От кого"),r.createElement("div",{className:vy.formField},r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i,ref:n}}=e;return r.createElement(d.zB,{label:"Имя отправителя",name:"nameFrom",error:W&&W.nameFrom&&W.nameFrom.message},r.createElement(d.A_,{ref:n,name:"nameFrom",onBlur:()=>i&&!(W&&W.nameFrom&&W.nameFrom.message)&&u.A.logEvent({name:"event_site_gift_enter-name-from"}),error:W&&W.nameFrom&&W.nameFrom.message,onChange:e=>t(e),value:i}))},control:V,name:"nameFrom",rules:{required:"Введите имя отправителя"}})),r.createElement("div",{className:vy.formField},r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i,ref:n}}=e;return r.createElement(d.zB,{label:"E-mail отправителя",name:"email",description:"Отправим подтверждение заказа и оплаты",error:W&&W.email&&W.email.message},r.createElement(d.A_,{ref:n,name:"email",onBlur:()=>i&&!(W&&W.email&&W.email.message)&&u.A.logEvent({name:"event_site_gift_enter-mail"}),error:W&&W.email&&W.email.message,onChange:e=>t(e),value:i,type:"email"}))},control:V,name:"email",rules:{required:"Введите E-mail отправителя",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Введите E-mail в формате [email protected]"}}}
2)),r.createElement(xe,{render:e=>{let{field:{onChange:t,value:i,ref:n}}=e;return r.createElement(d.zB,{name:"phone",label:"Телефон отправителя",error:W&&W.phone&&W.phone.message},r.createElement(d.PV,{ref:n,value:i,onChange:t,onBlur:()=>i&&!(W&&W.phone&&W.phone.message)&&u.A.logEvent({name:"event_site_gift_enter-phone"}),name:"phone",type:"text",placeholder:"+7 (___) ___-__-__",error:W&&W.phone&&W.phone.message}))},name:"phone",control:V,rules:{required:"Введите телефон отправителя",validate:e=>wy(e)}})),r.createElement(Cy,{control:V,errors:W,setValue:G,deliveryWay:$("deliveryWay"),deliveryRecipient:$("deliveryRecipient")}),r.createElement("div",{className:vy.formBlock},r.createElement(My,null,"6. Время отправки"),r.createElement("div",{className:vy.switcher},r.createElement(Ri.i,{activeOption:h,options:xy,onSwitch:e=>{if(e===h)return;const t=X("customDate"),i=X("customTime"),r=X("timezone");v({customDate:t,customTime:i,timezone:r}),e===fD.im&&(G("customDate",y.customDate),G("customTime",y.customTime),G("timezone",y.timezone)),u.A.logEvent({name:"event_site_gift_select-gift-send-type"}),p(e)}})),h===fD.ls&&r.createElement(d.fz,{size:"large"},"Отправим сертификат сегодня, сразу после оплаты."),h===fD.im&&r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement(xe,{control:V,name:"customDate",rules:{required:"Введите дату в формате дд.мм.гггг",validate:e=>(e=>{if(!e)return"";if(10!==e.length)return"Введите дату в формате дд.мм.гггг";const t=(0,Ci.o)(N(e)),i=(0,Ci.o)(new Date),r=Fi(i,2);return xi(t,i)?"Введите дату в будущем":!Ai(t,r)||"Максимальное время отправки — 2 года с текущей даты"})(e)},render:e=>{let{field:{onChange:t,value:i,ref:n,onBlur:s}}=e;return r.createElement(d.zB,{label:"Дата",name:"date",error:W&&W.customDate&&W.customDate.message},r.createElement(d.vM,{ref:n,onChange:e=>{v((t=>({...t,customDate:e}))),t(e)},value:i||"",error:W&&W.customDate&&W.customDate.message,type:"text",placeholder:"ДД.ММ.ГГГГ",onBlur:e=>{s(e),q("customDate");X("customTime")&&q("customTime"),!i||W&&W.customDate&&W.customDate.message||u.A.logEvent({name:"event_site_gift_customDate"})}}))}})),r.createElement("div",{className:vy.sendCustomTimeBlock},r.createElement(xe,{control:V,name:"customTime",rules:{required:"Введите время в формате чч:мм",validate:e=>ee(e)},render:e=>{let{field:{onChange:t,value:i,ref:n,onBlur:s}}=e;return r.createElement(d.zB,{label:"Время",name:"time",error:W&&W.customTime&&W.customTime.message},r.createElement(d.Q1,{ref:n,value:i||"",onChange:e=>{v((t=>({...t,customTime:e}))),t(e)},type:"text",placeholder:"__:__",error:W&&W.customTime&&W.customTime.message,onBlur:e=>{s(e),q("customTime"),!i||W&&W.customTime&&W.customTime.message||u.A.logEvent({name:"event_site_gift_customTime"})}}))}}),r.createElement(xe,{control:V,name:"timezone",render:e=>{let{field:{value:t,onChange:i,onBlur:n}}=e;return r.createElement(d.zB,{label:"Часовой пояс"},r.createElement(Oi.Kq,{selectedValue:t,setSelectedValue:e=>{v((t=>({...t,timezone:e}))),u.A.logEvent({name:"event_site_gift_timezone"}),i(e)}},r.createElement(Oi.l6,{placeholder:"Выберите часовой пояс",onBlur:e=>{n(e);X("customTime")&&q("customTime")}},Ay[t]),r.createElement(Oi.AM,{className:vy.popover},Object.entries(Ay).map((e=>{let[t,i]=e;return r.createElement(Oi.c$,{key:t,value:t},i)})))))}})))),r.createElement("div",{className:vy.submitGroup},r.createElement(d.$n,{form:"giftForm",size:"xLarge",className:vy.giftButtonMargin,disabled:!M},"Оформить сертификат"),r.createElement(xe,{control:V,name:"client_newsletter_agreed",defaultValue:!1,render:e=>{let{field:{value:t,onChange:i}}=e;return r.createElement(ki.OI,{size:"medium",label:r.createElement(Pi.Fr,null),onChange:e=>i(e),checked:t,value:t})}}),r.createElement(ki.OI,{size:"medium",label:r.createElement(Pi.Qj,null),onChange:w,checked:M}))))}var Sy=i(79813),zy=i(1087),Oy=i(42561),ky=i(55215),Py="styles-module--rounded--d022e";const Ly={}.URL||"https://periodica.press",_y=e=>{switch(e){case"main":return"Мне будет приятно получить подарок из Периодики";case"gift":return"Мне будет приятно получить сертификат Периодики в подарок — давно хочу собрать себе фотокнигу";default:return"Мне будет приятно получить такой подарок из Периодики"}},Uy=e=>`?utm_source=socialsharing${e?`&utm_medium=${e}`:""}&utm_campaign=hintgift`;function By(e){let{children:t,category:i="main"}=e;const n=(0,Oy.j)();return r.createElement(r.Fragment,null,r.createElement(d.DX,{onClick:()=>{n.show(),u.A.logEvent({name:"e_site_share_modal_open"})}},t),r.createElement(Yy,{store:n,onLinkClick:e=>{u.A.logEvent({name:`e_site_share_${e}_click`}),n.hide()},category:i}))}const Ry=(e,t)=>{const i=_y(t);return[{id:"vk",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAgMTZDMCA3LjE2MzQ0IDcuMTYzNDQgMCAxNiAwQzI0LjgzNjYgMCAzMiA3LjE2MzQ0IDMyIDE2QzMyIDI0LjgzNjYgMjQuODM2NiAzMiAxNiAzMkM3LjE2MzQ0IDMyIDAgMjQuODM2NiAwIDE2WiIgZmlsbD0iIzAwNzdGRiIvPgo8cGF0aCBkPSJNMTYuNzc0NyAyMi4wMDAyQzEwLjg1MjYgMjIuMDAwMiA3LjQ3NDczIDE3Ljk5NjIgNy4zMzM5OCAxMS4zMzM1SDEwLjMwMDVDMTAuMzk3OSAxNi4yMjM3IDEyLjU4NDggMTguMjk1MSAxNC4zMTcxIDE4LjcyMjJWMTEuMzMzNUgxNy4xMTA0VjE1LjU1MUMxOC44MjEgMTUuMzY5NSAyMC42MTggMTMuNDQ3NiAyMS4yMjQzIDExLjMzMzVIMjQuMDE3NkMyMy41NTIxIDEzLjkzODggMjEuNjAzMyAxNS44NjA3IDIwLjIxNzUgMTYuNjUwOEMyMS42MDMzIDE3LjI5MTUgMjMuODIyOCAxOC45Njc4IDI0LjY2NzMgMjIuMDAwMkgyMS41OTI1QzIwLjkzMiAxOS45NzE1IDE5LjI4NjYgMTguNDAxOSAxNy4xMTA0IDE4LjE4ODRWMjIuMDAwMkgxNi43NzQ3WiIgZmlsbD0id2hp
2dGUiLz4KPC9zdmc+Cg==",url:`https://vk.com/share.php?url=${encodeURIComponent(`${Ly}${e}${Uy("vk")}`)}&comment=${encodeURIComponent(i)}`},{id:"tg",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDMyQzI0LjgzNjYgMzIgMzIgMjQuODM2NiAzMiAxNkMzMiA3LjE2MzQ0IDI0LjgzNjYgMCAxNiAwQzcuMTYzNDQgMCAwIDcuMTYzNDQgMCAxNkMwIDI0LjgzNjYgNy4xNjM0NCAzMiAxNiAzMloiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl84MDk0XzIwMjM2KSIvPgo8cGF0aCBkPSJNMTMuMDY2OSAyMy4zMzMyQzEyLjU0ODYgMjMuMzMzMiAxMi42MzY3IDIzLjEzNzUgMTIuNDU3OSAyMi42NDM5TDEwLjkzMzYgMTcuNjI3M0wyMi42NjY5IDEwLjY2NjUiIGZpbGw9IiNDOERBRUEiLz4KPHBhdGggZD0iTTEzLjA2NjQgMjMuMzMzNUMxMy40NjY0IDIzLjMzMzUgMTMuNjQzMSAyMy4xNTA1IDEzLjg2NjQgMjIuOTMzNUwxNS45OTk3IDIwLjg1OTFMMTMuMzM4NyAxOS4yNTQ0IiBmaWxsPSIjQTlDOUREIi8+CjxwYXRoIGQ9Ik0xMy4zMzc2IDE5LjI1NDdMMTkuNzg1NiAyNC4wMTg1QzIwLjUyMTQgMjQuNDI0NSAyMS4wNTI1IDI0LjIxNDMgMjEuMjM1OCAyMy4zMzU0TDIzLjg2MDQgMTAuOTY3QzI0LjEyOTIgOS44ODk2MyAyMy40NDk4IDkuNDAwOTkgMjIuNzQ1OSA5LjcyMDU2TDcuMzMzODYgMTUuNjYzNEM2LjI4MTg1IDE2LjA4NTMgNi4yODc5OCAxNi42NzIyIDcuMTQyMSAxNi45MzM4TDExLjA5NzIgMTguMTY4MkwyMC4yNTM2IDEyLjM5MTVDMjAuNjg1OCAxMi4xMjk0IDIxLjA4MjUgMTIuMjcwMyAyMC43NTY5IDEyLjU1OTMiIGZpbGw9InVybCgjcGFpbnQxX2xpbmVhcl84MDk0XzIwMjM2KSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzgwOTRfMjAyMzYiIHgxPSIxMi4wMDE2IiB5MT0iMS4zMzQ0IiB4Mj0iNC4wMDE2IiB5Mj0iMjAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzM3QUVFMiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxRTk2QzgiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzgwOTRfMjAyMzYiIHgxPSIxMy45OTYxIiB5MT0iMTYuOTgyOCIgeDI9IjE1LjcwNTYiIHkyPSIyMi41MTI4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFRkY3RkMiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=",url:`https://t.me/share/url?url=${encodeURIComponent(`${Ly}${e}${Uy("tg")}`)}&text=${encodeURIComponent(i)}`},{id:"wa",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2IDMyQzI0LjgzNjYgMzIgMzIgMjQuODM2NiAzMiAxNkMzMiA3LjE2MzQ0IDI0LjgzNjYgMCAxNiAwQzcuMTYzNDQgMCAwIDcuMTYzNDQgMCAxNkMwIDI0LjgzNjYgNy4xNjM0NCAzMiAxNiAzMloiIGZpbGw9IiMyNUQzNjYiLz4KPHBhdGggZD0iTTE2LjUyNzMgNS44NjY3QzE5LjA3MjQgNS44Njc4IDIxLjQ2MTYgNi44NTg0MiAyMy4yNTc4IDguNjU2NzRDMjUuMDU0MSAxMC40NTUgMjYuMDQzIDEyLjg0NjEgMjYuMDQyIDE1LjM4ODJDMjYuMDM5NiAyMC42MzI1IDIxLjc3MjggMjQuODk5NyAxNi41MjczIDI0LjkwMTlIMTYuNTIzNEMxNC45MzEzIDI0LjkwMTMgMTMuMzY3IDI0LjUwMTUgMTEuOTc3NSAyMy43NDM3TDYuOTMzNTkgMjUuMDY2OUw4LjI4MzIgMjAuMTM2MkM3LjQ1MDc3IDE4LjY5MzUgNy4wMTI5OSAxNy4wNTcgNy4wMTM2NyAxNS4zODA0QzcuMDE1NzYgMTAuMTM0NyAxMS4yODM0IDUuODY2ODEgMTYuNTI3MyA1Ljg2NjdaTTE2LjUzMTIgNy40NzQxMkMxMi4xNjk1IDcuNDc0MTIgOC42MjIwNCAxMS4wMjA2IDguNjIwMTIgMTUuMzgwNEM4LjYxOTUgMTYuODc0NiA5LjAzNzUyIDE4LjMzMDMgOS44MjkxIDE5LjU4OTRMMTAuMDE2NiAxOS44ODgyTDkuMjE3NzcgMjIuODA2MkwxMi4yMTA5IDIyLjAyMUwxMi41IDIyLjE5MjlDMTMuNzE0IDIyLjkxMzIgMTUuMTA1NiAyMy4yOTM5IDE2LjUyNDQgMjMuMjk0NEgxNi41MjczQzIwLjg4NTggMjMuMjk0NCAyNC40MzM4IDE5Ljc0NzUgMjQuNDM1NSAxNS4zODcyQzI0LjQzNjQgMTMuMjc0MiAyMy42MTQxIDExLjI4NzIgMjIuMTIxMSA5Ljc5MjQ4QzIwLjYyODIgOC4yOTgwMiAxOC42NDMxIDcuNDc0OTYgMTYuNTMxMiA3LjQ3NDEyWk0xMy42MTQzIDEwLjk5NDZDMTMuNzYwMiAxMS4wMDIgMTMuOTU2NCAxMC45MzkzIDE0LjE0OTQgMTEuNDAyOEMxNC4zNDczIDExLjg3ODIgMTQuODIxNCAxMy4wNDU4IDE0Ljg4MTggMTMuMTY3NUMxNC45NDEzIDEzLjI4NjQgMTQuOTgxNSAxMy40MjU4IDE0LjkwMjMgMTMuNTg0NUMxNC44MjMxIDEzLjc0MyAxNC43ODI5IDEzLjg0MjIgMTQuNjY0MSAxMy45ODFDMTQuNTQ1MiAxNC4xMTk3IDE0LjQxNDYgMTQuMjkxNCAxNC4zMDc2IDE0LjM5NzlDMTQuMTg4NyAxNC41MTY0IDE0LjA2NDkgMTQuNjQ0NyAxNC4yMDMxIDE0Ljg4MjNDMTQuMzQxOCAxNS4xMjAzIDE0LjgxODcgMTUuODk5NCAxNS41MjU0IDE2LjUyOThDMTYuNDMzMyAxNy4zMzk2IDE3LjE5OTcgMTcuNTkwNSAxNy40Mzc1IDE3LjcwOTVDMTcuNjc1IDE3LjgyODUgMTcuODEzNSAxNy44MDgzIDE3Ljk1MjEgMTcuNjQ5OUMxOC4wOTA3IDE3LjQ5MTMgMTguNTQ2NCAxNi45NTY0IDE4LjcwNTEgMTYuNzE4M0MxOC44NjM1IDE2LjQ4MDQgMTkuMDIyNCAxNi41MTk4IDE5LjI0MDIgMTYuNTk5MUMxOS40NTg1IDE2LjY3ODcgMjAuNjI2MiAxNy4yNTM0IDIwLjg2NDMgMTcuMzcyNkMyMS4xMDIgMTcuNDkxNiAyMS4yNjA5IDE3LjU1MDcgMjEuMzIwMyAxNy42NDk5QzIxLjM3OTcgMTcuNzQ5MSAyMS4zNzk2IDE4LjIyNTQgMjEuMTgxNiAxOC43ODA4QzIwLjk4MzIgMTkuMzM1OCAyMC4wMzM5IDE5Ljg0MjMgMTkuNTc3MSAxOS45MTA2QzE5LjE2NzcgMTkuOTcxOSAxOC42NDkzIDE5Ljk5NzcgMTguMDgwMSAxOS44MTY5QzE3LjczNDggMTkuNzA3NCAxNy4yOTE3IDE5LjU2MDggMTYuNzI0NiAxOS4zMTU5QzE0LjMzOTkgMTguMjg2MiAxMi43ODE5IDE1Ljg4NDggMTIuNjYzMSAxNS43MjYxQzEyLjU0MzYgMTUuNTY2NiAxMS42OTI0IDE0LjQzNjYgMTEuNjkyNCAxMy4yNjcxQzExLjY5MjQgMTIuMDk3MiAxMi4zMDY0IDExLjUyMTcgMTIuNTI0NCAxMS4yODM3QzEyLjc0MjEgMTEuMDQ1OSAxMi45OTk3IDEwLjk4NjkgMTMuMTU4MiAxMC45ODY4QzEzLjMxNjcgMTAuOTg2OCAxMy40NzU4IDEwLjk4NzcgMTMuNjE0MyAxMC45OTQ2WiIgZmlsbD0iI0ZERkRGRCIvPgo8L3N2Zz4K",url:`https://wa.me/?text=${encodeURIComponent(`${i} ${Ly}${e}${Uy("wtap")}`)}`},{id:"ok",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAgMTZDMCA3LjE2MzQ0IDcuMTYzNDQgMCAxNiAwQzI0LjgzNjYgMCAzMiA3LjE2MzQ0IDMyIDE2QzMyIDI0LjgzNjYgMjQuODM2NiAzMiAxNiAzMkM3LjE2MzQ0IDMyIDAgMjQuODM2NiAwIDE2WiIgZmlsbD0iI0Y2ODYzNCIvPgo8cGF0aCBkPSJNMTcuNzMxOCAxOS42MjY5TDIwLjEyMjkgMjEuOTM1MkMyMC42MTI4IDIyLjQwNzEgMjAuNjEyOCAyMy4xNzM0IDIwLjEyMjkgMjMuNjQ1N0MxOS42MzM2IDI0LjExODEgMTguODQwNSAyNC4xMTgxIDE4LjM1MTcgMjMuNjQ1N0wxNi4wMDA3IDIxLjM3NzRMMTMuNjUxOCAyMy42NDU3QzEzLjQwNjkgMjMuODgxNyAxMy4wODYgMjMuOTk5NyAxMi43NjUxIDIzLjk5OTdDMTIuNDQ0NiAyMy45OTk3IDEyLjEyNDIgMjMuODgxNyAxMS44NzkzIDIzLjY0NTdDMTEuMzkgMjMuMTczNCAxMS4zOSAyMi40MDc2IDExLjg3ODggMjEuOTM1MkwxNC4yNzAyIDE5LjYyNjlDMTMuMzk5NSAxOS40MzU0IDEyLjU1OTggMTkuMTAyNCAxMS43ODY0IDE4LjYzNEMxMS4y
2MDExIDE4LjI3NzggMTEuMDI1MyAxNy41MzE1IDExLjM5NDEgMTYuOTY2QzExLjc2MTggMTYuMzk5OCAxMi41MzUyIDE2LjIyOTMgMTMuMTIxNiAxNi41ODU1QzE0Ljg3MjYgMTcuNjQ4OCAxNy4xMjgzIDE3LjY0OSAxOC44ODA0IDE2LjU4NTVDMTkuNDY2NyAxNi4yMjkzIDIwLjIzOTkgMTYuMzk5OCAyMC42MDg0IDE2Ljk2NkMyMC45NzcyIDE3LjUzMSAyMC44MDA5IDE4LjI3NzggMjAuMjE1NiAxOC42MzRDMTkuNDQyMiAxOS4xMDI5IDE4LjYwMjUgMTkuNDM1NCAxNy43MzE4IDE5LjYyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMTUuOTg4MyA4QzE4LjM0NzYgOCAyMC4yNjU1IDkuODUxOTkgMjAuMjY1NiAxMi4xMjg5QzIwLjI2NTYgMTQuNDA1MSAxOC4zNDc3IDE2LjI1NjggMTUuOTg4MyAxNi4yNTY4QzEzLjYyOTUgMTYuMjU2NyAxMS43MTA5IDE0LjQwNTEgMTEuNzEwOSAxMi4xMjg5QzExLjcxMSA5Ljg1MjA4IDEzLjYyOTYgOC4wMDAxNCAxNS45ODgzIDhaTTE1Ljk4OTMgMTAuNDE5OUMxNS4wMTM1IDEwLjQxOTkgMTQuMjE3OSAxMS4xODYzIDE0LjIxNzggMTIuMTI4OUMxNC4yMTc4IDEzLjA3MDkgMTUuMDEzNCAxMy44Mzc5IDE1Ljk4OTMgMTMuODM3OUMxNi45NjU2IDEzLjgzNzYgMTcuNzU5OCAxMy4wNzA3IDE3Ljc1OTggMTIuMTI4OUMxNy43NTk2IDExLjE4NjUgMTYuOTY1NSAxMC40MjAyIDE1Ljk4OTMgMTAuNDE5OVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",url:`https://connect.ok.ru/offer?url=${encodeURIComponent(`${Ly}${e}${Uy("ok")}`)}&title=${encodeURIComponent(i)}`}]};function Yy(e){var t;let{store:i,onLinkClick:n,category:s="main"}=e;const a=(0,l.useLocation)(),o="main"===s?"/products/":a.pathname,u=Ry(o,s),c=(0,ky.Ub)("(max-width: 767px)",!0),h="undefined"!=typeof window&&!(null===(t=navigator)||void 0===t||!t.share);return r.createElement(zy.mO,{store:i,autoFocusOnShow:!1,size:"small",type:"drawer",unmountOnHide:!0,portal:!0},r.createElement(zy.Y9,{title:"Намекните близким о лучшем подарке для вас!"}),r.createElement(zy.UC,null,r.createElement("div",{className:"styles-module--shareLinkeModalContent--96eb4"},r.createElement("div",{className:"styles-module--imgBlock--a0789"},r.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIyIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMiAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMDcuODQyIDEwOC4wMUgxMy4xODc1TDEwNy44NDIgNDYuODIwNlYxMDguMDFaIiBzdHJva2U9IiMyMTNGQjQiIHN0cm9rZS13aWR0aD0iMy4yMjI5NiIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTMuMjQ2MSAxMDguMDExVjQ2Ljg3NjdMNjIuMTg2NSA3Ni4zNTAzIiBzdHJva2U9IiMyMTNGQjQiIHN0cm9rZS13aWR0aD0iMy4yMjI5NiIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTMuMjk0OSA0Ni44NzY0TDYyLjI5IDExLjk4OTNMMTA3LjczMSA0Ni44NzY0IiBzdHJva2U9IiMyMTNGQjQiIHN0cm9rZS13aWR0aD0iMy4yMjI5NiIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNNzIuNTM2MSAzOC4yMzczQzc4LjI4OTcgMzguMjM3NSA4Mi45NTQgNDIuOTAxNiA4Mi45NTQxIDQ4LjY1NTNDODIuOTU0MSA0OC44MzQ0IDgyLjk0OTQgNDkuMDEyNiA4Mi45NDA0IDQ5LjE4OTVDODIuNjc1MyA1NS41NjQ1IDc3Ljc0MTEgNjMuMTUyNSA3MS40ODA1IDcwLjQwNDNMNjEuOTExMSA3Ni4xODY1TDUzLjU5OTYgNzEuMzUxNkM0My41NTM1IDYwLjA3OTMgNDEuNTQyOSA1MS45NjUxIDQxLjUxMTcgNDguODg2N0g0MS41MTc2QzQxLjUxNTkgNDguODA5OCA0MS41MTE3IDQ4LjczMjYgNDEuNTExNyA0OC42NTUzQzQxLjUxMTggNDIuOTAxNSA0Ni4xNzU5IDM4LjIzNzMgNTEuOTI5NyAzOC4yMzczQzU3LjE1NzEgMzguMjM3MyA2MS40ODQyIDQyLjA4NzMgNjIuMjMyNCA0Ny4xMDY0QzYyLjk4MDYgNDIuMDg3MyA2Ny4zMDg3IDM4LjIzNzMgNzIuNTM2MSAzOC4yMzczWiIgZmlsbD0iIzIxM0ZCNCIvPgo8L3N2Zz4K",alt:"Icon"})),r.createElement(d.fz,{size:"large",color:"primary",className:"styles-module--text--da3c4"},"Подскажите им, что будете рады получить ",(e=>{switch(e){case"book":return"фотокнигу";case"prints":case"stickers":return"фотокарточки";case"calendar":return"календарь";case"notebook":return"блокнот";case"gift":return"сертификат";default:return"подарок из"}})(s)," Периодики."),r.createElement(d.fz,{color:"tertiary",weight:"emphasized",className:"styles-module--dividerText--e2eac"},r.createElement("span",null,"Поделиться в мессенджере")),r.createElement("div",{className:"styles-module--linkBlock--948c3"},c&&h&&r.createElement(d.K0,{size:"medium",type:"button",variant:"brandSecondary",className:Py,onClick:()=>{navigator.share&&navigator.share({title:_y(s),text:_y(s),url:`${Ly}${o}${Uy()}`}).catch((()=>{})),n("system")}},r.createElement(Sy.B7,null)),u.map((e=>r.createElement("button",{type:"button",key:e.id,onClick:()=>{(e=>{const t=window.screen.width/2-300,i=window.screen.height/2-250;window.open(e,"popup",`width=600,height=500,left=${t},top=${i}, noreferrer=true`)})(e.url),n(e.id)},className:"styles-module--linkIcon--dbcbd"},r.createElement("img",{src:e.icon,alt:"Icon"})))),r.createElement(d.K0,{size:"medium",type:"button",variant:"brandSecondary",className:Py,onClick:()=>{navigator.clipboard.writeText(`${_y(s)} ${Ly}${o}${Uy()}`).then((()=>{(0,d.me)({text:"Ссылка на намек скопирована"}),n("copy")}))}},r.createElement(Sy.sW,null))))))}var Qy="GiftBanner-module--wrapper--8e2bc",Hy="GiftBanner-module--mainGiftBanner--bf198",Vy="GiftBanner-module--block--6bd7d",Wy="GiftBanner-module--title--272eb",Zy="GiftBanner-module--paragraph--6726d",$y="GiftBanner-module--list--955e8",Gy="GiftBanner-module--listItem--92cee",qy="GiftBanner-module--listIcon--6c875",Xy="GiftBanner-module--shareBtnContainer--d91d9",Jy="GiftBanner-module--btnGift--38b4c";const Ky=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIxLjU4ODkgMjEuNjIyMUgyLjY0MDYyTDIxLjU4ODkgOS4zNzMwNVYyMS42MjIxWiIgc3Ryb2tlPSIjMjEzRkI0IiBzdHJva2Utd2lkdGg9IjAuNjQ1MTgzIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yLjY1MjM0IDIxLjYyMjlWOS4zODQ3N0wxMi40NDk0IDE1LjI4NDkiIHN0cm9rZT0iIzIxM0ZCNCIgc3Ryb2tlLXdpZHRoPSIwLjY0NTE4MyIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMi42NjQwNiA5LjM4NDIyTDEyLjQ3MjEgMi40MDAzOUwyMS41Njg2IDkuMzg0MjIiIHN0cm9rZT0iIzIxM0ZCNCIgc3Ryb2tlLXdpZHRoPSIwLjY0NTE4MyIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTQuNTE4NiA3LjY1NDNDMTUuNjcwMiA3LjY1NDMgMTYuNjA0MiA4LjU4NzY5IDE2LjYwNDUgOS43MzkyNkwxNi41OTI4IDkuOTg2MzNDMTYuNDc3MiAxMS4yMzI4IDE1LjUxNTUgMTIuNjk0NiAxNC4zMDc2IDE0LjA5MzhMMTIuMzkyNiAxNS4yNTFMMTAuNzI4NSAxNC4yODMyQzguNzE3NDQgMTIuMDI2NyA4LjMxNDg0IDEwLjQwMjQgOC4zMDg1OSA5Ljc4NjEzSDguMzEwNTVDOC4zMTAyMSA5Ljc3MDg2IDguMzA4NiA5Ljc1NTU4IDguMzA4NTkgOS43NDAyM0M4LjMwODU5IDguNTg4NDEgOS4yNDI3MSA3LjY1NDMgMTAuMzk0NSA3LjY1NDNDMTEuNDQ2MSA3LjY1NDQ4IDEyLjMxMjggOC40MzMyOSAxMi40NTYxIDkuNDQ1MzFDMTIuNTk5MiA4LjQzMzE5IDEzLjQ2NjkgNy42NTQ0NiAxNC41MTg2IDcuNjU0M1oiIGZpbGw9IiMyMTNGQjQiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS45OTMyIDguNDU4OThINC4xOTUzMVYxMS42NzQ1SDE5Ljk5MzJWOC40NTg5OFpNMTguNjQxNiAxMS42NzQ1SDUuNTQ2NjZWMjEuMzY3NkgxOC42NDE2VjExLjY3NDVaIiBmaWxsPSIjMjEzRkI0Ii8+CjxwYXRoIGQ9Ik00LjE5NTMxIDguNDU4OThWOC4xNDI5OUM0LjAyMDc5IDguMTQyOTkgMy44NzkzMSA4LjI4NDQ2IDMuODc5MzEgOC40NTg5OEg0LjE5NTMxWk0xOS45OTMyIDguNDU4OThIMjAuMzA5MUMyMC4zMDkxIDguMjg0NDYgMjAuMTY3NyA4LjE0Mjk5IDE5Ljk5MzIgOC4xNDI5OVY4LjQ1ODk4Wk00LjE5NTMxIDExLjY3NDVIMy44NzkzMUMzLjg3OTMxIDExLjg0OSA0LjAyMDc5IDExLjk5MDUgNC4xOTUzMSAxMS45OTA1VjExLjY3NDVaTTE5Ljk5MzIgMTEuNjc0NVYxMS45OTA1QzIwLjE2NzcgMTEuOTkwNSAyMC4zMDkxIDExLjg0OSAyMC4zMDkxIDExLjY3NDVIMTkuOTkzMlpNNS41NDY2NiAxMS42NzQ1VjExLjM1ODVDNS4zNzIxNCAxMS4zNTg1IDUuMjMwNjYgMTEuNSA1LjIzMDY2IDExLjY3NDVINS41NDY2NlpNMTguNjQxNiAxMS42NzQ1SDE4Ljk1NzZDMTguOTU3NiAxMS41IDE4LjgxNjEgMTEuMzU4NSAxOC42
2NDE2IDExLjM1ODVWMTEuNjc0NVpNNS41NDY2NiAyMS4zNjc2SDUuMjMwNjZDNS4yMzA2NiAyMS41NDIxIDUuMzcyMTQgMjEuNjgzNiA1LjU0NjY2IDIxLjY4MzZWMjEuMzY3NlpNMTguNjQxNiAyMS4zNjc2VjIxLjY4MzZDMTguODE2MSAyMS42ODM2IDE4Ljk1NzYgMjEuNTQyMSAxOC45NTc2IDIxLjM2NzZIMTguNjQxNlpNNC4xOTUzMSA4LjQ1ODk4VjguNzc0OThIMTkuOTkzMlY4LjQ1ODk4VjguMTQyOTlINC4xOTUzMVY4LjQ1ODk4Wk00LjE5NTMxIDExLjY3NDVINC41MTEzMVY4LjQ1ODk4SDQuMTk1MzFIMy44NzkzMVYxMS42NzQ1SDQuMTk1MzFaTTE5Ljk5MzIgMTEuNjc0NVYxMS4zNTg1SDQuMTk1MzFWMTEuNjc0NVYxMS45OTA1SDE5Ljk5MzJWMTEuNjc0NVpNMTkuOTkzMiA4LjQ1ODk4SDE5LjY3NzJWMTEuNjc0NUgxOS45OTMySDIwLjMwOTFWOC40NTg5OEgxOS45OTMyWk01LjU0NjY2IDExLjY3NDVWMTEuOTkwNUgxOC42NDE2VjExLjY3NDVWMTEuMzU4NUg1LjU0NjY2VjExLjY3NDVaTTUuNTQ2NjYgMjEuMzY3Nkg1Ljg2MjY2VjExLjY3NDVINS41NDY2Nkg1LjIzMDY2VjIxLjM2NzZINS41NDY2NlpNMTguNjQxNiAyMS4zNjc2VjIxLjA1MTZINS41NDY2NlYyMS4zNjc2VjIxLjY4MzZIMTguNjQxNlYyMS4zNjc2Wk0xOC42NDE2IDExLjY3NDVIMTguMzI1NlYyMS4zNjc2SDE4LjY0MTZIMTguOTU3NlYxMS42NzQ1SDE4LjY0MTZaIiBmaWxsPSIjMjEzRkI0Ii8+CjxwYXRoIGQ9Ik02LjA3MDMxIDUuNDI5NjlDNi4wNzAzMSA2LjgxMDQgNy4xOTQzNiA3LjkyOTY5IDguNTgwOTUgNy45Mjk2OUgxMi4wNzAzTDEwLjkyMzggNC41MjkyNkMxMC41NjA5IDMuNTkzNDggOS42NDg3NSAyLjkyOTY5IDguNTgwOTUgMi45Mjk2OUM3LjE5NDM2IDIuOTI5NjkgNi4wNzAzMSA0LjA0ODk4IDYuMDcwMzEgNS40Mjk2OVoiIHN0cm9rZT0iIzIxM0ZCNCIvPgo8cGF0aCBkPSJNMTguMDcwMyA1LjQyOTY5QzE4LjA3MDMgNi44MTA0IDE2Ljk0NjMgNy45Mjk2OSAxNS41NTk3IDcuOTI5NjlIMTIuMDcwM0wxMy4yMTY4IDQuNTI5MjZDMTMuNTc5OCAzLjU5MzQ4IDE0LjQ5MTkgMi45Mjk2OSAxNS41NTk3IDIuOTI5NjlDMTYuOTQ2MyAyLjkyOTY5IDE4LjA3MDMgNC4wNDg5OCAxOC4wNzAzIDUuNDI5NjlaIiBzdHJva2U9IiMyMTNGQjQiLz4KPHBhdGggZD0iTTEyLjA5MzggOC4yMDMxMlYyMS42MjQzIiBzdHJva2U9IiNGNkY2RjMiIHN0cm9rZS13aWR0aD0iMC42MzE5OTUiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTUuMjg5MDYgMTIuMTg3NUwxOC44OTY2IDEyLjE4NzUiIHN0cm9rZT0iI0Y2RjZGMyIgc3Ryb2tlLXdpZHRoPSIwLjYzMTk5NSIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS40MTQ4IDkuNTMyNDdDMTguOTYzMiA3LjQzMzE0IDE5LjY4NzcgMy40MTU0MiAxNi4zNDM3IDEuODEwOTVDMTIuOTQ5NiAwLjE4MjQ5NyAxMC45MzE2IDQuNTQ1NjIgMTEuNTMgNy4zMzE1MkMxMC42MDgzIDQuODE5NDYgOC4wOTcxNSAyLjMxMTYgNS4xNzgyMyA0LjYzNDgyQzEuNzg5ODYgNy4zMzE2OSA0LjkwMDQ5IDExLjM5NzggOC4yODI5NyAxMS41MDA3QzUuMDUxMDggMTEuODc4NCAxLjQ0MTc0IDE0LjU2IDMuNzEwNTYgMTcuNjU4MUM2LjE1OTUgMjEuMDAyMSAxMC45Mzc1IDE3LjM0MjIgMTEuNzM2MyAxNC45MjcxQzExLjIxNjEgMTcuNjU4MSAxMi4xMDc5IDIyLjY3OTQgMTYuMDY1IDIxLjM3MzdDMTkuNzI0OSAyMC4xNjYxIDE3Ljc5MjggMTUuNjUxNiAxNS40MTQ4IDEzLjU1MjNDMTcuNjgxMyAxNC44MzQyIDIyLjgyMTYgMTYuMzg5MyAyMy4xMDYxIDEyLjEwMzJDMjMuNDAzNCA3LjYyNTkgMTcuOTIyOCA4LjA0NjIyIDE1LjQxNDggOS41MzI0N1pNMTIuNTMyOCAxNC45Mjc1QzE0LjQ0MTIgMTQuOTI3NSAxNS45ODgzIDEzLjM4MDUgMTUuOTg4MyAxMS40NzJDMTUuOTg4MyA5LjU2MzU4IDE0LjQ0MTIgOC4wMTY0OSAxMi41MzI4IDguMDE2NDlDMTAuNjI0MyA4LjAxNjQ5IDkuMDc3MjUgOS41NjM1OCA5LjA3NzI1IDExLjQ3MkM5LjA3NzI1IDEzLjM4MDUgMTAuNjI0MyAxNC45Mjc1IDEyLjUzMjggMTQuOTI3NVoiIGZpbGw9IiMyMTNGQjQiLz4KPHBhdGggZD0iTTE2LjM0MzcgMS44MTA5NUwxNi40NTMxIDEuNTgyOTlMMTYuMzQzNyAxLjgxMDk1Wk0xNS40MTQ4IDkuNTMyNDdMMTUuMjg1OSA5LjMxNDk1TDE1LjU0MzUgOS43NTAwOEwxNS40MTQ4IDkuNTMyNDdaTTExLjUzIDcuMzMxNTJMMTEuMjkyNiA3LjQxODYxTDExLjc3NzIgNy4yNzg0MkwxMS41MyA3LjMzMTUyWk01LjE3ODIzIDQu
2NjM0ODJMNS4wMjA3OCA0LjQzNjk5VjQuNDM2OTlMNS4xNzgyMyA0LjYzNDgyWk04LjI4Mjk3IDExLjUwMDdMOC4zMTIzMiAxMS43NTE4TDguMjkwNjYgMTEuMjQ3OUw4LjI4Mjk3IDExLjUwMDdaTTMuNzEwNTYgMTcuNjU4MUwzLjkxNDU1IDE3LjUwODdIMy45MTQ1NUwzLjcxMDU2IDE3LjY1ODFaTTExLjczNjMgMTQuOTI3MUwxMS45ODQ3IDE0Ljk3NDRMMTEuNDk2MyAxNC44NDc3TDExLjczNjMgMTQuOTI3MVpNMTYuMDY1IDIxLjM3MzdMMTUuOTg1OCAyMS4xMzM2VjIxLjEzMzZMMTYuMDY1IDIxLjM3MzdaTTE1LjQxNDggMTMuNTUyM0wxNS41MzkyIDEzLjMzMjJMMTUuMjQ3NCAxMy43NDE5TDE1LjQxNDggMTMuNTUyM1pNMjMuMTA2MSAxMi4xMDMyTDIzLjM1ODQgMTIuMTJWMTIuMTJMMjMuMTA2MSAxMi4xMDMyWk0xMS41MyA3LjMzMTUyTDExLjc2NzQgNy4yNDQ0M0wxMS4yODI4IDcuMzg0NjJMMTEuNTMgNy4zMzE1MlpNMTEuNzM2MyA3Ljk5NDI0TDExLjUwMzUgOC4wOTI4NkwxMS45ODEzIDcuOTMxNzJMMTEuNzM2MyA3Ljk5NDI0Wk04LjI4Mjk3IDExLjUwMDdMOC4yNTM2MiAxMS4yNDk1TDguMjc1MjkgMTEuNzUzNEw4LjI4Mjk3IDExLjUwMDdaTTkuMDQyNDMgMTEuNDU1Mkw5LjA4MDY5IDExLjcwNTFMOS4wNDI0MyAxMS4yMDI0VjExLjQ1NTJaTTE2LjM0MzcgMS44MTA5NUwxNi4yMzQzIDIuMDM4OTFDMTcuODEwMSAyLjc5NDk3IDE4LjQwNDQgNC4wOTU5MiAxOC4yMTM1IDUuNDUwODdDMTguMDE5OSA2LjgyNTM0IDE3LjAxMDMgOC4yOTQ3NyAxNS4yODYgOS4zMTQ4NkwxNS40MTQ4IDkuNTMyNDdMMTUuNTQzNSA5Ljc1MDA4QzE3LjM2NzcgOC42NzA4NCAxOC40OTQ1IDcuMDgxNzUgMTguNzE0MyA1LjUyMTRDMTguOTM2OCAzLjk0MTU1IDE4LjIyMTMgMi40MzE0IDE2LjQ1MzEgMS41ODI5OUwxNi4zNDM3IDEuODEwOTVaTTExLjUzIDcuMzMxNTJMMTEuNzc3MiA3LjI3ODQyQzExLjQ5MyA1Ljk1NTMgMTEuODMyNCA0LjIzOTA1IDEyLjY0NzcgMy4wNTk2MkMxMy4wNTI4IDIuNDczNTMgMTMuNTY0MyAyLjAzNTc2IDE0LjE1NyAxLjgzNDEzQzE0Ljc0NCAxLjYzNDQxIDE1LjQzOCAxLjY1NjgzIDE2LjIzNDMgMi4wMzg5MUwxNi4zNDM3IDEuODEwOTVMMTYuNDUzMSAxLjU4Mjk5QzE1LjU1MjQgMS4xNTA4NCAxNC43MjEzIDEuMTA3OTggMTMuOTk0MSAxLjM1NTRDMTMuMjcyNSAxLjYwMDkyIDEyLjY4MDYgMi4xMjI3MSAxMi4yMzE3IDIuNzcyMDlDMTEuMzM5IDQuMDYzNTggMTAuOTY4NiA1LjkyMTg0IDExLjI4MjggNy4zODQ2MkwxMS41MyA3LjMzMTUyWk01LjE3ODIzIDQu
2NjM0ODJMNS4zMzU2OSA0LjgzMjY1QzYuMDMzNjggNC4yNzcxIDYuNjkxMzQgNC4wMjI1MSA3LjI5MjQ4IDMuOTc0ODZDNy44OTM0IDMuOTI3MjMgOC40NTg2MiA0LjA4NDcxIDguOTc1MDQgNC4zODc5N0MxMC4wMTY0IDQuOTk5NDkgMTAuODQ0NSA2LjE5NzIxIDExLjI5MjYgNy40MTg2MUwxMS41MyA3LjMzMTUyTDExLjc2NzQgNy4yNDQ0M0MxMS4yOTM4IDUuOTUzNzcgMTAuNDA1NSA0LjY0MTUzIDkuMjMxMSAzLjk1MTkxQzguNjM5NjYgMy42MDQ2IDcuOTcyMTkgMy40MTM3MiA3LjI1MjUyIDMuNDcwNzZDNi41MzMwNyAzLjUyNzc5IDUuNzgyMjQgMy44MzA5MyA1LjAyMDc4IDQuNDM2OTlMNS4xNzgyMyA0LjYzNDgyWk04LjI4Mjk3IDExLjUwMDdMOC4yOTA2NiAxMS4yNDc5QzYuNjkwNTMgMTEuMTk5MyA1LjE0NjE1IDEwLjIwOCA0LjQxMTMzIDguOTE1NTRDNC4wNDYzNyA4LjI3MzYzIDMuODg3MDcgNy41NjgzMyA0LjAwNzM0IDYuODc0MDVDNC4xMjcxOSA2LjE4MjI0IDQuNTI5MjMgNS40NzQ1MiA1LjMzNTY5IDQuODMyNjVMNS4xNzgyMyA0LjYzNDgyTDUuMDIwNzggNC40MzY5OUM0LjEzMzA1IDUuMTQzNTUgMy42NTMyNyA1Ljk1NTQzIDMuNTA5MDkgNi43ODc3M0MzLjM2NTMzIDcuNjE3NTYgMy41NTk3NyA4LjQ0MDg5IDMuOTcxNzMgOS4xNjU0OEM0Ljc5MDc1IDEwLjYwNiA2LjQ5Mjk0IDExLjY5OTIgOC4yNzUyOSAxMS43NTM0TDguMjgyOTcgMTEuNTAwN1pNMy43MTA1NiAxNy42NTgxTDMuOTE0NTUgMTcuNTA4N0MzLjM3ODA0IDE2Ljc3NjEgMy4yMDIzNCAxNi4wODg2IDMuMjY0OTIgMTUuNDY3NEMzLjMyNzg5IDE0Ljg0MjQgMy42MzUyOCAxNC4yNTQxIDQuMTE5NTUgMTMuNzMxQzUuMDkzMzggMTIuNjc4OSA2Ljc0MzUgMTEuOTM1MSA4LjMxMjMyIDExLjc1MThMOC4yODI5NyAxMS41MDA3TDguMjUzNjMgMTEuMjQ5NUM2LjU5MDU2IDExLjQ0MzkgNC44MjAwNSAxMi4yMjk4IDMuNzQ4NDUgMTMuMzg3NUMzLjIxIDEzLjk2OTIgMi44Mzg0NiAxNC42NTU4IDIuNzYxNzkgMTUuNDE2N0MyLjY4NDczIDE2LjE4MTUgMi45MDg2NiAxNi45OTEgMy41MDY1NyAxNy44MDc1TDMuNzEwNTYgMTcuNjU4MVpNMTEuNzM2MyAxNC45MjcxTDExLjQ5NjMgMTQuODQ3N0MxMS4zMTIxIDE1LjQwNDUgMTAuODg5MiAxNi4wNTQ4IDEwLjMwNjMgMTYuNjY4OUM5LjcyNTU5IDE3LjI4MDYgOS4wMDAyMSAxNy44NDEzIDguMjI5MjkgMTguMjI2MUM3LjQ1Njg3IDE4LjYxMTYgNi42NTQ3OCAxOC44MTI4IDUuOTEzMzEgMTguNzMwNUM1LjE4MTE1IDE4LjY0OTEgNC40ODYzMiAxOC4yODk1IDMuOTE0NTUgMTcuNTA4N0wzLjcxMDU2IDE3LjY1ODFMMy41MDY1NyAxNy44MDc1QzQuMTU5MjYgMTguNjk4NyA0Ljk4MDAzIDE5LjEzNTYgNS44NTc0NyAxOS4yMzMxQzYuNzI1NTkgMTkuMzI5NSA3LjYyNzEgMTkuMDkxOCA4LjQ1NTEzIDE4LjY3ODVDOS4yODQ2OCAxOC4yNjQ1IDEwLjA1NjYgMTcuNjY2MyAxMC42NzMgMTcuMDE3QzExLjI4NzIgMTYuMzcwMSAxMS43NjExIDE1LjY1NzIgMTEuOTc2NCAxNS4wMDY1TDExLjczNjMgMTQuOTI3MVpNMTYuMDY1IDIxLjM3MzdMMTUuOTg1OCAyMS4xMzM2QzE1LjA0NzkgMjEuNDQzMSAxNC4zMjI5IDIxLjM2OTMgMTMuNzYzMSAyMS4wNzcxQzEzLjE5NyAyMC43ODE3IDEyLjc2MzQgMjAuMjQ0IDEyLjQ1MTggMTkuNTU5NEMxMS44MjU1IDE4LjE4MzYgMTEuNzMyMSAxNi4zMDA2IDExLjk4NDcgMTQuOTc0NEwxMS43MzYzIDE0LjkyNzFMMTEuNDg3OSAxNC44Nzk4QzExLjIyMDQgMTYuMjg0NSAxMS4zMTI3IDE4LjI3NzcgMTEuOTkxNSAxOS43Njg5QzEyLjMzMjQgMjAuNTE3OCAxMi44MzEzIDIxLjE2MTIgMTMuNTI5MSAyMS41MjU0QzE0LjIzMzEgMjEuODkyOSAxNS4xMDM2IDIxLjk1NzIgMTYuMTQ0MiAyMS42MTM4TDE2LjA2NSAyMS4zNzM3Wk0xNS40MTQ4IDEzLjU1MjNMMTUuMjQ3NCAxMy43NDE5QzE2LjQwMzcgMTQuNzYyNiAxNy40NDcgMTYuMzcwMyAxNy43NTY2IDE3Ljg0OTJDMTcuOTEwOCAxOC41ODU4IDE3Ljg3ODggMTkuMjY4NyAxNy42MTMzIDE5LjgyOTJDMTcuMzUxMiAyMC4zODI3IDE2Ljg0NjEgMjAuODQ5NyAxNS45ODU4IDIxLjEzMzZMMTYuMDY1IDIxLjM3MzdMMTYuMTQ0MiAyMS42MTM4QzE3LjExMzkgMjEuMjkzOSAxNy43Mzk3IDIwLjc0MzggMTguMDcwMyAyMC4wNDU2QzE4LjM5NzcgMTkuMzU0NCAxOC40MjAyIDE4LjU1MSAxOC4yNTE2IDE3Ljc0NTZDMTcuOTE1NiAxNi4xNDA2IDE2LjgwMzggMTQuNDQxMyAxNS41ODIxIDEzLjM2MjhMMTUuNDE0OCAxMy41NTIzWk0yMy4xMDYxIDEyLjEwMzJMMjIuODUzOCAxMi4wODY1QzIyLjc4NjMgMTMuMTAzOSAyMi40MzUzIDEzLjczNjMgMjEuOTQ3IDE0LjExOTFDMjEuNDUxNCAxNC41MDc3IDIwLjc3NTkgMTQuNjY5MyAyMC4wMDU4IDE0LjY2MjlDMTguNDYwNCAxNC42NTAxIDE2LjY1MTcgMTMuOTYxNCAxNS41MzkyIDEzLjMzMjJMMTUuNDE0OCAxMy41NTIzTDE1LjI5MDMgMTMuNzcyNEMxNi40NDQ0IDE0LjQyNTEgMTguMzM5MSAxNS4xNTQ4IDIwLjAwMTYgMTUuMTY4NkMyMC44MzU0IDE1LjE3NTUgMjEuNjQgMTUuMDAyMyAyMi4yNTkgMTQuNTE3MUMyMi44ODU0IDE0LjAyNiAyMy4yODM3IDEzLjI0NTYgMjMuMzU4NCAxMi4xMkwyMy4xMDYxIDEyLjEwMzJaTTE1LjQxNDggOS41MzI0N0wxNS41NDM3IDkuNzQ5OThDMTYuNzUyMiA5LjAzMzgxIDE4LjY4OTggOC41NzI3OSAyMC4yNzE3IDguODMxMDRDMjEuMDU4MyA4Ljk1OTQ3IDIxLjczMzcgOS4yNjE2NiAyMi4xOTQ3IDkuNzcyOTdDMjIuNjUxMyAxMC4yNzk0IDIyLjkyNDYgMTEuMDIxIDIyLjg1MzggMTIuMDg2NUwyMy4xMDYxIDEyLjEwMzJMMjMuMzU4NCAxMi4xMkMyMy40MzYzIDEwLjk0NjggMjMuMTM2IDEwLjA2MTkgMjIuNTcwMiA5LjQzNDM2QzIyLjAwODggOC44MTE2OCAyMS4yMTMgOC40NzIzNCAyMC4zNTMyIDguMzMxOTdDMTguNjQyIDguMDUyNjEgMTYuNTg1NCA4LjU0NDg4IDE1LjI4NTkgOS4zMTQ5NUwxNS40MTQ4IDkuNTMyNDdaTTE1Ljk4ODMgMTEuNDcySDE1LjczNTVDMTUuNzM1NSAxMy4yNDA4IDE0LjMwMTYgMTQuNjc0NyAxMi41MzI4IDE0LjY3NDdWMTQuOTI3NVYxNS4xODA0QzE0LjU4MDkgMTUuMTgwNCAxNi4yNDEyIDEzLjUyMDEgMTYuMjQxMiAxMS40NzJIMTUuOTg4M1pNMTIuNTMyOCA4LjAxNjQ5VjguMjY5MzNDMTQuMzAxNiA4LjI2OTMzIDE1LjczNTUgOS43MDMyMiAxNS43MzU1IDExLjQ3MkgxNS45ODgzSDE2LjI0MTJDMTYuMjQxMiA5LjQyMzk0IDE0LjU4MDkgNy43NjM2NSAxMi41MzI4IDcuNzYzNjVWOC4wMTY0OVpNOS4wNzcyNSAxMS40NzJIOS4zMzAwOUM5LjMzMDA5IDkuNzAzMjIgMTAuNzY0IDguMjY5MzMgMTIuNTMyOCA4LjI2OTMzVjguMDE2NDlWNy43NjM2NUMxMC40ODQ3IDcuNzYzNjUgOC44MjQ0MSA5LjQyMzk0IDguODI0NDEgMTEuNDcySDkuMDc3MjVaTTEyLjUzMjggMTQuOTI3NVYxNC42NzQ3QzEwLjc2NCAxNC42NzQ3IDkuMzMwMDkgMTMuMjQwOCA5LjMzMDA5IDExLjQ3Mkg5LjA3NzI1SDguODI0NDFDOC44MjQ0MSAxMy41MjAxIDEwLjQ4NDcgMTUuMTgwNCAxMi41MzI4IDE1LjE4MDRWMTQuOTI3NVpNMTEuNTMgNy4zMzE1MkwxMS4yODI4IDcuMzg0NjJDMTEuMzM1OSA3LjYzMTk1IDExLjQwOSA3Ljg2OTc3IDExLjUwMzUgOC4wOTI4NkwxMS43MzYzIDcuOTk0MjRMMTEuOTY5MSA3Ljg5NTYx
2QzExLjg4ODQgNy43MDQ5OCAxMS44MjQ0IDcuNDk4MDIgMTEuNzc3MiA3LjI3ODQyTDExLjUzIDcuMzMxNTJaTTExLjczNjMgNy45OTQyNEwxMS45ODEzIDcuOTMxNzJDMTEuOTIzMyA3LjcwNDM4IDExLjg1MTcgNy40NzQxNiAxMS43Njc0IDcuMjQ0NDNMMTEuNTMgNy4zMzE1MkwxMS4yOTI2IDcuNDE4NjFDMTEuMzcxMiA3LjYzMjg0IDExLjQzNzcgNy44NDY2NiAxMS40OTEzIDguMDU2NzVMMTEuNzM2MyA3Ljk5NDI0Wk04LjI4Mjk3IDExLjUwMDdMOC4yNzUyOSAxMS43NTM0QzguNTQyNTYgMTEuNzYxNSA4LjgxMTk3IDExLjc0NjMgOS4wODA2OSAxMS43MDUxTDkuMDQyNDMgMTEuNDU1Mkw5LjAwNDE4IDExLjIwNTNDOC43NjcwMSAxMS4yNDE2IDguNTI4MzkgMTEuMjU1MiA4LjI5MDY2IDExLjI0NzlMOC4yODI5NyAxMS41MDA3Wk05LjA0MjQzIDExLjQ1NTJWMTEuMjAyNEM4Ljc4MzMyIDExLjIwMjQgOC41MTkzMSAxMS4yMTg1IDguMjUzNjIgMTEuMjQ5NUw4LjI4Mjk3IDExLjUwMDdMOC4zMTIzMiAxMS43NTE4QzguNTU5NzkgMTEuNzIyOSA4LjgwNDE3IDExLjcwOCA5LjA0MjQzIDExLjcwOFYxMS40NTUyWiIgZmlsbD0iIzIxM0ZCNCIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuMzEzMTUgNS44NjY2NEwxNy45MTgxIDEwLjU3ODJMMTMuMTc4OCAyMi4xNDY4TDEuNjEwMzUgMTcuNDA3NEw2LjMxMzE1IDUuODY2NjRaIiBzdHJva2U9IiMyMTNGQjQiIHN0cm9rZS13aWR0aD0iMC42MDU1NzciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTYuMzEyNSA1Ljg2MTMzSDE5LjY0MTNMMTguNTU3MSAxOC45NDI3SDE0LjQ5MTMiIHN0cm9rZT0iIzIxM0ZCNCIgc3Ryb2tlLXdpZHRoPSIwLjYwNTU3NyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0yMS42NDIzIDUuODYxMzNIMTkuNjM4OUwxOC41NTQ3IDE4Ljk0MjdIMjIuOTk3NkwyMS42NDIzIDUuODYxMzNaIiBmaWxsPSIjMjEzRkI0IiBzdHJva2U9IiMyMTNGQjQiIHN0cm9rZS13aWR0aD0iMC42MDU1NzciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE3LjE0MjIgNy40MzI4OUMxNS44MzQgNy40MzI4OSAxNC43NzM0IDYuMzcyMzUgMTQuNzczNCA1LjA2NDFDMTQuNzczNCAzLjc1NTg2IDE1LjgzNCAyLjY5NTMxIDE3LjE0MjIgMi42OTUzMUMxOC40NTA1IDIuNjk1MzEgMTkuNTExIDMuNzU1ODYgMTkuNTExIDUuMDY0MUMxOS41MTEgNS4zMjk1NCAxOS40NjczIDUuNTg0NzggMTkuMzg2OCA1LjgyMzAzIiBzdHJva2U9IiMyMTNGQjQiIHN0cm9rZS13aWR0aD0iMC42MDU1NzciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTEuNDYyNSA3LjQzMjg5QzEwLjE1NDMgNy40MzI4OSA5LjA5Mzc1IDYuMzcyMzUgOS4wOTM3NSA1LjA2NDFDOS4wOTM3NSAzLjc1NTg2IDEwLjE1NDMgMi42OTUzMSAxMS40NjI1IDIuNjk1MzFDMTIuNzcwOCAyLjY5NTMxIDEzLjgzMTMgMy43NTU4NiAxMy44MzEzIDUuMDY0MUMxMy44MzEzIDUuMzI5NTQgMTMuNzg3NiA1LjU4NDc4IDEzLjcwNzEgNS44MjMwMyIgc3Ryb2tlPSIjMjEzRkI0IiBzdHJva2Utd2lkdGg9IjAuNjA1NTc3IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+Cg=="];function ev(){return r.createElement("div",{className:Qy},r.createElement("div",{className:Hy},r.createElement("div",{className:Vy},r.createElement(d.DZ,{className:Wy,color:"secondary"},"Подарочные сертификаты"),r.createElement("div",{className:$y},[{id:1,text:"Выберите готовый дизайн или загрузите свое изображение в шаблон"},{id:2,text:"Отправьте получателю на электронную почту или распечатайте, чтобы вручить лично"},{id:3,text:"Можно использовать несколько раз до исчерпания баланса"},{id:4,text:"Действует 1 год с момента получения     "}].map(((e,t)=>r.createElement("div",{key:e.id,className:Gy},r.createElement("img",{src:Ky[t],alt:"icon",className:qy}),r.createElement(d.fz,{className:Zy,size:"large",dangerouslySetInnerHTML:{__html:e.text}})))))),r.createElement("div",{className:Xy},r.createElement(By,{category:"gift"},r.createElement(d.$n,{className:Jy,size:"large",type:"button",variant:"brandSecondary"},r.createElement(Sy.pD,null)," Намекнуть о подарке")))))}var tv="GiftPage-module--FAQBlock--17093",iv="GiftPage-module--accordionContainer--aaab1",rv="GiftPage-module--h3--1d4a7";var nv=function(){const e=(0,l.useLocation)();return r.createElement(d.bc,null,r.createElement(h.B,{path:fD.yZ}),r.createElement(p.b,null,r.createElement(ev,null),r.createElement(jy,{values:null==e?void 0:e.state}),r.createElement("div",{className:tv},r.createElement(d.DZ,{variant:"h3",color:"primary",className:rv},"Вопросы и ответы"),r.createElement("div",{className:iv,onClick:()=>{u.A.logEvent({name:"event_site_gift_accordeon-click"})}},r.createElement(c.n,{title:"",items:[{groupTitle:"",groupRank:0,groupItems:[{title:"На что действует сертификат?",answer:'Сертификатом можно частично или полностью оплатить заказ. Его можно потратить на любую печатную продукцию Периодики, а также на услугу <a href="/design-photobook" target="_blank">«Соберем фотокнигу за вас»</a>',rank:0},{title:"Как активировать сертификат?",answer:"Код сертификата вводится в поле для промокода на финальном этапе оформления заказа — в корзине.",rank:1},{title:"Сколько действует сертификат?",answer:"Срок действия наших сертификатов — 
212 месяцев с момента отправки сертификата получателю. Сертификат можно использовать несколько раз до исчерпания баланса и он суммируется с другими сертификатами и промокодами.",rank:2}]}]})))))};function sv(){return r.createElement(r.Fragment,null,r.createElement(a.A,{title:"Сертификат на фотокнигу: изготовление и печать фотокниг в подарок",description:"Закажите универсальный подарок для коллег, друзей и родных: электронный сертификат на фотокнигу! Порадуйте близких фотоальбомом на заказ из собственных фотографий!"}),r.createElement(o.E,null))}function av(){return r.createElement(s.A,null,r.createElement(nv,null))}},74967:function(e,t,i){var r="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;e.exports=r},75382:function(e,t,i){"use strict";var r=i(88088),n=i(87308),s=i(14582),a=Error.captureStackTrace;e.exports=function(e,t,i,o){s&&(a?a(e,t):r(e,"stack",n(i,o)))}},76491:function(e){e.exports=function(e,t){if(e===t)return!0;for(var i in e)if(!(i in t))return!1;for(var i in t)if(e[i]!==t[i])return!1;return!0}},78942:function(e,t,i){var r=i(74967),n="object"==typeof self&&self&&self.Object===Object&&self,s=r||n||Function("return this")();e.exports=s},80547:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},80939:function(e,t,i){"use strict";var r=i(76744),n=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw new n("The argument can't be less than 0");return t}},84598:function(e,t,i){"use strict";var r=i(98060);e.exports=/MSIE|Trident/.test(r)},86403:function(e,t,i){var r=i(62945),n=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(n,""):e}},87308:function(e,t,i){"use strict";var r=i(16881),n=Error,s=r("".replace),a=String(new n("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,l=o.test(a);e.exports=function(e,t){if(l&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=s(e,o,"");return e}},87379:function(e,t,i){var r=i(65650),n=i(8870),s=i(29005),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?n(e):s(e)}},91083:function(e,t,i){"use strict";i.d(t,{Q:function(){return a}});var r=i(14041),n=i(96691),s=i(74113);const a=function(e,t){void 0===e&&(e=""),void 0===t&&(t="id");const{allStrapiProduct:{nodes:i}}=(0,n.useStaticQuery)("2190160699"),a=i.map((e=>{var t;const i=JSON.parse(JSON.stringify(e)),r=e.options&&e.options.filter((e=>e.strapi_component===s.BL))||[],n=e.options&&e.options.filter((e=>e.strapi_component===s.x6))||[],a=e.options&&e.options.filter((e=>e.strapi_component===s.ID))||[];return i.options={pageOptions:r,miscOptions:a,anyStringOptions:n},i.colorVariants=(null!==(t=e.colorVariants)&&void 0!==t?t:[]).sort(((e,t)=>e.title.localeCompare(t.title))),i})).sort(((e,t)=>e.rank-t.rank)),o=[],l=[],u=[],c=[],d=[],h=[],p=[],m=[],g=[],f=[],D=[],y=[],v=[],M=a;a.forEach((e=>{var t;"book"===e.productType?o.push(e):"calendar"===e.productType?l.push(e):"wedding"===e.productType?d.push(e):"detskaya"===e.productType?h.push(e):"notebook"===e.productType?c.push(e):"postcard"===e.productType?y.push(e):"wrappingPaper"===e.productType?v.push(e):"traditionsBook"===e.productType?p.push(e):"prints"===e.productType||"stickers"===e.productType?f.push(e):"preorder"!==e.productType&&"gift"!==e.productType?u.push(e):"gift"===e.productType&&g.push(e),null!==(t=e.labels)&&void 0!==t&&t.some((e=>"sale"===e.name||"sale1"===e.name||"sale20"===e.name))&&m.push(e),e.preOrder&&D.push(e)}));const b=(0,r.useMemo)((()=>e?a.filter((i=>i[t]===e))[0]:void 0),[e]);return{photobooks:o,calendarProducts:l,otherProducts:u,notebookProducts:c,weddingProducts:d,detskayaProducts:h,traditionsBook:p,saleProducts:m,allProducts:M,giftProducts:g,printsProducts:f,preorderProducts:D,postcardProducts:y,wrappingPaperProducts:v,productByParam:b}}},91361:function(e,t,i){"use strict";var r=i(80866),n=i(13174),s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(n(e)+" is not a constructor")}},93256:function(e,t,i){"use strict";i.d(t,{T:function(){return n}});var r=i(86369);function n(e,t){const i=(0,r.a)(e),n=(0,r.a)(t),s=i.getTime()-n.getTime();return s>0?-1:s<0?1:s}},94495:function(e,t,i){var r=i(78942);e.exports=function(){return r.Date.now()}},96885:function(e,t,i){"use strict";i.d(t,{FH:function(){return m},FK:function(){return g},HY:function(){return r},Ji:function(){return s},Jj:function(){return c},ND:function(){return p},S7:function(){return h},WU:function(){return u},XE:function(){return a},c3:function(){return d},im:function(){return l},ls:function(){return o},ly:function(){return n},yZ:function(){return f}});
vendor: 3,612 bytes, lines 2-3
2const r="0",n="1",s="0",a="1",o="0",l="1",u=2990,c="person",d="me",h="email",p="sms",m=768,g=768,f=[{title:"Главная",url:"/"},{title:"Сертификаты",url:""}]},97274:function(e){"use strict";var t=Object.prototype.hasOwnProperty,i="~";function r(){}function n(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(e,t,r,s,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new n(r,s||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),o.prototype.eventNames=function(){var e,r,n=[];if(0===this._eventsCount)return n;for(r in e=this._events)t.call(e,r)&&n.push(i?r.slice(1):r);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},o.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,a=new Array(s);n<s;n++)a[n]=r[n].fn;return a},o.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,n,s,a){var o=i?i+e:e;if(!this._events[o])return!1;var l,u,c=this._events[o],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,n),!0;case 5:return c.fn.call(c.context,t,r,n,s),!0;case 6:return c.fn.call(c.context,t,r,n,s,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,n);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},o.prototype.on=function(e,t,i){return s(this,e,t,i,!1)},o.prototype.once=function(e,t,i){return s(this,e,t,i,!0)},o.prototype.removeListener=function(e,t,r,n){var s=i?i+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==t||n&&!o.once||r&&o.context!==r||a(this,s);else{for(var l=0,u=[],c=o.length;l<c;l++)(o[l].fn!==t||n&&!o[l].once||r&&o[l].context!==r)&&u.push(o[l]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=i,o.EventEmitter=o,e.exports=o},97331:function(e,t,i){var r=i(12784),n=i(41580);e.exports=function(e,t,i){var s=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return n(i)&&(s="leading"in i?!!i.leading:s,a="trailing"in i?!!i.trailing:a),r(e,t,{leading:s,maxWait:t,trailing:a})}},97964:function(e,t,i){"use strict";var r=i(3770),n=i(91361),s=i(44318),a=i(4282)("species");e.exports=function(e,t){var i,o=r(e).constructor;return void 0===o||s(i=r(o)[a])?t:n(i)}},98257:function(e,t,i){"use strict";var r=i(80831),n=i(88088);e.exports=function(e,t){r(t)&&"cause"in t&&n(e,"cause",t.cause)}}}]);
3//# sourceMappingURL=component---src-pages-products-gift-index-tsx-840caa0405e4b85808eb.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.