69 lines
860 KiB
JavaScript
69 lines
860 KiB
JavaScript
(()=>{var e,t,n={1583:(e,t,n)=>{"use strict";
|
||
/** @license React v17.0.2
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(7294),i=n(7418),o=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,l={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},m={};function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(m,e)||!p.call(h,e)&&(f.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,b);y[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);y[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);y[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=60103,k=60106,E=60107,S=60108,C=60114,T=60109,A=60110,O=60112,P=60113,L=60120,R=60115,M=60116,N=60121,I=60128,D=60129,B=60130,z=60131;if("function"==typeof Symbol&&Symbol.for){var j=Symbol.for;_=j("react.element"),k=j("react.portal"),E=j("react.fragment"),S=j("react.strict_mode"),C=j("react.profiler"),T=j("react.provider"),A=j("react.context"),O=j("react.forward_ref"),P=j("react.suspense"),L=j("react.suspense_list"),R=j("react.memo"),M=j("react.lazy"),N=j("react.block"),j("react.scope"),I=j("react.opaque.id"),D=j("react.debug_trace_mode"),B=j("react.offscreen"),z=j("react.legacy_hidden")}var U,F="function"==typeof Symbol&&Symbol.iterator;function W(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=F&&e[F]||e["@@iterator"])?e:null}function H(e){if(void 0===U)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var V=!1;function q(e,t){if(!e||V)return"";V=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function G(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case k:return"Portal";case C:return"Profiler";case S:return"StrictMode";case P:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case O:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return $(e.type);case N:return $(e._render);case M:t=e._payload,e=e._init;try{return $(e(t))}catch(e){}}return null}function Z(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Z(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Z(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Z(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Z(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Z(n)}}function ce(e,t){var n=Z(t.value),r=Z(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,me,ge=(me=function(e,t){if(e.namespaceURI!==de.svg||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ve).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var _e=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ke(e,t){if(t){if(_e[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Te=null,Ae=null;function Oe(e){if(e=ni(e)){if("function"!=typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=ii(t),Ce(e.stateNode,e.type,t))}}function Pe(e){Te?Ae?Ae.push(e):Ae=[e]:Te=e}function Le(){if(Te){var e=Te,t=Ae;if(Ae=Te=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Re(e,t){return e(t)}function Me(e,t,n,r,i){return e(t,n,r,i)}function Ne(){}var Ie=Re,De=!1,Be=!1;function ze(){null===Te&&null===Ae||(Ne(),Le())}function je(e,t){var n=e.stateNode;if(null===n)return null;var r=ii(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(d)try{var Fe={};Object.defineProperty(Fe,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",Fe,Fe),window.removeEventListener("test",Fe,Fe)}catch(me){Ue=!1}function We(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var He=!1,Ve=null,qe=!1,Ge=null,$e={onError:function(e){He=!0,Ve=e}};function Ze(e,t,n,r,i,o,a,s,l){He=!1,Ve=null,We.apply($e,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ke(e){if(Ye(e)!==e)throw Error(a(188))}function Qe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ke(i),e;if(o===r)return Ke(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,it=!1,ot=[],at=null,st=null,lt=null,ct=new Map,ut=new Map,dt=[],ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function ht(e,t){switch(e){case"focusin":case"focusout":at=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ut.delete(t.pointerId)}}function mt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=ni(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function gt(e){var t=ti(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ni(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){yt(e)&&n.delete(t)}function bt(){for(it=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=ni(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==at&&yt(at)&&(at=null),null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),ct.forEach(vt),ut.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,bt)))}function xt(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==at&&wt(at,e),null!==st&&wt(st,e),null!==lt&&wt(lt,e),ct.forEach(t),ut.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function _t(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kt={animationend:_t("Animation","AnimationEnd"),animationiteration:_t("Animation","AnimationIteration"),animationstart:_t("Animation","AnimationStart"),transitionend:_t("Transition","TransitionEnd")},Et={},St={};function Ct(e){if(Et[e])return Et[e];if(!kt[e])return e;var t,n=kt[e];for(t in n)if(n.hasOwnProperty(t)&&t in St)return Et[e]=n[t];return e}d&&(St=document.createElement("div").style,"AnimationEvent"in window||(delete kt.animationend.animation,delete kt.animationiteration.animation,delete kt.animationstart.animation),"TransitionEvent"in window||delete kt.transitionend.transition);var Tt=Ct("animationend"),At=Ct("animationiteration"),Ot=Ct("animationstart"),Pt=Ct("transitionend"),Lt=new Map,Rt=new Map,Mt=["abort","abort",Tt,"animationEnd",At,"animationIteration",Ot,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Pt,"transitionEnd","waiting","waiting"];function Nt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Rt.set(r,t),Lt.set(r,i),c(i,[r])}}(0,o.unstable_now)();var It=8;function Dt(e){if(0!=(1&e))return It=15,1;if(0!=(2&e))return It=14,2;if(0!=(4&e))return It=13,4;var t=24&e;return 0!==t?(It=12,t):0!=(32&e)?(It=11,32):0!==(t=192&e)?(It=10,t):0!=(256&e)?(It=9,256):0!==(t=3584&e)?(It=8,t):0!=(4096&e)?(It=7,4096):0!==(t=4186112&e)?(It=6,t):0!==(t=62914560&e)?(It=5,t):67108864&e?(It=4,67108864):0!=(134217728&e)?(It=3,134217728):0!==(t=805306368&e)?(It=2,t):0!=(1073741824&e)?(It=1,1073741824):(It=8,e)}function Bt(e,t){var n=e.pendingLanes;if(0===n)return It=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=It=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=Dt(l),i=It):0!==(s&=o)&&(r=Dt(s),i=It)}else 0!==(o=n&~a)?(r=Dt(o),i=It):0!==s&&(r=Dt(s),i=It);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(Dt(t),i<=It)return t;It=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Ht(t)),r|=e[n],t&=~i;return r}function zt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function jt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?jt(10,t):e;case 10:return 0===(e=Ut(192&~t))?jt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vt(e)/qt|0)|0},Vt=Math.log,qt=Math.LN2;var Gt=o.unstable_UserBlockingPriority,$t=o.unstable_runWithPriority,Zt=!0;function Yt(e,t,n,r){De||Ne();var i=Kt,o=De;De=!0;try{Me(i,e,t,n,r)}finally{(De=o)||ze()}}function Xt(e,t,n,r){$t(Gt,Kt.bind(null,e,t,n,r))}function Kt(e,t,n,r){var i;if(Zt)if((i=0==(4&t))&&0<ot.length&&-1<ft.indexOf(e))e=pt(null,e,t,n,r),ot.push(e);else{var o=Qt(e,t,n,r);if(null===o)i&&ht(e,r);else{if(i){if(-1<ft.indexOf(e))return e=pt(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return at=mt(at,e,t,n,r,i),!0;case"dragenter":return st=mt(st,e,t,n,r,i),!0;case"mouseover":return lt=mt(lt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ct.set(o,mt(ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ut.set(o,mt(ut.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;ht(e,r)}Nr(e,t,r,null,n)}}}function Qt(e,t,n,r){var i=Se(r);if(null!==(i=ti(i))){var o=Ye(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Xe(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Nr(e,t,r,i,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return tn=i.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function an(){return!1}function sn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:an,this.isPropagationStopped=an,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,cn,un,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=sn(dn),pn=i({},dn,{view:0,detail:0}),hn=sn(pn),mn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(ln=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=ln=0,un=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=sn(mn),yn=sn(i({},mn,{dataTransfer:0})),vn=sn(i({},pn,{relatedTarget:0})),bn=sn(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=sn(wn),_n=sn(i({},dn,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return Cn}var An=i({},pn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),On=sn(An),Pn=sn(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=sn(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Rn=sn(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=i({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=sn(Mn),In=[9,13,27,32],Dn=d&&"CompositionEvent"in window,Bn=null;d&&"documentMode"in document&&(Bn=document.documentMode);var zn=d&&"TextEvent"in window&&!Bn,jn=d&&(!Dn||Bn&&8<Bn&&11>=Bn),Un=String.fromCharCode(32),Fn=!1;function Wn(e,t){switch(e){case"keyup":return-1!==In.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function $n(e,t,n,r){Pe(r),0<(t=Dr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Yn=null;function Xn(e){Ar(e,0)}function Kn(e){if(K(ri(e)))return e}function Qn(e,t){if("change"===e)return t}var Jn=!1;if(d){var er;if(d){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9<document.documentMode)}function rr(){Zn&&(Zn.detachEvent("onpropertychange",ir),Yn=Zn=null)}function ir(e){if("value"===e.propertyName&&Kn(Yn)){var t=[];if($n(t,Yn,e,Se(e)),e=Xn,De)e(t);else{De=!0;try{Re(e,t)}finally{De=!1,ze()}}}}function or(e,t,n){"focusin"===e?(rr(),Yn=n,(Zn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&rr()}function ar(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Yn)}function sr(e,t){if("click"===e)return Kn(t)}function lr(e,t){if("input"===e||"change"===e)return Kn(t)}var cr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ur=Object.prototype.hasOwnProperty;function dr(e,t){if(cr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=fr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=d&&"documentMode"in document&&11>=document.documentMode,vr=null,br=null,wr=null,xr=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==vr||vr!==Q(r)||("selectionStart"in(r=vr)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Dr(br,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}Nt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Nt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Nt(Mt,2);for(var kr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<kr.length;Er++)Rt.set(kr[Er],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sr));function Tr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,c){if(Ze.apply(this,arguments),He){if(!He)throw Error(a(198));var u=Ve;He=!1,Ve=null,qe||(qe=!0,Ge=u)}}(r,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,c),o=l}}}if(qe)throw e=Ge,qe=!1,Ge=null,e}function Or(e,t){var n=oi(t),r=e+"__bubble";n.has(r)||(Mr(t,e,2,!1),n.add(r))}var Pr="_reactListening"+Math.random().toString(36).slice(2);function Lr(e){e[Pr]||(e[Pr]=!0,s.forEach((function(t){Cr.has(t)||Rr(t,!1,e,null),Rr(t,!0,e,null)})))}function Rr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=oi(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Mr(o,e,i,t),a.add(s))}function Mr(e,t,n,r){var i=Rt.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Xt;break;default:i=Kt}n=i.bind(null,t,n,e),i=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Nr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ti(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Be)return e(t,n);Be=!0;try{return Ie(e,t,n)}finally{Be=!1,ze()}}((function(){var r=o,i=Se(n),a=[];e:{var s=Lt.get(e);if(void 0!==s){var l=fn,c=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":l=On;break;case"focusin":c="focus",l=vn;break;case"focusout":c="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ln;break;case Tt:case At:case Ot:l=bn;break;case Pt:l=Rn;break;case"scroll":l=hn;break;case"wheel":l=Nn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var u=0!=(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=je(h,f))&&u.push(Ir(h,m,p)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(c=n.relatedTarget||n.fromElement)||!ti(c)&&!c[Jr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?ti(c):null)&&(c!==(d=Ye(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=gn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Pn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ri(l),p=null==c?s:ri(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=p,m=null,ti(i)===r&&((u=new u(f,h+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=Br(p))h++;for(p=0,m=f;m;m=Br(m))p++;for(;0<h-p;)u=Br(u),h--;for(;0<p-h;)f=Br(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Br(u),f=Br(f)}u=null}else u=null;null!==l&&zr(a,s,l,u,!1),null!==c&&null!==d&&zr(a,d,c,u,!0)}if("select"===(l=(s=r?ri(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Qn;else if(Gn(s))if(Jn)g=lr;else{g=ar;var y=or}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=sr);switch(g&&(g=g(e,r))?$n(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ie(s,"number",s.value)),y=r?ri(r):window,e){case"focusin":(Gn(y)||"true"===y.contentEditable)&&(vr=y,br=r,wr=null);break;case"focusout":wr=br=vr=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,_r(a,n,i);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":_r(a,n,i)}var v;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vn?Wn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vn&&(v=nn()):(en="value"in(Jt=i)?Jt.value:Jt.textContent,Vn=!0)),0<(y=Dr(r,b)).length&&(b=new _n(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Hn(n))&&(b.data=v))),(v=zn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Un);case"textInput":return(e=t.data)===Un&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Dn&&Wn(e,t)?(e=nn(),tn=en=Jt=null,Vn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Dr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Ar(a,t)}))}function Ir(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=je(e,n))&&r.unshift(Ir(e,o,i)),null!=(o=je(e,t))&&r.push(Ir(e,o,i))),e=e.return}return r}function Br(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function zr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=je(n,o))&&a.unshift(Ir(n,l,s)):i||null!=(l=je(n,o))&&a.push(Ir(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function jr(){}var Ur=null,Fr=null;function Wr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Vr="function"==typeof setTimeout?setTimeout:void 0,qr="function"==typeof clearTimeout?clearTimeout:void 0;function Gr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function $r(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Zr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Xr=Math.random().toString(36).slice(2),Kr="__reactFiber$"+Xr,Qr="__reactProps$"+Xr,Jr="__reactContainer$"+Xr,ei="__reactEvents$"+Xr;function ti(e){var t=e[Kr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Kr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Zr(e);null!==e;){if(n=e[Kr])return n;e=Zr(e)}return t}n=(e=n).parentNode}return null}function ni(e){return!(e=e[Kr]||e[Jr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ri(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ii(e){return e[Qr]||null}function oi(e){var t=e[ei];return void 0===t&&(t=e[ei]=new Set),t}var ai=[],si=-1;function li(e){return{current:e}}function ci(e){0>si||(e.current=ai[si],ai[si]=null,si--)}function ui(e,t){si++,ai[si]=e.current,e.current=t}var di={},fi=li(di),pi=li(!1),hi=di;function mi(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function gi(e){return null!=(e=e.childContextTypes)}function yi(){ci(pi),ci(fi)}function vi(e,t,n){if(fi.current!==di)throw Error(a(168));ui(fi,t),ui(pi,n)}function bi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,$(t)||"Unknown",o));return i({},n,r)}function wi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,hi=fi.current,ui(fi,e),ui(pi,pi.current),!0}function xi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,ci(pi),ci(fi),ui(fi,e)):ci(pi),ui(pi,n)}var _i=null,ki=null,Ei=o.unstable_runWithPriority,Si=o.unstable_scheduleCallback,Ci=o.unstable_cancelCallback,Ti=o.unstable_shouldYield,Ai=o.unstable_requestPaint,Oi=o.unstable_now,Pi=o.unstable_getCurrentPriorityLevel,Li=o.unstable_ImmediatePriority,Ri=o.unstable_UserBlockingPriority,Mi=o.unstable_NormalPriority,Ni=o.unstable_LowPriority,Ii=o.unstable_IdlePriority,Di={},Bi=void 0!==Ai?Ai:function(){},zi=null,ji=null,Ui=!1,Fi=Oi(),Wi=1e4>Fi?Oi:function(){return Oi()-Fi};function Hi(){switch(Pi()){case Li:return 99;case Ri:return 98;case Mi:return 97;case Ni:return 96;case Ii:return 95;default:throw Error(a(332))}}function Vi(e){switch(e){case 99:return Li;case 98:return Ri;case 97:return Mi;case 96:return Ni;case 95:return Ii;default:throw Error(a(332))}}function qi(e,t){return e=Vi(e),Ei(e,t)}function Gi(e,t,n){return e=Vi(e),Si(e,t,n)}function $i(){if(null!==ji){var e=ji;ji=null,Ci(e)}Zi()}function Zi(){if(!Ui&&null!==zi){Ui=!0;var e=0;try{var t=zi;qi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zi=null}catch(t){throw null!==zi&&(zi=zi.slice(e+1)),Si(Li,$i),t}finally{Ui=!1}}}var Yi=x.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Ki=li(null),Qi=null,Ji=null,eo=null;function to(){eo=Ji=Qi=null}function no(e){var t=Ki.current;ci(Ki),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function io(e,t){Qi=e,eo=Ji=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Da=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ji){if(null===Qi)throw Error(a(308));Ji=t,Qi.dependencies={lanes:0,firstContext:t,responders:null}}else Ji=Ji.next=t;return e._currentValue}var ao=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var o=e.updateQueue;ao=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==s&&(null===f?d.firstBaseUpdate=u:f.next=u,d.lastBaseUpdate=c)}}if(null!==a){for(f=o.baseState,s=0,d=u=c=null;;){l=a.lane;var p=a.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(l=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){f=h.call(p,f,l);break e}f=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null==(l="function"==typeof(h=m.payload)?h.call(p,f,l):h))break e;f=i({},f,l);break e;case 2:ao=!0}}null!==a.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[a]:l.push(a))}else p={eventTime:p,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(u=d=p,c=f):d=d.next=p,s|=l;if(null===(a=a.next)){if(null===(l=o.shared.pending))break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(c=f),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,Fs|=s,e.lanes=s,e.memoizedState=f}}function ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var mo=(new r.Component).refs;function go(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yo={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),o=co(r,i);o.payload=t,null!=n&&(o.callback=n),uo(e,o),hl(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),o=co(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),uo(e,o),hl(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fl(),r=pl(e),i=co(n,r);i.tag=2,null!=t&&(i.callback=t),uo(e,i),hl(e,r,n)}};function vo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(i,o))}function bo(e,t,n){var r=!1,i=di,o=t.contextType;return"object"==typeof o&&null!==o?o=oo(o):(i=gi(t)?hi:fi.current,o=(r=null!=(r=t.contextTypes))?mi(e,i):di),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function wo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yo.enqueueReplaceState(t,t.state,null)}function xo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=mo,so(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=oo(o):(o=gi(t)?hi:fi.current,i.context=mi(e,o)),po(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(go(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&yo.enqueueReplaceState(i,i.state,null),po(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var _o=Array.isArray;function ko(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Eo(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function So(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Gl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Xl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=ko(e,t,n),r.return=e,r):((r=$l(n.type,n.key,n.props,null,e.mode,r)).ref=ko(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Kl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Zl(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Xl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=$l(t.type,t.key,t.props,null,e.mode,n)).ref=ko(e,null,t),n.return=e,n;case k:return(t=Kl(t,e.mode,n)).return=e,t}if(_o(t)||W(t))return(t=Zl(t,e.mode,n,null)).return=e,t;Eo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?n.type===E?d(e,t,n.props.children,r,i):c(e,t,n,r):null;case k:return n.key===i?u(e,t,n,r):null}if(_o(n)||W(n))return null!==i?null:d(e,t,n,r,null);Eo(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return e=e.get(null===r.key?n:r.key)||null,r.type===E?d(t,e,r.props.children,i,r.key):c(t,e,r,i);case k:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(_o(r)||W(r))return d(t,e=e.get(n)||null,r,i,null);Eo(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=p(i,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===s.length)return n(i,d),c;if(null===d){for(;m<s.length;m++)null!==(d=f(i,s[m],l))&&(a=o(d,a,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);m<s.length;m++)null!==(g=h(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),c}function g(i,s,l,c){var u=W(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,g=s=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=p(i,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?u=b:d.sibling=b,d=b,m=y}if(v.done)return n(i,m),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(i,v.value,c))&&(s=o(v,s,g),null===d?u=v:d.sibling=v,d=v);return u}for(m=r(i,m);!v.done;g++,v=l.next())null!==(v=h(m,i,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=o(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"==typeof o&&null!==o&&o.type===E&&null===o.key;c&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case _:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(o.type===E){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=ko(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===E?((r=Zl(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=$l(o.type,o.key,o.props,null,e.mode,l)).ref=ko(e,r,o),l.return=e,e=l)}return s(e);case k:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Kl(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Xl(o,e.mode,l)).return=e,e=r),s(e);if(_o(o))return m(e,r,o,l);if(W(o))return g(e,r,o,l);if(u&&Eo(e,o),void 0===o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,$(e.type)||"Component"))}return n(e,r)}}var Co=So(!0),To=So(!1),Ao={},Oo=li(Ao),Po=li(Ao),Lo=li(Ao);function Ro(e){if(e===Ao)throw Error(a(174));return e}function Mo(e,t){switch(ui(Lo,t),ui(Po,e),ui(Oo,Ao),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(Oo),ui(Oo,t)}function No(){ci(Oo),ci(Po),ci(Lo)}function Io(e){Ro(Lo.current);var t=Ro(Oo.current),n=pe(t,e.type);t!==n&&(ui(Po,e),ui(Oo,n))}function Do(e){Po.current===e&&(ci(Oo),ci(Po))}var Bo=li(0);function zo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=null,Uo=null,Fo=!1;function Wo(e,t){var n=Vl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ho(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Vo(e){if(Fo){var t=Uo;if(t){var n=t;if(!Ho(e,t)){if(!(t=$r(n.nextSibling))||!Ho(e,t))return e.flags=-1025&e.flags|2,Fo=!1,void(jo=e);Wo(jo,n)}jo=e,Uo=$r(t.firstChild)}else e.flags=-1025&e.flags|2,Fo=!1,jo=e}}function qo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;jo=e}function Go(e){if(e!==jo)return!1;if(!Fo)return qo(e),Fo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Uo;t;)Wo(e,t),t=$r(t.nextSibling);if(qo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Uo=$r(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Uo=null}}else Uo=jo?$r(e.stateNode.nextSibling):null;return!0}function $o(){Uo=jo=null,Fo=!1}var Zo=[];function Yo(){for(var e=0;e<Zo.length;e++)Zo[e]._workInProgressVersionPrimary=null;Zo.length=0}var Xo=x.ReactCurrentDispatcher,Ko=x.ReactCurrentBatchConfig,Qo=0,Jo=null,ea=null,ta=null,na=!1,ra=!1;function ia(){throw Error(a(321))}function oa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function aa(e,t,n,r,i,o){if(Qo=o,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xo.current=null===e||null===e.memoizedState?Ra:Ma,e=n(r,i),ra){o=0;do{if(ra=!1,!(25>o))throw Error(a(301));o+=1,ta=ea=null,t.updateQueue=null,Xo.current=Na,e=n(r,i)}while(ra)}if(Xo.current=La,t=null!==ea&&null!==ea.next,Qo=0,ta=ea=Jo=null,na=!1,t)throw Error(a(300));return e}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ta?Jo.memoizedState=ta=e:ta=ta.next=e,ta}function la(){if(null===ea){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ea.next;var t=null===ta?Jo.memoizedState:ta.next;if(null!==t)ta=t,ea=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ea=e).memoizedState,baseState:ea.baseState,baseQueue:ea.baseQueue,queue:ea.queue,next:null},null===ta?Jo.memoizedState=ta=e:ta=ta.next=e}return ta}function ca(e,t){return"function"==typeof t?t(e):t}function ua(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ea,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.lane;if((Qo&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,Jo.lanes|=u,Fs|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,cr(r,t.memoizedState)||(Da=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);cr(o,t.memoizedState)||(Da=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function fa(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Qo&e)===e)&&(t._workInProgressVersionPrimary=r,Zo.push(t))),e)return n(t._source);throw Zo.push(t),Error(a(350))}function pa(e,t,n,r){var i=Ms;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=Xo.current,c=l.useState((function(){return fa(i,t,n)})),u=c[1],d=c[0];c=ta;var f=e.memoizedState,p=f.refs,h=p.getSnapshot,m=f.source;f=f.subscribe;var g=Jo;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=u;var e=o(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(u(e),e=pl(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-Ht(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pl(g);i.mutableReadLanes|=r&i.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:d}).dispatch=u=Pa.bind(null,Jo,e),c.queue=e,c.baseQueue=null,d=fa(i,t,n),c.memoizedState=c.baseState=d),d}function ha(e,t,n){return pa(la(),e,t,n)}function ma(e){var t=sa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=Pa.bind(null,Jo,e),[t.memoizedState,e]}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Jo.updateQueue)?(t={lastEffect:null},Jo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},sa().memoizedState=e}function va(){return la().memoizedState}function ba(e,t,n,r){var i=sa();Jo.flags|=e,i.memoizedState=ga(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var i=la();r=void 0===r?null:r;var o=void 0;if(null!==ea){var a=ea.memoizedState;if(o=a.destroy,null!==r&&oa(r,a.deps))return void ga(t,n,o,r)}Jo.flags|=e,i.memoizedState=ga(1|t,n,o,r)}function xa(e,t){return ba(516,4,e,t)}function _a(e,t){return wa(516,4,e,t)}function ka(e,t){return wa(4,2,e,t)}function Ea(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Sa(e,t,n){return n=null!=n?n.concat([e]):null,wa(4,2,Ea.bind(null,t,e),n)}function Ca(){}function Ta(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aa(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Oa(e,t){var n=Hi();qi(98>n?98:n,(function(){e(!0)})),qi(97<n?97:n,(function(){var n=Ko.transition;Ko.transition=1;try{e(!1),t()}finally{Ko.transition=n}}))}function Pa(e,t,n){var r=fl(),i=pl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Jo||null!==a&&a===Jo)ra=na=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,cr(l,s))return}catch(e){}hl(e,i,r)}}var La={readContext:oo,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Ra={readContext:oo,useCallback:function(e,t){return sa().memoizedState=[e,void 0===t?null:t],e},useContext:oo,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ba(4,2,Ea.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ba(4,2,e,t)},useMemo:function(e,t){var n=sa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Pa.bind(null,Jo,e),[r.memoizedState,e]},useRef:ya,useState:ma,useDebugValue:Ca,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return xa((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ya(e=Oa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=sa();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},pa(r,e,t,n)},useOpaqueIdentifier:function(){if(Fo){var e=!1,t=function(e){return{$$typeof:I,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0==(2&Jo.mode)&&(Jo.flags|=516,ga(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Ma={readContext:oo,useCallback:Ta,useContext:oo,useEffect:_a,useImperativeHandle:Sa,useLayoutEffect:ka,useMemo:Aa,useReducer:ua,useRef:va,useState:function(){return ua(ca)},useDebugValue:Ca,useDeferredValue:function(e){var t=ua(ca),n=t[0],r=t[1];return _a((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=ua(ca)[0];return[va().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(ca)[0]},unstable_isNewReconciler:!1},Na={readContext:oo,useCallback:Ta,useContext:oo,useEffect:_a,useImperativeHandle:Sa,useLayoutEffect:ka,useMemo:Aa,useReducer:da,useRef:va,useState:function(){return da(ca)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return _a((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[va().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Ia=x.ReactCurrentOwner,Da=!1;function Ba(e,t,n,r){t.child=null===e?To(t,null,n,r):Co(t,e.child,n,r)}function za(e,t,n,r,i){n=n.render;var o=t.ref;return io(t,i),r=aa(e,t,n,r,o,i),null===e||Da?(t.flags|=1,Ba(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function ja(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||ql(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=$l(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,i,o))}return a=e.child,0==(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(i,r)&&e.ref===t.ref)?os(e,t,o):(t.flags|=1,(e=Gl(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,i,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Da=!1,0==(o&i))return t.lanes=e.lanes,os(e,t,o);0!=(16384&e.flags)&&(Da=!0)}return Ha(e,t,n,r,o)}function Fa(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},_l(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},_l(t,e),null;t.memoizedState={baseLanes:0},_l(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,_l(t,r);return Ba(e,t,i,n),t.child}function Wa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,i){var o=gi(n)?hi:fi.current;return o=mi(t,o),io(t,i),n=aa(e,t,n,r,o,i),null===e||Da?(t.flags|=1,Ba(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Va(e,t,n,r,i){if(gi(n)){var o=!0;wi(t)}else o=!1;if(io(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),bo(t,n,r),xo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=oo(c):c=mi(t,c=gi(n)?hi:fi.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&wo(t,a,r,c),ao=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),l=t.memoizedState,s!==r||f!==l||pi.current||ao?("function"==typeof u&&(go(t,n,u,r),l=t.memoizedState),(s=ao||vo(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,lo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xi(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=oo(l):l=mi(t,l=gi(n)?hi:fi.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&wo(t,a,r,l),ao=!1,f=t.memoizedState,a.state=f,po(t,r,a,i);var h=t.memoizedState;s!==d||f!==h||pi.current||ao?("function"==typeof p&&(go(t,n,p,r),h=t.memoizedState),(c=ao||vo(t,n,c,r,f,h,l))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return qa(e,t,n,r,o,i)}function qa(e,t,n,r,i,o){Wa(e,t);var a=0!=(64&t.flags);if(!r&&!a)return i&&xi(t,n,!1),os(e,t,o);r=t.stateNode,Ia.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Co(t,e.child,null,o),t.child=Co(t,null,s,o)):Ba(e,t,s,o),t.memoizedState=r.state,i&&xi(t,n,!0),t.child}function Ga(e){var t=e.stateNode;t.pendingContext?vi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&vi(0,t.context,!1),Mo(e,t.containerInfo)}var $a,Za,Ya,Xa,Ka={dehydrated:null,retryLane:0};function Qa(e,t,n){var r,i=t.pendingProps,o=Bo.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Bo,1&o),null===e?(void 0!==i.fallback&&Vo(t),e=i.children,o=i.fallback,a?(e=Ja(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ka,e):"number"==typeof i.unstable_expectedLoadTime?(e=Ja(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ka,t.lanes=33554432,e):((n=Yl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=ts(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Ka,i):(n=es(e,t,i.children,n),t.memoizedState=null,n))}function Ja(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Yl(t,i,0,null),n=Zl(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function es(e,t,n,r){var i=e.child;return e=i.sibling,n=Gl(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0==(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Gl(a,s),null!==e?r=Gl(e,r):(r=Zl(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ro(e.return,t)}function rs(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function is(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ba(e,t,r.children,n),0!=(2&(r=Bo.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ui(Bo,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===zo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===zo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,o,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fs|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Gl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Gl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return gi(t.type)&&yi(),null;case 3:return No(),ci(pi),ci(fi),Yo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Go(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Za(t),null;case 5:Do(t);var o=Ro(Lo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ya(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ro(Oo.current),Go(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Kr]=t,r[Qr]=s,n){case"dialog":Or("cancel",r),Or("close",r);break;case"iframe":case"object":case"embed":Or("load",r);break;case"video":case"audio":for(e=0;e<Sr.length;e++)Or(Sr[e],r);break;case"source":Or("error",r);break;case"img":case"image":case"link":Or("error",r),Or("load",r);break;case"details":Or("toggle",r);break;case"input":ee(r,s),Or("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Or("invalid",r);break;case"textarea":le(r,s),Or("invalid",r)}for(var c in ke(n,s),e=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):l.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Or("scroll",r));switch(n){case"input":X(r),re(r,s,!0);break;case"textarea":X(r),ue(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=jr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===de.html&&(e=fe(n)),e===de.html?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Kr]=t,e[Qr]=r,$a(e,t,!1,!1),t.stateNode=e,c=Ee(n,r),n){case"dialog":Or("cancel",e),Or("close",e),o=r;break;case"iframe":case"object":case"embed":Or("load",e),o=r;break;case"video":case"audio":for(o=0;o<Sr.length;o++)Or(Sr[o],e);o=r;break;case"source":Or("error",e),o=r;break;case"img":case"image":case"link":Or("error",e),Or("load",e),o=r;break;case"details":Or("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Or("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Or("invalid",e);break;case"textarea":le(e,r),o=se(e,r),Or("invalid",e);break;default:o=r}ke(n,o);var u=o;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?xe(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===s?"string"==typeof d?("textarea"!==n||""!==d)&&ye(e,d):"number"==typeof d&&ye(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Or("scroll",e):null!=d&&w(e,s,d,c))}switch(n){case"input":X(e),re(e,r,!1);break;case"textarea":X(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Z(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=jr)}Wr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Xa(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ro(Lo.current),Ro(Oo.current),Go(t)?(r=t.stateNode,n=t.memoizedProps,r[Kr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Kr]=t,t.stateNode=r)}return null;case 13:return ci(Bo),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Go(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Bo.current)?0===zs&&(zs=3):(0!==zs&&3!==zs||(zs=4),null===Ms||0==(134217727&Fs)&&0==(134217727&Ws)||vl(Ms,Is))),(r||n)&&(t.flags|=4),null);case 4:return No(),Za(t),null===e&&Lr(t.stateNode.containerInfo),null;case 10:return no(t),null;case 19:if(ci(Bo),null===(r=t.memoizedState))return null;if(s=0!=(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==zs||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=zo(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ui(Bo,1&Bo.current|2),t.child}e=e.sibling}null!==r.tail&&Wi()>Gs&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=zo(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Fo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Wi()-r.renderingStartTime>Gs&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Wi(),n.sibling=null,t=Bo.current,ui(Bo,s?1&t|2:1&t),n):null;case 23:case 24:return kl(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:gi(e.type)&&yi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(No(),ci(pi),ci(fi),Yo(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Do(e),null;case 13:return ci(Bo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ci(Bo),null;case 4:return No(),null;case 10:return no(e),null;case 23:case 24:return kl(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}$a=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Za=function(){},Ya=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ro(Oo.current);var a,s=null;switch(n){case"input":o=J(e,o),r=J(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=jr)}for(d in ke(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(c=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&u!==c&&(null!=u||null!=c))if("style"===d)if(c){for(a in c)!c.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&c[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(s=s||[]).push(d,u)):"children"===d?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&Or("scroll",e),s||c===u||(s=[])):"object"==typeof u&&null!==u&&u.$$typeof===I?u.toString():(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Xa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"==typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xs||(Xs=!0,Ks=r),us(0,t)},n}function ps(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return us(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Qs?Qs=new Set([this]):Qs.add(this),us(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"==typeof WeakSet?WeakSet:Set;function ms(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ul(e,t)}else t.current=null}function gs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Gr(t.stateNode.containerInfo))}throw Error(a(163))}function ys(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(Bl(n,e),Dl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ho(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ho(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Wr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function vs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(ki&&"function"==typeof ki.onCommitFiberUnmount)try{ki.onCommitFiberUnmount(_i,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))Bl(t,n);else{r=t;try{i()}catch(e){Ul(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ms(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ul(t,e)}break;case 5:ms(t);break;case 4:Ss(e,t)}}function ws(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function xs(e){return 5===e.tag||3===e.tag||4===e.tag}function _s(e){e:{for(var t=e.return;null!==t;){if(xs(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||xs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?ks(e,n,t):Es(e,n,t)}function ks(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=jr));else if(4!==r&&null!==(e=e.child))for(ks(e,t,n),e=e.sibling;null!==e;)ks(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Ss(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,c=l;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(bs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Cs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ee(e,i),t=Ee(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?xe(n,l):"dangerouslySetInnerHTML"===s?ge(n,l):"children"===s?ye(n,l):w(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(qs=Wi(),vs(t.child,!0)),void Ts(t);case 19:return void Ts(t);case 23:case 24:return void vs(t,null!==t.memoizedState)}throw Error(a(163))}function Ts(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Wl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function As(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Os=Math.ceil,Ps=x.ReactCurrentDispatcher,Ls=x.ReactCurrentOwner,Rs=0,Ms=null,Ns=null,Is=0,Ds=0,Bs=li(0),zs=0,js=null,Us=0,Fs=0,Ws=0,Hs=0,Vs=null,qs=0,Gs=1/0;function $s(){Gs=Wi()+500}var Zs,Ys=null,Xs=!1,Ks=null,Qs=null,Js=!1,el=null,tl=90,nl=[],rl=[],il=null,ol=0,al=null,sl=-1,ll=0,cl=0,ul=null,dl=!1;function fl(){return 0!=(48&Rs)?Wi():-1!==sl?sl:sl=Wi()}function pl(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Hi()?1:2;if(0===ll&&(ll=Us),0!==Yi.transition){0!==cl&&(cl=null!==Vs?Vs.pendingLanes:0),e=ll;var t=4186112&~cl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Hi(),0!=(4&Rs)&&98===e?e=jt(12,ll):e=jt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function hl(e,t,n){if(50<ol)throw ol=0,al=null,Error(a(185));if(null===(e=ml(e,t)))return null;Wt(e,t,n),e===Ms&&(Ws|=t,4===zs&&vl(e,Is));var r=Hi();1===t?0!=(8&Rs)&&0==(48&Rs)?bl(e):(gl(e,n),0===Rs&&($s(),$i())):(0==(4&Rs)||98!==r&&99!==r||(null===il?il=new Set([e]):il.add(e)),gl(e,n)),Vs=e}function ml(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Ht(s),c=1<<l,u=o[l];if(-1===u){if(0==(c&r)||0!=(c&i)){u=t,Dt(c);var d=It;o[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=Bt(e,e===Ms?Is:0),t=It,0===r)null!==n&&(n!==Di&&Ci(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Di&&Ci(n)}15===t?(n=bl.bind(null,e),null===zi?(zi=[n],ji=Si(Li,Zi)):zi.push(n),n=Di):14===t?n=Gi(99,bl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Gi(n,yl.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function yl(e){if(sl=-1,cl=ll=0,0!=(48&Rs))throw Error(a(327));var t=e.callbackNode;if(Il()&&e.callbackNode!==t)return null;var n=Bt(e,e===Ms?Is:0);if(0===n)return null;var r=n,i=Rs;Rs|=16;var o=Cl();for(Ms===e&&Is===r||($s(),El(e,r));;)try{Ol();break}catch(t){Sl(e,t)}if(to(),Ps.current=o,Rs=i,null!==Ns?r=0:(Ms=null,Is=0,r=zs),0!=(Us&Ws))El(e,0);else if(0!==r){if(2===r&&(Rs|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(n=zt(e))&&(r=Tl(e,n))),1===r)throw t=js,El(e,0),vl(e,n),gl(e,Wi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Rl(e);break;case 3:if(vl(e,n),(62914560&n)===n&&10<(r=qs+500-Wi())){if(0!==Bt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){fl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Vr(Rl.bind(null,e),r);break}Rl(e);break;case 4:if(vl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Ht(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Wi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Os(n/1960))-n)){e.timeoutHandle=Vr(Rl.bind(null,e),n);break}Rl(e);break;default:throw Error(a(329))}}return gl(e,Wi()),e.callbackNode===t?yl.bind(null,e):null}function vl(e,t){for(t&=~Hs,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bl(e){if(0!=(48&Rs))throw Error(a(327));if(Il(),e===Ms&&0!=(e.expiredLanes&Is)){var t=Is,n=Tl(e,t);0!=(Us&Ws)&&(n=Tl(e,t=Bt(e,t)))}else n=Tl(e,t=Bt(e,0));if(0!==e.tag&&2===n&&(Rs|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(t=zt(e))&&(n=Tl(e,t))),1===n)throw n=js,El(e,0),vl(e,t),gl(e,Wi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rl(e),gl(e,Wi()),null}function wl(e,t){var n=Rs;Rs|=1;try{return e(t)}finally{0===(Rs=n)&&($s(),$i())}}function xl(e,t){var n=Rs;Rs&=-2,Rs|=8;try{return e(t)}finally{0===(Rs=n)&&($s(),$i())}}function _l(e,t){ui(Bs,Ds),Ds|=t,Us|=t}function kl(){Ds=Bs.current,ci(Bs)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,qr(n)),null!==Ns)for(n=Ns.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&yi();break;case 3:No(),ci(pi),ci(fi),Yo();break;case 5:Do(r);break;case 4:No();break;case 13:case 19:ci(Bo);break;case 10:no(r);break;case 23:case 24:kl()}n=n.return}Ms=e,Ns=Gl(e.current,null),Is=Ds=Us=t,zs=0,js=null,Hs=Ws=Fs=0}function Sl(e,t){for(;;){var n=Ns;try{if(to(),Xo.current=La,na){for(var r=Jo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}na=!1}if(Qo=0,ta=ea=Jo=null,ra=!1,Ls.current=null,null===n||null===n.return){zs=1,js=t,Ns=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Is,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Bo.current),f=a;do{var p;if(p=13===f.tag){var h=f.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var m=f.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var g=f.updateQueue;if(null===g){var y=new Set;y.add(c),f.updateQueue=y}else g.add(c);if(0==(2&f.mode)){if(f.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var v=co(-1,1);v.tag=2,uo(s,v)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new ds,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var w=Fl.bind(null,o,c,s);c.then(w,w)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);l=Error(($(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==zs&&(zs=2),l=cs(l,s),f=a;do{switch(f.tag){case 3:o=l,f.flags|=4096,t&=-t,f.lanes|=t,fo(f,fs(0,o,t));break e;case 1:o=l;var x=f.type,_=f.stateNode;if(0==(64&f.flags)&&("function"==typeof x.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===Qs||!Qs.has(_)))){f.flags|=4096,t&=-t,f.lanes|=t,fo(f,ps(f,o,t));break e}}f=f.return}while(null!==f)}Ll(n)}catch(e){t=e,Ns===n&&null!==n&&(Ns=n=n.return);continue}break}}function Cl(){var e=Ps.current;return Ps.current=La,null===e?La:e}function Tl(e,t){var n=Rs;Rs|=16;var r=Cl();for(Ms===e&&Is===t||El(e,t);;)try{Al();break}catch(t){Sl(e,t)}if(to(),Rs=n,Ps.current=r,null!==Ns)throw Error(a(261));return Ms=null,Is=0,zs}function Al(){for(;null!==Ns;)Pl(Ns)}function Ol(){for(;null!==Ns&&!Ti();)Pl(Ns)}function Pl(e){var t=Zs(e.alternate,e,Ds);e.memoizedProps=e.pendingProps,null===t?Ll(e):Ns=t,Ls.current=null}function Ll(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ss(n,t,Ds)))return void(Ns=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ds)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ns=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ns=t);Ns=t=e}while(null!==t);0===zs&&(zs=5)}function Rl(e){var t=Hi();return qi(99,Ml.bind(null,e,t)),null}function Ml(e,t){do{Il()}while(null!==el);if(0!=(48&Rs))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-Ht(o),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,o&=~u}if(null!==il&&0==(24&r)&&il.has(e)&&il.delete(e),e===Ms&&(Ns=Ms=null,Is=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Rs,Rs|=32,Ls.current=null,Ur=Zt,gr(s=mr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(e){l=null;break e}var d=0,f=-1,p=-1,h=0,m=0,g=s,y=null;t:for(;;){for(var v;g!==l||0!==o&&3!==g.nodeType||(f=d+o),g!==c||0!==u&&3!==g.nodeType||(p=d+u),3===g.nodeType&&(d+=g.nodeValue.length),null!==(v=g.firstChild);)y=g,g=v;for(;;){if(g===s)break t;if(y===l&&++h===o&&(f=d),y===c&&++m===u&&(p=d),null!==(v=g.nextSibling))break;y=(g=y).parentNode}g=v}l=-1===f||-1===p?null:{start:f,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;Fr={focusedElem:s,selectionRange:l},Zt=!1,ul=null,dl=!1,Ys=r;do{try{Nl()}catch(e){if(null===Ys)throw Error(a(330));Ul(Ys,e),Ys=Ys.nextEffect}}while(null!==Ys);ul=null,Ys=r;do{try{for(s=e;null!==Ys;){var b=Ys.flags;if(16&b&&ye(Ys.stateNode,""),128&b){var w=Ys.alternate;if(null!==w){var x=w.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&b){case 2:_s(Ys),Ys.flags&=-3;break;case 6:_s(Ys),Ys.flags&=-3,Cs(Ys.alternate,Ys);break;case 1024:Ys.flags&=-1025;break;case 1028:Ys.flags&=-1025,Cs(Ys.alternate,Ys);break;case 4:Cs(Ys.alternate,Ys);break;case 8:Ss(s,l=Ys);var _=l.alternate;ws(l),null!==_&&ws(_)}Ys=Ys.nextEffect}}catch(e){if(null===Ys)throw Error(a(330));Ul(Ys,e),Ys=Ys.nextEffect}}while(null!==Ys);if(x=Fr,w=mr(),b=x.focusedElem,s=x.selectionRange,w!==b&&b&&b.ownerDocument&&hr(b.ownerDocument.documentElement,b)){null!==s&&gr(b)&&(w=s.start,void 0===(x=s.end)&&(x=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(x,b.value.length)):(x=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),l=b.textContent.length,_=Math.min(s.start,l),s=void 0===s.end?_:Math.min(s.end,l),!x.extend&&_>s&&(l=s,s=_,_=l),l=pr(b,_),o=pr(b,s),l&&o&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&((w=w.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),_>s?(x.addRange(w),x.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<w.length;b++)(x=w[b]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Zt=!!Ur,Fr=Ur=null,e.current=n,Ys=r;do{try{for(b=e;null!==Ys;){var k=Ys.flags;if(36&k&&ys(b,Ys.alternate,Ys),128&k){w=void 0;var E=Ys.ref;if(null!==E){var S=Ys.stateNode;Ys.tag,w=S,"function"==typeof E?E(w):E.current=w}}Ys=Ys.nextEffect}}catch(e){if(null===Ys)throw Error(a(330));Ul(Ys,e),Ys=Ys.nextEffect}}while(null!==Ys);Ys=null,Bi(),Rs=i}else e.current=n;if(Js)Js=!1,el=e,tl=t;else for(Ys=r;null!==Ys;)t=Ys.nextEffect,Ys.nextEffect=null,8&Ys.flags&&((k=Ys).sibling=null,k.stateNode=null),Ys=t;if(0===(r=e.pendingLanes)&&(Qs=null),1===r?e===al?ol++:(ol=0,al=e):ol=0,n=n.stateNode,ki&&"function"==typeof ki.onCommitFiberRoot)try{ki.onCommitFiberRoot(_i,n,void 0,64==(64&n.current.flags))}catch(e){}if(gl(e,Wi()),Xs)throw Xs=!1,e=Ks,Ks=null,e;return 0!=(8&Rs)||$i(),null}function Nl(){for(;null!==Ys;){var e=Ys.alternate;dl||null===ul||(0!=(8&Ys.flags)?Je(Ys,ul)&&(dl=!0):13===Ys.tag&&As(e,Ys)&&Je(Ys,ul)&&(dl=!0));var t=Ys.flags;0!=(256&t)&&gs(e,Ys),0==(512&t)||Js||(Js=!0,Gi(97,(function(){return Il(),null}))),Ys=Ys.nextEffect}}function Il(){if(90!==tl){var e=97<tl?97:tl;return tl=90,qi(e,zl)}return!1}function Dl(e,t){nl.push(t,e),Js||(Js=!0,Gi(97,(function(){return Il(),null})))}function Bl(e,t){rl.push(t,e),Js||(Js=!0,Gi(97,(function(){return Il(),null})))}function zl(){if(null===el)return!1;var e=el;if(el=null,0!=(48&Rs))throw Error(a(331));var t=Rs;Rs|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===o)throw Error(a(330));Ul(o,e)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(e){if(null===o)throw Error(a(330));Ul(o,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Rs=t,$i(),!0}function jl(e,t,n){uo(e,t=fs(0,t=cs(n,t),1)),t=fl(),null!==(e=ml(e,1))&&(Wt(e,1,t),gl(e,t))}function Ul(e,t){if(3===e.tag)jl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){jl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Qs||!Qs.has(r))){var i=ps(n,e=cs(t,e),1);if(uo(n,i),i=fl(),null!==(n=ml(n,1)))Wt(n,1,i),gl(n,i);else if("function"==typeof r.componentDidCatch&&(null===Qs||!Qs.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Fl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fl(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(Is&n)===n&&(4===zs||3===zs&&(62914560&Is)===Is&&500>Wi()-qs?El(e,0):Hs|=n),gl(e,t)}function Wl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Hi()?1:2:(0===ll&&(ll=Us),0===(t=Ut(62914560&~ll))&&(t=4194304))),n=fl(),null!==(e=ml(e,t))&&(Wt(e,t,n),gl(e,n))}function Hl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Vl(e,t,n,r){return new Hl(e,t,n,r)}function ql(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Gl(e,t){var n=e.alternate;return null===n?((n=Vl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $l(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)ql(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Zl(n.children,i,o,t);case D:s=8,i|=16;break;case S:s=8,i|=1;break;case C:return(e=Vl(12,n,t,8|i)).elementType=C,e.type=C,e.lanes=o,e;case P:return(e=Vl(13,n,t,i)).type=P,e.elementType=P,e.lanes=o,e;case L:return(e=Vl(19,n,t,i)).elementType=L,e.lanes=o,e;case B:return Yl(n,i,o,t);case z:return(e=Vl(24,n,t,i)).elementType=z,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case A:s=9;break e;case O:s=11;break e;case R:s=14;break e;case M:s=16,r=null;break e;case N:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Vl(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Zl(e,t,n,r){return(e=Vl(7,e,r,t)).lanes=n,e}function Yl(e,t,n,r){return(e=Vl(23,e,r,t)).elementType=B,e.lanes=n,e}function Xl(e,t,n){return(e=Vl(6,e,null,t)).lanes=n,e}function Kl(e,t,n){return(t=Vl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ql(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ft(0),this.expirationTimes=Ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ft(0),this.mutableSourceEagerHydrationData=null}function Jl(e,t,n,r){var i=t.current,o=fl(),s=pl(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(gi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(gi(c)){n=bi(n,c,l);break e}}n=l}else n=di;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),hl(i,s,o),s}function ec(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function nc(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function rc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Ql(e,t,null!=n&&!0===n.hydrate),t=Vl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,so(t),e[Jr]=n.current,Lr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function oc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=ec(a);s.call(e)}}Jl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new rc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var l=i;i=function(){var e=ec(a);l.call(e)}}xl((function(){Jl(t,a,e,i)}))}return ec(a)}function ac(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Zs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pi.current)Da=!0;else{if(0==(n&r)){switch(Da=!1,t.tag){case 3:Ga(t),$o();break;case 5:Io(t);break;case 1:gi(t.type)&&wi(t);break;case 4:Mo(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;ui(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Qa(e,t,n):(ui(Bo,1&Bo.current),null!==(t=os(e,t,n))?t.sibling:null);ui(Bo,1&Bo.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return is(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Bo,Bo.current),r)break;return null;case 23:case 24:return t.lanes=0,Fa(e,t,n)}return os(e,t,n)}Da=0!=(16384&e.flags)}else Da=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=mi(t,fi.current),io(t,n),i=aa(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,gi(r)){var o=!0;wi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,so(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&go(t,r,s,e),i.updater=yo,t.stateNode=i,i._reactInternals=t,xo(t,r,e,n),t=qa(null,t,r,!0,o,n)}else t.tag=0,Ba(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return ql(e)?1:0;if(null!=e){if((e=e.$$typeof)===O)return 11;if(e===R)return 14}return 2}(i),e=Xi(i,e),o){case 0:t=Ha(null,t,i,e,n);break e;case 1:t=Va(null,t,i,e,n);break e;case 11:t=za(null,t,i,e,n);break e;case 14:t=ja(null,t,i,Xi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ha(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Va(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 3:if(Ga(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,lo(e,t),po(t,r,null,n),(r=t.memoizedState.element)===i)$o(),t=os(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(Uo=$r(t.stateNode.containerInfo.firstChild),jo=t,o=Fo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Zo.push(o);for(n=To(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ba(e,t,r,n),$o();t=t.child}return t;case 5:return Io(t),null===e&&Vo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Hr(r,i)?s=null:null!==o&&Hr(r,o)&&(t.flags|=16),Wa(e,t),Ba(e,t,s,n),t.child;case 6:return null===e&&Vo(t),null;case 13:return Qa(e,t,n);case 4:return Mo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Co(t,null,r,n):Ba(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 7:return Ba(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ba(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var l=t.type._context;if(ui(Ki,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0===(o=cr(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!pi.current){t=os(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===l.tag&&((u=co(-1,n&-n)).tag=2,uo(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),ro(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Ba(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,io(t,n),r=r(i=oo(i,o.unstable_observedBits)),t.flags|=1,Ba(e,t,r,n),t.child;case 14:return o=Xi(i=t.type,t.pendingProps),ja(e,t,i,o=Xi(i.type,o),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,gi(r)?(e=!0,wi(t)):e=!1,io(t,n),bo(t,r,i),xo(t,r,i,n),qa(null,t,r,!0,e,n);case 19:return is(e,t,n);case 23:case 24:return Fa(e,t,n)}throw Error(a(156,t.tag))},rc.prototype.render=function(e){Jl(e,this._internalRoot,null,null)},rc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Jl(null,e,null,(function(){t[Jr]=null}))},et=function(e){13===e.tag&&(hl(e,4,fl()),nc(e,4))},tt=function(e){13===e.tag&&(hl(e,67108864,fl()),nc(e,67108864))},nt=function(e){if(13===e.tag){var t=fl(),n=pl(e);hl(e,n,t),nc(e,n)}},rt=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ii(r);if(!i)throw Error(a(90));K(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Re=wl,Me=function(e,t,n,r,i){var o=Rs;Rs|=4;try{return qi(98,e.bind(null,t,n,r,i))}finally{0===(Rs=o)&&($s(),$i())}},Ne=function(){0==(49&Rs)&&(function(){if(null!==il){var e=il;il=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gl(e,Wi())}))}$i()}(),Il())},Ie=function(e,t){var n=Rs;Rs|=2;try{return e(t)}finally{0===(Rs=n)&&($s(),$i())}};var sc={Events:[ni,ri,ii,Pe,Le,Il,{current:!1}]},lc={findFiberByHostInstance:ti,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cc={bundleType:lc.bundleType,version:lc.version,rendererPackageName:lc.rendererPackageName,rendererConfig:lc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Qe(e))?null:e.stateNode},findFiberByHostInstance:lc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{_i=uc.inject(cc),ki=uc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sc,t.createPortal=ac,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Qe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Rs;if(0!=(48&n))return e(t);Rs|=1;try{if(e)return qi(99,e.bind(null,t))}finally{Rs=n,$i()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return oc(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return oc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(xl((function(){oc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Jr]=null}))})),!0)},t.unstable_batchedUpdates=wl,t.unstable_createPortal=function(e,t){return ac(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return oc(e,t,n,!1,r)},t.version="17.0.2"},9060:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(1583)},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=s(e),a=o[0],l=o[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),u=0,d=l>0?a-4:a;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,c=r-i;s<c;s+=a)o.push(l(e,s,s+a>c?c:s+a));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(e,t,n)=>{"use strict";
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/const r=n(9742),i=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=s(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||X(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),s(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function h(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===l)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){let n=!0;for(let r=0;r<l;r++)if(c(e,o+r)!==c(t,r)){n=!1;break}if(n)return o}return-1}function w(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(X(r))return a;e[n+a]=r}return a}function x(e,t,n,r){return Z(G(t,e.length-n),e,n,r)}function _(e,t,n,r){return Z(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return Z($(t),e,n,r)}function E(e,t,n,r){return Z(function(e,t){let n,r,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(o=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},l.allocUnsafe=function(e){return d(e)},l.allocUnsafeSlow=function(e){return d(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=l.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(Y(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){o=c[e],a=u[e];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function A(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=K[e[r]];return i}function L(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r,i){W(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function I(e,t,n,r,i){W(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,o){return t=+t,n>>>=0,o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,o){return t=+t,n>>>=0,o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){M(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){M(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return I(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return I(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=l.isBuffer(e)?e:l.from(e,r),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};const j={};function U(e,t,n){j[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function W(e,t,n,r,i,o){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new j.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||V(t,e.length-(n+1))}(r,i,o)}function H(e,t){if("number"!=typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,n){if(Math.floor(e)!==e)throw H(e,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=F(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function G(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},4184:(e,t)=>{var n;
|
||
/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},7811:(e,t)=>{"use strict";var n=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,o=/\\([\u000b\u0020-\u00ff])/g,a=/([\\"])/g,s=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
||
/*!
|
||
* content-type
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/function l(e){var t=String(e);if(i.test(t))return t;if(t.length>0&&!r.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(a,"\\$1")+'"'}function c(e){this.parameters=Object.create(null),this.type=e}t.Q=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),i=-1!==r?t.slice(0,r).trim():t.trim();if(!s.test(i))throw new TypeError("invalid media type");var a=new c(i.toLowerCase());if(-1!==r){var l,u,d;for(n.lastIndex=r;u=n.exec(t);){if(u.index!==r)throw new TypeError("invalid parameter format");r+=u[0].length,l=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(o,"$1")),a.parameters[l]=d}if(r!==t.length)throw new TypeError("invalid parameter format")}return a}},640:(e,t,n)=>{"use strict";var r=n(1742),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}},3516:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".advanced-cropper-line-wrapper--north,.advanced-cropper-line-wrapper--south{height:12px;width:100%}.advanced-cropper-line-wrapper--north{cursor:n-resize}.advanced-cropper-line-wrapper--south{cursor:s-resize}.advanced-cropper-line-wrapper--east,.advanced-cropper-line-wrapper--west{width:12px;height:100%}.advanced-cropper-line-wrapper--east{cursor:e-resize}.advanced-cropper-line-wrapper--west{cursor:w-resize}.advanced-cropper-line-wrapper--disabled{cursor:auto}.advanced-cropper-line-wrapper__content{position:absolute}.advanced-cropper-line-wrapper__content--east,.advanced-cropper-line-wrapper__content--west{height:100%}.advanced-cropper-line-wrapper__content--north,.advanced-cropper-line-wrapper__content--south{width:100%}.advanced-cropper-line-wrapper__content--east{left:50%;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.advanced-cropper-line-wrapper__content--west{right:50%;-webkit-transform:translateX(100%);transform:translateX(100%)}.advanced-cropper-line-wrapper__content--north{top:50%}.advanced-cropper-line-wrapper__content--south{bottom:50%}.advanced-cropper-handler-wrapper{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:30px;height:30px}.advanced-cropper-handler-wrapper__draggable{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.advanced-cropper-handler-wrapper--west-north{cursor:nw-resize}.advanced-cropper-handler-wrapper--north{cursor:n-resize}.advanced-cropper-handler-wrapper--east-north{cursor:ne-resize}.advanced-cropper-handler-wrapper--east{cursor:e-resize}.advanced-cropper-handler-wrapper--east-south{cursor:se-resize}.advanced-cropper-handler-wrapper--south{cursor:s-resize}.advanced-cropper-handler-wrapper--west-south{cursor:sw-resize}.advanced-cropper-handler-wrapper--west{cursor:w-resize}.advanced-cropper-handler-wrapper--disabled{cursor:auto}.advanced-cropper-bounding-box{position:relative;height:100%;width:100%}.advanced-cropper-bounding-box__handler-wrapper{position:absolute}.advanced-cropper-bounding-box__handler-wrapper--east,.advanced-cropper-bounding-box__handler-wrapper--west{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:100%}.advanced-cropper-bounding-box__handler-wrapper--south,.advanced-cropper-bounding-box__handler-wrapper--north{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:100%}.advanced-cropper-bounding-box__handler-wrapper--west,.advanced-cropper-bounding-box__handler-wrapper--west-north,.advanced-cropper-bounding-box__handler-wrapper--west-south{left:0}.advanced-cropper-bounding-box__handler-wrapper--east,.advanced-cropper-bounding-box__handler-wrapper--east-north,.advanced-cropper-bounding-box__handler-wrapper--east-south{left:100%}.advanced-cropper-bounding-box__handler-wrapper--north,.advanced-cropper-bounding-box__handler-wrapper--west-north,.advanced-cropper-bounding-box__handler-wrapper--east-north{top:0}.advanced-cropper-bounding-box__handler-wrapper--south,.advanced-cropper-bounding-box__handler-wrapper--west-south,.advanced-cropper-bounding-box__handler-wrapper--east-south{top:100%}.advanced-cropper-bounding-box__handler{position:absolute}.advanced-cropper-bounding-box__handler--west-north{left:0;top:0}.advanced-cropper-bounding-box__handler--north{left:50%;top:0}.advanced-cropper-bounding-box__handler--east-north{left:100%;top:0}.advanced-cropper-bounding-box__handler--east{left:100%;top:50%}.advanced-cropper-bounding-box__handler--east-south{left:100%;top:100%}.advanced-cropper-bounding-box__handler--south{left:50%;top:100%}.advanced-cropper-bounding-box__handler--west-south{left:0;top:100%}.advanced-cropper-bounding-box__handler--west{left:0;top:50%}.advanced-cropper-bounding-box__line{position:absolute}.advanced-cropper-bounding-box__line--north,.advanced-cropper-bounding-box__line--south{left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.advanced-cropper-bounding-box__line--north{top:0}.advanced-cropper-bounding-box__line--south{top:100%}.advanced-cropper-bounding-box__line--west,.advanced-cropper-bounding-box__line--east{top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.advanced-cropper-bounding-box__line--west{left:0}.advanced-cropper-bounding-box__line--east{left:100%}.advanced-cropper-artificial-transition{will-change:transform}.advanced-cropper-background-image{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;-webkit-transform-origin:center;transform-origin:center;pointer-events:none;max-width:none !important}.advanced-cropper-canvas{display:none}.advanced-cropper-source{width:1px;height:1px;visibility:hidden;position:absolute;opacity:0}.advanced-cropper-fade{visibility:hidden;opacity:0;-webkit-transition:.5s;transition:.5s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.advanced-cropper-fade--visible{opacity:1;visibility:visible}.advanced-cropper-wrapper__fade{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;min-height:0}.advanced-cropper-stencil-grid{display:table;border-collapse:collapse;table-layout:fixed;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s}.advanced-cropper-stencil-grid--visible{opacity:1}.advanced-cropper-stencil-grid__row{display:table-row}.advanced-cropper-stencil-grid__cell{display:table-cell;width:1%;height:1%;border:currentColor solid 1px}.advanced-cropper-stencil-grid__cell--top{border-top-color:rgba(0,0,0,0)}.advanced-cropper-stencil-grid__cell--left{border-left-color:rgba(0,0,0,0)}.advanced-cropper-stencil-grid__cell--right{border-right-color:rgba(0,0,0,0)}.advanced-cropper-stencil-grid__cell--bottom{border-bottom-color:rgba(0,0,0,0)}.advanced-cropper-stencil-overlay{-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:0 0 0 1000px currentColor;box-shadow:0 0 0 1000px currentColor;pointer-events:none;width:100%;height:100%;position:absolute;-webkit-backface-visibility:hidden}.advanced-cropper-stencil-wrapper{will-change:transform}.advanced-cropper-boundary{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;direction:ltr;position:relative}.advanced-cropper-boundary__content{width:100%;height:100%;position:absolute;top:0;left:0}.advanced-cropper-boundary__stretcher{pointer-events:none;position:relative;max-width:100%;max-height:100%}.advanced-cropper-circle-stencil{position:absolute;height:100%;width:100%;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-backface-visibility:hidden;-webkit-transform-style:preserve-3d}.advanced-cropper-circle-stencil__overlay{border-radius:50%;overflow:hidden}.advanced-cropper-circle-stencil__preview{border-radius:50%}.advanced-cropper-circle-stencil__draggable-area,.advanced-cropper-circle-stencil__overlay,.advanced-cropper-circle-stencil__preview,.advanced-cropper-circle-stencil__grid{position:absolute;height:100%;width:100%}.advanced-cropper-circle-stencil--movable{cursor:move}.advanced-cropper-rectangle-stencil{position:absolute;height:100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-backface-visibility:hidden;-webkit-transform-style:preserve-3d}.advanced-cropper-rectangle-stencil__draggable-area,.advanced-cropper-rectangle-stencil__overlay,.advanced-cropper-rectangle-stencil__preview,.advanced-cropper-rectangle-stencil__grid{position:absolute;height:100%;width:100%}.advanced-cropper-rectangle-stencil--movable{cursor:move}.advanced-cropper-simple-line{background:none;border-width:0}.advanced-cropper-simple-line--south,.advanced-cropper-simple-line--north{height:0;width:100%}.advanced-cropper-simple-line--east,.advanced-cropper-simple-line--west{height:100%;width:0}.advanced-cropper-simple-line--east{border-right-width:1px}.advanced-cropper-simple-line--west{border-left-width:1px}.advanced-cropper-simple-line--south{border-bottom-width:1px}.advanced-cropper-simple-line--north{border-top-width:1px}.advanced-cropper-simple-handler{display:block}.advanced-cropper-preview{overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.advanced-cropper-preview__content{overflow:hidden;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.advanced-cropper-preview__image{display:none;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform-origin:center;transform-origin:center;max-width:none !important}.advanced-cropper-preview__image--visible{display:block}.advanced-cropper-preview__boundary{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;min-height:0;min-width:0}.cropper-preview-wrapper__fade{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;min-height:0;width:100%}.advanced-cropper{overflow:hidden;max-height:100%;background:#000;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;color:#fff}.advanced-cropper__boundary{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;min-height:0;min-width:0}.advanced-cropper__wrapper,.advanced-cropper__background-wrapper{left:0;top:0;right:0;bottom:0;position:absolute}.advanced-cropper__stencil-wrapper{position:absolute}.advanced-cropper *{-webkit-box-sizing:border-box;box-sizing:border-box}.advanced-cropper-simple-handler{background:currentColor;height:10px;width:10px}.advanced-cropper-simple-line{-webkit-transition:border .5s;transition:border .5s;border-color:rgba(255,255,255,.3);border-style:solid}.advanced-cropper-simple-line--hover{border-color:#fff}.advanced-cropper-circle-stencil__preview{border:solid 2px rgba(255,255,255,.2)}.advanced-cropper-stencil-overlay{color:rgba(0,0,0,.5)}.advanced-cropper-stencil-grid{color:rgba(255,255,255,.4)}",""]);const s=a},3562:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.S_Kj89qgp2pITVAZ9ueY{display:inline-flex;align-items:center;justify-content:space-between;border-radius:30px;line-height:1;height:44px;gap:5px;background-color:#fff;color:#29292f;width:100%;box-sizing:border-box;margin-top:4px;margin-bottom:4px;border:1px solid #e8e8e8;text-align:left !important;font-family:"Satoshi-Medium",sans-serif !important;text-indent:18px}.S_Kj89qgp2pITVAZ9ueY:hover{box-shadow:2px 2px 10px rgba(0,0,0,.1);cursor:pointer}.S_Kj89qgp2pITVAZ9ueY:focus{box-shadow:0px 0px 0px 2px rgba(48,128,248,.5) !important}.S_Kj89qgp2pITVAZ9ueY[data-placeholder]{color:var(--violet9)}.S_Kj89qgp2pITVAZ9ueY[data-state=open]{box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}.PIdm6kAgHdtUJk6XVpy5{text-align:left;flex:1;display:block;width:100%;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;text-indent:18px !important}.PIdm6kAgHdtUJk6XVpy5 span{overflow:hidden;text-overflow:ellipsis;height:100%;line-height:44px;text-indent:18px !important}.lDRutX9SgYTagLeJmmQG,._tsWVVi95qxsCGvIYTr3{text-align:center}._tsWVVi95qxsCGvIYTr3{padding-left:16px;padding-right:4px}.lDRutX9SgYTagLeJmmQG{padding-right:16px}.S_Kj89qgp2pITVAZ9ueY[data-state=open] .lDRutX9SgYTagLeJmmQG img{transform:rotate(180deg)}.ukBp9AW87XCxNSeVXRVy{position:absolute}.RPhlSHBSdXRJQwL8DbC2{position:absolute;overflow:hidden;z-index:99999999999;width:var(--radix-select-trigger-width);max-height:var(--radix-select-content-available-height);font-family:"Satoshi-Medium",sans-serif;background-color:#fff;border-radius:15px;margin-top:4px;box-shadow:2px 2px 10px rgba(0,0,0,.1)}.yEl0nunBgW3KvQ8kqmGH{font-size:14px;line-height:1;color:var(--violet11);display:flex;align-items:center;height:44px;padding-left:16px;padding-right:16px;position:relative;user-select:none}.yEl0nunBgW3KvQ8kqmGH[data-disabled]{color:#6e7684;pointer-events:none}.yEl0nunBgW3KvQ8kqmGH[data-highlighted]{background:#f6f7fb;outline:none !important}.yEl0nunBgW3KvQ8kqmGH:hover{background:#f6f7fb;cursor:pointer}.CtB_SJfkRE0Re4YegORT{height:1px;background-color:#e8e8e8;width:calc(100% - 24px);margin:auto;border-radius:30px;margin-top:4px;margin-bottom:4px}.giV2x2X2F_F5ESpsIYge{position:absolute;right:12px;width:24px;height:24px;background:#3080f8;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}.ADFsaj5FtjsL8Wo0IaOh{display:flex;align-items:center;justify-content:center;height:25px;background-color:#fff;color:var(--violet11);cursor:default}.hnCrLmAsWcZxD6v1w9il{background:#faf0f4;color:#d2234d;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;margin-right:4px;border-radius:30px;font-size:12px;font-weight:700}',""]),a.locals={SelectTrigger:"S_Kj89qgp2pITVAZ9ueY",SelectValue:"PIdm6kAgHdtUJk6XVpy5",SelectIconDrop:"lDRutX9SgYTagLeJmmQG",SelectIconType:"_tsWVVi95qxsCGvIYTr3",Portal:"ukBp9AW87XCxNSeVXRVy",SelectContent:"RPhlSHBSdXRJQwL8DbC2",SelectItem:"yEl0nunBgW3KvQ8kqmGH",SelectSeparator:"CtB_SJfkRE0Re4YegORT",SelectItemIndicator:"giV2x2X2F_F5ESpsIYge",SelectScrollButton:"ADFsaj5FtjsL8Wo0IaOh",SelectOff:"hnCrLmAsWcZxD6v1w9il"};const s=a},24:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.MxrwrdDspMpgHmGAID5Q{width:100%;margin:auto;height:80px;left:0px;top:0px;position:fixed;z-index:999999999999;background-color:#fff;border-bottom:1px solid #e8e8e8}.SvWUmxe8iKDGQ5QaVxZP{margin:auto;display:flex;justify-content:space-between;align-items:center;height:100%;width:95%}.dROWS9U7vqBaUxSWpITw{position:absolute;left:0px;right:0px;margin:auto;width:fit-content;display:flex;align-items:center;gap:8px}.etUWvW8ebOLU21zAMVhI{font-size:14px;color:#29292f;font-weight:600;text-align:center;margin:auto}.etUWvW8ebOLU21zAMVhI span{margin-left:4px;font-weight:400;font-size:12px;color:#fff;background-color:#3080f8;border-radius:30px;padding:4px 8px}.BFdjaGiWYqDJFjWGz9kX{display:flex;height:fit-content;align-items:center;gap:8px}.kCn2KFoLas4XjNXmVQBl{display:flex;align-items:center;cursor:pointer}.kCn2KFoLas4XjNXmVQBl img{height:30px}@media(max-width: 1000px){.dROWS9U7vqBaUxSWpITw{display:none}}',""]),a.locals={editorNav:"MxrwrdDspMpgHmGAID5Q",navWrap:"SvWUmxe8iKDGQ5QaVxZP",editorNavCenter:"dROWS9U7vqBaUxSWpITw",editorNavTitle:"etUWvW8ebOLU21zAMVhI",editorNavRight:"BFdjaGiWYqDJFjWGz9kX",editorNavLeft:"kCn2KFoLas4XjNXmVQBl"};const s=a},5175:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.TzbvByLJfcwwUgrmd7l2{width:100%;display:flex;align-items:center;justify-content:space-between;height:40px}._dyVna17cniqsNRCk_ZO{width:34px;height:22px;background-color:#e8e8e8;border-radius:9999px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none !important}._dyVna17cniqsNRCk_ZO:focus{box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}._dyVna17cniqsNRCk_ZO[data-state=checked]{background-color:#3080f8}._dyVna17cniqsNRCk_ZO:hover{cursor:pointer}.iUeF1oBnNL7HC7cEblHd{display:block;width:14px;height:14px;background-color:#fff;border-radius:9999px;box-shadow:0px 1px 10px rgba(0,0,0,.1);transition:transform 100ms;transform:translateX(2px);will-change:transform;margin-left:-5px}.iUeF1oBnNL7HC7cEblHd[data-state=checked]{transform:translateX(15px)}.iczRBYG8yrxf_S1ksjXZ{color:#6e7684}',""]),a.locals={SwitchRow:"TzbvByLJfcwwUgrmd7l2",SwitchRoot:"_dyVna17cniqsNRCk_ZO",SwitchThumb:"iUeF1oBnNL7HC7cEblHd",Label:"iczRBYG8yrxf_S1ksjXZ"};const s=a},2827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.jLoDOTjBqVbTTUj4HWP9{position:absolute;bottom:0px;left:0px;width:100%;height:230px;border-top:1px solid #e8e8e8;background-color:#fff}.ahjKCctvaidpW66pYjNw{display:flex;align-items:center;justify-content:space-between;width:90%;margin:auto;margin-top:12px}.aXPhM3s4zBnUXpxFhmiU{display:flex;align-items:center;gap:8px}.BgJ5xpEJHvP5mkjhhrOv{display:flex;align-items:center}.AEA6tt9s8khyRAJt7F5G{color:#29292f;display:flex;align-items:center;gap:4px;position:absolute;left:0px;right:0px;margin:auto;width:fit-content}.AEA6tt9s8khyRAJt7F5G span{position:relative;font-variant-numeric:tabular-nums}.AEA6tt9s8khyRAJt7F5G svg{color:#9797a4;margin-top:5px}.v9i0p6RO3nzy66MnnGNy{display:flex;align-items:center;gap:4px;background-color:#f6f7fb;border-radius:30px;padding:8px 16px;width:fit-content;margin-left:auto;margin-right:auto;margin-top:8px;margin-bottom:8px;justify-content:center;align-items:center;color:#29292f;position:absolute;left:0px;right:0px;bottom:8px}.v9i0p6RO3nzy66MnnGNy svg{color:#9797a4;margin-top:5px;margin-right:5px}.v9i0p6RO3nzy66MnnGNy .a0bzRr4FLUJbunwj2z2Y{color:#3080f8;cursor:pointer;display:inline-block;margin-left:5px}@media(max-width: 1000px){.AEA6tt9s8khyRAJt7F5G{display:none}}',""]),a.locals={trimWrap:"jLoDOTjBqVbTTUj4HWP9",controls:"ahjKCctvaidpW66pYjNw",actions:"aXPhM3s4zBnUXpxFhmiU",controlsRight:"BgJ5xpEJHvP5mkjhhrOv",timeWrap:"AEA6tt9s8khyRAJt7F5G",trimInfo:"v9i0p6RO3nzy66MnnGNy",trimInfoLink:"a0bzRr4FLUJbunwj2z2Y"};const s=a},3661:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.D5GsqK7Ex7_VEsIqhqwR{width:100%;height:100%;object-fit:cover}.B7xNeVpSOyppzQO3OKbg{position:absolute;bottom:75px;left:0px;right:0px;margin:auto;width:90%;height:80px}.iaFXLxTkQTfFHThZxS0Q{width:100%;display:flex;overflow:hidden;position:relative}.s30uhByrzGDVn8LQnYKL{pointer-events:none}.TpR67J7hh0sPMMnWCoa1{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.hSEaEntikEDAUjYZ2i3F{position:absolute;top:0px;left:0px;z-index:999999;width:100%;height:100%;pointer-events:none}.JeideWGr1hOkYPM5M7JM{position:absolute;width:12px;height:30px;top:0px;bottom:0px;margin:auto;background-color:#3080f8;cursor:pointer;pointer-events:all !important}.JeideWGr1hOkYPM5M7JM::after{content:"";width:2px;height:12px;border-radius:30px;background-color:#fff;position:absolute;top:0px;left:0px;bottom:0px;right:0px;margin:auto}.JeideWGr1hOkYPM5M7JM:hover{cursor:ew-resize;background-color:#2969d8 !important}.Si0gUZsx8TBIypYaTGzQ{border-radius:5px 0px 0px 5px;transform:translateX(-10px)}.IJ6Nl9aA19EFNyzMciVA{border-radius:0px 5px 5px 0px;transform:translateX(2px)}.XSErjqhebfmE22ykLz9T{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,.5);pointer-events:none !important}.vHqtN2kZdOQWsT2Tu5eS{position:absolute;top:0;bottom:0;background:rgba(0,0,0,.05);border-radius:5px 0px 0px 5px}.ZXLaP2dphTSTdeP8Rv7k{position:absolute;top:0;bottom:0;right:0;left:auto;background:rgba(0,0,0,.05);border-radius:0px 5px 5px 0px}.s30uhByrzGDVn8LQnYKL{position:absolute;top:0;bottom:0;border:2px solid #3080f8;border-radius:5px}',""]),a.locals={img:"D5GsqK7Ex7_VEsIqhqwR",trimmerContainer:"B7xNeVpSOyppzQO3OKbg",thumbstrip:"iaFXLxTkQTfFHThZxS0Q",trimSection:"s30uhByrzGDVn8LQnYKL",trimmer:"TpR67J7hh0sPMMnWCoa1",trimWrap:"hSEaEntikEDAUjYZ2i3F",handle:"JeideWGr1hOkYPM5M7JM",startHandle:"Si0gUZsx8TBIypYaTGzQ",endHandle:"IJ6Nl9aA19EFNyzMciVA",overlay:"XSErjqhebfmE22ykLz9T",leftOverlay:"vHqtN2kZdOQWsT2Tu5eS",rightOverlay:"ZXLaP2dphTSTdeP8Rv7k"};const s=a},8629:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}:root{--plyr-color-main: #3080f8;--plyr-font-family: "Satoshi-Medium", sans-serif}.videoPlayer{position:absolute;top:0px;left:0px;right:0px;margin:auto;height:100% !important}.playerWrap{position:relative !important;height:100% !important;padding-top:40px !important;padding-bottom:60px !important;top:0px !important;width:100%;display:flex;flex-direction:column;align-items:center}.plyr{max-width:900px !important;left:0px !important;right:0px !important;margin:0px !important;top:0px !important;bottom:0px !important;position:relative !important;border-radius:15px !important;width:90% !important;margin-bottom:15px}.plyr__progress--played{background-color:#ff5733 !important}@media(max-width: 900px){.videoPlayer{height:100% !important}.playerWrap{position:relative !important;height:100% !important;padding-top:40px !important;padding-bottom:60px !important;top:0px !important;position:relative !important}}',""]);const s=a},497:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.HO7Z7yXfVgBL9KHA2zVA{height:100%}.HO7Z7yXfVgBL9KHA2zVA ::part(cursor){display:none}.U_qAiOEUUGTPK9F_L2m2{height:100%;background-color:#3080f8;z-index:999999;width:3px;position:absolute;border-radius:30px;padding-top:20px;transform:translateY(-10px)}.eUenjs3S4gmt_lC3Bukt{height:100%;padding-top:20px;transform:translateY(-10px);background-color:#8aafee;z-index:999999;width:3px;position:absolute;border-radius:30px;pointer-events:none}',""]),a.locals={waveform:"HO7Z7yXfVgBL9KHA2zVA",cursor:"U_qAiOEUUGTPK9F_L2m2",ghostCursor:"eUenjs3S4gmt_lC3Bukt"};const s=a},6668:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}body{background:#f6f7fb;font-family:"Satoshi-Medium",sans-serif;font-size:14px;height:100vh;overflow-y:hidden;margin:0px}@media(max-width: 900px){body{overflow-y:unset !important}}.button{display:flex;align-items:center;justify-content:center;border-radius:4px;border:none;padding:8px 16px;gap:6px;text-align:center;box-sizing:border-box;border-radius:30px;font-family:"Satoshi-Bold",sans-serif;font-weight:500}.button.primaryButton:disabled,.button.secondaryButton:disabled{background-color:#f6f7fb !important;color:#9797a4 !important;cursor:not-allowed !important;border:1px solid rgba(0,0,0,0) !important}.button.primaryButton:disabled svg,.button.secondaryButton:disabled svg{color:#9797a4 !important;margin-top:5px}.button.simpleButton:disabled{opacity:.5;cursor:not-allowed !important}.button.primaryButton{color:#fff;background-color:#3080f8;height:40px}.button.primaryButton svg{margin-top:5px;color:#fff}.button.primaryButton:hover{background-color:#0864ed;cursor:pointer}.button.secondaryButton{color:#29292f;background-color:#fff;border:1px solid #e8e8e8;height:40px}.button.secondaryButton svg{margin-top:5px;color:#9797a4}.button.secondaryButton:hover{background-color:#f6f7fb;cursor:pointer}.button.simpleButton{color:#6e7684;background:none}.button.simpleButton svg{margin-top:5px}.button.simpleButton:hover{background-color:#f6f7fb;cursor:pointer}.button.blueButton{color:#3080f8}.button.blackButton{color:#29292f !important}.cropper,.advanced-cropper-artificial-transition,.advanced-cropper-background-image,.advanced-cropper-wrapper,.advanced-cropper,.CropperBackgroundWrapper,.cropper *{transition:none !important}.cropper{max-width:80%;height:80%;border-radius:15px;margin:auto !important;position:absolute !important;top:0px;left:0px;right:0px;bottom:0px !important;display:block;transition:none !important;padding-left:40px;padding-right:40px}.advanced-cropper-artificial-transition{transition:none !important}.advanced-cropper-background-image{transition:none !important}.advanced-cropper-wrapper,.advanced-cropper,.CropperBackgroundWrapper{background-image:url("chrome-extension://__MSG_@@extension_id__/assets/editor/transparenttile.png") !important;background-repeat:repeat !important;background-size:20px !important;transition:none !important}.advanced-cropper-simple-handler{width:15px !important;height:15px !important;background-color:rgba(0,0,0,0) !important;position:absolute;border-style:solid;border-width:0 !important;border-radius:2px}.advanced-cropper-simple-handler--west-north,.advanced-cropper-simple-handler--west-south{margin-left:8px !important}.advanced-cropper-simple-handler--west-north,.advanced-cropper-simple-handler--east-north{margin-top:8px !important}.advanced-cropper-simple-handler--west-south,.advanced-cropper-simple-handler--east-south{margin-bottom:8px !important}.advanced-cropper-simple-handler--east{margin-right:8px !important;border-right-width:4px !important}.advanced-cropper-simple-handler--west{margin-left:8px;border-left-width:4px !important}.advanced-cropper-simple-handler--north{margin-top:8px;border-top-width:4px !important}.advanced-cropper-simple-handler--south{margin-bottom:8px;border-bottom-width:4px !important}button{all:unset}.AlertDialogOverlay{background-color:rgba(0,0,0,.5);position:fixed;inset:0;animation:overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);z-index:99999999999}.AlertDialogContent{background-color:#fff;border-radius:30px;box-shadow:rgba(14,18,22,.35) 0px 10px 38px -10px,rgba(14,18,22,.2) 0px 10px 20px -15px;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:90vw;max-width:500px;max-height:85vh;padding:35px 25px;animation:contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);z-index:99999999999}.AlertDialogContent:focus{outline:none}.AlertDialogTitle{margin:0;color:#29292f;font-size:14px;font-family:"Satoshi-Bold",sans-serif;font-weight:700}.AlertDialogDescription{margin-bottom:20px;color:#6e7684;font-size:14px;line-height:1.5}.AlertDialogDescription a{color:#3080f8 !important;font-weight:600 !important;text-decoration:none !important;display:inline-block;cursor:pointer}.Button{display:inline-flex;align-items:center;justify-content:center;border-radius:30px;padding:0 15px;font-size:14px;line-height:1;font-weight:500;height:35px}.Button.blue{background-color:rgba(48,128,248,.1);color:#3080f8}.Button.blue:hover{background-color:rgba(48,128,248,.15);cursor:pointer}.Button.blue:focus{box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}.Button.red{background-color:rgba(247,56,90,.1);color:#f7385a}.Button.red:hover{background-color:rgba(247,56,90,.15);cursor:pointer}.Button.red:focus{box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}.Button.grey{background:rgba(110,118,132,.1);color:#6e7684}.Button.grey:hover{background:rgba(110,118,132,.15);cursor:pointer}.Button.grey:focus{box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}@keyframes overlayShow{from{opacity:0}to{opacity:1}}@keyframes contentShow{from{opacity:0;transform:translate(-50%, -48%) scale(0.96)}to{opacity:1;transform:translate(-50%, -50%) scale(1)}}.SideButtonModal{display:inline-flex;align-items:center;justify-content:center;border-radius:30px;padding:0 15px;font-size:14px;line-height:1;font-weight:500;height:35px;color:#6e7684;font-family:"Satoshi-Medium",sans-serif}.SideButtonModal:hover{cursor:pointer;background:rgba(110,118,132,.05)}',""]);const s=a},9146:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.NMwslPmx1u8VJviFmUdQ{flex:1;height:100%;position:relative;overflow:hidden;min-height:300px}.n24TgT4rfSCSL6NfY09A{max-width:1400px;margin:0 auto;position:relative;height:100%;min-height:50vh}@media(max-width: 900px){.NMwslPmx1u8VJviFmUdQ{display:block !important;height:auto !important;overflow:unset !important}}',""]),a.locals={content:"NMwslPmx1u8VJviFmUdQ",wrap:"n24TgT4rfSCSL6NfY09A"};const s=a},893:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.zly9uYj_g7Mvh6iCcPTH{position:absolute;bottom:20px;right:20px;z-index:99999;background:#fff;border-radius:50%;border:1px solid #e8e8e8;box-shadow:0px 4px 30px 0px rgba(63,67,72,.15);cursor:pointer;pointer-events:all;width:48px;height:48px;display:flex;align-items:center;justify-content:center}.zly9uYj_g7Mvh6iCcPTH:hover{border:0px 0px 0px 2px rgba(48,128,248,.5) !important}.zly9uYj_g7Mvh6iCcPTH svg{fill:#6e7684;color:#6e7684;margin-top:3px}',""]),a.locals={HelpButton:"zly9uYj_g7Mvh6iCcPTH"};const s=a},1559:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.Nd8MMagdD8eZbLyuCZmg{width:100%;margin:auto;height:80px;left:0px;top:0px;position:fixed;z-index:99999999999999;background-color:#fff;border-bottom:1px solid #e8e8e8}._nzdqzGOC3rTKCSn_5bw{margin:auto;display:flex;justify-content:space-between;align-items:center;height:100%;width:95%}.rzfxAULf8lFXjwRJkw4w{position:absolute;left:0px;right:0px;margin:auto;width:fit-content;display:flex;align-items:center;gap:8px}.Mmu4cyVzGLkpe5d3so09{font-size:14px;color:#29292f;font-weight:600;text-align:center;margin:auto}.UtcnVz5Db8l4tNb_N_y_{margin-left:4px;font-weight:400;font-size:12px;color:#fff;background-color:#3080f8;border-radius:30px;padding:4px 8px}.Om5PLkq2hb5fS2McEbhs{display:flex;align-items:center;cursor:pointer}.Om5PLkq2hb5fS2McEbhs img{height:30px}.x6pTeGphMHjx5dm06Srz{display:flex;height:fit-content;align-items:center;gap:8px}.x6pTeGphMHjx5dm06Srz .qAiauH4QyBLZ8ly_pAm9{padding:8px 16px !important}',""]),a.locals={nav:"Nd8MMagdD8eZbLyuCZmg",navWrap:"_nzdqzGOC3rTKCSn_5bw",navCenter:"rzfxAULf8lFXjwRJkw4w",navTitle:"Mmu4cyVzGLkpe5d3so09",beta:"UtcnVz5Db8l4tNb_N_y_",navLeft:"Om5PLkq2hb5fS2McEbhs",navRight:"x6pTeGphMHjx5dm06Srz",button:"qAiauH4QyBLZ8ly_pAm9"};const s=a},930:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.laWt5nHf6EgvOaXAbrja{display:flex;position:absolute;top:80px;width:100%;height:calc(100% - 80px);box-sizing:border-box;left:0px}.ckfbnKD3PzJPJIFb2ZNo{position:absolute}@media(max-width: 900px){.laWt5nHf6EgvOaXAbrja{display:block !important;height:auto !important}.ckfbnKD3PzJPJIFb2ZNo{position:relative}}',""]),a.locals={content:"laWt5nHf6EgvOaXAbrja",player:"ckfbnKD3PzJPJIFb2ZNo"};const s=a},3049:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.qPS4cDHc13z0ko9azFz_{height:100%;width:460px;background-color:#fff;border:1px solid #e8e8e8;box-sizing:border-box;overflow-y:auto;z-index:9999999}@media(max-width: 900px){.qPS4cDHc13z0ko9azFz_{width:100% !important;position:relative !important;top:0px;left:0px;overflow:unset !important}}.WwQD2cnbIGCKrepWhXwU{width:90%;margin:auto;padding-top:16px;padding-bottom:16px;border-bottom:1px solid #e8e8e8;position:relative}.WwQD2cnbIGCKrepWhXwU:last-child{border-bottom:none}.kKWwJkT8pFv5pMIOa4qc{margin-top:8px;margin-bottom:16px;font-family:"Satoshi-Bold",sans-serif;color:#29292f}.z661hQ3816HRSMdwA5Po{position:absolute;right:8px;top:26px;font-family:"Satoshi-Medium",sans-serif;color:#6e7684;cursor:pointer}.cLffxphT37hD7qNleguC{display:flex;flex-direction:column;gap:12px}.sHvf7jx4xO2U1YiEBzv8{display:flex;width:100%;height:80px;justify-content:space-between;align-items:center;position:relative;overflow:hidden;background-color:rgba(56,126,247,.1)}.sHvf7jx4xO2U1YiEBzv8 .ozLFYNY84Vx9GF0Gdfge{color:#3080f8;font-family:"Satoshi-Bold",sans-serif;width:150px}.sHvf7jx4xO2U1YiEBzv8 .ozLFYNY84Vx9GF0Gdfge:hover{cursor:pointer}.stIOAwuQexj34TSOPhLf{display:flex;width:100%;height:80px;border-radius:30px;border:1px solid #e8e8e8;justify-content:space-between;align-items:center;position:relative;overflow:hidden}.stIOAwuQexj34TSOPhLf:hover{cursor:pointer;background-color:#f6f7fb}.stIOAwuQexj34TSOPhLf:disabled,.stIOAwuQexj34TSOPhLf[disabled]{background-color:#f6f7fb !important;opacity:.5;cursor:not-allowed}.stIOAwuQexj34TSOPhLf.ALkA6n_oM6qih14Up8VI::after{content:"";display:block;position:absolute;background-color:#3080f8;opacity:.1;height:100%;width:80px;left:0px;top:0px}.A0xS0cFrZ_oW4wgcYFcQ,.ozLFYNY84Vx9GF0Gdfge{width:60px;display:flex;align-items:center;text-align:center;height:100%;justify-content:center}.A0xS0cFrZ_oW4wgcYFcQ svg,.ozLFYNY84Vx9GF0Gdfge svg{color:#9797a4}.gX7J9UEyQcWHmP1WMaL2{flex:1}.gX7J9UEyQcWHmP1WMaL2 .Oq4myOuzmGELYvRju6NE{font-family:"Satoshi-Bold",sans-serif;color:#29292f}.gX7J9UEyQcWHmP1WMaL2 .yEWCjqMO23ilkxePbfdZ{font-family:"Satoshi-Medium",sans-serif;color:#6e7684;margin-top:4px}.xyIQfPUXj46IdYcthZzM{padding-top:4px;padding-bottom:4px}.oc2I1zVu30HavlyZm2Bl{font-family:"Satoshi-Medium",sans-serif;color:#6e7684;margin-bottom:4px}.oxeU0znSOJ_13PSxD6Fj{display:flex;gap:18px;margin-bottom:16px}.AH1VcmkjZ6tmdTV9ixa0{flex:none !important;width:100px}.UNGtoHvKN4zSjlto01QL,.AH1VcmkjZ6tmdTV9ixa0{flex:1;position:relative}.UNGtoHvKN4zSjlto01QL input,.AH1VcmkjZ6tmdTV9ixa0 input{border-radius:30px;border:1px solid #e8e8e8;height:40px;box-sizing:border-box;position:relative;width:100%;padding-left:18px;padding-right:40px;font-family:"Satoshi-Medium",sans-serif}.UNGtoHvKN4zSjlto01QL span,.AH1VcmkjZ6tmdTV9ixa0 span{color:#6e7684;font-family:"Satoshi-Medium",sans-serif;position:absolute;right:18px;bottom:12px;user-select:none}.oM_IUsqwdYEKE7l7aajU{font-family:"Satoshi-Medium",sans-serif;color:#6e7684;margin-bottom:8px}.nO4L3uqcen_XjMBfbliT{display:flex;flex-direction:column;gap:12px;margin-bottom:16px;justify-content:center;align-items:center;width:100%;border:1px solid #e8e8e8;border-radius:30px;text-align:center;padding-top:20px;padding-bottom:20px}.nO4L3uqcen_XjMBfbliT svg{color:#6e7684}.nO4L3uqcen_XjMBfbliT .ER90aj76DvlTBHfURYHe{font-family:"Satoshi-Bold",sans-serif;color:#29292f}.nO4L3uqcen_XjMBfbliT .bGM1Jkn08V6b6HxpAiAr{margin-top:10px;font-family:"Satoshi-Medium",sans-serif;color:#6e7684}.nO4L3uqcen_XjMBfbliT:hover{cursor:pointer;background-color:#f6f7fb}.pB5xJDbhStCMh8TzRVoU{display:flex;border-radius:30px;border:1px solid #e8e8e8;height:43px;align-items:center;position:relative}.pB5xJDbhStCMh8TzRVoU .Bh15bWObqui9rBUNiFVQ{display:flex;padding-left:14px;padding-right:8px}.pB5xJDbhStCMh8TzRVoU .Bh15bWObqui9rBUNiFVQ svg{color:#6e7684}.pB5xJDbhStCMh8TzRVoU .KYHSFZlifG0jYU1_sS3n{flex:1;display:flex;flex-direction:column;gap:4px;overflow:hidden}.pB5xJDbhStCMh8TzRVoU .KYHSFZlifG0jYU1_sS3n span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:90%}.pB5xJDbhStCMh8TzRVoU .T5uAWxOGom9rEai_56R9{right:0px;top:0px;bottom:0px;display:flex;align-items:center;padding-right:14px;position:absolute;height:100%}.pB5xJDbhStCMh8TzRVoU .T5uAWxOGom9rEai_56R9 svg{color:#6e7684}.pB5xJDbhStCMh8TzRVoU .T5uAWxOGom9rEai_56R9:hover{cursor:pointer}._vhtWbe6qsqM_uS5gGT6{position:relative;display:flex;align-items:center;user-select:none;touch-action:none;width:200px;height:20px;margin-top:36px;flex:1}.cZDAwZdtm3DpQSh7a33v{background-color:#e8e8e8;position:relative;flex-grow:1;border-radius:9999px;height:6px}.H9NRMCIgJLN9u5c7D5HY{position:absolute;background-color:#3080f8;border-radius:9999px;height:100%}.SPN37LFTiorgUzsOQKEt{display:block;width:16px;height:16px;background-color:#fff;box-sizing:border-box;border:2px solid #3080f8;border-radius:10px}.SPN37LFTiorgUzsOQKEt:focus{outline:none;box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}.TXMQ5GrkoiKWfkQ9_V1D{margin-top:20px;float:right}',""]),a.locals={panel:"qPS4cDHc13z0ko9azFz_",section:"WwQD2cnbIGCKrepWhXwU",sectionTitle:"kKWwJkT8pFv5pMIOa4qc",buttonLogout:"z661hQ3816HRSMdwA5Po",buttonWrap:"cLffxphT37hD7qNleguC",alert:"sHvf7jx4xO2U1YiEBzv8",buttonRight:"ozLFYNY84Vx9GF0Gdfge",button:"stIOAwuQexj34TSOPhLf",progress:"ALkA6n_oM6qih14Up8VI",buttonLeft:"A0xS0cFrZ_oW4wgcYFcQ",buttonMiddle:"gX7J9UEyQcWHmP1WMaL2",buttonTitle:"Oq4myOuzmGELYvRju6NE",buttonDescription:"yEWCjqMO23ilkxePbfdZ",inputSection:"xyIQfPUXj46IdYcthZzM",inputSectionTitle:"oc2I1zVu30HavlyZm2Bl",inputs:"oxeU0znSOJ_13PSxD6Fj",inputVolume:"AH1VcmkjZ6tmdTV9ixa0",input:"UNGtoHvKN4zSjlto01QL",inputTitle:"oM_IUsqwdYEKE7l7aajU",uploadArea:"nO4L3uqcen_XjMBfbliT",uploadTitle:"ER90aj76DvlTBHfURYHe",uploadDescription:"bGM1Jkn08V6b6HxpAiAr",audioDetails:"pB5xJDbhStCMh8TzRVoU",audioDetailsLeft:"Bh15bWObqui9rBUNiFVQ",audioDetailsMiddle:"KYHSFZlifG0jYU1_sS3n",audioDetailsRight:"T5uAWxOGom9rEai_56R9",SliderRoot:"_vhtWbe6qsqM_uS5gGT6",SliderTrack:"cZDAwZdtm3DpQSh7a33v",SliderRange:"H9NRMCIgJLN9u5c7D5HY",SliderThumb:"SPN37LFTiorgUzsOQKEt",updateButton:"TXMQ5GrkoiKWfkQ9_V1D"};const s=a},9147:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.mrtJ5TbBnlSA6q3Y2sPM{position:fixed;width:100%;height:100%;top:0px;left:0px;overflow:hidden;z-index:99999999999}.S7FfhuL8p4DVSjQ6zKnw{position:absolute;left:0px;right:0px;top:0px;bottom:0px;margin:auto;padding:24px;background:#fff;z-index:99999999999;text-align:center;width:fit-content;height:fit-content;border-radius:30px}.S7FfhuL8p4DVSjQ6zKnw .F91gaRtEb3y781FDdxS8{font-size:22px}.S7FfhuL8p4DVSjQ6zKnw .joZhTDpZ9OTpn8_PfeIi{font-family:"Satoshi-Bold",sans-serif;color:#29292f;text-align:center;margin-top:8px}.S7FfhuL8p4DVSjQ6zKnw .h3dYTy6DiF2Sr7W90tiI{font-family:"Satoshi-Medium",sans-serif;color:#6e7684;margin-top:8px;text-align:center;width:300px;line-height:150%}.S7FfhuL8p4DVSjQ6zKnw ._pFfuFuHeX05xJ2phRhR{background:radial-gradient(118.3% 119.01% at 35.44% 0%, #2baef8 23.13%, #3582f6 46.35%, #486def 74.48%, #7b9aea 100%),#1b58f6;color:#fff;text-align:center;padding:8px 16px;border-radius:30px;margin-top:18px;font-family:"Satoshi-Medium",sans-serif;width:fit-content;margin-left:auto;margin-right:auto}.S7FfhuL8p4DVSjQ6zKnw ._pFfuFuHeX05xJ2phRhR:hover{cursor:pointer;opacity:.8}.rYbuZiAemjp1qGv2hw_X{width:100%;height:100%;position:absolute;background:rgba(0,0,0,.6)}.MZc0ZkS0YmpTwGfFiS9H{position:absolute;right:18px;top:18px}.MZc0ZkS0YmpTwGfFiS9H:hover{cursor:pointer;opacity:.8}',""]),a.locals={modalWrap:"mrtJ5TbBnlSA6q3Y2sPM",modal:"S7FfhuL8p4DVSjQ6zKnw",emoji:"F91gaRtEb3y781FDdxS8",title:"joZhTDpZ9OTpn8_PfeIi",subtitle:"h3dYTy6DiF2Sr7W90tiI",button:"_pFfuFuHeX05xJ2phRhR",modalBackground:"rYbuZiAemjp1qGv2hw_X",close:"MZc0ZkS0YmpTwGfFiS9H"};const s=a},13:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@font-face{font-family:"Satoshi-Light";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Light.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Medium";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Medium.ttf") format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"Satoshi-Bold";src:url("chrome-extension://__MSG_@@extension_id__/assets/fonts/Satoshi-Bold.ttf") format("truetype");font-weight:normal;font-style:normal}.yiA7MhEMrDDgypxaGVW4{position:relative;bottom:0;width:90%;max-width:900px;left:0;right:0;margin:0px !important;margin-top:20px}.rNQGYmaCRXc4RHUhO_wq{position:relative;margin:auto;display:flex;flex-direction:column;justify-content:flex-start;height:auto;margin-top:20px}.rNQGYmaCRXc4RHUhO_wq:hover{cursor:text}.rNQGYmaCRXc4RHUhO_wq h1{margin:0;padding:0;font-size:20px;font-family:"Satoshi-Medium",sans-serif;position:absolute;top:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:calc(100% - 140px)}.rNQGYmaCRXc4RHUhO_wq input{position:absolute;top:100%;font-family:"Satoshi-Medium",sans-serif;font-size:20px;border-radius:30px;border:1px solid #e8e8e8;width:100%;height:32px;box-sizing:border-box}.rNQGYmaCRXc4RHUhO_wq input:focus{outline:none;box-shadow:0px 0px 0px 2px rgba(48,128,248,.5)}.DqJxXiihjIwpz_80MdVd{display:inline-block;color:#9797a4}.vAkNssNKLUhygmgtIRF0{display:flex;justify-content:center;align-items:center;background-color:#29292f;color:#fff;border-radius:30px;padding:0px 16px;height:40px;right:0px;gap:8px;font-size:500;font-family:"Satoshi-Medium",sans-serif;top:-6px}.vAkNssNKLUhygmgtIRF0:hover{cursor:pointer;opacity:.8}.RD0WbyEdudE22UVMYUsi{width:16px}.RD0WbyEdudE22UVMYUsi svg{color:#fff;margin-top:1px}',""]),a.locals={TitleParent:"yiA7MhEMrDDgypxaGVW4",TitleWrap:"rNQGYmaCRXc4RHUhO_wq",pencil:"DqJxXiihjIwpz_80MdVd",shareButton:"vAkNssNKLUhygmgtIRF0",shareIcon:"RD0WbyEdudE22UVMYUsi"};const s=a},4917:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'@keyframes plyr-progress{to{background-position:25px 0;background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{0%{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:inherit;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:400;font-weight:var(--plyr-font-weight-regular, 400);line-height:1.7;line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow .3s ease;z-index:0}.plyr audio,.plyr iframe,.plyr video{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui :after,.plyr--full-ui :before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:#4a5464;background:var(--plyr-badge-background, #4a5464);border-radius:2px;border-radius:var(--plyr-badge-border-radius, 2px);color:#fff;color:var(--plyr-badge-text-color, #fff);font-size:9px;font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in .3s ease;bottom:0;display:none;font-size:13px;font-size:var(--plyr-font-size-small, 13px);left:0;padding:10px;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform .4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media(min-width: 480px){.plyr__captions{font-size:15px;font-size:var(--plyr-font-size-base, 15px);padding:20px;padding:calc(var(--plyr-control-spacing, 10px)*2)}}@media(min-width: 768px){.plyr__captions{font-size:18px;font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(-40px);transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:rgba(0,0,0,.8);background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;-webkit-box-decoration-break:clone;box-decoration-break:clone;color:#fff;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:.2em .5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:rgba(0,0,0,0);border:0;border-radius:3px;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:7px;padding:calc(var(--plyr-control-spacing, 10px)*.7);position:relative;transition:all .3s ease}.plyr__control svg{fill:currentColor;display:block;height:18px;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:18px;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control:focus-visible{outline:2px dashed #00b2ff;outline:2px dashed var(--plyr-focus-visible-color, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));outline-offset:2px}a.plyr__control{text-decoration:none}.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control.plyr__control--pressed .label--not-pressed,.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,a.plyr__control:after,a.plyr__control:before{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:2.5px;margin-left:calc(var(--plyr-control-spacing, 10px)/4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:2.5px;padding-left:calc(var(--plyr-control-spacing, 10px)/4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 5px;padding:0 calc(var(--plyr-control-spacing, 10px)/2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time,.plyr__controls .plyr__controls__item.plyr__time:first-child{padding-left:0}.plyr [data-plyr=airplay],.plyr [data-plyr=captions],.plyr [data-plyr=fullscreen],.plyr [data-plyr=pip],.plyr__controls:empty{display:none}.plyr--airplay-supported [data-plyr=airplay],.plyr--captions-enabled [data-plyr=captions],.plyr--fullscreen-enabled [data-plyr=fullscreen],.plyr--pip-supported [data-plyr=pip]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform .3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup .2s ease;background:rgba(255,255,255,.9019607843);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9019607843));border-radius:4px;border-radius:var(--plyr-menu-radius, 4px);bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.1490196078);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.1490196078));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height .35s cubic-bezier(0.4, 0, 0.2, 1),width .35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container:after{border:4px solid rgba(0,0,0,0);border-top-color:rgba(255,255,255,.9019607843);border:var(--plyr-menu-arrow-size, 4px) solid rgba(0,0,0,0);border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9019607843));content:"";height:0;position:absolute;right:14px;right:calc(var(--plyr-control-icon-size, 18px)/2 + var(--plyr-control-spacing, 10px)*.7 - var(--plyr-menu-arrow-size, 4px)/2);top:100%;width:0}.plyr__menu__container [role=menu]{padding:7px;padding:calc(var(--plyr-control-spacing, 10px)*.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:#4a5464;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:13px;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding:4.66667px 10.5px;padding:calc(var(--plyr-control-spacing, 10px)*.7/1.5) calc(var(--plyr-control-spacing, 10px)*.7*1.5);-webkit-user-select:none;user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control:after{border:4px solid rgba(0,0,0,0);border:var(--plyr-menu-item-arrow-size, 4px) solid rgba(0,0,0,0);content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:28px;padding-right:calc(var(--plyr-control-spacing, 10px)*.7*4)}.plyr__menu__container .plyr__control--forward:after{border-left-color:#728197;border-left-color:var(--plyr-menu-arrow-color, #728197);right:6.5px;right:calc(var(--plyr-control-spacing, 10px)*.7*1.5 - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward:focus-visible:after,.plyr__menu__container .plyr__control--forward:hover:after{border-left-color:initial}.plyr__menu__container .plyr__control--back{font-weight:400;font-weight:var(--plyr-font-weight-regular, 400);margin:7px;margin:calc(var(--plyr-control-spacing, 10px)*.7);margin-bottom:3.5px;margin-bottom:calc(var(--plyr-control-spacing, 10px)*.7/2);padding-left:28px;padding-left:calc(var(--plyr-control-spacing, 10px)*.7*4);position:relative;width:calc(100% - 14px);width:calc(100% - var(--plyr-control-spacing, 10px)*.7*2)}.plyr__menu__container .plyr__control--back:after{border-right-color:#728197;border-right-color:var(--plyr-menu-arrow-color, #728197);left:6.5px;left:calc(var(--plyr-control-spacing, 10px)*.7*1.5 - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back:before{background:#dcdfe5;background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:3.5px;margin-top:calc(var(--plyr-control-spacing, 10px)*.7/2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back:focus-visible:after,.plyr__menu__container .plyr__control--back:hover:after{border-right-color:initial}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:7px;padding-left:calc(var(--plyr-control-spacing, 10px)*.7)}.plyr__menu__container .plyr__control[role=menuitemradio]:after,.plyr__menu__container .plyr__control[role=menuitemradio]:before{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]:before{background:rgba(0,0,0,.1019607843);content:"";display:block;flex-shrink:0;height:16px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all .3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]:after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform .3s ease,opacity .3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]:before{background:#00b2ff;background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]:after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio]:focus-visible:before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover:before{background:rgba(35,40,47,.1019607843)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:-5px;margin-right:calc(var(--plyr-control-spacing, 10px)*.7*-1 + 2px);overflow:hidden;padding-left:24.5px;padding-left:calc(var(--plyr-control-spacing, 10px)*.7*3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);border:0;border-radius:26px;border-radius:calc(var(--plyr-range-thumb-height, 13px)*2);color:#00b2ff;color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));display:block;height:19px;height:calc(var(--plyr-range-thumb-active-shadow-width, 3px)*2 + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow .3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:rgba(0,0,0,0);background-image:linear-gradient(90deg, currentColor 0, rgba(0, 0, 0, 0) 0);background-image:linear-gradient(to right, currentColor var(--value, 0), rgba(0, 0, 0, 0) var(--value, 0));border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-webkit-transition:box-shadow .3s ease;transition:box-shadow .3s ease;-webkit-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:#fff;background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2));height:13px;height:var(--plyr-range-thumb-height, 13px);margin-top:-4px;margin-top:calc((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px))/2*-1);position:relative;-webkit-transition:all .2s ease;transition:all .2s ease;width:13px;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-track{background:rgba(0,0,0,0);border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-moz-transition:box-shadow .3s ease;transition:box-shadow .3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:#fff;background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2));height:13px;height:var(--plyr-range-thumb-height, 13px);position:relative;-moz-transition:all .2s ease;transition:all .2s ease;width:13px;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{color:rgba(0,0,0,0)}.plyr--full-ui input[type=range]::-ms-fill-upper,.plyr--full-ui input[type=range]::-ms-track{background:rgba(0,0,0,0);border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-ms-transition:box-shadow .3s ease;transition:box-shadow .3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0);background:currentColor;border:0;border-radius:2.5px;border-radius:calc(var(--plyr-range-track-height, 5px)/2);height:5px;height:var(--plyr-range-track-height, 5px);-ms-transition:box-shadow .3s ease;transition:box-shadow .3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-thumb{background:#fff;background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2));height:13px;height:var(--plyr-range-thumb-height, 13px);margin-top:0;position:relative;-ms-transition:all .2s ease;transition:all .2s ease;width:13px;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]:focus-visible::-webkit-slider-runnable-track{outline:2px dashed #00b2ff;outline:2px dashed var(--plyr-focus-visible-color, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));outline-offset:2px}.plyr--full-ui input[type=range]:focus-visible::-moz-range-track{outline:2px dashed #00b2ff;outline:2px dashed var(--plyr-focus-visible-color, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));outline-offset:2px}.plyr--full-ui input[type=range]:focus-visible::-ms-track{outline:2px dashed #00b2ff;outline:2px dashed var(--plyr-focus-visible-color, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));outline-offset:2px}.plyr__poster{background-color:#000;background-color:var(--plyr-video-background, var(--plyr-video-background, #000));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:13px;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time:before{content:"⁄";margin-right:10px;margin-right:var(--plyr-control-spacing, 10px)}@media(max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:rgba(255,255,255,.9019607843);background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9019607843));border-radius:5px;border-radius:var(--plyr-tooltip-radius, 5px);bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.1490196078);box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.1490196078));color:#4a5464;color:var(--plyr-tooltip-color, #4a5464);font-size:13px;font-size:var(--plyr-font-size-small, 13px);font-weight:400;font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:10px;margin-bottom:calc(var(--plyr-control-spacing, 10px)/2*2);opacity:0;padding:5px 7.5px;padding:calc(var(--plyr-control-spacing, 10px)/2) calc(var(--plyr-control-spacing, 10px)/2*1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform .2s ease .1s,opacity .2s ease .1s;white-space:nowrap;z-index:2}.plyr__tooltip:before{border-left:4px solid rgba(0,0,0,0);border-left:var(--plyr-tooltip-arrow-size, 4px) solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);border-right:var(--plyr-tooltip-arrow-size, 4px) solid rgba(0,0,0,0);border-top:4px solid rgba(255,255,255,.9019607843);border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9019607843));bottom:-4px;bottom:calc(var(--plyr-tooltip-arrow-size, 4px)*-1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:focus-visible .plyr__tooltip,.plyr .plyr__control:hover .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translateY(10px) scale(0.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip:before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip:before{left:16px;left:calc(var(--plyr-control-icon-size, 18px)/2 + var(--plyr-control-spacing, 10px)*.7)}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translateY(10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip:before{left:auto;right:16px;right:calc(var(--plyr-control-icon-size, 18px)/2 + var(--plyr-control-spacing, 10px)*.7);transform:translateX(50%)}.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:focus-visible .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child:focus-visible .plyr__tooltip,.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:focus-visible .plyr__tooltip,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip{transform:translate(0) scale(1)}.plyr__progress{left:6.5px;left:calc(var(--plyr-range-thumb-height, 13px)*.5);margin-right:13px;margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:-6.5px;margin-left:calc(var(--plyr-range-thumb-height, 13px)*-0.5);margin-right:-6.5px;margin-right:calc(var(--plyr-range-thumb-height, 13px)*-0.5);width:calc(100% + 13px);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{left:0;max-width:120px;overflow-wrap:break-word}.plyr__progress__buffer{-webkit-appearance:none;background:rgba(0,0,0,0);border:0;border-radius:100px;height:5px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:-2.5px;margin-top:calc(var(--plyr-range-track-height, 5px)/2*-1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:rgba(0,0,0,0)}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:5px;min-width:var(--plyr-range-track-height, 5px);-webkit-transition:width .2s ease;transition:width .2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:5px;min-width:var(--plyr-range-track-height, 5px);-moz-transition:width .2s ease;transition:width .2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;-ms-transition:width .2s ease;transition:width .2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, rgba(35, 40, 47, 0.6) 25%, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 50%, rgba(35, 40, 47, 0.6) 0, rgba(35, 40, 47, 0.6) 75%, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0));background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0));background-repeat:repeat-x;background-size:25px 25px;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:rgba(0,0,0,0)}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:rgba(255,255,255,.2509803922);background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.2509803922))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:rgba(193,200,209,.6);background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__progress__marker{background-color:#fff;background-color:var(--plyr-progress-marker-background, #fff);border-radius:1px;height:5px;height:var(--plyr-range-track-height, 5px);position:absolute;top:50%;transform:translate(-50%, -50%);width:3px;width:var(--plyr-progress-marker-width, 3px);z-index:3}.plyr__volume{align-items:center;display:flex;position:relative}.plyr__volume input[type=range]{margin-left:5px;margin-left:calc(var(--plyr-control-spacing, 10px)/2);margin-right:5px;margin-right:calc(var(--plyr-control-spacing, 10px)/2);max-width:90px;min-width:60px;position:relative;z-index:2}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:#fff;background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:#4a5464;color:var(--plyr-audio-control-color, #4a5464);padding:10px;padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control:focus-visible,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:#00b2ff;background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));color:#fff;color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:rgba(193,200,209,.6);background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:rgba(193,200,209,.6);background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:rgba(193,200,209,.6);background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px rgba(35,40,47,.1019607843);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1019607843))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px rgba(35,40,47,.1019607843);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1019607843))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px rgba(35,40,47,.1019607843);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1019607843))}.plyr--audio .plyr__progress__buffer{color:rgba(193,200,209,.6);color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:#000;background:var(--plyr-video-background, var(--plyr-video-background, #000));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:#000;background:var(--plyr-video-background, var(--plyr-video-background, #000));height:100%;margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7490196078));background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7490196078)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:#fff;color:var(--plyr-video-control-color, #fff);left:0;padding:5px;padding:calc(var(--plyr-control-spacing, 10px)/2);padding-top:20px;padding-top:calc(var(--plyr-control-spacing, 10px)*2);position:absolute;right:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out;z-index:3}@media(min-width: 480px){.plyr--video .plyr__controls{padding:10px;padding:var(--plyr-control-spacing, 10px);padding-top:35px;padding-top:calc(var(--plyr-control-spacing, 10px)*3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control:focus-visible,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:#00b2ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:#00b2ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b2ff)));border:0;border-radius:100%;color:#fff;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:.9;padding:15px;padding:calc(var(--plyr-control-spacing, 10px)*1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:focus,.plyr__control--overlaid:hover{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:rgba(255,255,255,.2509803922);background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.2509803922)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:rgba(255,255,255,.2509803922);background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.2509803922)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:rgba(255,255,255,.2509803922);background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.2509803922)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px rgba(255,255,255,.5019607843);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5019607843))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px rgba(255,255,255,.5019607843);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5019607843))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px rgba(35,40,47,.1490196078),0 0 0 1px rgba(35,40,47,.2),0 0 0 3px rgba(255,255,255,.5019607843);box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.1490196078), 0 0 0 1px rgba(35, 40, 47, 0.2)),0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5019607843))}.plyr--video .plyr__progress__buffer{color:rgba(255,255,255,.2509803922);color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.2509803922))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media(min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;bottom:0;height:100%;left:0;margin:0;position:fixed;right:0;top:0;width:100%;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media(min-width: 1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:21px;font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads:after{background:#23282f;border-radius:2px;bottom:10px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:10px;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads:empty:after{display:none}.plyr__cues{background:currentColor;display:block;height:5px;height:var(--plyr-range-track-height, 5px);left:0;opacity:.8;position:absolute;top:50%;transform:translateY(-50%);width:3px;z-index:3}.plyr__preview-thumb{background-color:rgba(255,255,255,.9019607843);background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9019607843));border-radius:5px;border-radius:var(--plyr-tooltip-radius, 5px);bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.1490196078);box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.1490196078));margin-bottom:10px;margin-bottom:calc(var(--plyr-control-spacing, 10px)/2*2);opacity:0;padding:3px;pointer-events:none;position:absolute;transform:translateY(10px) scale(0.8);transform-origin:50% 100%;transition:transform .2s ease .1s,opacity .2s ease .1s;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0) scale(1)}.plyr__preview-thumb:before{border-left:4px solid rgba(0,0,0,0);border-left:var(--plyr-tooltip-arrow-size, 4px) solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);border-right:var(--plyr-tooltip-arrow-size, 4px) solid rgba(0,0,0,0);border-top:4px solid rgba(255,255,255,.9019607843);border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9019607843));bottom:-4px;bottom:calc(var(--plyr-tooltip-arrow-size, 4px)*-1);content:"";height:0;left:calc(50% + var(--preview-arrow-offset));position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:4px;border-radius:calc(var(--plyr-tooltip-radius, 5px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img,.plyr__preview-thumb__image-container:after{height:100%;left:0;position:absolute;top:0;width:100%}.plyr__preview-thumb__image-container:after{border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1490196078);content:"";pointer-events:none}.plyr__preview-thumb__image-container img{max-height:none;max-width:none}.plyr__preview-thumb__time-container{background:linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7490196078));background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7490196078)));border-bottom-left-radius:4px;border-bottom-left-radius:calc(var(--plyr-tooltip-radius, 5px) - 1px);border-bottom-right-radius:4px;border-bottom-right-radius:calc(var(--plyr-tooltip-radius, 5px) - 1px);bottom:0;left:0;line-height:1.1;padding:20px 6px 6px;position:absolute;right:0;z-index:3}.plyr__preview-thumb__time-container span{color:#fff;font-size:13px;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity .3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none !important}.plyr__sr-only{clip:rect(1px, 1px, 1px, 1px);border:0 !important;height:1px !important;overflow:hidden;padding:0 !important;position:absolute !important;width:1px !important}.plyr [hidden]{display:none !important}',""]);const s=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},1586:(e,t,n)=>{var r=n(1721);e.exports=function(e){var t={},n=new r(e);t.trackNumber=n.nextUIntV(),t.timecode=n.nextInt16BE();var i=n.nextUInt8();t.invisible=!!(8&i),t.keyframe=!!(128&i),t.discardable=!!(1&i);var o=(6&i)>>1;return t.frames=function(e,t){if(!t)return[e.nextBuffer()];var n,r,i=[],o=e.nextUInt8()+1;if(2===t){if(e.length%o!=0)throw new Error("Fixed-Size Lacing Error");for(r=e.length/o,n=0;n<o;n++)i.push(e.nextBuffer(r));return i}var a=[];if(1===t)for(n=0;n<o-1;n++){var s;r=0;do{r+=s=e.nextUInt8()}while(255===s);a.push(r)}else if(3===t)for(r=e.nextUIntV(),a.push(r),n=1;n<o-1;n++)r+=e.nextIntV(),a.push(r);for(n=0;n<o-1;n++)i.push(e.nextBuffer(a[n]));return i.push(e.nextBuffer()),i}(n,o),t}},1721:(e,t,n)=>{var r=n(8826);function i(e){this.buffer=e,this.offset=0}i.prototype.nextInt16BE=function(){var e=this.buffer.readInt16BE(this.offset);return this.offset+=2,e},i.prototype.nextUInt8=function(){var e=this.buffer.readUInt8(this.offset);return this.offset+=1,e},i.prototype.nextUIntV=function(){var e=r(this.buffer,this.offset);return this.offset+=e.length,e.value},i.prototype.nextIntV=function(){var e=r(this.buffer,this.offset,!0);return this.offset+=e.length,e.value},i.prototype.nextBuffer=function(e){var t=e?this.buffer.slice(this.offset,this.offset+e):this.buffer.slice(this.offset);return this.offset+=e||this.length,t},Object.defineProperty(i.prototype,"length",{get:function(){return this.buffer.length-this.offset}}),e.exports=i},8826:e=>{e.exports=function(e,t,n){t=t||0;for(var r=1;r<=8&&!(e[t]>=Math.pow(2,8-r));r++);if(r>8)throw new Error("Unrepresentable length: "+r+" "+e.toString("hex",t,t+r));if(t+r>e.length)return null;var i,o=e[t]&(1<<8-r)-1;for(i=1;i<r;i++){if(7===i&&o>=Math.pow(2,45)&&e[t+7]>0)return{length:r,value:-1};o*=Math.pow(2,8),o+=e[t+i]}return n&&(o-=Math.pow(2,7*r-1)-1),{length:r,value:o}}},7187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,a,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6027:(e,t,n)=>{var r,i;void 0===(i="function"==typeof(r=function(){var e={172351395:{name:"EBML",type:"Container"},646:{name:"EBMLVersion",type:"Uint"},759:{name:"EBMLReadVersion",type:"Uint"},754:{name:"EBMLMaxIDLength",type:"Uint"},755:{name:"EBMLMaxSizeLength",type:"Uint"},642:{name:"DocType",type:"String"},647:{name:"DocTypeVersion",type:"Uint"},645:{name:"DocTypeReadVersion",type:"Uint"},108:{name:"Void",type:"Binary"},63:{name:"CRC-32",type:"Binary"},190023271:{name:"SignatureSlot",type:"Container"},16010:{name:"SignatureAlgo",type:"Uint"},16026:{name:"SignatureHash",type:"Uint"},16037:{name:"SignaturePublicKey",type:"Binary"},16053:{name:"Signature",type:"Binary"},15963:{name:"SignatureElements",type:"Container"},15995:{name:"SignatureElementList",type:"Container"},9522:{name:"SignedElement",type:"Binary"},139690087:{name:"Segment",type:"Container"},21863284:{name:"SeekHead",type:"Container"},3515:{name:"Seek",type:"Container"},5035:{name:"SeekID",type:"Binary"},5036:{name:"SeekPosition",type:"Uint"},88713574:{name:"Info",type:"Container"},13220:{name:"SegmentUID",type:"Binary"},13188:{name:"SegmentFilename",type:"String"},1882403:{name:"PrevUID",type:"Binary"},1868715:{name:"PrevFilename",type:"String"},2013475:{name:"NextUID",type:"Binary"},1999803:{name:"NextFilename",type:"String"},1092:{name:"SegmentFamily",type:"Binary"},10532:{name:"ChapterTranslate",type:"Container"},10748:{name:"ChapterTranslateEditionUID",type:"Uint"},10687:{name:"ChapterTranslateCodec",type:"Uint"},10661:{name:"ChapterTranslateID",type:"Binary"},710577:{name:"TimecodeScale",type:"Uint"},1161:{name:"Duration",type:"Float"},1121:{name:"DateUTC",type:"Date"},15273:{name:"Title",type:"String"},3456:{name:"MuxingApp",type:"String"},5953:{name:"WritingApp",type:"String"},103:{name:"Timecode",type:"Uint"},6228:{name:"SilentTracks",type:"Container"},6359:{name:"SilentTrackNumber",type:"Uint"},39:{name:"Position",type:"Uint"},43:{name:"PrevSize",type:"Uint"},35:{name:"SimpleBlock",type:"Binary"},32:{name:"BlockGroup",type:"Container"},33:{name:"Block",type:"Binary"},34:{name:"BlockVirtual",type:"Binary"},13729:{name:"BlockAdditions",type:"Container"},38:{name:"BlockMore",type:"Container"},110:{name:"BlockAddID",type:"Uint"},37:{name:"BlockAdditional",type:"Binary"},27:{name:"BlockDuration",type:"Uint"},122:{name:"ReferencePriority",type:"Uint"},123:{name:"ReferenceBlock",type:"Int"},125:{name:"ReferenceVirtual",type:"Int"},36:{name:"CodecState",type:"Binary"},13730:{name:"DiscardPadding",type:"Int"},14:{name:"Slices",type:"Container"},104:{name:"TimeSlice",type:"Container"},76:{name:"LaceNumber",type:"Uint"},77:{name:"FrameNumber",type:"Uint"},75:{name:"BlockAdditionID",type:"Uint"},78:{name:"Delay",type:"Uint"},79:{name:"SliceDuration",type:"Uint"},72:{name:"ReferenceFrame",type:"Container"},73:{name:"ReferenceOffset",type:"Uint"},74:{name:"ReferenceTimeCode",type:"Uint"},47:{name:"EncryptedBlock",type:"Binary"},106212971:{name:"Tracks",type:"Container"},46:{name:"TrackEntry",type:"Container"},87:{name:"TrackNumber",type:"Uint"},13253:{name:"TrackUID",type:"Uint"},3:{name:"TrackType",type:"Uint"},57:{name:"FlagEnabled",type:"Uint"},8:{name:"FlagDefault",type:"Uint"},5546:{name:"FlagForced",type:"Uint"},28:{name:"FlagLacing",type:"Uint"},11751:{name:"MinCache",type:"Uint"},11768:{name:"MaxCache",type:"Uint"},254851:{name:"DefaultDuration",type:"Uint"},216698:{name:"DefaultDecodedFieldDuration",type:"Uint"},209231:{name:"TrackTimecodeScale",type:"Float"},4991:{name:"TrackOffset",type:"Int"},5614:{name:"MaxBlockAdditionID",type:"Uint"},4974:{name:"Name",type:"String"},177564:{name:"Language",type:"String"},6:{name:"CodecID",type:"String"},9122:{name:"CodecPrivate",type:"Binary"},362120:{name:"CodecName",type:"String"},13382:{name:"AttachmentLink",type:"Uint"},1742487:{name:"CodecSettings",type:"String"},1785920:{name:"CodecInfoURL",type:"String"},438848:{name:"CodecDownloadURL",type:"String"},42:{name:"CodecDecodeAll",type:"Uint"},12203:{name:"TrackOverlay",type:"Uint"},5802:{name:"CodecDelay",type:"Uint"},5819:{name:"SeekPreRoll",type:"Uint"},9764:{name:"TrackTranslate",type:"Container"},9980:{name:"TrackTranslateEditionUID",type:"Uint"},9919:{name:"TrackTranslateCodec",type:"Uint"},9893:{name:"TrackTranslateTrackID",type:"Binary"},96:{name:"Video",type:"Container"},26:{name:"FlagInterlaced",type:"Uint"},5048:{name:"StereoMode",type:"Uint"},5056:{name:"AlphaMode",type:"Uint"},5049:{name:"OldStereoMode",type:"Uint"},48:{name:"PixelWidth",type:"Uint"},58:{name:"PixelHeight",type:"Uint"},5290:{name:"PixelCropBottom",type:"Uint"},5307:{name:"PixelCropTop",type:"Uint"},5324:{name:"PixelCropLeft",type:"Uint"},5341:{name:"PixelCropRight",type:"Uint"},5296:{name:"DisplayWidth",type:"Uint"},5306:{name:"DisplayHeight",type:"Uint"},5298:{name:"DisplayUnit",type:"Uint"},5299:{name:"AspectRatioType",type:"Uint"},963876:{name:"ColourSpace",type:"Binary"},1029411:{name:"GammaValue",type:"Float"},230371:{name:"FrameRate",type:"Float"},97:{name:"Audio",type:"Container"},53:{name:"SamplingFrequency",type:"Float"},14517:{name:"OutputSamplingFrequency",type:"Float"},31:{name:"Channels",type:"Uint"},15739:{name:"ChannelPositions",type:"Binary"},8804:{name:"BitDepth",type:"Uint"},98:{name:"TrackOperation",type:"Container"},99:{name:"TrackCombinePlanes",type:"Container"},100:{name:"TrackPlane",type:"Container"},101:{name:"TrackPlaneUID",type:"Uint"},102:{name:"TrackPlaneType",type:"Uint"},105:{name:"TrackJoinBlocks",type:"Container"},109:{name:"TrackJoinUID",type:"Uint"},64:{name:"TrickTrackUID",type:"Uint"},65:{name:"TrickTrackSegmentUID",type:"Binary"},70:{name:"TrickTrackFlag",type:"Uint"},71:{name:"TrickMasterTrackUID",type:"Uint"},68:{name:"TrickMasterTrackSegmentUID",type:"Binary"},11648:{name:"ContentEncodings",type:"Container"},8768:{name:"ContentEncoding",type:"Container"},4145:{name:"ContentEncodingOrder",type:"Uint"},4146:{name:"ContentEncodingScope",type:"Uint"},4147:{name:"ContentEncodingType",type:"Uint"},4148:{name:"ContentCompression",type:"Container"},596:{name:"ContentCompAlgo",type:"Uint"},597:{name:"ContentCompSettings",type:"Binary"},4149:{name:"ContentEncryption",type:"Container"},2017:{name:"ContentEncAlgo",type:"Uint"},2018:{name:"ContentEncKeyID",type:"Binary"},2019:{name:"ContentSignature",type:"Binary"},2020:{name:"ContentSigKeyID",type:"Binary"},2021:{name:"ContentSigAlgo",type:"Uint"},2022:{name:"ContentSigHashAlgo",type:"Uint"},206814059:{name:"Cues",type:"Container"},59:{name:"CuePoint",type:"Container"},51:{name:"CueTime",type:"Uint"},55:{name:"CueTrackPositions",type:"Container"},119:{name:"CueTrack",type:"Uint"},113:{name:"CueClusterPosition",type:"Uint"},112:{name:"CueRelativePosition",type:"Uint"},50:{name:"CueDuration",type:"Uint"},4984:{name:"CueBlockNumber",type:"Uint"},106:{name:"CueCodecState",type:"Uint"},91:{name:"CueReference",type:"Container"},22:{name:"CueRefTime",type:"Uint"},23:{name:"CueRefCluster",type:"Uint"},4959:{name:"CueRefNumber",type:"Uint"},107:{name:"CueRefCodecState",type:"Uint"},155296873:{name:"Attachments",type:"Container"},8615:{name:"AttachedFile",type:"Container"},1662:{name:"FileDescription",type:"String"},1646:{name:"FileName",type:"String"},1632:{name:"FileMimeType",type:"String"},1628:{name:"FileData",type:"Binary"},1710:{name:"FileUID",type:"Uint"},1653:{name:"FileReferral",type:"Binary"},1633:{name:"FileUsedStartTime",type:"Uint"},1634:{name:"FileUsedEndTime",type:"Uint"},4433776:{name:"Chapters",type:"Container"},1465:{name:"EditionEntry",type:"Container"},1468:{name:"EditionUID",type:"Uint"},1469:{name:"EditionFlagHidden",type:"Uint"},1499:{name:"EditionFlagDefault",type:"Uint"},1501:{name:"EditionFlagOrdered",type:"Uint"},54:{name:"ChapterAtom",type:"Container"},13252:{name:"ChapterUID",type:"Uint"},5716:{name:"ChapterStringUID",type:"String"},17:{name:"ChapterTimeStart",type:"Uint"},18:{name:"ChapterTimeEnd",type:"Uint"},24:{name:"ChapterFlagHidden",type:"Uint"},1432:{name:"ChapterFlagEnabled",type:"Uint"},11879:{name:"ChapterSegmentUID",type:"Binary"},11964:{name:"ChapterSegmentEditionUID",type:"Uint"},9155:{name:"ChapterPhysicalEquiv",type:"Uint"},15:{name:"ChapterTrack",type:"Container"},9:{name:"ChapterTrackNumber",type:"Uint"},0:{name:"ChapterDisplay",type:"Container"},5:{name:"ChapString",type:"String"},892:{name:"ChapLanguage",type:"String"},894:{name:"ChapCountry",type:"String"},10564:{name:"ChapProcess",type:"Container"},10581:{name:"ChapProcessCodecID",type:"Uint"},1293:{name:"ChapProcessPrivate",type:"Binary"},10513:{name:"ChapProcessCommand",type:"Container"},10530:{name:"ChapProcessTime",type:"Uint"},10547:{name:"ChapProcessData",type:"Binary"},39109479:{name:"Tags",type:"Container"},13171:{name:"Tag",type:"Container"},9152:{name:"Targets",type:"Container"},10442:{name:"TargetTypeValue",type:"Uint"},9162:{name:"TargetType",type:"String"},9157:{name:"TagTrackUID",type:"Uint"},9161:{name:"TagEditionUID",type:"Uint"},9156:{name:"TagChapterUID",type:"Uint"},9158:{name:"TagAttachmentUID",type:"Uint"},10184:{name:"SimpleTag",type:"Container"},1443:{name:"TagName",type:"String"},1146:{name:"TagLanguage",type:"String"},1156:{name:"TagDefault",type:"Uint"},1159:{name:"TagString",type:"String"},1157:{name:"TagBinary",type:"Binary"}};function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function n(e,t){this.name=e||"Unknown",this.type=t||"Unknown"}function r(e,t){n.call(this,e,t||"Uint")}function i(e){return e.length%2==1?"0"+e:e}function o(e,t){n.call(this,e,t||"Float")}function a(e,t){n.call(this,e,t||"Container")}function s(e){a.call(this,"File","File"),this.setSource(e)}function l(e,t,n,r){if("object"==typeof n&&(r=n,n=void 0),!n)return new Promise((function(n){l(e,t,n,r)}));try{var i=new FileReader;i.onloadend=function(){try{var o=new s(new Uint8Array(i.result));o.fixDuration(t,r)&&(e=o.toBlob(e.type))}catch(e){}n(e)},i.readAsArrayBuffer(e)}catch(t){n(e)}}return n.prototype.updateBySource=function(){},n.prototype.setSource=function(e){this.source=e,this.updateBySource()},n.prototype.updateByData=function(){},n.prototype.setData=function(e){this.data=e,this.updateByData()},t(r,n),r.prototype.updateBySource=function(){this.data="";for(var e=0;e<this.source.length;e++){var t=this.source[e].toString(16);this.data+=i(t)}},r.prototype.updateByData=function(){var e=this.data.length/2;this.source=new Uint8Array(e);for(var t=0;t<e;t++){var n=this.data.substr(2*t,2);this.source[t]=parseInt(n,16)}},r.prototype.getValue=function(){return parseInt(this.data,16)},r.prototype.setValue=function(e){this.setData(i(e.toString(16)))},t(o,n),o.prototype.getFloatArrayType=function(){return this.source&&4===this.source.length?Float32Array:Float64Array},o.prototype.updateBySource=function(){var e=this.source.reverse(),t=new(this.getFloatArrayType())(e.buffer);this.data=t[0]},o.prototype.updateByData=function(){var e=new(this.getFloatArrayType())([this.data]),t=new Uint8Array(e.buffer);this.source=t.reverse()},o.prototype.getValue=function(){return this.data},o.prototype.setValue=function(e){this.setData(e)},t(a,n),a.prototype.readByte=function(){return this.source[this.offset++]},a.prototype.readUint=function(){for(var e=this.readByte(),t=8-e.toString(2).length,n=e-(1<<7-t),r=0;r<t;r++)n*=256,n+=this.readByte();return n},a.prototype.updateBySource=function(){for(this.data=[],this.offset=0;this.offset<this.source.length;this.offset=s){var t=this.readUint(),i=this.readUint(),s=Math.min(this.offset+i,this.source.length),l=this.source.slice(this.offset,s),c=e[t]||{name:"Unknown",type:"Unknown"},u=n;switch(c.type){case"Container":u=a;break;case"Uint":u=r;break;case"Float":u=o}var d=new u(c.name,c.type);d.setSource(l),this.data.push({id:t,idHex:t.toString(16),data:d})}},a.prototype.writeUint=function(e,t){for(var n=1,r=128;e>=r&&n<8;n++,r*=128);if(!t)for(var i=r+e,o=n-1;o>=0;o--){var a=i%256;this.source[this.offset+o]=a,i=(i-a)/256}this.offset+=n},a.prototype.writeSections=function(e){this.offset=0;for(var t=0;t<this.data.length;t++){var n=this.data[t],r=n.data.source,i=r.length;this.writeUint(n.id,e),this.writeUint(i,e),e||this.source.set(r,this.offset),this.offset+=i}return this.offset},a.prototype.updateByData=function(){var e=this.writeSections("draft");this.source=new Uint8Array(e),this.writeSections()},a.prototype.getSectionById=function(e){for(var t=0;t<this.data.length;t++){var n=this.data[t];if(n.id===e)return n.data}return null},t(s,a),s.prototype.fixDuration=function(e,t){var n=t&&t.logger;void 0===n?n=function(e){console.log(e)}:n||(n=function(){});var r=this.getSectionById(139690087);if(!r)return n("[fix-webm-duration] Segment section is missing"),!1;var i=r.getSectionById(88713574);if(!i)return n("[fix-webm-duration] Info section is missing"),!1;var a=i.getSectionById(710577);if(!a)return n("[fix-webm-duration] TimecodeScale section is missing"),!1;var s=i.getSectionById(1161);if(s){if(!(s.getValue()<=0))return n("[fix-webm-duration] Duration section is present"),!1;n("[fix-webm-duration] Duration section is present, but the value is empty"),s.setValue(e)}else n("[fix-webm-duration] Duration section is missing"),(s=new o("Duration","Float")).setValue(e),i.data.push({id:1161,data:s});return a.setValue(1e6),i.updateByData(),r.updateByData(),this.updateByData(),!0},s.prototype.toBlob=function(e){return new Blob([this.source.buffer],{type:e||"video/webm"})},l.default=l,l})?r.call(t,n,t,e):r)||(e.exports=i)},645:(e,t)=>{
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*m}},1166:function(e,t){!function(e){var t,n="undefined",r=n!==typeof Buffer&&Buffer,i=n!==typeof Uint8Array&&Uint8Array,o=n!==typeof ArrayBuffer&&ArrayBuffer,a=[0,0,0,0,0,0,0,0],s=Array.isArray||function(e){return!!e&&"[object Array]"==Object.prototype.toString.call(e)},l=4294967296;function c(s,c,w){var x=c?0:4,_=c?4:0,k=c?0:3,E=c?1:2,S=c?2:1,C=c?3:0,T=c?g:v,A=c?y:b,O=R.prototype,P="is"+s,L="_"+P;return O.buffer=void 0,O.offset=0,O[L]=!0,O.toNumber=M,O.toString=function(e){var t=this.buffer,n=this.offset,r=I(t,n+x),i=I(t,n+_),o="",a=!w&&2147483648&r;a&&(r=~r,i=l-i);e=e||10;for(;;){var s=r%e*l+i;if(r=Math.floor(r/e),i=Math.floor(s/e),o=(s%e).toString(e)+o,!r&&!i)break}a&&(o="-"+o);return o},O.toJSON=M,O.toArray=u,r&&(O.toBuffer=d),i&&(O.toArrayBuffer=f),R[P]=function(e){return!(!e||!e[L])},e[s]=R,R;function R(e,s,c,u){return this instanceof R?function(e,s,c,u,d){i&&o&&(s instanceof o&&(s=new i(s)),u instanceof o&&(u=new i(u)));if(!(s||c||u||t))return void(e.buffer=m(a,0));if(!p(s,c)){var f=t||Array;d=c,u=s,c=0,s=t===r?r.alloc(8):new f(8)}if(e.buffer=s,e.offset=c|=0,n===typeof u)return;"string"==typeof u?function(e,t,n,r){var i=0,o=n.length,a=0,s=0;"-"===n[0]&&i++;var c=i;for(;i<o;){var u=parseInt(n[i++],r);if(!(u>=0))break;s=s*r+u,a=a*r+Math.floor(s/l),s%=l}c&&(a=~a,s?s=l-s:a++);N(e,t+x,a),N(e,t+_,s)}(s,c,u,d||10):p(u,d)?h(s,c,u,d):"number"==typeof d?(N(s,c+x,u),N(s,c+_,d)):u>0?T(s,c,u):u<0?A(s,c,u):h(s,c,a,0)}(this,e,s,c,u):new R(e,s,c,u)}function M(){var e=this.buffer,t=this.offset,n=I(e,t+x),r=I(e,t+_);return w||(n|=0),n?n*l+r:r}function N(e,t,n){e[t+C]=255&n,n>>=8,e[t+S]=255&n,n>>=8,e[t+E]=255&n,n>>=8,e[t+k]=255&n}function I(e,t){return 16777216*e[t+k]+(e[t+E]<<16)+(e[t+S]<<8)+e[t+C]}}function u(e){var n=this.buffer,r=this.offset;return t=null,!1!==e&&s(n)?8===n.length?n:n.slice(r,r+8):m(n,r)}function d(e){var n=this.buffer,i=this.offset;return t=r,!1!==e&&r.isBuffer(n)?8===n.length?n:n.slice(i,i+8):r.from(f.call(this,e))}function f(e){var n=this.buffer,r=this.offset,a=n.buffer;if(t=i,!1!==e&&!n.offset&&a instanceof o)return 8===a.byteLength?a:a.slice(r,r+8);var s=new i(8);return h(s,0,n,r),s.buffer}function p(e,t){var n=e&&e.length;return t|=0,n&&t+8<=n&&"string"!=typeof e[t]}function h(e,t,n,r){t|=0,r|=0;for(var i=0;i<8;i++)e[t++]=255&n[r++]}function m(e,t){return Array.prototype.slice.call(e,t,t+8)}function g(e,t,n){for(var r=t+8;r>t;)e[--r]=255&n,n/=256}function y(e,t,n){var r=t+8;for(n++;r>t;)e[--r]=255&-n^255,n/=256}function v(e,t,n){for(var r=t+8;t<r;)e[t++]=255&n,n/=256}function b(e,t,n){var r=t+8;for(n++;t<r;)e[t++]=255&-n^255,n/=256}c("Uint64BE",!0,!0),c("Int64BE",!0,!1),c("Uint64LE",!1,!0),c("Int64LE",!1,!1)}("string"!=typeof t.nodeName?t:this||{})},5733:(e,t,n)=>{
|
||
/*!
|
||
|
||
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
||
<http://stuartk.com/jszip>
|
||
|
||
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
||
|
||
JSZip uses the library pako released under the MIT license :
|
||
https://github.com/nodeca/pako/blob/main/LICENSE
|
||
*/
|
||
e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,a,s,l,c,u=[],d=0,f=e.length,p=f,h="string"!==r.getTypeOf(e);d<e.length;)p=f-d,i=h?(t=e[d++],n=d<f?e[d++]:0,d<f?e[d++]:0):(t=e.charCodeAt(d++),n=d<f?e.charCodeAt(d++):0,d<f?e.charCodeAt(d++):0),a=t>>2,s=(3&t)<<4|n>>4,l=1<p?(15&n)<<2|i>>6:64,c=2<p?63&i:64,u.push(o.charAt(a)+o.charAt(s)+o.charAt(l)+o.charAt(c));return u.join("")},n.decode=function(e){var t,n,r,a,s,l,c=0,u=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var f,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&p--,e.charAt(e.length-2)===o.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=i.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=o.indexOf(e.charAt(c++))<<2|(a=o.indexOf(e.charAt(c++)))>>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(c++)))>>2,r=(3&s)<<6|(l=o.indexOf(e.charAt(c++))),f[u++]=t,64!==s&&(f[u++]=n),64!==l&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=r?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,a,u){var d,f,p=e.file,h=e.compression,m=u!==s.utf8encode,g=o.transformTo("string",u(p.name)),y=o.transformTo("string",s.utf8encode(p.name)),v=p.comment,b=o.transformTo("string",u(v)),w=o.transformTo("string",s.utf8encode(v)),x=y.length!==p.name.length,_=w.length!==v.length,k="",E="",S="",C=p.dir,T=p.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),m||!x&&!_||(O|=2048);var P=0,L=0;C&&(P|=16),"UNIX"===a?(L=798,P|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,C)):(L=20,P|=function(e){return 63&(e||0)}(p.dosPermissions)),d=T.getUTCHours(),d<<=6,d|=T.getUTCMinutes(),d<<=5,d|=T.getUTCSeconds()/2,f=T.getUTCFullYear()-1980,f<<=4,f|=T.getUTCMonth()+1,f<<=5,f|=T.getUTCDate(),x&&(E=r(1,1)+r(l(g),4)+y,k+="up"+r(E.length,2)+E),_&&(S=r(1,1)+r(l(b),4)+w,k+="uc"+r(S.length,2)+S);var R="";return R+="\n\0",R+=r(O,2),R+=h.magic,R+=r(d,2),R+=r(f,2),R+=r(A.crc32,4),R+=r(A.compressedSize,4),R+=r(A.uncompressedSize,4),R+=r(g.length,2),R+=r(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+g+k,dirRecord:c.CENTRAL_FILE_HEADER+r(L,2)+R+r(b.length,2)+"\0\0\0\0"+r(P,4)+r(i,4)+g+k+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,a),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,a){var s=o.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(s.length,2)+s}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},u.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},u.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var o=new i(t.streamFiles,n,t.platform,t.encodeFileName),a=0;try{e.forEach((function(e,n){a++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},l=n.dir,c=n.date;n._compressWorker(i,s).withStreamInfo("file",{name:e,dir:l,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)})),o.entriesCount=a}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./external"),o=e("./utf8"),a=e("./zipEntries"),s=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new i.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new a(t);return n.load(e),n})).then((function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var o=0;o<r.length;o++)n.push(c(r[o]));return i.Promise.all(n)})).then((function(e){for(var i=e.shift(),o=i.files,a=0;a<o.length;a++){var s=o[a],l=s.fileNameStr,c=r.resolve(s.fileNameStr);n.file(c,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(n.file(c).unsafeOriginalName=l)}return i.zipComment.length&&(n.comment=i.zipComment),n}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../stream/GenericWorker");function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(o,i),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=o.getTypeOf(t),s=o.extend(n||{},l);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=m(e)),s.createFolders&&(r=h(e))&&g.call(this,r,!0);var d="string"===i&&!1===s.binary&&!1===s.base64;n&&void 0!==n.binary||(s.binary=!d),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var y=null;y=t instanceof c||t instanceof a?t:f.isNode&&f.isStream(t)?new p(e,t):o.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var v=new u(e,y,s);this.files[e]=v}var i=e("./utf8"),o=e("./utils"),a=e("./stream/GenericWorker"),s=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),u=e("./zipObject"),d=e("./generate"),f=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),h=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:l.createFolders,e=m(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,r.call(this,e,t,n),this;if(y(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(y(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");o.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=d.generateWorker(this,n,r)}catch(e){(t=new a("error")).error(e)}return new s(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&i===o[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){"use strict";var r=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),s=e("../support"),l=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function u(e,t){return new l.Promise((function(n,i){var o=[],s=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(l,function(e,t){var n,r=0,i=null,o=0;for(n=0;n<t.length;n++)o+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,o),c);n(e)}catch(e){i(e)}o=[]})).resume()}))}function d(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,r.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return u(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){r.delay(t,arguments,n)})),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=0===i.getBlob("application/zip").size}catch(e){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(e){n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),a=e("./stream/GenericWorker"),s=new Array(256),l=0;l<256;l++)s[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function u(){a.call(this,"utf-8 encode")}s[254]=s[254]=1,n.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(l):new Array(l),o=a=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:(n<2048?t[a++]=192|n>>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,l=new Array(2*a);for(t=n=0;t<a;)if((i=e[t++])<128)l[n++]=i;else if(4<(o=s[i]))l[n++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<a;)i=i<<6|63&e[t++],o--;1<o?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(c,a),c.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(t),l=t;a!==t.length&&(i.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(u,a),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function s(e){return e}function l(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),n.newBlob=function(e,t){n.checkSupport("blob");try{return new Blob([e],{type:t})}catch(n){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(e,t,n){var r=[],i=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,o)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,o)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function u(e){var t=65536,r=n.getTypeOf(e),i=!0;if("uint8array"===r?i=c.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=c.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return c.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return c.stringifyByChar(e)}function d(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=u;var f={};f.string={string:s,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,o.allocBuffer(e.length))}},f.array={string:u,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},f.arraybuffer={string:function(e){return u(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:u,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return o.newBufferFrom(e)}},f.nodebuffer={string:u,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:s},n.transformTo=function(e,t){if(t=t||"",!e)return t;n.checkSupport(e);var r=n.getTypeOf(t);return f[r][e](t)},n.resolve=function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++){var i=t[r];"."===i||""===i&&0!==r&&r!==t.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":r.nodebuffer&&o.isBuffer(e)?"nodebuffer":r.uint8array&&e instanceof Uint8Array?"uint8array":r.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){if(!r[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},n.delay=function(e,t,n){setImmediate((function(){e.apply(n||null,t||[])}))},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,o,s,c){return a.Promise.resolve(t).then((function(e){return r.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):e})).then((function(t){var u=n.getTypeOf(t);return u?("arraybuffer"===u?t=n.transformTo("uint8array",t):"string"===u&&(c?t=i.decode(t):o&&!0!==s&&(t=function(e){return l(e,r.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),a=e("./zipEntry"),s=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),a=e("./crc32"),s=e("./utf8"),l=e("./compressions"),c=e("./support");function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return 1!==t.readInt(1)||a(this.fileName)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return 1!==t.readInt(1)||a(this.fileComment)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),a=e("./utf8"),s=e("./compressedObject"),l=e("./stream/GenericWorker");r.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!r&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&r&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new i(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof l?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<c.length;d++)r.prototype[c[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){"use strict";var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(u),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){"use strict";var r=e("immediate");function i(){}var o={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r((function(){var r;try{r=t(n)}catch(r){return o.reject(e,r)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var a=h((function(){t(i,r)}));"error"===a.status&&r(a.value)}function h(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===s?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=h(f,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){a[i]=e,++s!==n||r||(r=!0,o.resolve(c,a))}),(function(e){r||(r=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a,s=-1,l=new this(i);++s<n;)a=e[s],t.resolve(a).then((function(e){r||(r=!0,o.resolve(l,e))}),(function(e){r||(r=!0,o.reject(l,e))}));return l}},{immediate:36}],38:[function(e,t,n){"use strict";var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){"use strict";var r=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/messages"),s=e("./zlib/zstream"),l=Object.prototype.toString,c=0,u=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:u,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==c)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=r.deflateSetDictionary(this.strm,h))!==c)throw new Error(a[n]);this._dict_set=!0}}function h(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(e,t){var n,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),1!==(n=r.deflate(s,a))&&n!==c)return this.onEnd(n),!(this.ended=!0);0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c):2!==a||(this.onEnd(c),!(s.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=p,n.deflate=h,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";var r=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,l,c,d,f,p=this.strm,h=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(h),p.next_out=0,p.avail_out=h),(n=r.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===u.call(m)?new Uint8Array(m):m,n=r.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===g&&(n=a.Z_OK,g=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(p.output,p.next_out),c=p.next_out-l,d=o.buf2string(p.output,l),p.next_out=c,p.avail_out=h-c,c&&i.arraySet(p.output,p.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((0<p.avail_in||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(p.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=f,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(t=r=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],42:[function(e,t,n){"use strict";var r=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new r.Buf8(256),s=0;s<256;s++)a[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,i,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),o=a=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[a++]=n:(n<2048?t[a++]=192|n>>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,o,s=t||e.length,c=new Array(2*s);for(n=r=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if(4<(o=a[i]))c[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&n<s;)i=i<<6|63&e[n++],o--;1<o?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages"),c=0,u=4,d=0,f=-2,p=-1,h=4,m=2,g=8,y=9,v=286,b=30,w=19,x=2*v+1,_=15,k=3,E=258,S=E+k+1,C=42,T=113,A=1,O=2,P=3,L=4;function R(e,t){return e.msg=l[t],t}function M(e){return(e<<1)-(4<e?9:0)}function N(e){for(var t=e.length;0<=--t;)e[t]=0}function I(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,I(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function z(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function j(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-S?e.strstart-(e.w_size-S):0,c=e.window,u=e.w_mask,d=e.prev,f=e.strstart+E,p=c[o+a-1],h=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===h&&c[n+a-1]===p&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<f);if(r=E-(f-o),o=f-E,a<r){if(e.match_start=t,s<=(a=r))break;p=c[o+a-1],h=c[o+a]}}}while((t=d[t&u])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function U(e){var t,n,r,o,l,c,u,d,f,p,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-S)){for(i.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;r=e.head[--t],e.head[t]=h<=r?r-h:0,--n;);for(t=n=h;r=e.prev[--t],e.prev[t]=h<=r?r-h:0,--n;);o+=h}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,p=void 0,(f=o)<(p=c.avail_in)&&(p=f),n=0===p?0:(c.avail_in-=p,i.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,u,p,d):2===c.state.wrap&&(c.adler=s(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=k)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+k-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<k)););}while(e.lookahead<S&&0!==e.strm.avail_in)}function F(e,t){for(var n,r;;){if(e.lookahead<S){if(U(e),e.lookahead<S&&t===c)return A;if(0===e.lookahead)break}if(n=0,e.lookahead>=k&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-S&&(e.match_length=j(e,n)),e.match_length>=k)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-k),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=k){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(D(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<k-1?e.strstart:k-1,t===u?(D(e,!0),0===e.strm.avail_out?P:L):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?A:O}function W(e,t){for(var n,r,i;;){if(e.lookahead<S){if(U(e),e.lookahead<S&&t===c)return A;if(0===e.lookahead)break}if(n=0,e.lookahead>=k&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=k-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-S&&(e.match_length=j(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===k&&4096<e.strstart-e.match_start)&&(e.match_length=k-1)),e.prev_length>=k&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-k,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-k),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+k-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=k-1,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return A}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&D(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return A}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<k-1?e.strstart:k-1,t===u?(D(e,!0),0===e.strm.avail_out?P:L):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?A:O}function H(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function V(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*x),this.dyn_dtree=new i.Buf16(2*(2*b+1)),this.bl_tree=new i.Buf16(2*(2*w+1)),N(this.dyn_ltree),N(this.dyn_dtree),N(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(_+1),this.heap=new i.Buf16(2*v+1),N(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*v+1),N(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function q(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=m,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:T,e.adler=2===t.wrap?0:1,t.last_flush=c,o._tr_init(t),d):R(e,f)}function G(e){var t=q(e);return t===d&&function(e){e.window_size=2*e.w_size,N(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=k-1,e.match_available=0,e.ins_h=0}(e.state),t}function $(e,t,n,r,o,a){if(!e)return f;var s=1;if(t===p&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),o<1||y<o||n!==g||r<8||15<r||t<0||9<t||a<0||h<a)return R(e,f);8===r&&(r=9);var l=new V;return(e.state=l).strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+k-1)/k),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=n,G(e)}r=[new H(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(U(e),0===e.lookahead&&t===c)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,D(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-S&&(D(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===u?(D(e,!0),0===e.strm.avail_out?P:L):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),A)})),new H(4,4,8,4,F),new H(4,5,16,8,F),new H(4,6,32,32,F),new H(4,4,16,16,W),new H(8,16,32,32,W),new H(8,16,128,128,W),new H(8,32,128,256,W),new H(32,128,258,1024,W),new H(32,258,258,4096,W)],n.deflateInit=function(e,t){return $(e,t,g,15,8,0)},n.deflateInit2=$,n.deflateReset=G,n.deflateResetKeep=q,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?f:(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||5<t||t<0)return e?R(e,f):f;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==u)return R(e,0===e.avail_out?-5:f);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===C)if(2===i.wrap)e.adler=0,B(i,31),B(i,139),B(i,8),i.gzhead?(B(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),B(i,255&i.gzhead.time),B(i,i.gzhead.time>>8&255),B(i,i.gzhead.time>>16&255),B(i,i.gzhead.time>>24&255),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(B(i,255&i.gzhead.extra.length),B(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(B(i,0),B(i,0),B(i,0),B(i,0),B(i,0),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,3),i.status=T);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=T,z(i,p),0!==i.strstart&&(z(i,e.adler>>>16),z(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),I(e),a=i.pending,i.pending!==i.pending_buf_size));)B(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),I(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,B(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),I(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,B(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(e),i.pending+2<=i.pending_buf_size&&(B(i,255&e.adler),B(i,e.adler>>8&255),e.adler=0,i.status=T)):i.status=T),0!==i.pending){if(I(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&M(t)<=M(n)&&t!==u)return R(e,-5);if(666===i.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==c&&666!==i.status){var h=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(U(e),0===e.lookahead)){if(t===c)return A;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(D(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===u?(D(e,!0),0===e.strm.avail_out?P:L):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?A:O}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=E){if(U(e),e.lookahead<=E&&t===c)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=k&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+E;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=E-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=k?(n=o._tr_tally(e,1,e.match_length-k),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(D(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===u?(D(e,!0),0===e.strm.avail_out?P:L):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?A:O}(i,t):r[i.level].func(i,t);if(h!==P&&h!==L||(i.status=666),h===A||h===P)return 0===e.avail_out&&(i.last_flush=-1),d;if(h===O&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(N(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(e),0===e.avail_out))return i.last_flush=-1,d}return t!==u?d:i.wrap<=0?1:(2===i.wrap?(B(i,255&e.adler),B(i,e.adler>>8&255),B(i,e.adler>>16&255),B(i,e.adler>>24&255),B(i,255&e.total_in),B(i,e.total_in>>8&255),B(i,e.total_in>>16&255),B(i,e.total_in>>24&255)):(z(i,e.adler>>>16),z(i,65535&e.adler)),I(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?d:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==T&&666!==t?R(e,f):(e.state=null,t===T?R(e,-3):d):f},n.deflateSetDictionary=function(e,t){var n,r,o,s,l,c,u,p,h=t.length;if(!e||!e.state)return f;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==C||n.lookahead)return f;for(1===s&&(e.adler=a(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(N(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,h-n.w_size,n.w_size,0),t=p,h=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=h,e.next_in=0,e.input=t,U(n);n.lookahead>=k;){for(r=n.strstart,o=n.lookahead-(k-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+k-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--o;);n.strstart=r,n.lookahead=k-1,U(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=k-1,n.match_available=0,e.next_in=c,e.input=u,e.avail_in=l,n.wrap=s,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,y,v,b,w,x,_,k,E,S,C;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,m=n.lencode,g=n.distcode,y=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),b=m[p&y];t:for(;;){if(p>>>=w=b>>>24,h-=w,0==(w=b>>>16&255))C[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(p&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&b,(w&=15)&&(h<w&&(p+=S[r++]<<h,h+=8),x+=p&(1<<w)-1,p>>>=w,h-=w),h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),b=g[p&v];n:for(;;){if(p>>>=w=b>>>24,h-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=g[(65535&b)+(p&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(_=65535&b,h<(w&=15)&&(p+=S[r++]<<h,(h+=8)<w&&(p+=S[r++]<<h,h+=8)),l<(_+=p&(1<<w)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=w,h-=w,(w=o-a)<_){if(u<(w=_-w)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=f,(k=0)===d){if(k+=c-w,w<x){for(x-=w;C[o++]=f[k++],--w;);k=o-_,E=C}}else if(d<w){if(k+=c+d-w,(w-=d)<x){for(x-=w;C[o++]=f[k++],--w;);if(k=0,d<x){for(x-=w=d;C[o++]=f[k++],--w;);k=o-_,E=C}}}else if(k+=d-w,w<x){for(x-=w;C[o++]=f[k++],--w;);k=o-_,E=C}for(;2<x;)C[o++]=E[k++],C[o++]=E[k++],C[o++]=E[k++],x-=3;x&&(C[o++]=E[k++],1<x&&(C[o++]=E[k++]))}else{for(k=o-_;C[o++]=C[k++],C[o++]=C[k++],C[o++]=C[k++],2<(x-=3););x&&(C[o++]=C[k++],1<x&&(C[o++]=C[k++]))}break}}break}}while(r<i&&o<s);r-=x=h>>3,p&=(1<<(h-=x<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=h}},{}],49:[function(e,t,n){"use strict";var r=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),l=1,c=2,u=0,d=-2,f=1,p=852,h=592;function m(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(h),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):d}function b(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?d:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,v(e))):d}function w(e,t){var n,r;return e?(r=new g,(e.state=r).window=null,(n=b(e,t))!==u&&(e.state=null),n):d}var x,_,k=!0;function E(e){if(k){var t;for(x=new r.Buf32(512),_=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(l,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,_,0,e.work,{bits:5}),k=!1}e.lencode=x,e.lenbits=9,e.distcode=_,e.distbits=5}function S(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}n.inflateReset=v,n.inflateReset2=b,n.inflateResetKeep=y,n.inflateInit=function(e){return w(e,15)},n.inflateInit2=w,n.inflate=function(e,t){var n,p,h,g,y,v,b,w,x,_,k,C,T,A,O,P,L,R,M,N,I,D,B,z,j=0,U=new r.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return d;12===(n=e.state).mode&&(n.mode=13),y=e.next_out,h=e.output,b=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,w=n.hold,x=n.bits,_=v,k=b,D=u;e:for(;;)switch(n.mode){case f:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(2&n.wrap&&35615===w){U[n.check=0]=255&w,U[1]=w>>>8&255,n.check=o(n.check,U,2,0),x=w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",n.mode=30;break}if(x-=4,I=8+(15&(w>>>=4)),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=512&w?10:12,x=w=0;break;case 2:for(;x<16;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=w>>8&1),512&n.flags&&(U[0]=255&w,U[1]=w>>>8&255,n.check=o(n.check,U,2,0)),x=w=0,n.mode=3;case 3:for(;x<32;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}n.head&&(n.head.time=w),512&n.flags&&(U[0]=255&w,U[1]=w>>>8&255,U[2]=w>>>16&255,U[3]=w>>>24&255,n.check=o(n.check,U,4,0)),x=w=0,n.mode=4;case 4:for(;x<16;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}n.head&&(n.head.xflags=255&w,n.head.os=w>>8),512&n.flags&&(U[0]=255&w,U[1]=w>>>8&255,n.check=o(n.check,U,2,0)),x=w=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}n.length=w,n.head&&(n.head.extra_len=w),512&n.flags&&(U[0]=255&w,U[1]=w>>>8&255,n.check=o(n.check,U,2,0)),x=w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(C=n.length)&&(C=v),C&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,C,I)),512&n.flags&&(n.check=o(n.check,p,C,g)),v-=C,g+=C,n.length-=C),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===v)break e;for(C=0;I=p[g+C++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I)),I&&C<v;);if(512&n.flags&&(n.check=o(n.check,p,C,g)),v-=C,g+=C,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===v)break e;for(C=0;I=p[g+C++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I)),I&&C<v;);if(512&n.flags&&(n.check=o(n.check,p,C,g)),v-=C,g+=C,I)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(w!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}x=w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}e.adler=n.check=m(w),x=w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=y,e.avail_out=b,e.next_in=g,e.avail_in=v,n.hold=w,n.bits=x,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}switch(n.last=1&w,x-=1,3&(w>>>=1)){case 0:n.mode=14;break;case 1:if(E(n),n.mode=20,6!==t)break;w>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}w>>>=2,x-=2;break;case 14:for(w>>>=7&x,x-=7&x;x<32;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&w,x=w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(C=n.length){if(v<C&&(C=v),b<C&&(C=b),0===C)break e;r.arraySet(h,p,g,C,y),v-=C,g+=C,b-=C,y+=C,n.length-=C;break}n.mode=12;break;case 17:for(;x<14;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(n.nlen=257+(31&w),w>>>=5,x-=5,n.ndist=1+(31&w),w>>>=5,x-=5,n.ncode=4+(15&w),w>>>=4,x-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}n.lens[F[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},D=s(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,D){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;P=(j=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,L=65535&j,!((O=j>>>24)<=x);){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(L<16)w>>>=O,x-=O,n.lens[n.have++]=L;else{if(16===L){for(z=O+2;x<z;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(w>>>=O,x-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],C=3+(3&w),w>>>=2,x-=2}else if(17===L){for(z=O+3;x<z;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}x-=O,I=0,C=3+(7&(w>>>=O)),w>>>=3,x-=3}else{for(z=O+7;x<z;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}x-=O,I=0,C=11+(127&(w>>>=O)),w>>>=7,x-=7}if(n.have+C>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;C--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},D=s(l,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,D){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},D=s(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,D){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=b){e.next_out=y,e.avail_out=b,e.next_in=g,e.avail_in=v,n.hold=w,n.bits=x,a(e,k),y=e.next_out,h=e.output,b=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,w=n.hold,x=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;P=(j=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,L=65535&j,!((O=j>>>24)<=x);){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(P&&0==(240&P)){for(R=O,M=P,N=L;P=(j=n.lencode[N+((w&(1<<R+M)-1)>>R)])>>>16&255,L=65535&j,!(R+(O=j>>>24)<=x);){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=O,x-=O,n.back+=O,n.length=L,0===P){n.mode=26;break}if(32&P){n.back=-1,n.mode=12;break}if(64&P){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&P,n.mode=22;case 22:if(n.extra){for(z=n.extra;x<z;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}n.length+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;P=(j=n.distcode[w&(1<<n.distbits)-1])>>>16&255,L=65535&j,!((O=j>>>24)<=x);){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(0==(240&P)){for(R=O,M=P,N=L;P=(j=n.distcode[N+((w&(1<<R+M)-1)>>R)])>>>16&255,L=65535&j,!(R+(O=j>>>24)<=x);){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=O,x-=O,n.back+=O,64&P){e.msg="invalid distance code",n.mode=30;break}n.offset=L,n.extra=15&P,n.mode=24;case 24:if(n.extra){for(z=n.extra;x<z;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}n.offset+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===b)break e;if(C=k-b,n.offset>C){if((C=n.offset-C)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}T=C>n.wnext?(C-=n.wnext,n.wsize-C):n.wnext-C,C>n.length&&(C=n.length),A=n.window}else A=h,T=y-n.offset,C=n.length;for(b<C&&(C=b),b-=C,n.length-=C;h[y++]=A[T++],--C;);0===n.length&&(n.mode=21);break;case 26:if(0===b)break e;h[y++]=n.length,b--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===v)break e;v--,w|=p[g++]<<x,x+=8}if(k-=b,e.total_out+=k,n.total+=k,k&&(e.adler=n.check=n.flags?o(n.check,h,k,y-k):i(n.check,h,k,y-k)),k=b,(n.flags?w:m(w))!==n.check){e.msg="incorrect data check",n.mode=30;break}x=w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===v)break e;v--,w+=p[g++]<<x,x+=8}if(w!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}x=w=0}n.mode=29;case 29:D=1;break e;case 30:D=-3;break e;case 31:return-4;default:return d}return e.next_out=y,e.avail_out=b,e.next_in=g,e.avail_in=v,n.hold=w,n.bits=x,(n.wsize||k!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&S(e,e.output,e.next_out,k-e.avail_out)?(n.mode=31,-4):(_-=e.avail_in,k-=e.avail_out,e.total_in+=_,e.total_out+=k,n.total+=k,n.wrap&&k&&(e.adler=n.check=n.flags?o(n.check,h,k,e.next_out-k):i(n.check,h,k,e.next_out-k)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==_&&0===k||4===t)&&D===u&&(D=-5),D)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&(t.window=null),e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?d:((n.head=t).done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?d:11===n.mode&&i(1,t,r,0)!==n.check?-3:S(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){"use strict";var r=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,d,f){var p,h,m,g,y,v,b,w,x,_=f.bits,k=0,E=0,S=0,C=0,T=0,A=0,O=0,P=0,L=0,R=0,M=null,N=0,I=new r.Buf16(16),D=new r.Buf16(16),B=null,z=0;for(k=0;k<=15;k++)I[k]=0;for(E=0;E<l;E++)I[t[n+E]]++;for(T=_,C=15;1<=C&&0===I[C];C--);if(C<T&&(T=C),0===C)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(S=1;S<C&&0===I[S];S++);for(T<S&&(T=S),k=P=1;k<=15;k++)if(P<<=1,(P-=I[k])<0)return-1;if(0<P&&(0===e||1!==C))return-1;for(D[1]=0,k=1;k<15;k++)D[k+1]=D[k]+I[k];for(E=0;E<l;E++)0!==t[n+E]&&(d[D[t[n+E]]++]=E);if(v=0===e?(M=B=d,19):1===e?(M=i,N-=257,B=o,z-=257,256):(M=a,B=s,-1),k=S,y=u,O=E=R=0,m=-1,g=(L=1<<(A=T))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(b=k-O,x=d[E]<v?(w=0,d[E]):d[E]>v?(w=B[z+d[E]],M[N+d[E]]):(w=96,0),p=1<<k-O,S=h=1<<A;c[y+(R>>O)+(h-=p)]=b<<24|w<<16|x|0,0!==h;);for(p=1<<k-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,E++,0==--I[k]){if(k===C)break;k=t[n+d[E]]}if(T<k&&(R&g)!==m){for(0===O&&(O=T),y+=S,P=1<<(A=k-O);A+O<C&&!((P-=I[A+O])<=0);)A++,P<<=1;if(L+=1<<A,1===e&&852<L||2===e&&592<L)return 1;c[m=R&g]=T<<24|A<<16|y-u|0}}return 0!==R&&(c[y+R]=k-O<<24|64<<16|0),f.bits=T,0}},{"../utils/common":41}],51:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){"use strict";var r=e("../utils/common"),i=0,o=1;function a(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,l=29,c=256,u=c+1+l,d=30,f=19,p=2*u+1,h=15,m=16,g=7,y=256,v=16,b=17,w=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],_=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=new Array(2*(u+2));a(S);var C=new Array(2*d);a(C);var T=new Array(512);a(T);var A=new Array(256);a(A);var O=new Array(l);a(O);var P,L,R,M=new Array(d);function N(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function I(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function D(e){return e<256?T[e]:T[256+(e>>>7)]}function B(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function z(e,t,n){e.bi_valid>m-n?(e.bi_buf|=t<<e.bi_valid&65535,B(e,e.bi_buf),e.bi_buf=t>>m-e.bi_valid,e.bi_valid+=n-m):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function j(e,t,n){z(e,n[2*t],n[2*t+1])}function U(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function F(e,t,n){var r,i,o=new Array(h+1),a=0;for(r=1;r<=h;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=U(o[s]++,s))}}function W(e){var t;for(t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<f;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*y]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function H(e){8<e.bi_valid?B(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function V(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function q(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&V(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!V(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function G(e,t,n){var r,i,o,a,s=0;if(0!==e.last_lit)for(;r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?j(e,i,t):(j(e,(o=A[i])+c+1,t),0!==(a=x[o])&&z(e,i-=O[o],a),j(e,o=D(--r),n),0!==(a=_[o])&&z(e,r-=M[o],a)),s<e.last_lit;);j(e,y,t)}function $(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=p,n=0;n<l;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;1<=n;n--)q(e,o,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,q(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,g=t.stat_desc.max_length,y=0;for(o=0;o<=h;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<p;n++)g<(o=l[2*l[2*(r=e.heap[n])+1]+1]+1)&&(o=g,y++),l[2*r+1]=o,c<r||(e.bl_count[o]++,a=0,m<=r&&(a=f[r-m]),s=l[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(u[2*r+1]+a)));if(0!==y){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,y-=2}while(0<y);for(o=g;0!==o;o--)for(r=e.bl_count[o];0!==r;)c<(i=e.heap[--n])||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),r--)}}(e,t),F(o,c,e.bl_count)}function Z(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<l&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[2*v]++):s<=10?e.bl_tree[2*b]++:e.bl_tree[2*w]++,o=i,c=(s=0)===a?(l=138,3):i===a?(l=6,3):(l=7,4))}function Y(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<l&&i===a)){if(s<c)for(;j(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(j(e,i,e.bl_tree),s--),j(e,v,e.bl_tree),z(e,s-3,2)):s<=10?(j(e,b,e.bl_tree),z(e,s-3,3)):(j(e,w,e.bl_tree),z(e,s-11,7));o=i,c=(s=0)===a?(l=138,3):i===a?(l=6,3):(l=7,4)}}a(M);var X=!1;function K(e,t,n,i){z(e,(s<<1)+(i?1:0),3),function(e,t,n,i){H(e),i&&(B(e,n),B(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){X||(function(){var e,t,n,r,i,o=new Array(h+1);for(r=n=0;r<l-1;r++)for(O[r]=n,e=0;e<1<<x[r];e++)A[n++]=r;for(A[n-1]=r,r=i=0;r<16;r++)for(M[r]=i,e=0;e<1<<_[r];e++)T[i++]=r;for(i>>=7;r<d;r++)for(M[r]=i<<7,e=0;e<1<<_[r]-7;e++)T[256+i++]=r;for(t=0;t<=h;t++)o[t]=0;for(e=0;e<=143;)S[2*e+1]=8,e++,o[8]++;for(;e<=255;)S[2*e+1]=9,e++,o[9]++;for(;e<=279;)S[2*e+1]=7,e++,o[7]++;for(;e<=287;)S[2*e+1]=8,e++,o[8]++;for(F(S,u+1,o),e=0;e<d;e++)C[2*e+1]=5,C[2*e]=U(e,5);P=new N(S,x,c+1,u,h),L=new N(C,_,0,d,h),R=new N(new Array(0),k,0,f,g)}(),X=!0),e.l_desc=new I(e.dyn_ltree,P),e.d_desc=new I(e.dyn_dtree,L),e.bl_desc=new I(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,W(e)},n._tr_stored_block=K,n._tr_flush_block=function(e,t,n,r){var a,s,l=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t<c;t++)if(0!==e.dyn_ltree[2*t])return o;return i}(e)),$(e,e.l_desc),$(e,e.d_desc),l=function(e){var t;for(Z(e,e.dyn_ltree,e.l_desc.max_code),Z(e,e.dyn_dtree,e.d_desc.max_code),$(e,e.bl_desc),t=f-1;3<=t&&0===e.bl_tree[2*E[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=a&&(a=s)):a=s=n+5,n+4<=a&&-1!==t?K(e,t,n,r):4===e.strategy||s===a?(z(e,2+(r?1:0),3),G(e,S,C)):(z(e,4+(r?1:0),3),function(e,t,n,r){var i;for(z(e,t-257,5),z(e,n-1,5),z(e,r-4,4),i=0;i<r;i++)z(e,e.bl_tree[2*E[i]+1],3);Y(e,e.dyn_ltree,t-1),Y(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),G(e,e.dyn_ltree,e.dyn_dtree)),W(e),r&&H(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(A[n]+c+1)]++,e.dyn_dtree[2*D(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){z(e,2,3),j(e,y,S),function(e){16===e.bi_valid?(B(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var n,r,i,o,a=1,s={},l=!1,c=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){f(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",p,!1):e.attachEvent("onmessage",p),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,function(e){var t=c.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return s[a]=i,n(a),a++},u.clearImmediate=d}function d(e){delete s[e]}function f(e){if(l)setTimeout(f,0,e);else{var n=s[e];if(n){l=!0;try{!function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}}(n)}finally{d(e),l=!1}}}}function p(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},7418:e=>{"use strict";
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))n.call(o,c)&&(s[c]=o[c]);if(t){a=t(o);for(var u=0;u<a.length;u++)r.call(o,a[u])&&(s[a[u]]=o[a[u]])}}return s}},1443:function(e,t,n){"object"==typeof navigator&&(e.exports=function(){"use strict";function e(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a={addCSS:!0,thumbWidth:15,watch:!0},s=function(e){return null!=e?e.constructor:null},l=function(e,t){return!!(e&&t&&e instanceof t)},c=function(e){return null==e},u=function(e){return s(e)===Object},d=function(e){return s(e)===String},f=function(e){return Array.isArray(e)},p=function(e){return l(e,NodeList)},h={nullOrUndefined:c,object:u,number:function(e){return s(e)===Number&&!Number.isNaN(e)},string:d,boolean:function(e){return s(e)===Boolean},function:function(e){return s(e)===Function},array:f,nodeList:p,element:function(e){return l(e,Element)},event:function(e){return l(e,Event)},empty:function(e){return c(e)||(d(e)||f(e)||p(e))&&!e.length||u(e)&&!Object.keys(e).length}};function m(e,t){if(1>t){var n=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}var g=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),h.element(t)?this.element=t:h.string(t)&&(this.element=document.querySelector(t)),h.element(this.element)&&h.empty(this.element.rangeTouch)&&(this.config=o({},a,{},n),this.init())}return function(e,n,r){n&&t(e.prototype,n),r&&t(e,r)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!h.event(t))return null;var n,r=t.target,i=t.changedTouches[0],o=parseFloat(r.getAttribute("min"))||0,a=parseFloat(r.getAttribute("max"))||100,s=parseFloat(r.getAttribute("step"))||1,l=r.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(n=100/l.width*(i.clientX-l.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*c:50<n&&(n+=2*(n-50)*c),o+m(n/100*(a-o),s)}},{key:"set",value:function(t){e.enabled&&h.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=null;if(h.empty(t)||h.string(t)?r=Array.from(document.querySelectorAll(h.string(t)?t:'input[type="range"]')):h.element(t)?r=[t]:h.nodeList(t)?r=Array.from(t):h.array(t)&&(r=t.filter(h.element)),h.empty(r))return null;var i=o({},a,{},n);if(h.string(t)&&i.watch){var s=new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){h.element(n)&&function(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}(n,t)&&new e(n,i)}))}))}));s.observe(document.body,{childList:!0,subtree:!0})}return r.map((function(t){return new e(t,n)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const y=e=>null!=e?e.constructor:null,v=(e,t)=>Boolean(e&&t&&e instanceof t),b=e=>null==e,w=e=>y(e)===Object,x=e=>y(e)===String,_=e=>"function"==typeof e,k=e=>Array.isArray(e),E=e=>v(e,NodeList),S=e=>b(e)||(x(e)||k(e)||E(e))&&!e.length||w(e)&&!Object.keys(e).length;var C={nullOrUndefined:b,object:w,number:e=>y(e)===Number&&!Number.isNaN(e),string:x,boolean:e=>y(e)===Boolean,function:_,array:k,weakMap:e=>v(e,WeakMap),nodeList:E,element:e=>null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument,textNode:e=>y(e)===Text,event:e=>v(e,Event),keyboardEvent:e=>v(e,KeyboardEvent),cue:e=>v(e,window.TextTrackCue)||v(e,window.VTTCue),track:e=>v(e,TextTrack)||!b(e)&&x(e.kind),promise:e=>v(e,Promise)&&_(e.then),url:e=>{if(v(e,window.URL))return!0;if(!x(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!S(new URL(t).hostname)}catch(e){return!1}},empty:S};const T=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n=Object.keys(t).find((t=>void 0!==e.style[t]));return!!C.string(n)&&t[n]})();function A(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}}),t)}var O={isIE:Boolean(window.document.documentMode),isEdge:/Edge/g.test(navigator.userAgent),isWebKit:"WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),isIPhone:/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,isIPadOS:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function P(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function L(e={},...t){if(!t.length)return e;const n=t.shift();return C.object(n)?(Object.keys(n).forEach((t=>{C.object(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),L(e[t],n[t])):Object.assign(e,{[t]:n[t]})})),L(e,...t)):e}function R(e,t){const n=e.length?e:[e];Array.from(n).reverse().forEach(((e,n)=>{const r=n>0?t.cloneNode(!0):t,i=e.parentNode,o=e.nextSibling;r.appendChild(e),o?i.insertBefore(r,o):i.appendChild(r)}))}function M(e,t){C.element(e)&&!C.empty(t)&&Object.entries(t).filter((([,e])=>!C.nullOrUndefined(e))).forEach((([t,n])=>e.setAttribute(t,n)))}function N(e,t,n){const r=document.createElement(e);return C.object(t)&&M(r,t),C.string(n)&&(r.innerText=n),r}function I(e,t,n,r){C.element(t)&&t.appendChild(N(e,n,r))}function D(e){C.nodeList(e)||C.array(e)?Array.from(e).forEach(D):C.element(e)&&C.element(e.parentNode)&&e.parentNode.removeChild(e)}function B(e){if(!C.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function z(e,t){return C.element(t)&&C.element(t.parentNode)&&C.element(e)?(t.parentNode.replaceChild(e,t),e):null}function j(e,t){if(!C.string(e)||C.empty(e))return{};const n={},r=L({},t);return e.split(",").forEach((e=>{const t=e.trim(),i=t.replace(".",""),o=t.replace(/[[\]]/g,"").split("="),[a]=o,s=o.length>1?o[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":C.string(r.class)?n.class=`${r.class} ${i}`:n.class=i;break;case"#":n.id=t.replace("#","");break;case"[":n[a]=s}})),L(r,n)}function U(e,t){if(!C.element(e))return;let n=t;C.boolean(n)||(n=!e.hidden),e.hidden=n}function F(e,t,n){if(C.nodeList(e))return Array.from(e).map((e=>F(e,t,n)));if(C.element(e)){let r="toggle";return void 0!==n&&(r=n?"add":"remove"),e.classList[r](t),e.classList.contains(t)}return!1}function W(e,t){return C.element(e)&&e.classList.contains(t)}function H(e,t){const{prototype:n}=Element;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function V(e){return this.elements.container.querySelectorAll(e)}function q(e){return this.elements.container.querySelector(e)}function G(e=null,t=!1){C.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}const $={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Z={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){const n=Z[e]||"html5"!==t;return{api:n,ui:n&&Z.rangeInput}},pip:!(O.isIPhone||!C.function(N("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||N("video").disablePictureInPicture)),airplay:C.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(C.empty(e))return!1;const[t]=e.split("/");let n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys($).includes(n)&&(n+=`; codecs="${$[e]}"`);try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==T,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Y=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})();function X(e,t,n,r=!1,i=!0,o=!1){if(!e||!("addEventListener"in e)||C.empty(t)||!C.function(n))return;const a=t.split(" ");let s=o;Y&&(s={passive:i,capture:o}),a.forEach((t=>{this&&this.eventListeners&&r&&this.eventListeners.push({element:e,type:t,callback:n,options:s}),e[r?"addEventListener":"removeEventListener"](t,n,s)}))}function K(e,t="",n,r=!0,i=!1){X.call(this,e,t,n,!0,r,i)}function Q(e,t="",n,r=!0,i=!1){X.call(this,e,t,n,!1,r,i)}function J(e,t="",n,r=!0,i=!1){const o=(...a)=>{Q(e,t,o,r,i),n.apply(this,a)};X.call(this,e,t,o,!0,r,i)}function ee(e,t="",n=!1,r={}){if(!C.element(e)||C.empty(t))return;const i=new CustomEvent(t,{bubbles:n,detail:{...r,plyr:this}});e.dispatchEvent(i)}function te(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:n,callback:r,options:i}=e;t.removeEventListener(n,r,i)})),this.eventListeners=[])}function ne(){return new Promise((e=>this.ready?setTimeout(e,0):K.call(this,this.elements.container,"ready",e))).then((()=>{}))}function re(e){C.promise(e)&&e.then(null,(()=>{}))}function ie(e){return C.array(e)?e.filter(((t,n)=>e.indexOf(t)===n)):e}function oe(e,t){return C.array(e)&&e.length?e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)):null}function ae(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const se=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,n])=>({...e,[t/n]:[t,n]})),{});function le(e){return!!(C.array(e)||C.string(e)&&e.includes(":"))&&(C.array(e)?e:e.split(":")).map(Number).every(C.number)}function ce(e){if(!C.array(e)||!e.every(C.number))return null;const[t,n]=e,r=(e,t)=>0===t?e:r(t,e%t),i=r(t,n);return[t/i,n/i]}function ue(e){const t=e=>le(e)?e.split(":").map(Number):null;let n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!C.empty(this.embed)&&C.array(this.embed.ratio)&&({ratio:n}=this.embed),null===n&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;n=[e,t]}return ce(n)}function de(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,n=ue.call(this,e);if(!C.array(n))return{};const[r,i]=ce(n),o=100/r*i;if(ae(`aspect-ratio: ${r}/${i}`)?t.style.aspectRatio=`${r}/${i}`:t.style.paddingBottom=`${o}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),n=(e-o)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${n}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:o,ratio:n}}function fe(e,t,n=.05){const r=e/t,i=oe(Object.keys(se),r);return Math.abs(i-r)<=n?se[i]:[e,t]}const pe={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!C.empty(t)||Z.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:pe.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,C.empty(this.config.ratio)||de.call(e),Object.defineProperty(e.media,"quality",{get(){const t=pe.getSources.call(e).find((t=>t.getAttribute("src")===e.source));return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&C.function(e.config.quality.onChange))e.config.quality.onChange(t);else{const n=pe.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!n)return;const{currentTime:r,paused:i,preload:o,readyState:a,playbackRate:s}=e.media;e.media.src=n.getAttribute("src"),("none"!==o||a)&&(e.once("loadedmetadata",(()=>{e.speed=s,e.currentTime=r,i||re(e.play())})),e.media.load())}ee.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(D(pe.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function he(e,...t){return C.empty(e)?e:e.toString().replace(/{(\d+)}/g,((e,n)=>t[n].toString()))}const me=(e="",t="",n="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString()),ge=(e="")=>e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));function ye(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=me(t,"-"," "),t=me(t,"_"," "),t=ge(t),me(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}function ve(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const be={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},we={get(e="",t={}){if(C.empty(e)||C.empty(t))return"";let n=P(t.i18n,e);if(C.empty(n))return Object.keys(be).includes(e)?be[e]:"";const r={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(r).forEach((([e,t])=>{n=me(n,e,t)})),n}};class xe{constructor(t){e(this,"get",(e=>{if(!xe.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(C.empty(t))return null;const n=JSON.parse(t);return C.string(e)&&e.length?n[e]:n})),e(this,"set",(e=>{if(!xe.supported||!this.enabled)return;if(!C.object(e))return;let t=this.get();C.empty(t)&&(t={}),L(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch(e){}})),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}function _e(e,t="text"){return new Promise(((n,r)=>{try{const r=new XMLHttpRequest;if(!("withCredentials"in r))return;r.addEventListener("load",(()=>{if("text"===t)try{n(JSON.parse(r.responseText))}catch(e){n(r.responseText)}else n(r.response)})),r.addEventListener("error",(()=>{throw new Error(r.status)})),r.open("GET",e,!0),r.responseType=t,r.send()}catch(e){r(e)}}))}function ke(e,t){if(!C.string(e))return;const n="cache",r=C.string(t);let i=!1;const o=()=>null!==document.getElementById(t),a=(e,t)=>{e.innerHTML=t,r&&o()||document.body.insertAdjacentElement("afterbegin",e)};if(!r||!o()){const o=xe.supported,s=document.createElement("div");if(s.setAttribute("hidden",""),r&&s.setAttribute("id",t),o){const e=window.localStorage.getItem(`${n}-${t}`);if(i=null!==e,i){const t=JSON.parse(e);a(s,t.content)}}_e(e).then((e=>{if(!C.empty(e)){if(o)try{window.localStorage.setItem(`${n}-${t}`,JSON.stringify({content:e}))}catch(e){}a(s,e)}})).catch((()=>{}))}}const Ee=e=>Math.trunc(e/60/60%60,10),Se=e=>Math.trunc(e/60%60,10),Ce=e=>Math.trunc(e%60,10);function Te(e=0,t=!1,n=!1){if(!C.number(e))return Te(void 0,t,n);const r=e=>`0${e}`.slice(-2);let i=Ee(e);const o=Se(e),a=Ce(e);return i=t||i>0?`${i}:`:"",`${n&&e>0?"-":""}${i}${r(o)}:${r(a)}`}const Ae={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,n=e.host!==t||O.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:n}},findElements(){try{return this.elements.controls=q.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:V.call(this,this.config.selectors.buttons.play),pause:q.call(this,this.config.selectors.buttons.pause),restart:q.call(this,this.config.selectors.buttons.restart),rewind:q.call(this,this.config.selectors.buttons.rewind),fastForward:q.call(this,this.config.selectors.buttons.fastForward),mute:q.call(this,this.config.selectors.buttons.mute),pip:q.call(this,this.config.selectors.buttons.pip),airplay:q.call(this,this.config.selectors.buttons.airplay),settings:q.call(this,this.config.selectors.buttons.settings),captions:q.call(this,this.config.selectors.buttons.captions),fullscreen:q.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=q.call(this,this.config.selectors.progress),this.elements.inputs={seek:q.call(this,this.config.selectors.inputs.seek),volume:q.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:q.call(this,this.config.selectors.display.buffer),currentTime:q.call(this,this.config.selectors.display.currentTime),duration:q.call(this,this.config.selectors.display.duration)},C.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const n="http://www.w3.org/2000/svg",r=Ae.getIconUrl.call(this),i=`${r.cors?"":r.url}#${this.config.iconPrefix}`,o=document.createElementNS(n,"svg");M(o,L(t,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(n,"use"),s=`${i}-${e}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),o.appendChild(a),o},createLabel(e,t={}){const n=we.get(e,this.config);return N("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},n)},createBadge(e){if(C.empty(e))return null;const t=N("span",{class:this.config.classNames.menu.value});return t.appendChild(N("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const n=L({},t);let r=ye(e);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(n).includes(e)&&(i[e]=n[e],delete n[e])})),"button"!==i.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").some((e=>e===this.config.classNames.control))||L(n,{class:`${n.class} ${this.config.classNames.control}`}):n.class=this.config.classNames.control,e){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":n.class+=` ${this.config.classNames.control}--overlaid`,r="play",i.label="play",i.icon="play";break;default:C.empty(i.label)&&(i.label=r),C.empty(i.icon)&&(i.icon=e)}const o=N(i.element);return i.toggle?(o.appendChild(Ae.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),o.appendChild(Ae.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),o.appendChild(Ae.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),o.appendChild(Ae.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(o.appendChild(Ae.createIcon.call(this,i.icon)),o.appendChild(Ae.createLabel.call(this,i.label))),L(n,j(this.config.selectors.buttons[r],n)),M(o,n),"play"===r?(C.array(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(o)):this.elements.buttons[r]=o,o},createRange(e,t){const n=N("input",L(j(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":we.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,Ae.updateRangeFill.call(this,n),g.setup(n),n},createProgress(e,t){const n=N("progress",L(j(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(N("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],r=t?we.get(t,this.config):"";n.innerText=`% ${r.toLowerCase()}`}return this.elements.display[e]=n,n},createTime(e,t){const n=j(this.config.selectors.display[e],t),r=N("div",L(n,{class:`${n.class?n.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":we.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=r,r},bindMenuItemShortcuts(e,t){K.call(this,e,"keydown keyup",(n=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(n.key))return;if(n.preventDefault(),n.stopPropagation(),"keydown"===n.type)return;const r=H(e,'[role="menuitemradio"]');if(!r&&[" ","ArrowRight"].includes(n.key))Ae.showMenuPanel.call(this,t,!0);else{let t;" "!==n.key&&("ArrowDown"===n.key||r&&"ArrowRight"===n.key?(t=e.nextElementSibling,C.element(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,C.element(t)||(t=e.parentNode.lastElementChild)),G.call(this,t,!0))}}),!1),K.call(this,e,"keyup",(e=>{"Return"===e.key&&Ae.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:n,title:r,badge:i=null,checked:o=!1}){const a=j(this.config.selectors.inputs[n]),s=N("button",L(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":o,value:e})),l=N("span");l.innerHTML=r,C.element(i)&&l.appendChild(i),s.appendChild(l),Object.defineProperty(s,"checked",{enumerable:!0,get:()=>"true"===s.getAttribute("aria-checked"),set(e){e&&Array.from(s.parentNode.children).filter((e=>H(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),s.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(s,"click keyup",(t=>{if(!C.keyboardEvent(t)||" "===t.key){switch(t.preventDefault(),t.stopPropagation(),s.checked=!0,n){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}Ae.showMenuPanel.call(this,"home",C.keyboardEvent(t))}}),n,!1),Ae.bindMenuItemShortcuts.call(this,s,n),t.appendChild(s)},formatTime(e=0,t=!1){return C.number(e)?Te(e,Ee(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,n=!1){C.element(e)&&C.number(t)&&(e.innerText=Ae.formatTime(t,n))},updateVolume(){this.supported.ui&&(C.element(this.elements.inputs.volume)&&Ae.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),C.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){C.element(e)&&(e.value=t,Ae.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!C.event(e))return;let t=0;const n=(e,t)=>{const n=C.number(t)?t:0,r=C.element(e)?e:this.elements.display.buffer;if(C.element(r)){r.value=n;const e=r.getElementsByTagName("span")[0];C.element(e)&&(e.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":r=this.currentTime,i=this.duration,t=0===r||0===i||Number.isNaN(r)||Number.isNaN(i)?0:(r/i*100).toFixed(2),"timeupdate"===e.type&&Ae.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":n(this.elements.display.buffer,100*this.buffered)}var r,i},updateRangeFill(e){const t=C.event(e)?e.target:e;if(C.element(t)&&"range"===t.getAttribute("type")){if(H(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=Ae.formatTime(this.currentTime),n=Ae.formatTime(this.duration),r=we.get("seekLabel",this.config);t.setAttribute("aria-valuetext",r.replace("{currentTime}",e).replace("{duration}",n))}else if(H(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);(O.isWebKit||O.isIPadOS)&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,n;if(!this.config.tooltips.seek||!C.element(this.elements.inputs.seek)||!C.element(this.elements.display.seekTooltip)||0===this.duration)return;const r=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,o=e=>F(r,i,e);if(this.touch)return void o(!1);let a=0;const s=this.elements.progress.getBoundingClientRect();if(C.event(e))a=100/s.width*(e.pageX-s.left);else{if(!W(r,i))return;a=parseFloat(r.style.left,10)}a<0?a=0:a>100&&(a=100);const l=this.duration/100*a;r.innerText=Ae.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(l)));c&&r.insertAdjacentHTML("afterbegin",`${c.label}<br>`),r.style.left=`${a}%`,C.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&o("mouseenter"===e.type)},timeUpdate(e){const t=!C.element(this.elements.display.duration)&&this.config.invertTime;Ae.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Ae.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return U(this.elements.display.currentTime,!0),void U(this.elements.progress,!0);C.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=C.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Ae.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Ae.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Ae.setMarkers.call(this),Ae.updateSeekTooltip.call(this)},toggleMenuButton(e,t){U(this.elements.settings.buttons[e],!t)},updateSetting(e,t,n){const r=this.elements.settings.panels[e];let i=null,o=t;if("captions"===e)i=this.currentTrack;else{if(i=C.empty(n)?this[e]:n,C.empty(i)&&(i=this.config[e].default),!C.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(C.element(o)||(o=r&&r.querySelector('[role="menu"]')),!C.element(o))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Ae.getLabel.call(this,e,i);const a=o&&o.querySelector(`[value="${i}"]`);C.element(a)&&(a.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?we.get("normal",this.config):`${t}×`;case"quality":if(C.number(t)){const e=we.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return ge(t);case"captions":return Le.getLabel.call(this);default:return null}},setQualityMenu(e){if(!C.element(this.elements.settings.panels.quality))return;const t="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');C.array(e)&&(this.options.quality=ie(e).filter((e=>this.config.quality.options.includes(e))));const r=!C.empty(this.options.quality)&&this.options.quality.length>1;if(Ae.toggleMenuButton.call(this,t,r),B(n),Ae.checkMenu.call(this),!r)return;const i=e=>{const t=we.get(`qualityBadge.${e}`,this.config);return t.length?Ae.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const n=this.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1})).forEach((e=>{Ae.createMenuItem.call(this,{value:e,list:n,type:t,title:Ae.getLabel.call(this,"quality",e),badge:i(e)})})),Ae.updateSetting.call(this,t,n)},setCaptionsMenu(){if(!C.element(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Le.getTracks.call(this),r=Boolean(n.length);if(Ae.toggleMenuButton.call(this,e,r),B(t),Ae.checkMenu.call(this),!r)return;const i=n.map(((e,n)=>({value:n,checked:this.captions.toggled&&this.currentTrack===n,title:Le.getLabel.call(this,e),badge:e.language&&Ae.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));i.unshift({value:-1,checked:!this.captions.toggled,title:we.get("disabled",this.config),list:t,type:"language"}),i.forEach(Ae.createMenuItem.bind(this)),Ae.updateSetting.call(this,e,t)},setSpeedMenu(){if(!C.element(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const n=!C.empty(this.options.speed)&&this.options.speed.length>1;Ae.toggleMenuButton.call(this,e,n),B(t),Ae.checkMenu.call(this),n&&(this.options.speed.forEach((n=>{Ae.createMenuItem.call(this,{value:n,list:t,type:e,title:Ae.getLabel.call(this,"speed",n)})})),Ae.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!C.empty(e)&&Object.values(e).some((e=>!e.hidden));U(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let n=e;C.element(n)||(n=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const r=n.querySelector('[role^="menuitem"]');G.call(this,r,t)},toggleMenu(e){const{popup:t}=this.elements.settings,n=this.elements.buttons.settings;if(!C.element(t)||!C.element(n))return;const{hidden:r}=t;let i=r;if(C.boolean(e))i=e;else if(C.keyboardEvent(e)&&"Escape"===e.key)i=!1;else if(C.event(e)){const r=C.function(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(r);if(o||!o&&e.target!==n&&i)return}n.setAttribute("aria-expanded",i),U(t,!i),F(this.elements.container,this.config.classNames.menu.open,i),i&&C.keyboardEvent(e)?Ae.focusFirstMenuItem.call(this,null,!0):i||r||G.call(this,n,C.keyboardEvent(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const n=t.scrollWidth,r=t.scrollHeight;return D(t),{width:n,height:r}},showMenuPanel(e="",t=!1){const n=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!C.element(n))return;const r=n.parentNode,i=Array.from(r.children).find((e=>!e.hidden));if(Z.transitions&&!Z.reducedMotion){r.style.width=`${i.scrollWidth}px`,r.style.height=`${i.scrollHeight}px`;const e=Ae.getMenuSize.call(this,n),t=e=>{e.target===r&&["width","height"].includes(e.propertyName)&&(r.style.width="",r.style.height="",Q.call(this,r,T,t))};K.call(this,r,T,t),r.style.width=`${e.width}px`,r.style.height=`${e.height}px`}U(i,!0),U(n,!1),Ae.focusFirstMenuItem.call(this,n,t)},setDownloadUrl(){const e=this.elements.buttons.download;C.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:n,createProgress:r,createRange:i,createTime:o,setQualityMenu:a,setSpeedMenu:s,showMenuPanel:l}=Ae;this.elements.controls=null,C.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));const c=N("div",j(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return ie(C.array(this.config.controls)?this.config.controls:[]).forEach((a=>{if("restart"===a&&c.appendChild(n.call(this,"restart",u)),"rewind"===a&&c.appendChild(n.call(this,"rewind",u)),"play"===a&&c.appendChild(n.call(this,"play",u)),"fast-forward"===a&&c.appendChild(n.call(this,"fast-forward",u)),"progress"===a){const t=N("div",{class:`${u.class} plyr__progress__container`}),n=N("div",j(this.config.selectors.progress));if(n.appendChild(i.call(this,"seek",{id:`plyr-seek-${e.id}`})),n.appendChild(r.call(this,"buffer")),this.config.tooltips.seek){const e=N("span",{class:this.config.classNames.tooltip},"00:00");n.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=n,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===a&&c.appendChild(o.call(this,"currentTime",u)),"duration"===a&&c.appendChild(o.call(this,"duration",u)),"mute"===a||"volume"===a){let{volume:t}=this.elements;if(C.element(t)&&c.contains(t)||(t=N("div",L({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===a&&t.appendChild(n.call(this,"mute")),"volume"===a&&!O.isIos&&!O.isIPadOS){const n={max:1,step:.05,value:this.config.volume};t.appendChild(i.call(this,"volume",L(n,{id:`plyr-volume-${e.id}`})))}}if("captions"===a&&c.appendChild(n.call(this,"captions",u)),"settings"===a&&!C.empty(this.config.settings)){const r=N("div",L({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));r.appendChild(n.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const i=N("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),o=N("div"),a=N("div",{id:`plyr-settings-${e.id}-home`}),s=N("div",{role:"menu"});a.appendChild(s),o.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach((n=>{const r=N("button",L(j(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,r,n),K.call(this,r,"click",(()=>{l.call(this,n,!1)}));const i=N("span",null,we.get(n,this.config)),a=N("span",{class:this.config.classNames.menu.value});a.innerHTML=e[n],i.appendChild(a),r.appendChild(i),s.appendChild(r);const c=N("div",{id:`plyr-settings-${e.id}-${n}`,hidden:""}),u=N("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});u.appendChild(N("span",{"aria-hidden":!0},we.get(n,this.config))),u.appendChild(N("span",{class:this.config.classNames.hidden},we.get("menuBack",this.config))),K.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),K.call(this,u,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(u),c.appendChild(N("div",{role:"menu"})),o.appendChild(c),this.elements.settings.buttons[n]=r,this.elements.settings.panels[n]=c})),i.appendChild(o),r.appendChild(i),c.appendChild(r),this.elements.settings.popup=i,this.elements.settings.menu=r}if("pip"===a&&Z.pip&&c.appendChild(n.call(this,"pip",u)),"airplay"===a&&Z.airplay&&c.appendChild(n.call(this,"airplay",u)),"download"===a){const e=L({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!C.url(t)&&this.isEmbed&&L(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(n.call(this,"download",e))}"fullscreen"===a&&c.appendChild(n.call(this,"fullscreen",u))})),this.isHTML5&&a.call(this,pe.getQualityOptions.call(this)),s.call(this),c},inject(){if(this.config.loadSprite){const e=Ae.getIconUrl.call(this);e.cors&&ke(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let n,r=!0;if(C.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),C.element(this.config.controls)||C.string(this.config.controls)?e=this.config.controls:(e=Ae.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Le.getLabel.call(this)}),r=!1),r&&C.string(this.config.controls)&&(e=(e=>{let n=e;return Object.entries(t).forEach((([e,t])=>{n=me(n,`{${e}}`,t)})),n})(e)),C.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),C.element(n)||(n=this.elements.container),n[C.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),C.element(this.elements.controls)||Ae.findElements.call(this),!C.empty(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;e.setAttribute("aria-pressed","false"),Object.defineProperty(e,"pressed",{configurable:!0,enumerable:!0,get:()=>W(e,t),set(n=!1){F(e,t,n),e.setAttribute("aria-pressed",n?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{C.array(t)||C.nodeList(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(O.isEdge&&A(n),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,n=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,r=V.call(this,n);Array.from(r).forEach((e=>{F(e,this.config.classNames.hidden,!1),F(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(e){}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const n=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(null==n||!n.length)return;const r=document.createDocumentFragment(),i=document.createDocumentFragment();let o=null;const a=`${this.config.classNames.tooltip}--visible`,s=e=>F(o,a,e);n.forEach((e=>{const t=N("span",{class:this.config.classNames.marker},""),n=e.time/this.duration*100+"%";o&&(t.addEventListener("mouseenter",(()=>{e.label||(o.style.left=n,o.innerHTML=e.label,s(!0))})),t.addEventListener("mouseleave",(()=>{s(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=n,i.appendChild(t)})),r.appendChild(i),this.config.tooltips.seek||(o=N("span",{class:this.config.classNames.tooltip},""),r.appendChild(o)),this.elements.markers={points:i,tip:o},this.elements.progress.appendChild(r)}};function Oe(e,t=!0){let n=e;if(t){const e=document.createElement("a");e.href=n,n=e.href}try{return new URL(n)}catch(e){return null}}function Pe(e){const t=new URLSearchParams;return C.object(e)&&Object.entries(e).forEach((([e,n])=>{t.set(e,n)})),t}const Le={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!Z.textTracks)return void(C.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ae.setCaptionsMenu.call(this));var e,t;if(C.element(this.elements.captions)||(this.elements.captions=N("div",j(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),e=this.elements.captions,t=this.elements.wrapper,C.element(e)&&C.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),O.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),n=Oe(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&_e(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{D(e)}))}))}const n=ie((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0])));let r=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===r&&([r]=n);let i=this.storage.get("captions");if(C.boolean(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:r,languages:n}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";K.call(this,this.media.textTracks,e,Le.update.bind(this))}setTimeout(Le.update.bind(this),0)},update(){const e=Le.getTracks.call(this,!0),{active:t,language:n,meta:r,currentTrackNode:i}=this.captions,o=Boolean(e.find((e=>e.language===n)));this.isHTML5&&this.isVideo&&e.filter((e=>!r.get(e))).forEach((e=>{this.debug.log("Track added",e),r.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),K.call(this,e,"cuechange",(()=>Le.updateCues.call(this)))})),(o&&this.language!==n||!e.includes(i))&&(Le.setLanguage.call(this,n),Le.toggle.call(this,t&&o)),this.elements&&F(this.elements.container,this.config.classNames.captions.enabled,!C.empty(e)),C.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Ae.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:n}=this.captions,r=this.config.classNames.captions.active,i=C.nullOrUndefined(e)?!n:e;if(i!==n){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){const e=Le.getTracks.call(this),t=Le.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Le.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),F(this.elements.container,r,i),this.captions.toggled=i,Ae.updateSetting.call(this,"captions"),ee.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout((()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const n=Le.getTracks.call(this);if(-1!==e)if(C.number(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const r=n[e],{language:i}=r||{};this.captions.currentTrackNode=r,Ae.updateSetting.call(this,"captions"),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),ee.call(this,this.media,"languagechange")}Le.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Le.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Le.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!C.string(e))return void this.debug.warn("Invalid language argument",e);const n=e.toLowerCase();this.captions.language=n;const r=Le.getTracks.call(this),i=Le.findTrack.call(this,[n]);Le.set.call(this,r.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const n=Le.getTracks.call(this),r=e=>Number((this.captions.meta.get(e)||{}).default),i=Array.from(n).sort(((e,t)=>r(t)-r(e)));let o;return e.every((e=>(o=i.find((t=>t.language===e)),!o))),o||(t?i[0]:void 0)},getCurrentTrack(){return Le.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!C.track(t)&&Z.textTracks&&this.captions.toggled&&(t=Le.getCurrentTrack.call(this)),C.track(t)?C.empty(t.label)?C.empty(t.language)?we.get("enabled",this.config):e.language.toUpperCase():t.label:we.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!C.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!C.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Le.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(ve)}const n=t.map((e=>e.trim())).join("\n");if(n!==this.elements.captions.innerHTML){B(this.elements.captions);const e=N("span",j(this.config.selectors.caption));e.innerHTML=n,this.elements.captions.appendChild(e),ee.call(this,this.media,"cuechange")}}},Re={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:null,listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Me="picture-in-picture",Ne="inline",Ie={html5:"html5",youtube:"youtube",vimeo:"vimeo"},De="audio",Be="video",ze=()=>{};class je{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):ze}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):ze}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):ze}}class Ue{constructor(t){e(this,"onChange",(()=>{if(!this.supported)return;const e=this.player.elements.buttons.fullscreen;C.element(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;ee.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),e(this,"toggleFallback",((e=!1)=>{if(e?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",F(this.target,this.player.config.classNames.fullscreen.fallback,e),O.isIos){let t=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const r=C.string(t.content)&&t.content.includes(n);e?(this.cleanupViewport=!r,r||(t.content+=`,${n}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==n)).join(","))}this.onChange()})),e(this,"trapFocus",(e=>{if(O.isIos||O.isIPadOS||!this.active||"Tab"!==e.key)return;const t=document.activeElement,n=V.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[r]=n,i=n[n.length-1];t!==i||e.shiftKey?t===r&&e.shiftKey&&(i.focus(),e.preventDefault()):(r.focus(),e.preventDefault())})),e(this,"update",(()=>{if(this.supported){let e;e=this.forceFallback?"Fallback (forced)":Ue.nativeSupported?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");F(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)})),e(this,"enter",(()=>{this.supported&&(O.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ue.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?C.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),e(this,"exit",(()=>{if(this.supported)if(O.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),re(this.player.play());else if(!Ue.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!C.empty(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),e(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=t,this.prefix=Ue.prefix,this.property=Ue.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,this.player.elements.fullscreen=t.config.fullscreen.container&&function(e,t){const{prototype:n}=Element;return(n.closest||function(){let e=this;do{if(H.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,t.config.fullscreen.container),K.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),K.call(this.player,this.player.elements.container,"dblclick",(e=>{C.element(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),K.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ue.nativeSupported&&!this.forceFallback}static get prefix(){if(C.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!C.function(document[`${t}ExitFullscreen`])&&!C.function(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ue.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ue.nativeSupported||!O.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ue.nativeSupported||this.forceFallback)return W(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return O.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Fe(e,t=1){return new Promise(((n,r)=>{const i=new Image,o=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?n:r)(i)};Object.assign(i,{onload:o,onerror:o,src:e})}))}const We={addStyleHook(){F(this.elements.container,this.config.selectors.container.replace(".",""),!0),F(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void We.toggleNativeControls.call(this,!0);C.element(this.elements.controls)||(Ae.inject.call(this),this.listeners.controls()),We.toggleNativeControls.call(this),this.isHTML5&&Le.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Ae.updateVolume.call(this),Ae.timeUpdate.call(this),Ae.durationUpdate.call(this),We.checkPlaying.call(this),F(this.elements.container,this.config.classNames.pip.supported,Z.pip&&this.isHTML5&&this.isVideo),F(this.elements.container,this.config.classNames.airplay.supported,Z.airplay&&this.isHTML5),F(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{ee.call(this,this.media,"ready")}),0),We.setTitle.call(this),this.poster&&We.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&Ae.durationUpdate.call(this),this.config.mediaMetadata&&Ae.setMediaMetadata.call(this)},setTitle(){let e=we.get("play",this.config);if(C.string(this.config.title)&&!C.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=q.call(this,"iframe");if(!C.element(e))return;const t=C.empty(this.config.title)?"video":this.config.title,n=we.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){F(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),ne.call(this).then((()=>Fe(e))).catch((t=>{throw e===this.poster&&We.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),We.togglePoster.call(this,!0),e))))},checkPlaying(e){F(this.elements.container,this.config.classNames.playing,this.playing),F(this.elements.container,this.config.classNames.paused,this.paused),F(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",we.get(this.playing?"pause":"play",this.config))})),C.event(e)&&"timeupdate"===e.type||We.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{F(this.elements.container,this.config.classNames.loading,this.loading),We.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!C.empty(e)&&C.string(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),C.empty(this.media.style)&&this.media.removeAttribute("style")}};class He{constructor(t){e(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,F(t.container,e.config.classNames.isTouch,!0)})),e(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&X.call(t,window,"keydown keyup",this.handleKey,e,!1),X.call(t,document.body,"click",this.toggleMenu,e),J.call(t,document.body,"touchstart",this.firstTouch)})),e(this,"container",(()=>{const{player:e}=this,{config:t,elements:n,timers:r}=e;!t.keyboard.global&&t.keyboard.focused&&K.call(e,n.container,"keydown keyup",this.handleKey,!1),K.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:i}=n;i&&"enterfullscreen"===t.type&&(i.pressed=!1,i.hover=!1);let o=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(We.toggleControls.call(e,!0),o=e.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout((()=>We.toggleControls.call(e,!1)),o)}));const i=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=n.wrapper,{active:r}=e.fullscreen,[i,o]=ue.call(e),a=ae(`aspect-ratio: ${i} / ${o}`);if(!r)return void(a?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[s,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=s/l>i/o;a?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/o*i+"px":null,t.style.margin=c?"0 auto":null)},o=()=>{clearTimeout(r.resized),r.resized=setTimeout(i,50)};K.call(e,n.container,"enterfullscreen exitfullscreen",(t=>{const{target:r}=e.fullscreen;r===n.container&&(!e.isEmbed&&C.empty(e.config.ratio)||(i(),("enterfullscreen"===t.type?K:Q).call(e,window,"resize",o)))}))})),e(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(K.call(e,e.media,"timeupdate seeking seeked",(t=>Ae.timeUpdate.call(e,t))),K.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>Ae.durationUpdate.call(e,t))),K.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),K.call(e,e.media,"progress playing seeking seeked",(t=>Ae.updateProgress.call(e,t))),K.call(e,e.media,"volumechange",(t=>Ae.updateVolume.call(e,t))),K.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>We.checkPlaying.call(e,t))),K.call(e,e.media,"waiting canplay seeked playing",(t=>We.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const n=q.call(e,`.${e.config.classNames.video}`);if(!C.element(n))return;K.call(e,t.container,"click",(r=>{([t.container,n].includes(r.target)||n.contains(r.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(r,e.restart,"restart"),this.proxy(r,(()=>{re(e.play())}),"play")):this.proxy(r,(()=>{re(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&K.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),K.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),K.call(e,e.media,"ratechange",(()=>{Ae.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),K.call(e,e.media,"qualitychange",(t=>{Ae.updateSetting.call(e,"quality",null,t.detail.quality)})),K.call(e,e.media,"ready qualitychange",(()=>{Ae.setDownloadUrl.call(e)}));const n=e.config.events.concat(["keyup","keydown"]).join(" ");K.call(e,e.media,n,(n=>{let{detail:r={}}=n;"error"===n.type&&(r=e.media.error),ee.call(e,t.container,n.type,!0,r)}))})),e(this,"proxy",((e,t,n)=>{const{player:r}=this,i=r.config.listeners[n];let o=!0;C.function(i)&&(o=i.call(r,e)),!1!==o&&C.function(t)&&t.call(r,e)})),e(this,"bind",((e,t,n,r,i=!0)=>{const{player:o}=this,a=o.config.listeners[r],s=C.function(a);K.call(o,e,t,(e=>this.proxy(e,n,r)),i&&!s)})),e(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,n=O.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{re(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{ee.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),Ae.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{[" ","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),Ae.toggleMenu.call(e,t)):Ae.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&Ae.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const n=t.progress.getBoundingClientRect(),r=100/n.width*(e.pageX-n.left);e.currentTarget.setAttribute("seek-value",r)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const n=t.currentTarget,r="play-on-seeked";if(C.keyboardEvent(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const i=n.hasAttribute(r),o=["mouseup","touchend","keyup"].includes(t.type);i&&o?(n.removeAttribute(r),re(e.play())):!o&&e.playing&&(n.setAttribute(r,""),e.pause())})),O.isIos){const t=V.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,n,(e=>A(e.target)))))}this.bind(t.inputs.seek,n,(t=>{const n=t.currentTarget;let r=n.getAttribute("seek-value");C.empty(r)&&(r=n.value),n.removeAttribute("seek-value"),e.currentTime=r/n.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>Ae.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.endScrubbing(t)})),O.isWebKit&&Array.from(V.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>Ae.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!C.element(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Ae.timeUpdate.call(e))})),this.bind(t.inputs.volume,n,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(n=>{t.controls.hover=!e.touch&&"mouseenter"===n.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((n=>{this.bind(n,"mouseenter mouseleave",(n=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===n.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:n,timers:r}=e;F(t.controls,n.classNames.noTransition,!0),We.toggleControls.call(e,!0),setTimeout((()=>{F(t.controls,n.classNames.noTransition,!1)}),0);const i=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout((()=>We.toggleControls.call(e,!1)),i)})),this.bind(t.inputs.volume,"wheel",(t=>{const n=t.webkitDirectionInvertedFromDevice,[r,i]=[t.deltaX,-t.deltaY].map((e=>n?-e:e)),o=Math.sign(Math.abs(r)>Math.abs(i)?r:i);e.increaseVolume(o/50);const{volume:a}=e.media;(1===o&&a<1||-1===o&&a>0)&&t.preventDefault()}),"volume",!1)})),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:r,type:i,altKey:o,ctrlKey:a,metaKey:s,shiftKey:l}=e,c="keydown"===i,u=c&&r===this.lastKey;var d;if(!(o||a||s||l)&&r)if(c){const i=document.activeElement;if(C.element(i)){const{editable:r}=t.config.selectors,{seek:o}=n.inputs;if(i!==o&&H(i,r))return;if(" "===e.key&&H(i,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(r)&&(e.preventDefault(),e.stopPropagation()),r){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(d=parseInt(r,10),t.currentTime=t.duration/10*d);break;case" ":case"k":u||re(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":u||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":u||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===r&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=r}else this.lastKey=null}toggleMenu(e){Ae.toggleMenu.call(this.player,e)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var Ve=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){},t={},n={},r={};function i(e,t){e=e.push?e:[e];var i,o,a,s=[],l=e.length,c=l;for(i=function(e,n){n.length&&s.push(e),--c||t(s)};l--;)o=e[l],(a=n[o])?i(o,a):(r[o]=r[o]||[]).push(i)}function o(e,t){if(e){var i=r[e];if(n[e]=t,i)for(;i.length;)i[0](e,t),i.splice(0,1)}}function a(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function s(t,n,r,i){var o,a,l=document,c=r.async,u=(r.numRetries||0)+1,d=r.before||e,f=t.replace(/[\?|#].*$/,""),p=t.replace(/^(css|img)!/,"");i=i||0,/(^css!|\.css$)/.test(f)?((a=l.createElement("link")).rel="stylesheet",a.href=p,(o="hideFocus"in a)&&a.relList&&(o=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(f)?(a=l.createElement("img")).src=p:((a=l.createElement("script")).src=t,a.async=void 0===c||c),a.onload=a.onerror=a.onbeforeload=function(e){var l=e.type[0];if(o)try{a.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((i+=1)<u)return s(t,n,r,i)}else if("preload"==a.rel&&"style"==a.as)return a.rel="stylesheet";n(t,l,e.defaultPrevented)},!1!==d(t,a)&&l.head.appendChild(a)}function l(e,t,n){var r,i,o=(e=e.push?e:[e]).length,a=o,l=[];for(r=function(e,n,r){if("e"==n&&l.push(e),"b"==n){if(!r)return;l.push(e)}--o||t(l)},i=0;i<a;i++)s(e[i],r,n)}function c(e,n,r){var i,s;if(n&&n.trim&&(i=n),s=(i?r:n)||{},i){if(i in t)throw"LoadJS";t[i]=!0}function c(t,n){l(e,(function(e){a(s,e),t&&a({success:t,error:n},e),o(i,e)}),s)}if(s.returnPromise)return new Promise(c);c()}return c.ready=function(e,t){return i(e,(function(e){a(t,e)})),c},c.done=function(e){o(e,[])},c.reset=function(){t={},n={},r={}},c.isDefined=function(e){return e in t},c}()}));function qe(e){return new Promise(((t,n)=>{Ve(e,{success:t,error:n})}))}function Ge(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,ee.call(this,this.media,e?"play":"pause"))}const $e={setup(){const e=this;F(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,de.call(e),C.object(window.Vimeo)?$e.ready.call(e):qe(e.config.urls.vimeo.sdk).then((()=>{$e.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:n,referrerPolicy:r,...i}=t;let o=e.media.getAttribute("src"),a="";C.empty(o)?(o=e.media.getAttribute(e.config.attributes.embed.id),a=e.media.getAttribute(e.config.attributes.embed.hash)):a=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(o);const s=a?{h:a}:{};n&&Object.assign(i,{controls:!1,sidedock:!1});const l=Pe({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...s,...i}),c=(u=o,C.empty(u)?null:C.number(Number(u))?u:u.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:u);var u;const d=N("iframe"),f=he(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",f),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),C.empty(r)||d.setAttribute("referrerPolicy",r),n||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=z(d,e.media);else{const t=N("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=z(t,e.media)}t.customControls||_e(he(e.config.urls.vimeo.api,f)).then((t=>{!C.empty(t)&&t.thumbnail_url&&We.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Ge.call(e,!0),e.embed.play()),e.media.pause=()=>(Ge.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:p}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>p,set(t){const{embed:n,media:r,paused:i,volume:o}=e,a=i&&!n.hasPlayed;r.seeking=!0,ee.call(e,r,"seeking"),Promise.resolve(a&&n.setVolume(0)).then((()=>n.setCurrentTime(t))).then((()=>a&&n.pause())).then((()=>a&&n.setVolume(o))).catch((()=>{}))}});let h=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>h,set(t){e.embed.setPlaybackRate(t).then((()=>{h=t,ee.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:m}=e.config;Object.defineProperty(e.media,"volume",{get:()=>m,set(t){e.embed.setVolume(t).then((()=>{m=t,ee.call(e,e.media,"volumechange")}))}});let{muted:g}=e.config;Object.defineProperty(e.media,"muted",{get:()=>g,set(t){const n=!!C.boolean(t)&&t;e.embed.setMuted(!!n||e.config.muted).then((()=>{g=n,ee.call(e,e.media,"volumechange")}))}});let y,{loop:v}=e.config;Object.defineProperty(e.media,"loop",{get:()=>v,set(t){const n=C.boolean(t)?t:e.config.loop.active;e.embed.setLoop(n).then((()=>{v=n}))}}),e.embed.getVideoUrl().then((t=>{y=t,Ae.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>y}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[n,r]=t;e.embed.ratio=fe(n,r),de.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,We.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{p=t,ee.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,ee.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Le.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const n=t.map((e=>function(e){const t=document.createDocumentFragment(),n=document.createElement("div");return t.appendChild(n),n.innerHTML=e,t.firstChild.innerText}(e.text)));Le.updateCues.call(e,n)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{Ge.call(e,!t),t||ee.call(e,e.media,"playing")})),C.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{ee.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{ee.call(e,e.media,"playing")})),e.embed.on("play",(()=>{Ge.call(e,!0),ee.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{Ge.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,p=t.seconds,ee.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,ee.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&ee.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,ee.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,ee.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,ee.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,ee.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>We.build.call(e)),0)}};function Ze(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,ee.call(this,this.media,e?"play":"pause"))}function Ye(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const Xe={setup(){if(F(this.elements.wrapper,this.config.classNames.embed,!0),C.object(window.YT)&&C.function(window.YT.Player))Xe.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{C.function(e)&&e(),Xe.ready.call(this)},qe(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){_e(he(this.config.urls.youtube.api,e)).then((e=>{if(C.object(e)){const{title:t,height:n,width:r}=e;this.config.title=t,We.setTitle.call(this),this.embed.ratio=fe(r,n)}de.call(this)})).catch((()=>{de.call(this)}))},ready(){const e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute("id");if(!C.empty(n)&&n.startsWith("youtube-"))return;let r=e.media.getAttribute("src");C.empty(r)&&(r=e.media.getAttribute(this.config.attributes.embed.id));const i=(o=r,C.empty(o)?null:o.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:o);var o;const a=N("div",{id:`${e.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":t.customControls?e.poster:void 0});if(e.media=z(a,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${i}/${e}default.jpg`;Fe(t("maxres"),121).catch((()=>Fe(t("sd"),121))).catch((()=>Fe(t("hq")))).then((t=>We.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:i,host:Ye(t),playerVars:L({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const n=t.data,r={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occurred";e.media.error={code:n,message:r},ee.call(e,e.media,"error")}},onPlaybackRateChange(t){const n=t.target;e.media.playbackRate=n.getPlaybackRate(),ee.call(e,e.media,"ratechange")},onReady(n){if(C.function(e.media.play))return;const r=n.target;Xe.getTitle.call(e,i),e.media.play=()=>{Ze.call(e,!0),r.playVideo()},e.media.pause=()=>{Ze.call(e,!1),r.pauseVideo()},e.media.stop=()=>{r.stopVideo()},e.media.duration=r.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(r.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,ee.call(e,e.media,"seeking"),r.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>r.getPlaybackRate(),set(e){r.setPlaybackRate(e)}});let{volume:o}=e.config;Object.defineProperty(e.media,"volume",{get:()=>o,set(t){o=t,r.setVolume(100*o),ee.call(e,e.media,"volumechange")}});let{muted:a}=e.config;Object.defineProperty(e.media,"muted",{get:()=>a,set(t){const n=C.boolean(t)?t:a;a=n,r[n?"mute":"unMute"](),r.setVolume(100*o),ee.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>r.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const s=r.getAvailablePlaybackRates();e.options.speed=s.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),ee.call(e,e.media,"timeupdate"),ee.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=r.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&ee.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),ee.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((()=>We.build.call(e)),50)},onStateChange(n){const r=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,ee.call(e,e.media,"seeked")),n.data){case-1:ee.call(e,e.media,"timeupdate"),e.media.buffered=r.getVideoLoadedFraction(),ee.call(e,e.media,"progress");break;case 0:Ze.call(e,!1),e.media.loop?(r.stopVideo(),r.playVideo()):ee.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(Ze.call(e,!0),ee.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{ee.call(e,e.media,"timeupdate")}),50),e.media.duration!==r.getDuration()&&(e.media.duration=r.getDuration(),ee.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),Ze.call(e,!1);break;case 3:ee.call(e,e.media,"waiting")}ee.call(e,e.elements.container,"statechange",!1,{code:n.data})}}})}},Ke={setup(){this.media?(F(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),F(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&F(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=N("div",{class:this.config.classNames.video}),R(this.media,this.elements.wrapper),this.elements.poster=N("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?pe.setup.call(this):this.isYouTube?Xe.setup.call(this):this.isVimeo&&$e.setup.call(this)):this.debug.warn("No media element found!")}};class Qe{constructor(t){e(this,"load",(()=>{this.enabled&&(C.object(window.google)&&C.object(window.google.ima)?this.ready():qe(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),e(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),e(this,"setupIMA",(()=>{this.elements.container=N("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),e(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}})),e(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval((()=>{const e=Te(Math.max(this.manager.getRemainingTime(),0)),t=`${we.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),e(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),e(this,"addCuePoints",(()=>{C.empty(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(C.element(t)){const n=100/this.player.duration*e,r=N("span",{class:this.player.config.classNames.cues});r.style.left=`${n.toString()}%`,t.appendChild(r)}}}))})),e(this,"onAdEvent",(e=>{const{container:t}=this.player.elements,n=e.getAd(),r=e.getAdData();switch((e=>{ee.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}})),e(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),e(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;C.empty(this.cuePoints)||this.cuePoints.forEach(((n,r)=>{t<n&&n<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))}))})),window.addEventListener("resize",(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),e(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}})).catch((()=>{}))})),e(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,re(this.player.media.play())})),e(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),e(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),e(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),e(this,"trigger",((e,...t)=>{const n=this.events[e];C.array(n)&&n.forEach((e=>{C.function(e)&&e.apply(this,t)}))})),e(this,"on",((e,t)=>(C.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),e(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),e(this,"clearSafetyTimer",(e=>{C.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!C.empty(e.publisherId)||C.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return C.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Pe({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function Je(e=0,t=0,n=255){return Math.min(Math.max(e,t),n)}const et=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const n={};e.split(/\r\n|\n|\r/).forEach((e=>{if(C.number(n.startTime)){if(!C.empty(e.trim())&&C.empty(n.text)){const t=e.trim().split("#xywh=");[n.text]=t,t[1]&&([n.x,n.y,n.w,n.h]=t[1].split(","))}}else{const t=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);t&&(n.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),n.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),n.text&&t.push(n)})),t},tt=(e,t)=>{const n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n};class nt{constructor(t){e(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)}))})),e(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(C.empty(t))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(C.function(t))t((e=>{this.thumbnails=e,n()}));else{const e=(C.string(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(n)}})))),e(this,"getThumbnail",(e=>new Promise((t=>{_e(e).then((n=>{const r={frames:et(n),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const i=new Image;i.onload=()=>{r.height=i.naturalHeight,r.width=i.naturalWidth,this.thumbnails.push(r),t()},i.src=r.urlPrefix+r.frames[0].text}))})))),e(this,"startMove",(e=>{if(this.loaded&&C.event(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,n;const r=this.player.elements.progress.getBoundingClientRect(),i=100/r.width*(e.pageX-r.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=Te(this.seekTime);const o=null===(t=this.player.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(this.seekTime)));o&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${o.label}<br>`)}this.showImageAtCurrentTime()}})),e(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),e(this,"startScrubbing",(e=>{(C.nullOrUndefined(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),e(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):J.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),e(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),e(this,"render",(()=>{this.elements.thumb.container=N("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=N("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=N("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=N("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),C.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=N("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),e(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),e(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let n=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,r)=>{this.loadedImages.includes(t.frames[e].text)&&(n=r)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(n)))})),e(this,"loadImage",((e=0)=>{const t=this.showingThumb,n=this.thumbnails[e],{urlPrefix:r}=n,i=n.frames[t],o=n.frames[t].text,a=r+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,i,e,t,o,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const n=new Image;n.src=a,n.dataset.index=t,n.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log(`Loading image: ${a}`),n.onload=()=>this.showImage(n,i,e,t,o,!0),this.loadingImage=n,this.removeOldImages(n)}})),e(this,"showImage",((e,t,n,r,i,o=!0)=>{this.player.debug.log(`Showing thumb: ${i}. num: ${r}. qual: ${n}. newimg: ${o}`),this.setImageSizeAndOffset(e,t),o&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(i)||this.loadedImages.push(i)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(n,e,t,i))})),e(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const n=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),n)}}))})),e(this,"preloadNearby",((e,t=!0)=>new Promise((n=>{setTimeout((()=>{const r=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===r){let i;i=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let o=!1;i.forEach((e=>{const t=e.text;if(t!==r&&!this.loadedImages.includes(t)){o=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],r=e+t,i=new Image;i.src=r,i.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),n()}}})),o||n()}}),300)})))),e(this,"getHigherQuality",((e,t,n,r)=>{if(e<this.thumbnails.length-1){let i=t.naturalHeight;this.usingSprites&&(i=n.h),i<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(e+1))}),300)}})),e(this,"toggleThumbContainer",((e=!1,t=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),e(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),e(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),e(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),e(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,r=t.left-e.left+10,i=t.right-e.left-n.clientWidth-10,o=this.mousePosX-e.left-n.clientWidth/2,a=Je(o,r,i);n.style.left=`${a}px`,n.style.setProperty("--preview-arrow-offset",o-a+"px")})),e(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=tt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),e(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left=`-${t.x*n}px`,e.style.top=`-${t.y*n}px`})),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=tt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const rt={insertElements(e,t){C.string(t)?I(e,this.media,{src:t}):C.array(t)&&t.forEach((t=>{I(e,this.media,t)}))},change(e){P(e,"sources.length")?(pe.cancelRequests.call(this),this.destroy.call(this,(()=>{this.options.quality=[],D(this.media),this.media=null,C.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:n}=e,[{provider:r=Ie.html5,src:i}]=t,o="html5"===r?n:"div",a="html5"===r?{}:{src:i};Object.assign(this,{provider:r,type:n,supported:Z.check(n,r,this.config.playsinline),media:N(o,a)}),this.elements.container.appendChild(this.media),C.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),C.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),We.addStyleHook.call(this),this.isHTML5&&rt.insertElements.call(this,"source",t),this.config.title=e.title,Ke.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&rt.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&We.build.call(this),this.isHTML5&&this.media.load(),C.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new nt(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class it{constructor(t,n){if(e(this,"play",(()=>C.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>re(this.media.play()))),this.media.play()):null)),e(this,"pause",(()=>this.playing&&C.function(this.media.pause)?this.media.pause():null)),e(this,"togglePlay",(e=>(C.boolean(e)?e:!this.playing)?this.play():this.pause())),e(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):C.function(this.media.stop)&&this.media.stop()})),e(this,"restart",(()=>{this.currentTime=0})),e(this,"rewind",(e=>{this.currentTime-=C.number(e)?e:this.config.seekTime})),e(this,"forward",(e=>{this.currentTime+=C.number(e)?e:this.config.seekTime})),e(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+(C.number(e)?e:0)})),e(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),e(this,"airplay",(()=>{Z.airplay&&this.media.webkitShowPlaybackTargetPicker()})),e(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=W(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,r=F(this.elements.container,this.config.classNames.hideControls,n);if(r&&C.array(this.config.controls)&&this.config.controls.includes("settings")&&!C.empty(this.config.settings)&&Ae.toggleMenu.call(this,!1),r!==t){const e=r?"controlshidden":"controlsshown";ee.call(this,this.media,e)}return!r}return!1})),e(this,"on",((e,t)=>{K.call(this,this.elements.container,e,t)})),e(this,"once",((e,t)=>{J.call(this,this.elements.container,e,t)})),e(this,"off",((e,t)=>{Q(this.elements.container,e,t)})),e(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const n=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(D(this.elements.buttons.play),D(this.elements.captions),D(this.elements.controls),D(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),C.function(e)&&e()):(te.call(this),pe.cancelRequests.call(this),z(this.elements.original,this.elements.container),ee.call(this,this.elements.original,"destroyed",!0),C.function(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(We.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&C.function(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200))})),e(this,"supports",(e=>Z.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Z.touch,this.media=t,C.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||C.nodeList(this.media)||C.array(this.media))&&(this.media=this.media[0]),this.config=L({},Re,it.defaults,n||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new je(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Z),C.nullOrUndefined(this.media)||!C.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!Z.check().api)return void this.debug.error("Setup failed: no support");const r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;const i=this.media.tagName.toLowerCase();let o=null,a=null;switch(i){case"div":if(o=this.media.querySelector("iframe"),C.element(o)){if(a=Oe(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Ie.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Ie.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",a.search.length){const e=["1","true"];e.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(C.empty(this.provider)||!Object.values(Ie).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Be;break;case"video":case"audio":this.type=i,this.provider=Ie.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Z.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new He(this),this.storage=new xe(this),this.media.plyr=this,C.element(this.elements.container)||(this.elements.container=N("div"),R(this.media,this.elements.container)),We.migrateStyles.call(this),We.addStyleHook.call(this),Ke.setup.call(this),this.config.debug&&K.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new Ue(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&We.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Qe(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>re(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new nt(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Ie.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Ie.youtube}get isVimeo(){return this.provider===Ie.vimeo}get isVideo(){return this.type===Be}get isAudio(){return this.type===De}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=C.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return C.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=C.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;C.string(t)&&(t=Number(t)),C.number(t)||(t=this.storage.get("volume")),C.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!C.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;C.boolean(t)||(t=this.storage.get("muted")),C.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;C.number(e)&&(t=e),C.number(t)||(t=this.storage.get("speed")),C.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:r}=this;t=Je(t,n,r),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let r=[!C.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(C.number),i=!0;if(!n.includes(r)){const e=oe(n,r);this.debug.warn(`Unsupported quality option: ${r}, using ${e} instead`),r=e,i=!1}t.selected=r,this.media.quality=r,i&&this.storage.set({quality:r})}get quality(){return this.media.quality}set loop(e){const t=C.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){rt.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return C.url(e)?e:this.source}set download(e){C.url(e)&&(this.config.urls.download=e,Ae.setDownloadUrl.call(this))}set poster(e){this.isVideo?We.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=ce(ue.call(this));return C.array(e)?e.join(":"):e}set ratio(e){this.isVideo?C.string(e)&&le(e)?(this.config.ratio=ce(e),de.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=C.boolean(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Le.toggle.call(this,e,!1)}set currentTrack(e){Le.set.call(this,e,!1),Le.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Le.setLanguage.call(this,e,!1)}get language(){return(Le.getCurrentTrack.call(this)||{}).language}set pip(e){if(!Z.pip)return;const t=C.boolean(e)?e:!this.pip;C.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Me:Ne),C.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return Z.pip?C.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Me:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new nt(this))}static supported(e,t){return Z.check(e,t)}static loadSprite(e,t){return ke(e,t)}static setup(e,t={}){let n=null;return C.string(e)?n=Array.from(document.querySelectorAll(e)):C.nodeList(e)?n=Array.from(e):C.array(e)&&(n=e.filter(C.element)),C.empty(n)?null:n.map((e=>new it(e,t)))}}var ot;return it.defaults=(ot=Re,JSON.parse(JSON.stringify(ot))),it}())},2703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4300:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var i=s(n(7294)),o=s(n(640)),a=["text","onCopy","options","children"];function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,n)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(l,e);var t,n,r,s=p(l);function l(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g(h(e=s.call.apply(s,[this].concat(n))),"onClick",(function(t){var n=e.props,r=n.text,a=n.onCopy,s=n.children,l=n.options,c=i.default.Children.only(s),u=(0,o.default)(r,l);a&&a(r,u),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(t)})),e}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=u(e,a),r=i.default.Children.only(t);return i.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.default.PureComponent);t.CopyToClipboard=y,g(y,"defaultProps",{onCopy:void 0,options:void 0})},4855:(e,t,n)=>{"use strict";var r=n(4300).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},5251:(e,t,n)=>{"use strict";
|
||
/** @license React v17.0.2
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
n(7418);var r=n(7294),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.jsx=c},2408:(e,t,n)=>{"use strict";
|
||
/** @license React v17.0.2
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(7418),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var f="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var b=v.prototype=new y;b.constructor=v,r(b,g.prototype),b.isPureReactComponent=!0;var w={current:null},x=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:w.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var S=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return a=a(l=e),e=""===r?"."+C(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(S,"$&/")+"/"),T(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(S,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+C(s=e[c],c);l+=T(s,t,n,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=T(s=s.value,t,n,u=r+C(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function A(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var P={current:null};function L(){var e=P.current;if(null===e)throw Error(p(321));return e}var R={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(p(143));return e}},t.Component=g,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)x.call(t,u)&&!_.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return L().useCallback(e,t)},t.useContext=function(e,t){return L().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return L().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return L().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return L().useLayoutEffect(e,t)},t.useMemo=function(e,t){return L().useMemo(e,t)},t.useReducer=function(e,t,n){return L().useReducer(e,t,n)},t.useRef=function(e){return L().useRef(e)},t.useState=function(e){return L().useState(e)},t.version="17.0.2"},7294:(e,t,n)=>{"use strict";e.exports=n(2408)},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},53:(e,t)=>{"use strict";
|
||
/** @license React v0.20.2
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var n,r,i,o;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,u=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(d,0),e}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(d,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,g=null,y=-1,v=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,x=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+v;try{g(!0,e)?x.postMessage(null):(m=!1,g=null)}catch(e){throw x.postMessage(null),e}}else m=!1},n=function(e){g=e,m||(m=!0,x.postMessage(null))},r=function(e,n){y=f((function(){e(t.unstable_now())}),n)},i=function(){p(y),y=-1}}function _(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<S(i,t)))break e;e[r]=t,e[n]=i,n=r}}function k(e){return void 0===(e=e[0])?null:e}function E(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>S(a,n))void 0!==l&&0>S(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>S(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],T=[],A=1,O=null,P=3,L=!1,R=!1,M=!1;function N(e){for(var t=k(T);null!==t;){if(null===t.callback)E(T);else{if(!(t.startTime<=e))break;E(T),t.sortIndex=t.expirationTime,_(C,t)}t=k(T)}}function I(e){if(M=!1,N(e),!R)if(null!==k(C))R=!0,n(D);else{var t=k(T);null!==t&&r(I,t.startTime-e)}}function D(e,n){R=!1,M&&(M=!1,i()),L=!0;var o=P;try{for(N(n),O=k(C);null!==O&&(!(O.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=O.callback;if("function"==typeof a){O.callback=null,P=O.priorityLevel;var s=a(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?O.callback=s:O===k(C)&&E(C),N(n)}else E(C);O=k(C)}if(null!==O)var l=!0;else{var c=k(T);null!==c&&r(I,c.startTime-n),l=!1}return l}finally{O=null,P=o,L=!1}}var B=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||L||(R=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return P},t.unstable_getFirstCallbackNode=function(){return k(C)},t.unstable_next=function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:A++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,_(T,e),null===k(C)&&e===k(T)&&(M?i():M=!0,r(I,a-s))):(e.sortIndex=l,_(C,e),R||L||(R=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=P;return function(){var n=P;P=t;try{return e.apply(this,arguments)}finally{P=n}}}},3840:(e,t,n)=>{"use strict";e.exports=n(53)},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},a=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var f=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var h=i(p,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:h,references:1})}a.push(d)}return a}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var l=r(e,i),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},569:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1742:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},4990:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1166),o=n(3210),a=n(3210),s=n(4370);!function(e){e[e.STATE_TAG=1]="STATE_TAG",e[e.STATE_SIZE=2]="STATE_SIZE",e[e.STATE_CONTENT=3]="STATE_CONTENT"}(r||(r={}));var l=function(){function e(){this._buffer=new o.Buffer(0),this._tag_stack=[],this._state=r.STATE_TAG,this._cursor=0,this._total=0,this._schema=s.byEbmlID,this._result=[]}return e.prototype.decode=function(e){this.readChunk(e);var t=this._result;return this._result=[],t},e.prototype.readChunk=function(e){for(this._buffer=a.concat([this._buffer,new o.Buffer(e)]);this._cursor<this._buffer.length&&(this._state!==r.STATE_TAG||this.readTag())&&(this._state!==r.STATE_SIZE||this.readSize())&&(this._state!==r.STATE_CONTENT||this.readContent()););},e.prototype.getSchemaInfo=function(e){return this._schema[e]||{name:"unknown",level:-1,type:"unknown",description:"unknown"}},e.prototype.readTag=function(){if(this._cursor>=this._buffer.length)return!1;var e=(0,o.readVint)(this._buffer,this._cursor);if(null==e)return!1;var t=this._buffer.slice(this._cursor,this._cursor+e.length).reduce((function(e,t,n,r){return e+t*Math.pow(16,2*(r.length-1-n))}),0),n=this.getSchemaInfo(t),i={EBML_ID:t.toString(16),schema:n,type:n.type,name:n.name,level:n.level,tagStart:this._total,tagEnd:this._total+e.length,sizeStart:this._total+e.length,sizeEnd:null,dataStart:null,dataEnd:null,dataSize:null,data:null};return this._tag_stack.push(i),this._cursor+=e.length,this._total+=e.length,this._state=r.STATE_SIZE,!0},e.prototype.readSize=function(){if(this._cursor>=this._buffer.length)return!1;var e=(0,o.readVint)(this._buffer,this._cursor);if(null==e)return!1;var t=this._tag_stack[this._tag_stack.length-1];return t.sizeEnd=t.sizeStart+e.length,t.dataStart=t.sizeEnd,t.dataSize=e.value,-1===e.value?(t.dataEnd=-1,"m"===t.type&&(t.unknownSize=!0)):t.dataEnd=t.sizeEnd+e.value,this._cursor+=e.length,this._total+=e.length,this._state=r.STATE_CONTENT,!0},e.prototype.readContent=function(){var e=this._tag_stack[this._tag_stack.length-1];if("m"===e.type){if(e.isEnd=!1,this._result.push(e),this._state=r.STATE_TAG,0===e.dataSize){var t=Object.assign({},e,{isEnd:!0});this._result.push(t),this._tag_stack.pop()}return!0}if(this._buffer.length<this._cursor+e.dataSize)return!1;var n=this._buffer.slice(this._cursor,this._cursor+e.dataSize);switch(this._buffer=this._buffer.slice(this._cursor+e.dataSize),e.data=n,e.type){case"u":e.value=n.readUIntBE(0,n.length);break;case"i":e.value=n.readIntBE(0,n.length);break;case"f":e.value=4===e.dataSize?n.readFloatBE(0):8===e.dataSize?n.readDoubleBE(0):(console.warn("cannot read ".concat(e.dataSize," octets float. failback to 0")),0);break;case"s":e.value=n.toString("ascii");break;case"8":e.value=n.toString("utf8");break;case"b":e.value=n;break;case"d":e.value=(0,o.convertEBMLDateToJSDate)(new i.Int64BE(n).toNumber())}if(null===e.value)throw new Error("unknown tag type:"+e.type);for(this._result.push(e),this._total+=e.dataSize,this._state=r.STATE_TAG,this._cursor=0,this._tag_stack.pop();this._tag_stack.length>0;){var a=this._tag_stack[this._tag_stack.length-1];if(a.dataEnd<0)return this._tag_stack.pop(),!0;if(this._total<a.dataEnd)break;if("m"!==a.type)throw new Error("parent element is not master element");t=Object.assign({},a,{isEnd:!0});this._result.push(t),this._tag_stack.pop()}return!0},e}();t.default=l},8031:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3210),i=n(3210),o=n(4370),a=function(){function e(){this._schema=o.byEbmlID,this._buffers=[],this._stack=[]}return e.prototype.encode=function(e){var t=this;return r.concat(e.reduce((function(e,n){return e.concat(t.encodeChunk(n))}),[])).buffer},e.prototype.encodeChunk=function(e){return"m"===e.type?e.isEnd?this.endTag(e):this.startTag(e):(e.data=i.Buffer.from(e.data),this.writeTag(e)),this.flush()},e.prototype.flush=function(){var e=this._buffers;return this._buffers=[],e},e.prototype.getSchemaInfo=function(e){for(var t=Object.keys(this._schema).map(Number),n=0;n<t.length;n++){var r=t[n];if(this._schema[r].name===e)return new i.Buffer(r.toString(16),"hex")}return null},e.prototype.writeTag=function(e){var t=e.name,n=this.getSchemaInfo(t),i=e.data;if(null==n)throw new Error("No schema entry found for "+t);var o=r.encodeTag(n,i);this._stack.length>0?this._stack[this._stack.length-1].children.push({tagId:n,elm:e,children:[],data:o}):this._buffers=this._buffers.concat(o)},e.prototype.startTag=function(e){var t=e.name,n=this.getSchemaInfo(t);if(null==n)throw new Error("No schema entry found for "+t);if(e.unknownSize){var o=r.encodeTag(n,new i.Buffer(0),e.unknownSize);this._buffers=this._buffers.concat(o)}else{var a={tagId:n,elm:e,children:[],data:null};this._stack.length>0&&this._stack[this._stack.length-1].children.push(a),this._stack.push(a)}},e.prototype.endTag=function(e){e.name;var t=this._stack.pop();if(null==t)throw new Error("EBML structure is broken");if(t.elm.name!==e.name)throw new Error("EBML structure is broken");var n=t.children.reduce((function(e,t){if(null===t.data)throw new Error("EBML structure is broken");return e.concat(t.data)}),[]),i=r.concat(n);"m"===t.elm.type?t.data=r.encodeTag(t.tagId,i,t.elm.unknownSize):t.data=r.encodeTag(t.tagId,i),this._stack.length<1&&(this._buffers=this._buffers.concat(t.data))},e}();t.default=a},1381:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(7187),a=n(3210),s=function(e){function t(){var t=e.call(this)||this;return t.logGroup="",t.hasLoggingStarted=!1,t.metadataloaded=!1,t.chunks=[],t.stack=[],t.segmentOffset=0,t.last2SimpleBlockVideoTrackTimecode=[0,0],t.last2SimpleBlockAudioTrackTimecode=[0,0],t.lastClusterTimecode=0,t.lastClusterPosition=0,t.timecodeScale=1e6,t.metadataSize=0,t.metadatas=[],t.cues=[],t.firstVideoBlockRead=!1,t.firstAudioBlockRead=!1,t.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null},t.trackTypes=[],t.trackDefaultDuration=[],t.trackCodecDelay=[],t.trackInfo={type:"nothing"},t.ended=!1,t.logging=!1,t.use_duration_every_simpleblock=!1,t.use_webp=!1,t.use_segment_info=!0,t.drop_default_duration=!0,t}return i(t,e),t.prototype.stop=function(){for(this.ended=!0,this.emit_segment_info();this.stack.length;)this.stack.pop(),this.logging&&console.groupEnd();this.logging&&this.hasLoggingStarted&&this.logGroup&&console.groupEnd()},t.prototype.emit_segment_info=function(){var e=this.chunks;if(this.chunks=[],this.metadataloaded){if(!this.use_segment_info)return;var t=this.lastClusterTimecode,n=this.duration,r=this.timecodeScale;this.emit("cluster",{timecode:t,data:e}),this.emit("duration",{timecodeScale:r,duration:n})}else{this.metadataloaded=!0,this.metadatas=e;var i=this.trackTypes.indexOf(1),o=this.trackTypes.indexOf(2);if(this.trackInfo=i>=0&&o>=0?{type:"both",trackNumber:i}:i>=0?{type:"video",trackNumber:i}:o>=0?{type:"audio",trackNumber:o}:{type:"nothing"},!this.use_segment_info)return;this.emit("metadata",{data:e,metadataSize:this.metadataSize})}},t.prototype.read=function(e){var t=this,n=!1;if(!this.ended){if("m"===e.type)if(e.isEnd)this.stack.pop();else{var r=this.stack[this.stack.length-1];if(null!=r&&r.level>=e.level){this.stack.pop(),this.logging&&console.groupEnd(),r.dataEnd=e.dataEnd,r.dataSize=e.dataEnd-r.dataStart,r.unknownSize=!1;var i=Object.assign({},r,{name:r.name,type:r.type,isEnd:!0});this.chunks.push(i)}this.stack.push(e)}if("m"===e.type&&"Segment"==e.name)0!=this.segmentOffset&&console.warn("Multiple segments detected!"),this.segmentOffset=e.dataStart,this.emit("segment_offset",this.segmentOffset);else if("b"===e.type&&"SimpleBlock"===e.name){var o=a.ebmlBlock(e.data),s=o.timecode,l=o.trackNumber,c=o.frames;if(1===this.trackTypes[l]){if(!this.firstVideoBlockRead&&(this.firstVideoBlockRead=!0,"both"===this.trackInfo.type||"video"===this.trackInfo.type)){var u=this.lastClusterTimecode+s;this.cues.push({CueTrack:l,CueClusterPosition:this.lastClusterPosition,CueTime:u}),this.emit("cue_info",{CueTrack:l,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:l,CueClusterPosition:this.lastClusterPosition,CueTime:u})}this.last2SimpleBlockVideoTrackTimecode=[this.last2SimpleBlockVideoTrackTimecode[1],s]}else if(2===this.trackTypes[l]){if(!this.firstAudioBlockRead&&(this.firstAudioBlockRead=!0,"audio"===this.trackInfo.type)){u=this.lastClusterTimecode+s;this.cues.push({CueTrack:l,CueClusterPosition:this.lastClusterPosition,CueTime:u}),this.emit("cue_info",{CueTrack:l,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:l,CueClusterPosition:this.lastClusterPosition,CueTime:u})}this.last2SimpleBlockAudioTrackTimecode=[this.last2SimpleBlockAudioTrackTimecode[1],s]}this.use_duration_every_simpleblock&&this.emit("duration",{timecodeScale:this.timecodeScale,duration:this.duration}),this.use_webp&&c.forEach((function(e){if("9d012a"===e.slice(3,6).toString("hex")){var n=a.VP8BitStreamToRiffWebPBuffer(e),r=new Blob([n],{type:"image/webp"}),i=t.duration;t.emit("webp",{currentTime:i,webp:r})}}))}else"m"===e.type&&"Cluster"===e.name&&!1===e.isEnd?(this.firstVideoBlockRead=!1,this.firstAudioBlockRead=!1,this.emit_segment_info(),this.emit("cluster_ptr",e.tagStart),this.lastClusterPosition=e.tagStart):"u"===e.type&&"Timecode"===e.name?this.lastClusterTimecode=e.value:"u"===e.type&&"TimecodeScale"===e.name?this.timecodeScale=e.value:"m"===e.type&&"TrackEntry"===e.name?e.isEnd?(this.trackTypes[this.currentTrack.TrackNumber]=this.currentTrack.TrackType,this.trackDefaultDuration[this.currentTrack.TrackNumber]=this.currentTrack.DefaultDuration,this.trackCodecDelay[this.currentTrack.TrackNumber]=this.currentTrack.CodecDelay):this.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null}:"u"===e.type&&"TrackType"===e.name?this.currentTrack.TrackType=e.value:"u"===e.type&&"TrackNumber"===e.name?this.currentTrack.TrackNumber=e.value:"u"===e.type&&"CodecDelay"===e.name?this.currentTrack.CodecDelay=e.value:"u"===e.type&&"DefaultDuration"===e.name?this.drop_default_duration?(console.warn("DefaultDuration detected!, remove it"),n=!0):this.currentTrack.DefaultDuration=e.value:"unknown"===e.name&&console.warn(e);!this.metadataloaded&&e.dataEnd>0&&(this.metadataSize=e.dataEnd),n||this.chunks.push(e),this.logging&&this.put(e)}},Object.defineProperty(t.prototype,"duration",{get:function(){if("nothing"===this.trackInfo.type)return console.warn("no video, no audio track"),0;var e=0,t=0,n=0,r=this.trackDefaultDuration[this.trackInfo.trackNumber];if("number"==typeof r)e=r;else if("both"===this.trackInfo.type)this.last2SimpleBlockAudioTrackTimecode[1]>this.last2SimpleBlockVideoTrackTimecode[1]?(e=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale,"number"==typeof(i=this.trackCodecDelay[this.trackTypes.indexOf(2)])&&(t=i),n=this.last2SimpleBlockAudioTrackTimecode[1]):(e=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale,"number"==typeof(i=this.trackCodecDelay[this.trackTypes.indexOf(1)])&&(t=i),n=this.last2SimpleBlockVideoTrackTimecode[1]);else if("video"===this.trackInfo.type){e=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale,"number"==typeof(i=this.trackCodecDelay[this.trackInfo.trackNumber])&&(t=i),n=this.last2SimpleBlockVideoTrackTimecode[1]}else if("audio"===this.trackInfo.type){var i;e=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale,"number"==typeof(i=this.trackCodecDelay[this.trackInfo.trackNumber])&&(t=i),n=this.last2SimpleBlockAudioTrackTimecode[1]}var o=((this.lastClusterTimecode+n)*this.timecodeScale+e-t)/this.timecodeScale;return Math.floor(o)},enumerable:!1,configurable:!0}),t.prototype.addListener=function(t,n){return e.prototype.addListener.call(this,t,n)},t.prototype.put=function(e){this.hasLoggingStarted||(this.hasLoggingStarted=!0,this.logging&&this.logGroup&&console.groupCollapsed(this.logGroup)),"m"===e.type?e.isEnd?console.groupEnd():console.group(e.name+":"+e.tagStart):"b"===e.type?console.log(e.name,e.type):console.log(e.name,e.tagStart,e.type,e.value)},t}(o.EventEmitter);t.default=s},4370:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byEbmlID=void 0,t.byEbmlID={128:{name:"ChapterDisplay",level:4,type:"m",multiple:!0,minver:1,webm:!0,description:"Contains all possible strings to use for the chapter display."},131:{name:"TrackType",level:3,type:"u",mandatory:!0,minver:1,range:"1-254",description:"A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control)."},133:{name:"ChapString",cppname:"ChapterString",level:5,type:"8",mandatory:!0,minver:1,webm:!0,description:"Contains the string to use as the chapter atom."},134:{name:"CodecID",level:3,type:"s",mandatory:!0,minver:1,description:"An ID corresponding to the codec, see the codec page for more info."},136:{name:"FlagDefault",cppname:"TrackFlagDefault",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)"},137:{name:"ChapterTrackNumber",level:5,type:"u",mandatory:!0,multiple:!0,minver:1,webm:!1,range:"not 0",description:"UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks."},145:{name:"ChapterTimeStart",level:4,type:"u",mandatory:!0,minver:1,webm:!0,description:"Timestamp of the start of Chapter (not scaled)."},146:{name:"ChapterTimeEnd",level:4,type:"u",minver:1,webm:!1,description:"Timestamp of the end of Chapter (timestamp excluded, not scaled)."},150:{name:"CueRefTime",level:5,type:"u",mandatory:!0,minver:2,webm:!1,description:"Timestamp of the referenced Block."},151:{name:"CueRefCluster",level:5,type:"u",mandatory:!0,webm:!1,description:"The Position of the Cluster containing the referenced Block."},152:{name:"ChapterFlagHidden",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},16980:{name:"ContentCompAlgo",level:6,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 3 - Header Stripping"},16981:{name:"ContentCompSettings",level:6,type:"b",minver:1,webm:!1,description:"Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track."},17026:{name:"DocType",level:1,type:"s",mandatory:!0,default:"matroska",minver:1,description:"A string that describes the type of document that follows this EBML header. 'matroska' in our case or 'webm' for webm files."},17029:{name:"DocTypeReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum DocType version an interpreter has to support to read this file."},17030:{name:"EBMLVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of EBML parser used to create the file."},17031:{name:"DocTypeVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of DocType interpreter used to create the file."},17476:{name:"SegmentFamily",level:2,type:"b",multiple:!0,minver:1,webm:!1,bytesize:16,description:"A randomly generated unique ID that all segments related to each other must use (128 bits)."},17505:{name:"DateUTC",level:2,type:"d",minver:1,description:"Date of the origin of timestamp (value 0), i.e. production date."},17540:{name:"TagDefault",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Indication to know if this is the default/original language to use for the given tag. (1 bit)"},17541:{name:"TagBinary",level:4,type:"b",minver:1,webm:!1,description:"The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString."},17543:{name:"TagString",level:4,type:"8",minver:1,webm:!1,description:"The value of the Element."},17545:{name:"Duration",level:2,type:"f",minver:1,range:"> 0",description:"Duration of the segment (based on TimecodeScale)."},17816:{name:"ChapterFlagEnabled",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit)"},18016:{name:"FileMimeType",level:3,type:"s",mandatory:!0,minver:1,webm:!1,description:"MIME type of the file."},18017:{name:"FileUsedStartTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18018:{name:"FileUsedEndTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18037:{name:"FileReferral",level:3,type:"b",webm:!1,description:"A binary value that a track/codec can refer to when the attachment is needed."},20529:{name:"ContentEncodingOrder",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment."},20530:{name:"ContentEncodingScope",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)"},20531:{name:"ContentEncodingType",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption"},20532:{name:"ContentCompression",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking."},20533:{name:"ContentEncryption",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise."},21368:{name:"CueBlockNumber",level:4,type:"u",minver:1,default:1,range:"not 0",description:"Number of the Block in the specified Cluster."},22100:{name:"ChapterStringUID",level:4,type:"8",mandatory:!1,minver:3,webm:!0,description:"A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage."},22337:{name:"WritingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Writing application ("mkvmerge-0.3.3").'},22612:{name:"SilentTracks",cppname:"ClusterSilentTracks",level:2,type:"m",minver:1,webm:!1,description:"The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use."},25152:{name:"ContentEncoding",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Settings for one content encoding like compression or encryption."},25188:{name:"BitDepth",cppname:"AudioBitDepth",level:4,type:"u",minver:1,range:"not 0",description:"Bits per sample, mostly used for PCM."},25906:{name:"SignedElement",level:3,type:"b",multiple:!0,webm:!1,description:"An element ID whose data will be used to compute the signature."},26148:{name:"TrackTranslate",level:3,type:"m",multiple:!0,minver:1,webm:!1,description:"The track identification for the given Chapter Codec."},26897:{name:"ChapProcessCommand",cppname:"ChapterProcessCommand",level:5,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26914:{name:"ChapProcessTime",cppname:"ChapterProcessTime",level:6,type:"u",mandatory:!0,minver:1,webm:!1,description:"Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter)."},26916:{name:"ChapterTranslate",level:2,type:"m",multiple:!0,minver:1,webm:!1,description:"A tuple of corresponding ID used by chapter codecs to represent this segment."},26931:{name:"ChapProcessData",cppname:"ChapterProcessData",level:6,type:"b",mandatory:!0,minver:1,webm:!1,description:"Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands."},26948:{name:"ChapProcess",cppname:"ChapterProcess",level:4,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26965:{name:"ChapProcessCodecID",cppname:"ChapterProcessCodecID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later."},29555:{name:"Tag",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters."},29572:{name:"SegmentFilename",level:2,type:"8",minver:1,webm:!1,description:"A filename corresponding to this segment."},29766:{name:"AttachmentLink",cppname:"TrackAttachmentLink",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"The UID of an attachment that is used by this codec."},2459272:{name:"CodecName",level:3,type:"8",minver:1,description:"A human-readable string specifying the codec."},408125543:{name:"Segment",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment."},17530:{name:"TagLanguage",level:4,type:"s",mandatory:!0,minver:1,webm:!1,default:"und",description:"Specifies the language of the tag specified, in the Matroska languages form."},17827:{name:"TagName",level:4,type:"8",mandatory:!0,minver:1,webm:!1,description:"The name of the Tag that is going to be stored."},26568:{name:"SimpleTag",cppname:"TagSimple",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contains general information about the target."},25542:{name:"TagAttachmentUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment."},25540:{name:"TagChapterUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment."},25545:{name:"TagEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment."},25541:{name:"TagTrackUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment."},25546:{name:"TargetType",cppname:"TagTargetType",level:4,type:"s",minver:1,webm:!1,strong:"informational",description:'An string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).'},26826:{name:"TargetTypeValue",cppname:"TagTargetTypeValue",level:4,type:"u",minver:1,webm:!1,default:50,description:"A number to indicate the logical level of the target (see TargetType)."},25536:{name:"Targets",cppname:"TagTargets",level:3,type:"m",mandatory:!0,minver:1,webm:!1,description:"Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment."},307544935:{name:"Tags",level:1,type:"m",multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here."},17677:{name:"ChapProcessPrivate",cppname:"ChapterProcessPrivate",level:5,type:"b",minver:1,webm:!1,description:'Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.'},17278:{name:"ChapCountry",cppname:"ChapterCountry",level:5,type:"s",multiple:!0,minver:1,webm:!1,description:"The countries corresponding to the string, same 2 octets as in Internet domains."},17276:{name:"ChapLanguage",cppname:"ChapterLanguage",level:5,type:"s",mandatory:!0,multiple:!0,minver:1,webm:!0,default:"eng",description:"The languages corresponding to the string, in the bibliographic ISO-639-2 form."},143:{name:"ChapterTrack",level:4,type:"m",minver:1,webm:!1,description:"List of tracks on which the chapter applies. If this element is not present, all tracks apply"},25539:{name:"ChapterPhysicalEquiv",level:4,type:"u",minver:1,webm:!1,description:'Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.'},28348:{name:"ChapterSegmentEditionUID",level:4,type:"u",minver:1,webm:!1,range:"not 0",description:"The EditionUID to play from the segment linked in ChapterSegmentUID."},28263:{name:"ChapterSegmentUID",level:4,type:"b",minver:1,webm:!1,range:">0",bytesize:16,description:"A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used."},29636:{name:"ChapterUID",level:4,type:"u",mandatory:!0,minver:1,webm:!0,range:"not 0",description:"A unique ID to identify the Chapter."},182:{name:"ChapterAtom",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains the atom information to use as the chapter atom (apply to all tracks)."},17885:{name:"EditionFlagOrdered",level:3,type:"u",minver:1,webm:!1,default:0,range:"0-1",description:"Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)"},17883:{name:"EditionFlagDefault",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a flag is set (1) the edition should be used as the default one. (1 bit)"},17853:{name:"EditionFlagHidden",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},17852:{name:"EditionUID",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"A unique ID to identify the edition. It's useful for tagging an edition."},17849:{name:"EditionEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains all information about a segment edition."},272869232:{name:"Chapters",level:1,type:"m",minver:1,webm:!0,description:"A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation."},18094:{name:"FileUID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,range:"not 0",description:"Unique ID representing the file, as random as possible."},18012:{name:"FileData",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The data of the file."},18030:{name:"FileName",level:3,type:"8",mandatory:!0,minver:1,webm:!1,description:"Filename of the attached file."},18046:{name:"FileDescription",level:3,type:"8",minver:1,webm:!1,description:"A human-friendly name for the attached file."},24999:{name:"AttachedFile",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"An attached file."},423732329:{name:"Attachments",level:1,type:"m",minver:1,webm:!1,description:"Contain attached files."},235:{name:"CueRefCodecState",level:5,type:"u",webm:!1,default:0,description:"The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry."},21343:{name:"CueRefNumber",level:5,type:"u",webm:!1,default:1,range:"not 0",description:"Number of the referenced Block of Track X in the specified Cluster."},219:{name:"CueReference",level:4,type:"m",multiple:!0,minver:2,webm:!1,description:"The Clusters containing the required referenced Blocks."},234:{name:"CueCodecState",level:4,type:"u",minver:2,webm:!1,default:0,description:"The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry."},178:{name:"CueDuration",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The duration of the block according to the segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues."},240:{name:"CueRelativePosition",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The relative position of the referenced block inside the cluster with 0 being the first possible position for an element inside that cluster.",position:"clusterRelative"},241:{name:"CueClusterPosition",level:4,type:"u",mandatory:!0,minver:1,description:"The position of the Cluster containing the required Block.",position:"segment"},247:{name:"CueTrack",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track for which a position is given."},183:{name:"CueTrackPositions",level:3,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contain positions for different tracks corresponding to the timestamp."},179:{name:"CueTime",level:3,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp according to the segment time base."},187:{name:"CuePoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains all information relative to a seek point in the segment."},475249515:{name:"Cues",level:1,type:"m",minver:1,description:'A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.'},18406:{name:"ContentSigHashAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5"},18405:{name:"ContentSigAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA"},18404:{name:"ContentSigKeyID",level:6,type:"b",minver:1,webm:!1,description:"This is the ID of the private key the data was signed with."},18403:{name:"ContentSignature",level:6,type:"b",minver:1,webm:!1,description:"A cryptographic signature of the contents."},18402:{name:"ContentEncKeyID",level:6,type:"b",minver:1,webm:!1,description:"For public key algorithms this is the ID of the public key the the data was encrypted with."},18401:{name:"ContentEncAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES"},28032:{name:"ContentEncodings",level:3,type:"m",minver:1,webm:!1,description:"Settings for several content encoding mechanisms like compression or encryption."},196:{name:"TrickMasterTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},199:{name:"TrickMasterTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},198:{name:"TrickTrackFlag",level:3,type:"u",divx:!0,default:0,description:"DivX trick track extenstions"},193:{name:"TrickTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},192:{name:"TrickTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},237:{name:"TrackJoinUID",level:5,type:"u",mandatory:!0,multiple:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of a track whose blocks are used to create this virtual track."},233:{name:"TrackJoinBlocks",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all tracks whose Blocks need to be combined to create this virtual track"},230:{name:"TrackPlaneType",level:6,type:"u",mandatory:!0,minver:3,webm:!1,description:"The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background)."},229:{name:"TrackPlaneUID",level:6,type:"u",mandatory:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of the track representing the plane."},228:{name:"TrackPlane",level:5,type:"m",mandatory:!0,multiple:!0,minver:3,webm:!1,description:"Contains a video plane track that need to be combined to create this 3D track"},227:{name:"TrackCombinePlanes",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all video plane tracks that need to be combined to create this 3D track"},226:{name:"TrackOperation",level:3,type:"m",minver:3,webm:!1,description:"Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject."},32123:{name:"ChannelPositions",cppname:"AudioPosition",level:4,type:"b",webm:!1,description:"Table of horizontal angles for each successive channel, see appendix."},159:{name:"Channels",cppname:"AudioChannels",level:4,type:"u",mandatory:!0,minver:1,default:1,range:"not 0",description:"Numbers of channels in the track."},30901:{name:"OutputSamplingFrequency",cppname:"AudioOutputSamplingFreq",level:4,type:"f",minver:1,default:"Sampling Frequency",range:"> 0",description:"Real output sampling frequency in Hz (used for SBR techniques)."},181:{name:"SamplingFrequency",cppname:"AudioSamplingFreq",level:4,type:"f",mandatory:!0,minver:1,default:8e3,range:"> 0",description:"Sampling frequency in Hz."},225:{name:"Audio",cppname:"TrackAudio",level:3,type:"m",minver:1,description:"Audio settings."},2327523:{name:"FrameRate",cppname:"VideoFrameRate",level:4,type:"f",range:"> 0",strong:"Informational",description:"Number of frames per second. only."},3126563:{name:"GammaValue",cppname:"VideoGamma",level:4,type:"f",webm:!1,range:"> 0",description:"Gamma Value."},3061028:{name:"ColourSpace",cppname:"VideoColourSpace",level:4,type:"b",minver:1,webm:!1,bytesize:4,description:"Same value as in AVI (32 bits)."},21683:{name:"AspectRatioType",cppname:"VideoAspectRatio",level:4,type:"u",minver:1,default:0,description:"Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)."},21682:{name:"DisplayUnit",cppname:"VideoDisplayUnit",level:4,type:"u",minver:1,default:0,description:"How DisplayWidth & DisplayHeight should be interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio)."},21690:{name:"DisplayHeight",cppname:"VideoDisplayHeight",level:4,type:"u",minver:1,default:"PixelHeight",range:"not 0",description:"Height of the video frames to display. The default value is only valid when DisplayUnit is 0."},21680:{name:"DisplayWidth",cppname:"VideoDisplayWidth",level:4,type:"u",minver:1,default:"PixelWidth",range:"not 0",description:"Width of the video frames to display. The default value is only valid when DisplayUnit is 0."},21725:{name:"PixelCropRight",cppname:"VideoPixelCropRight",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the right of the image."},21708:{name:"PixelCropLeft",cppname:"VideoPixelCropLeft",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the left of the image."},21691:{name:"PixelCropTop",cppname:"VideoPixelCropTop",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the top of the image."},21674:{name:"PixelCropBottom",cppname:"VideoPixelCropBottom",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the bottom of the image (for HDTV content)."},186:{name:"PixelHeight",cppname:"VideoPixelHeight",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Height of the encoded video frames in pixels."},176:{name:"PixelWidth",cppname:"VideoPixelWidth",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Width of the encoded video frames in pixels."},21433:{name:"OldStereoMode",level:4,type:"u",maxver:"0",webm:!1,divx:!1,description:"DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes)."},21440:{name:"AlphaMode",cppname:"VideoAlphaMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Alpha Video Mode. Presence of this element indicates that the BlockAdditional element could contain Alpha data."},21432:{name:"StereoMode",cppname:"VideoStereoMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes."},154:{name:"FlagInterlaced",cppname:"VideoFlagInterlaced",level:4,type:"u",mandatory:!0,minver:2,webm:!0,default:0,range:"0-1",description:"Set if the video is interlaced. (1 bit)"},224:{name:"Video",cppname:"TrackVideo",level:3,type:"m",minver:1,description:"Video settings."},26277:{name:"TrackTranslateTrackID",level:4,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used."},26303:{name:"TrackTranslateCodec",level:4,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},26364:{name:"TrackTranslateEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment."},22203:{name:"SeekPreRoll",level:3,type:"u",mandatory:!0,multiple:!1,default:0,minver:4,webm:!0,description:"After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid."},22186:{name:"CodecDelay",level:3,type:"u",multiple:!1,default:0,minver:4,webm:!0,description:"CodecDelay is The codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp. The value should be small so the muxing of tracks with the same actual timestamp are in the same Cluster."},28587:{name:"TrackOverlay",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc."},170:{name:"CodecDecodeAll",level:3,type:"u",mandatory:!0,minver:2,webm:!1,default:1,range:"0-1",description:"The codec can decode potentially damaged data (1 bit)."},2536e3:{name:"CodecDownloadURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to download about the codec used."},3883072:{name:"CodecInfoURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to find information about the codec used."},3839639:{name:"CodecSettings",level:3,type:"8",webm:!1,description:"A string describing the encoding setting used."},25506:{name:"CodecPrivate",level:3,type:"b",minver:1,description:"Private data only known to the codec."},2274716:{name:"Language",cppname:"TrackLanguage",level:3,type:"s",minver:1,default:"eng",description:"Specifies the language of the track in the Matroska languages form."},21358:{name:"Name",cppname:"TrackName",level:3,type:"8",minver:1,description:"A human-readable track name."},21998:{name:"MaxBlockAdditionID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The maximum value of BlockAdditions for this track."},21375:{name:"TrackOffset",level:3,type:"i",webm:!1,default:0,description:"A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track."},2306383:{name:"TrackTimecodeScale",level:3,type:"f",mandatory:!0,minver:1,maxver:"3",webm:!1,default:1,range:"> 0",description:"DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs)."},2313850:{name:"DefaultDecodedFieldDuration",cppname:"TrackDefaultDecodedFieldDuration",level:3,type:"u",minver:4,range:"not 0",description:"The period in nanoseconds (not scaled by TimcodeScale)\nbetween two successive fields at the output of the decoding process (see the notes)"},2352003:{name:"DefaultDuration",cppname:"TrackDefaultDuration",level:3,type:"u",minver:1,range:"not 0",description:"Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a (Simple)Block)."},28152:{name:"MaxCache",cppname:"TrackMaxCache",level:3,type:"u",minver:1,webm:!1,description:"The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed."},28135:{name:"MinCache",cppname:"TrackMinCache",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used."},156:{name:"FlagLacing",cppname:"TrackFlagLacing",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if the track may contain blocks using lacing. (1 bit)"},21930:{name:"FlagForced",cppname:"TrackFlagForced",level:3,type:"u",mandatory:!0,minver:1,default:0,range:"0-1",description:"Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)"},185:{name:"FlagEnabled",cppname:"TrackFlagEnabled",level:3,type:"u",mandatory:!0,minver:2,webm:!0,default:1,range:"0-1",description:"Set if the track is usable. (1 bit)"},29637:{name:"TrackUID",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file."},215:{name:"TrackNumber",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number)."},174:{name:"TrackEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Describes a track with all elements."},374648427:{name:"Tracks",level:1,type:"m",multiple:!0,minver:1,description:"A top-level block of information with many tracks described."},175:{name:"EncryptedBlock",level:2,type:"b",multiple:!0,webm:!1,description:"Similar to EncryptedBlock Structure)"},202:{name:"ReferenceTimeCode",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},201:{name:"ReferenceOffset",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},200:{name:"ReferenceFrame",level:3,type:"m",multiple:!1,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},207:{name:"SliceDuration",level:5,type:"u",default:0,description:"The (scaled) duration to apply to the element."},206:{name:"Delay",cppname:"SliceDelay",level:5,type:"u",default:0,description:"The (scaled) delay to apply to the element."},203:{name:"BlockAdditionID",cppname:"SliceBlockAddID",level:5,type:"u",default:0,description:"The ID of the BlockAdditional element (0 is the main Block)."},205:{name:"FrameNumber",cppname:"SliceFrameNumber",level:5,type:"u",default:0,description:"The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame)."},204:{name:"LaceNumber",cppname:"SliceLaceNumber",level:5,type:"u",minver:1,default:0,divx:!1,description:"The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},232:{name:"TimeSlice",level:4,type:"m",multiple:!0,minver:1,divx:!1,description:"Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},142:{name:"Slices",level:3,type:"m",minver:1,divx:!1,description:"Contains slices description."},30114:{name:"DiscardPadding",level:3,type:"i",minver:4,webm:!0,description:"Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and should be discarded during playback."},164:{name:"CodecState",level:3,type:"b",minver:2,webm:!1,description:"The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry."},253:{name:"ReferenceVirtual",level:3,type:"i",webm:!1,description:"Relative position of the data that should be in position of the virtual block."},251:{name:"ReferenceBlock",level:3,type:"i",multiple:!0,minver:1,description:"Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to."},250:{name:"ReferencePriority",cppname:"FlagReferenced",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced."},155:{name:"BlockDuration",level:3,type:"u",minver:1,default:"TrackDuration",description:'The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe.'},165:{name:"BlockAdditional",level:5,type:"b",mandatory:!0,minver:1,webm:!1,description:"Interpreted by the codec as it wishes (using the BlockAddID)."},238:{name:"BlockAddID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"An ID to identify the BlockAdditional level."},166:{name:"BlockMore",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contain the BlockAdditional and some parameters."},30113:{name:"BlockAdditions",level:3,type:"m",minver:1,webm:!1,description:"Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data."},162:{name:"BlockVirtual",level:3,type:"b",webm:!1,description:"A Block with no data. It must be stored in the stream at the place the real Block should be in display order. (see Block Virtual)"},161:{name:"Block",level:3,type:"b",mandatory:!0,minver:1,description:"Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)"},160:{name:"BlockGroup",level:2,type:"m",multiple:!0,minver:1,description:"Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock."},163:{name:"SimpleBlock",level:2,type:"b",multiple:!0,minver:2,webm:!0,divx:!0,description:"Similar to SimpleBlock Structure"},171:{name:"PrevSize",cppname:"ClusterPrevSize",level:2,type:"u",minver:1,description:"Size of the previous Cluster, in octets. Can be useful for backward playing.",position:"prevCluster"},167:{name:"Position",cppname:"ClusterPosition",level:2,type:"u",minver:1,webm:!1,description:"The Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.",position:"segment"},22743:{name:"SilentTrackNumber",cppname:"ClusterSilentTrackNumber",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster."},231:{name:"Timecode",cppname:"ClusterTimecode",level:2,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp of the cluster (based on TimecodeScale)."},524531317:{name:"Cluster",level:1,type:"m",multiple:!0,minver:1,description:"The lower level element containing the (monolithic) Block structure."},19840:{name:"MuxingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Muxing application or library ("libmatroska-0.4.3").'},31657:{name:"Title",level:2,type:"8",minver:1,webm:!1,description:"General name of the segment."},2807730:{name:"TimecodeScaleDenominator",level:2,type:"u",mandatory:!0,minver:4,default:"1000000000",description:"Timestamp scale numerator, see TimecodeScale."},2807729:{name:"TimecodeScale",level:2,type:"u",mandatory:!0,minver:1,default:"1000000",description:"Timestamp scale in nanoseconds (1.000.000 means all timestamps in the segment are expressed in milliseconds)."},27045:{name:"ChapterTranslateID",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used."},27071:{name:"ChapterTranslateCodec",level:3,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},27132:{name:"ChapterTranslateEditionUID",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment."},4096955:{name:"NextFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the next segment."},4110627:{name:"NextUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the next chained segment (128 bits)."},3965867:{name:"PrevFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the previous segment."},3979555:{name:"PrevUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the previous chained segment (128 bits)."},29604:{name:"SegmentUID",level:2,type:"b",minver:1,webm:!1,range:"not 0",bytesize:16,description:"A randomly generated unique ID to identify the current segment between many others (128 bits)."},357149030:{name:"Info",level:1,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains miscellaneous general information and statistics on the file."},21420:{name:"SeekPosition",level:3,type:"u",mandatory:!0,minver:1,description:"The position of the element in the segment in octets (0 = first level 1 element).",position:"segment"},21419:{name:"SeekID",level:3,type:"b",mandatory:!0,minver:1,description:"The binary ID corresponding to the element name.",type2:"ebmlID"},19899:{name:"Seek",cppname:"SeekPoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains a single seek entry to an EBML element."},290298740:{name:"SeekHead",cppname:"SeekHeader",level:1,type:"m",multiple:!0,minver:1,description:"Contains the position of other level 1 elements."},32379:{name:"SignatureElementList",level:2,type:"m",multiple:!0,webm:!1,i:"Cluster|Block|BlockAdditional",description:"A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: means that the BlockAdditional of all Blocks in all Clusters is used for encryption."},32347:{name:"SignatureElements",level:1,type:"m",webm:!1,description:"Contains elements that will be used to compute the signature."},32437:{name:"Signature",level:1,type:"b",webm:!1,description:"The signature of the data (until a new."},32421:{name:"SignaturePublicKey",level:1,type:"b",webm:!1,description:"The public key to use with the algorithm (in the case of a PKI-based signature)."},32410:{name:"SignatureHash",level:1,type:"u",webm:!1,description:"Hash algorithm used (1=SHA1-160, 2=MD5)."},32394:{name:"SignatureAlgo",level:1,type:"u",webm:!1,description:"Signature algorithm used (1=RSA, 2=elliptic)."},458458727:{name:"SignatureSlot",level:-1,type:"m",multiple:!0,webm:!1,description:"Contain signature of some (coming) elements in the stream."},191:{name:"CRC-32",level:-1,type:"b",minver:1,webm:!1,description:"The CRC is computed on all the data of the Master element it's in. The CRC element should be the first in it's parent master for easier reading. All level 1 elements should include a CRC-32. The CRC in use is the IEEE CRC32 Little Endian",crc:!0},236:{name:"Void",level:-1,type:"b",minver:1,description:"Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use."},17139:{name:"EBMLMaxSizeLength",level:1,type:"u",mandatory:!0,default:8,minver:1,description:"The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid."},17138:{name:"EBMLMaxIDLength",level:1,type:"u",mandatory:!0,default:4,minver:1,description:"The maximum length of the IDs you'll find in this file (4 or less in Matroska)."},17143:{name:"EBMLReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum EBML version a parser has to support to read this file."},440786851:{name:"EBML",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"Set the EBML characteristics of the data to follow. Each EBML document has to start with this."},21936:{name:"Colour",level:"4",type:"m",mandatory:!0,multiple:!0,description:"Settings describing the colour format."},21937:{name:"MatrixCoefficients",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273."},21945:{name:"Range",level:"5",type:"u",mandatory:!0,multiple:!0,description:"Clipping of the color ranges."},21946:{name:"TransferCharacteristics",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The transfer characteristics of the video."},21947:{name:"Primaries",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23091-4 or ITU-T H.273."}}},1384:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.tools=t.Reader=t.Encoder=t.Decoder=void 0,i(n(4990),t);var o=n(2800);t.Decoder=o.default;var a=n(8031);t.Encoder=a.default;var s=n(1381);t.Reader=s.default;var l=n(3210);t.tools=l},190:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=n(3210),a=function(){function e(){}return e.readVint=function(t,n){void 0===n&&(n=0);var r=8-Math.floor(Math.log2(t[n]));if(r>8){var i=e.readHexString(t,n,n+r);throw new Error("Unrepresentable length: ".concat(r," ").concat(i))}if(n+r>t.length)return null;for(var o=t[n]&(1<<8-r)-1,a=1;a<r;a+=1){if(7===a&&o>=Math.pow(2,8)&&t[n+7]>0)return{length:r,value:-1};o*=Math.pow(2,8),o+=t[n+a]}return{length:r,value:o}},e.writeVint=function(e){if(e<0||e>Math.pow(2,53))throw new Error("Unrepresentable value: ".concat(e));var t=1;for(t=1;t<=8&&!(e<Math.pow(2,7*t)-1);t+=1);for(var n=o.Buffer.alloc(t),r=e,i=1;i<=t;i+=1){var a=255&r;n[t-i]=a,r-=a,r/=Math.pow(2,8)}return n[0]|=1<<8-t,n},e.concatenate=function(e,t){return e||t?e&&0!==e.byteLength?t&&0!==t.byteLength?o.Buffer.from(i(i([],e,!0),t,!0)):e:t:o.Buffer.from([])},e.readHexString=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),Array.from(e.slice(t,n)).map((function(e){return Number(e).toString(16)})).reduce((function(e,t){return"".concat(e).concat(t.padStart(2,"0"))}),"")},e.readUtf8=function(e){try{return o.Buffer.from(e).toString("utf8")}catch(e){return null}},e.readUnsigned=function(t){var n=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 1:return n.getUint8(0);case 2:return n.getUint16(0);case 4:return n.getUint32(0)}return t.byteLength<=6?t.reduce((function(e,t){return 256*e+t}),0):e.readHexString(t,0,t.byteLength)},e.readSigned=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 1:return t.getInt8(0);case 2:return t.getInt16(0);case 4:return t.getInt32(0);default:return NaN}},e.readFloat=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return t.getFloat32(0);case 8:return t.getFloat64(0);default:return NaN}},e.readDate=function(t){var n=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 1:return new Date(n.getUint8(0));case 2:return new Date(n.getUint16(0));case 4:return new Date(n.getUint32(0));case 8:return new Date(Number.parseInt(e.readHexString(t),16));default:return new Date(0)}},e.readDataFromTag=function(t,n){var i,o=t.type,a=t.name,s=t.track,l=t.discardable||!1,c=t.keyframe||!1,u=null;switch(o){case"u":i=e.readUnsigned(n);break;case"f":i=e.readFloat(n);break;case"i":i=e.readSigned(n);break;case"s":i=String.fromCharCode.apply(String,n);break;case"8":i=e.readUtf8(n);break;case"d":i=e.readDate(n)}if("SimpleBlock"===a||"Block"===a){var d=0,f=e.readVint(n,d),p=f.length;d+=p,s=f.value,i=e.readSigned(n.subarray(d,d+2)),d+=2,"SimpleBlock"===a&&(c=Boolean(128&n[p+2]),l=Boolean(1&n[p+2])),d+=1,u=n.subarray(d)}return r(r({},t),{data:n,discardable:l,keyframe:c,payload:u,track:s,value:i})},e}();t.default=a},3210:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertEBMLDateToJSDate=t.createFloatBuffer=t.createIntBuffer=t.createUIntBuffer=t.encodeValueToBuffer=t.concat=t.putRefinedMetaData=t.extractElement=t.removeElement=t.makeMetadataSeekable=t.createRIFFChunk=t.VP8BitStreamToRiffWebPBuffer=t.WebPBlockFilter=t.encodeTag=t.readBlock=t.ebmlBlock=t.writeVint=t.readVint=t.Buffer=void 0;var r=n(1166),i=n(8031),o=n(8764),a=n(190),s=n(1586);function l(e,n){var r=new t.Buffer(4);return r.writeUInt32LE(n.byteLength,0),h([new t.Buffer(e.substr(0,4),"ascii"),r,n,new t.Buffer(n.byteLength%2==0?0:1)])}function c(e,t){for(var n=-1,r=0;r<t.length;r++){var i=t[r];if(i.name===e){if("m"!==i.type)return void t.splice(r,1);if(i.isEnd){if(-1==n)throw new Error("Detected ".concat(e," closing element before finding the start"));return void t.splice(n,r-n+1)}n=r}}}function u(e,t){for(var n=[],r=-1,i=0;i<t.length;i++){var o=t[i];if(o.name===e){if("m"!==o.type){n.push(t[i]);break}if(o.isEnd){if(-1==r)throw new Error("Detected ".concat(e," closing element before finding the start"));n=t.slice(r,i+1);break}r=i}}return n}function d(e){var t=new i.default;return e.reduce((function(e,n){return e.concat(t.encode([n]))}),[]).reduce((function(e,t){return e+t.byteLength}),0)}function f(e,n,r){var i=r.duration,o=r.clusterPtrs,a=r.cues,s=e.slice(0);if("number"==typeof i){var l=!1;s.forEach((function(e){"f"===e.type&&"Duration"===e.name&&(l=!0,e.data=y(i,8))})),l||p(s,"Info",[{name:"Duration",type:"f",data:y(i,8)}])}Array.isArray(a)&&p(s,"Cues",function(e,t){var n=[];return e.forEach((function(e){var r=e.CueTrack,i=e.CueClusterPosition,o=e.CueTime;n.push({name:"CuePoint",type:"m",isEnd:!1}),n.push({name:"CueTime",type:"u",data:m(o)}),n.push({name:"CueTrackPositions",type:"m",isEnd:!1}),n.push({name:"CueTrack",type:"u",data:m(r)}),n.push({name:"CueClusterPosition",type:"u",data:m(i+t)}),n.push({name:"CueTrackPositions",type:"m",isEnd:!0}),n.push({name:"CuePoint",type:"m",isEnd:!0})})),n}(a,n));var c=[];return Array.isArray(o)&&(console.warn("append cluster pointers to seekhead is deprecated. please use cues"),c=function(e,n){var r=[];return e.forEach((function(e){r.push({name:"Seek",type:"m",isEnd:!1}),r.push({name:"SeekID",type:"b",data:new t.Buffer([31,67,182,117])}),r.push({name:"SeekPosition",type:"u",data:m(e+n)}),r.push({name:"Seek",type:"m",isEnd:!0})})),r}(o,n)),p(s,"SeekHead",c,!0),s}function p(e,t,n,r){void 0===r&&(r=!1);for(var i=-1,o=0;o<e.length;o++){var a=e[o];if("m"===a.type&&a.name===t&&!1===a.isEnd){i=o;break}}i>=0?Array.prototype.splice.apply(e,[i+1,0].concat(n)):r?[].concat([{name:t,type:"m",isEnd:!1}],n,[{name:t,type:"m",isEnd:!0}]).reverse().forEach((function(t){e.unshift(t)})):(e.push({name:t,type:"m",isEnd:!1}),n.forEach((function(t){e.push(t)})),e.push({name:t,type:"m",isEnd:!0}))}function h(e){return t.Buffer.concat(e)}function m(e){for(var n=1;e>=Math.pow(2,8*n);n++);if(n>=7)return console.warn("7bit or more bigger uint not supported."),new r.Uint64BE(e).toBuffer();var i=new t.Buffer(n);return i.writeUIntBE(e,0,n),i}function g(e){for(var n=1;e>=Math.pow(2,8*n);n++);if(n>=7)return console.warn("7bit or more bigger uint not supported."),new r.Int64BE(e).toBuffer();var i=new t.Buffer(n);return i.writeIntBE(e,0,n),i}function y(e,n){var r;if(void 0===n&&(n=8),8===n)return(r=new t.Buffer(8)).writeDoubleBE(e,0),r;if(4===n)return(r=new t.Buffer(4)).writeFloatBE(e,0),r;throw new Error("float type bits must 4bytes or 8bytes")}t.Buffer=o.Buffer,t.readVint=a.default.readVint,t.writeVint=a.default.writeVint,t.ebmlBlock=s,t.readBlock=function(e){return(0,t.ebmlBlock)(new t.Buffer(e))},t.encodeTag=function(e,n,r){return void 0===r&&(r=!1),h([e,r?new t.Buffer("01ffffffffffffff","hex"):(0,t.writeVint)(n.length),n])},t.WebPBlockFilter=function(e){return e.reduce((function(e,n){return"b"!==n.type||"SimpleBlock"!==n.name?e:(0,t.ebmlBlock)(n.data).frames.some((function(e){return"9d012a"===e.slice(3,6).toString("hex")}))?e.concat(n):e}),[])},t.VP8BitStreamToRiffWebPBuffer=function(e){var n=l("VP8 ",e);return l("RIFF",h([new t.Buffer("WEBP","ascii"),n]))},t.createRIFFChunk=l,t.makeMetadataSeekable=function(e,n,r){var o=u("EBML",e),a=d(o)+12,s=e[e.length-1].dataEnd-a,l=u("Info",e);c("Duration",l),l.splice(1,0,{name:"Duration",type:"f",data:y(n,8)});for(var f=d(l),p=u("Tracks",e),h=d(p),g=47,v=[],b=5+15*r.length,w=[],x=-1,_=function(e){var n=g,i=n+f,o=i+h,l=o+b-s;if((v=[]).push({name:"SeekHead",type:"m",isEnd:!1}),v.push({name:"Seek",type:"m",isEnd:!1}),v.push({name:"SeekID",type:"b",data:new t.Buffer([21,73,169,102])}),v.push({name:"SeekPosition",type:"u",data:m(n)}),v.push({name:"Seek",type:"m",isEnd:!0}),v.push({name:"Seek",type:"m",isEnd:!1}),v.push({name:"SeekID",type:"b",data:new t.Buffer([22,84,174,107])}),v.push({name:"SeekPosition",type:"u",data:m(i)}),v.push({name:"Seek",type:"m",isEnd:!0}),v.push({name:"Seek",type:"m",isEnd:!1}),v.push({name:"SeekID",type:"b",data:new t.Buffer([28,83,187,107])}),v.push({name:"SeekPosition",type:"u",data:m(o)}),v.push({name:"Seek",type:"m",isEnd:!0}),v.push({name:"SeekHead",type:"m",isEnd:!0}),g=d(v),(w=[]).push({name:"Cues",type:"m",isEnd:!1}),r.forEach((function(e){var t=e.CueTrack,n=e.CueClusterPosition,r=e.CueTime;w.push({name:"CuePoint",type:"m",isEnd:!1}),w.push({name:"CueTime",type:"u",data:m(r)}),w.push({name:"CueTrackPositions",type:"m",isEnd:!1}),w.push({name:"CueTrack",type:"u",data:m(t)}),n-=a,n+=l,w.push({name:"CueClusterPosition",type:"u",data:m(n)}),w.push({name:"CueTrackPositions",type:"m",isEnd:!0}),w.push({name:"CuePoint",type:"m",isEnd:!0})})),w.push({name:"Cues",type:"m",isEnd:!0}),b=d(w),x===l)return"break";if(x=l,9===e)throw new Error("Failed to converge to a stable metadata size")},k=0;k<10;k++){if("break"===_(k))break}var E=[].concat.apply([],[o,{name:"Segment",type:"m",isEnd:!1,unknownSize:!0},v,l,p,w]);return(new i.default).encode(E)},t.removeElement=c,t.extractElement=u,t.putRefinedMetaData=function(e,n){Array.isArray(n.cueInfos)&&!Array.isArray(n.cues)&&(console.warn("putRefinedMetaData: info.cueInfos property is deprecated. please use info.cues"),n.cues=n.cueInfos);for(var r=[],o=[],a=0;a<e.length;a++){var s=e[a];if("m"===s.type&&"Segment"===s.name){if(r=e.slice(0,a),o=e.slice(a),s.unknownSize){o.shift();break}throw new Error("this metadata is not streaming webm file")}}if(!(o[o.length-1].dataEnd>0))throw new Error("metadata dataEnd has wrong number");var l,c=o[o.length-1].dataEnd,u=r[r.length-1].dataEnd,d=(new i.default).encode(r).byteLength-u,p=c-o[0].tagStart,h=(o[0].tagStart,o[0].tagStart,new t.Buffer([24,83,128,103])),m=new t.Buffer("01ffffffffffffff","hex"),g=h.byteLength+m.byteLength,y=p;for(l=1;l<20;l++){var v=f(o,d+(u+g+y-c),n),b=(new i.default).encode(v).byteLength;if(b===y)return(new i.default).encode([].concat(r,[{type:"m",name:"Segment",isEnd:!1,unknownSize:!0}],v));y=b}throw new Error("unable to refine metadata, stable size could not be found in "+l+" iterations!")},t.concat=h,t.encodeValueToBuffer=function(e){var n=new t.Buffer(0);if("m"===e.type)return e;switch(e.type){case"u":n=m(e.value);break;case"i":n=g(e.value);break;case"f":n=y(e.value);break;case"s":n=new t.Buffer(e.value,"ascii");break;case"8":n=new t.Buffer(e.value,"utf8");break;case"b":n=e.value;break;case"d":n=new r.Int64BE(e.value.getTime().toString()).toBuffer()}return Object.assign({},e,{data:n})},t.createUIntBuffer=m,t.createIntBuffer=g,t.createFloatBuffer=y,t.convertEBMLDateToJSDate=function(e){return e instanceof Date?e:new Date(new Date("2001-01-01T00:00:00.000Z").getTime()+Number(e)/1e3/1e3)}},8246:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1384);t.default=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a,s,l,c,u,d,f,p;return i(this,(function(i){switch(i.label){case 0:if(!e)throw Error("call to fixWebmDuration requires a blob");t=new o.Decoder,n=new o.Reader,r=e.stream(),a=r.getReader(),i.label=1;case 1:return[4,a.read()];case 2:return s=i.sent(),l=s.done,c=s.value,l?(n.stop(),[3,3]):((u=null==(u=t.decode(c))?void 0:u.filter((function(e){return"unknown"!==e.type}))).forEach((function(e){n.read(e)})),c=null,[3,1]);case 3:return d=o.tools.makeMetadataSeekable(n.metadatas,n.duration,n.cues),f=new Blob([d],{type:e.type}),p=e.slice(n.metadataSize),[2,new Blob([f,p],{type:e.type})]}}))}))}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);i.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,i.d(o,a),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0,(()=>{"use strict";var e={};i.r(e),i.d(e,{hasBrowserEnv:()=>qr,hasStandardBrowserEnv:()=>Gr,hasStandardBrowserWebWorkerEnv:()=>Zr});var t=i(7294),n=i.t(t,2),r=i(9060),o=i(3379),a=i.n(o),s=i(7795),l=i.n(s),c=i(569),u=i.n(c),d=i(3565),f=i.n(d),p=i(9216),h=i.n(p),m=i(4589),g=i.n(m),y=i(8629),v={};v.styleTagTransform=g(),v.setAttributes=f(),v.insert=u().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=h();a()(y.Z,v);y.Z&&y.Z.locals&&y.Z.locals;var b=i(6668),w={};w.styleTagTransform=g(),w.setAttributes=f(),w.insert=u().bind(null,"head"),w.domAPI=l(),w.insertStyleElement=h();a()(b.Z,w);b.Z&&b.Z.locals&&b.Z.locals;var x=i(24),_={};_.styleTagTransform=g(),_.setAttributes=f(),_.insert=u().bind(null,"head"),_.domAPI=l(),_.insertStyleElement=h();a()(x.Z,_);const k=x.Z&&x.Z.locals?x.Z.locals:void 0;var E=i(6027),S=i.n(E),C=i(8246),T=i.n(C);function A(e){return A="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},A(e)}function O(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */O=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==A(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(A(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function P(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){P(o,r,i,a,s,"next",e)}function s(e){P(o,r,i,a,s,"throw",e)}a(void 0)}))}}function R(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===A(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j=(0,t.createContext)();const U=function(e){var n=(0,t.useRef)([]),r=(0,t.useRef)(!1),i=(0,t.useRef)(0),o=D((0,t.useState)({time:0,editLimit:420,blob:null,webm:null,originalBlob:null,updatePlayerTime:!1,start:0,end:1,trimming:!1,cutting:!1,muting:!1,history:[{}],redoHistory:[],undoDisabled:!0,redoDisabled:!0,duration:0,mode:"player",ffmpegLoaded:!1,frame:null,getFrame:null,isFfmpegRunning:!1,reencoding:!1,prevWidth:0,width:0,prevHeight:0,height:0,top:0,left:0,fromCropper:!1,base64:null,saveDrive:!1,downloading:!1,downloadingWEBM:!1,downloadingGIF:!1,volume:1,cropPreset:"none",replaceAudio:!1,title:null,ready:!1,mp4ready:!1,saved:!1,iframeRef:null,offline:!1,updateChrome:!1,driveEnabled:!1,hasBeenEdited:!1,dragInteracted:!1,noffmpeg:!1,openModal:null,rawBlob:null,override:!1,fallback:!1,chunkCount:0,chunkIndex:0}),2),a=o[0],s=o[1],l=(0,t.useRef)(a);(0,t.useEffect)((function(){l.current=a}),[a]),(0,t.useEffect)((function(){var e=(new Date).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric"});s((function(t){return N(N({},t),{},{title:"MyTechPassport video - ".concat(e)})}))}),[]),(0,t.useEffect)((function(){a.saved?window.onbeforeunload=null:window.onbeforeunload=function(){return!0}}),[a.saved]);var c=(0,t.useCallback)((function(){s((function(e){return N(N({},e),{},{history:[].concat(R(e.history),[e]),redoHistory:[]})}))}),[a]),u=(0,t.useCallback)((function(){if(a.history.length>1){var e=a.history[a.history.length-2],t=a.history.slice(0,-1);s((function(n){return N(N(N({},n),e),{},{history:t,redoHistory:[a].concat(R(a.redoHistory))})}))}}),[a]),d=(0,t.useCallback)((function(){if(a.redoHistory.length>0){var e=a.redoHistory[0],t=a.redoHistory.slice(1);s((function(n){return N(N(N({},n),e),{},{history:[].concat(R(a.history),[a]),redoHistory:t})}))}}),[a]),f=function(e){var t=e.match(/^data:(.*?);base64,/);if(null!==t){for(var n=t[1],r=atob(e.slice(t[0].length)),i=new Uint8Array(r.length),o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return new Blob([i],{type:n})}for(var a=atob(e),s=new Uint8Array(a.length),l=0;l<a.length;l++)s[l]=a.charCodeAt(l);return s};(0,t.useEffect)((function(){if(a.blob){var e=document.createElement("video");e.preload="metadata",e.onloadedmetadata=L(O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s((function(t){return N(N({},t),{},{duration:e.duration,width:e.videoWidth,height:e.videoHeight,prevWidth:e.videoWidth,prevHeight:e.videoHeight})})),URL.revokeObjectURL(e.src),e.remove();case 3:case"end":return t.stop()}}),t)}))),e.src=URL.createObjectURL(a.blob)}}),[a.blob]);var p=function(){var e=L(O().mark((function e(){var t,r,i,o,a,c,u,d,f,p;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Blob(n.current,{type:"video/webm; codecs=vp8, opus"}),e.next=3,chrome.storage.local.get("recordingDuration");case 3:return r=e.sent,i=r.recordingDuration,e.next=7,chrome.storage.local.get("token");case 7:if(o=e.sent,a=o.token,c=!1,a&&null!==a&&(c=!0),s((function(e){return N(N({},e),{},{rawBlob:t,duration:i/1e3})})),u=navigator.userAgent.match(/Windows NT 10.0/),e.prev=13,!(i>0&&null!==i)){e.next=31;break}if(u){e.next=19;break}S()(t,i,function(){var e=L(O().mark((function e(t){var n;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(l.current.fallback||l.current.updateChrome||l.current.noffmpeg||l.current.duration>l.current.editLimit&&!l.current.override)){e.next=4;break}return s((function(e){return N(N({},e),{},{webm:t,ready:!0})})),chrome.runtime.sendMessage({type:"recording-complete"}),e.abrupt("return");case 4:(n=new FileReader).onloadend=function(){var e=n.result;s((function(t){return N(N({},t),{},{base64:e,driveEnabled:c})}))},n.readAsDataURL(t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{logger:!1}),e.next=29;break;case 19:return e.next=21,T()(t,{type:"video/webm; codecs=vp8, opus"});case 21:if(d=e.sent,!(l.current.fallback||l.current.updateChrome||l.current.noffmpeg||l.current.duration>l.current.editLimit&&!l.current.override)){e.next=26;break}return s((function(e){return N(N({},e),{},{webm:d,ready:!0})})),chrome.runtime.sendMessage({type:"recording-complete"}),e.abrupt("return");case 26:(f=new FileReader).onloadend=function(){var e=f.result;s((function(t){return N(N({},t),{},{base64:e,driveEnabled:c})}))},f.readAsDataURL(d);case 29:e.next=38;break;case 31:if(!(l.current.fallback||l.current.updateChrome||l.current.noffmpeg||l.current.duration>l.current.editLimit&&!l.current.override)){e.next=35;break}return s((function(e){return N(N({},e),{},{webm:t,ready:!0})})),chrome.runtime.sendMessage({type:"recording-complete"}),e.abrupt("return");case 35:(p=new FileReader).onloadend=function(){var e=p.result;s((function(t){return N(N({},t),{},{base64:e,driveEnabled:c})}))},p.readAsDataURL(t);case 38:e.next=44;break;case 40:e.prev=40,e.t0=e.catch(13),s((function(e){return N(N({},e),{},{webm:t,ready:!0})})),chrome.runtime.sendMessage({type:"recording-complete"});case 44:n.current=[];case 45:case"end":return e.stop()}}),e,null,[[13,40]])})));return function(){return e.apply(this,arguments)}}();(0,t.useEffect)((function(){i.current=a.chunkCount}),[a.chunkCount]);var h=function(){var e=L(O().mark((function e(t,r){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map(function(){var e=L(O().mark((function e(t,r){var o;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r>=i)){e.next=3;break}return console.warn("Too many chunks received"),e.abrupt("return",Promise.resolve());case 3:return o=f(t.chunk),n.current.push(o),s((function(e){return N(N({},e),{},{chunkIndex:e.chunkIndex+1})})),e.abrupt("return",Promise.resolve());case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}())).then((function(){r({status:"ok"})})).catch((function(e){console.error("Error processing batch",e)}));case 2:return e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();(0,t.useEffect)((function(){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);e&&parseInt(e[2],10)<109&&s((function(e){return N(N({},e),{},{updateChrome:!0,noffmpeg:!0})}))}),[]);var m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;r.current||(r.current=!0,s((function(e){return N(N({},e),{},{override:t.override})})),"function"==typeof l.current.openModal&&chrome.storage.local.get("memoryError",(function(e){e.memoryError&&null!==e.memoryError&&(chrome.storage.local.set({memoryError:!1}),l.current.openModal(chrome.i18n.getMessage("memoryLimitTitle"),chrome.i18n.getMessage("memoryLimitDescription"),chrome.i18n.getMessage("understoodButton"),null,(function(){}),(function(){}),null,chrome.i18n.getMessage("learnMoreDot"),(function(){chrome.runtime.sendMessage({type:"memory-limit-help"})})))})),p(),null!==e&&e({status:"ok"}))},g=(0,t.useCallback)((function(e,t,n){var r=e;if("chunk-count"===r.type)s((function(e){return N(N({},e),{},{chunkCount:r.count,override:r.override})}));else{if("new-chunk-tab"===r.type)return h(r.chunks,n,r.count);if("make-video-tab"===r.type)return void m(n,r);"saved-to-drive"===r.type?s((function(e){return N(N({},e),{},{saveDrive:!1,driveEnabled:!0,saved:!0})})):("restore-recording"===r.type||"fallback-recording"===r.type)&&s((function(e){return N(N({},e),{},{fallback:!0,isFfmpegRunning:!1,noffmpeg:!0,ffmpegLoaded:!0,ffmpeg:!0})}))}}),[r.current,n.current,a,l.current]);(0,t.useEffect)((function(){return chrome.runtime.onMessage.addListener(g),function(){chrome.runtime.onMessage.removeListener(g)}}),[]);var y=function(){var e=L(O().mark((function e(t){var n,r,i,o,l,c,u,d,p,h;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"updated-blob"===t.data.type?(n=t.data.base64,r=new Blob([f(n)],{type:"video/mp4"}),s((function(e){return N(N({},e),{},{blob:r,mp4ready:!0,hasBeenEdited:!0,isFfmpegRunning:!1,reencoding:!1,trimming:!1,cutting:!1,muting:!1,cropping:!1})})),(i=document.createElement("video")).preload="metadata",i.onloadedmetadata=L(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s((function(e){return N(N({},e),{},{duration:i.duration,width:i.videoWidth,height:i.videoHeight,start:0,end:1})})),t.data.addToHistory&&a.addToHistory(),URL.revokeObjectURL(i.src),i.remove();case 4:case"end":return e.stop()}}),e)}))),i.src=URL.createObjectURL(r),a.originalBlob||s((function(e){return N(N({},e),{},{originalBlob:r})}))):"download-mp4"===t.data.type?(o=t.data.base64,l=new Blob([f(o)],{type:"video/mp4"}),c=URL.createObjectURL(l),A(c,".mp4"),s((function(e){return N(N({},e),{},{saved:!0,isFfmpegRunning:!1,downloading:!1})}))):"download-gif"===t.data.type?(u=t.data.base64,d=new Blob([f(u)],{type:"image/gif"}),p=URL.createObjectURL(d),A(p,".gif"),s((function(e){return N(N({},e),{},{saved:!0,isFfmpegRunning:!1,downloadingGIF:!1})}))):"new-frame"===t.data.type?(h=URL.createObjectURL(t.data.frame),s((function(e){return N(N({},e),{},{frame:h,isFfmpegRunning:!1})}))):"ffmpeg-loaded"===t.data.type?s((function(e){return N(N({},e),{},{ffmpeg:!0,ffmpegLoaded:!0,isFfmpegRunning:!1})})):"ffmpeg-load-error"===t.data.type?s((function(e){return N(N({},e),{},{ffmpeg:!0,noffmpeg:!0,ffmpegLoaded:!0,isFfmpegRunning:!1})})):"crop-update"===t.data.type&&s((function(e){return N(N({},e),{},{mode:"player",start:0,end:1})}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,t.useEffect)((function(){return window.addEventListener("message",(function(e){y(e)})),function(){window.removeEventListener("message",(function(e){y(e)}))}}),[]);var v=function(e){window.parent.postMessage(e,"*")},b=function(){var e=L(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.fallback||a.noffmpeg||a.duration>a.editLimit&&!a.override)){e.next=2;break}return e.abrupt("return");case 2:t=new Blob([f(a.base64)],{type:"video/webm"}),s((function(e){return N(N({},e),{},{webm:t,ready:!0})})),a.offline&&!0===a.ffmpeg||!a.updateChrome&&(a.duration<=a.editLimit||a.override)&&v({type:"base64-to-blob",base64:a.base64}),chrome.runtime.sendMessage({type:"recording-complete"});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,t.useEffect)((function(){a.base64&&a.ffmpeg&&a.ffmpegLoaded&&b()}),[a.base64,a.ffmpeg,a.ffmpegLoaded]);var w=(0,t.useCallback)(L(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.blob){e.next=2;break}return e.abrupt("return");case 2:if(a.ffmpeg){e.next=4;break}return e.abrupt("return");case 4:if(!a.isFfmpegRunning){e.next=6;break}return e.abrupt("return");case 6:s((function(e){return N(N({},e),{},{isFfmpegRunning:!0})})),v({type:"get-frame",time:0,blob:a.blob});case 8:case"end":return e.stop()}}),e)}))),[a.blob,a.ffmpeg,a.isFfmpegRunning]),x=function(){var e=L(O().mark((function e(t,n,r){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning){e.next=2;break}return e.abrupt("return");case 2:if(!(a.duration>a.editLimit)||a.override){e.next=4;break}return e.abrupt("return");case 4:s((function(e){return N(N({},e),{},{isFfmpegRunning:!0})})),v({type:"add-audio-to-video",blob:t,audio:n,duration:a.duration,volume:r,replaceAudio:a.replaceAudio});case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),_=function(){var e=L(O().mark((function e(t){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning){e.next=2;break}return e.abrupt("return");case 2:if(!(a.duration>a.editLimit)||a.override){e.next=4;break}return e.abrupt("return");case 4:s(t?function(e){return N(N({},e),{},{cutting:!0})}:function(e){return N(N({},e),{},{trimming:!0})}),s((function(e){return N(N({},e),{},{isFfmpegRunning:!0})})),v({type:"cut-video",blob:a.blob,startTime:a.start*a.duration,endTime:a.end*a.duration,cut:t,duration:a.duration,encode:!1});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=L(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning&&!a.muting){e.next=2;break}return e.abrupt("return");case 2:if(!(a.duration>a.editLimit)||a.override){e.next=4;break}return e.abrupt("return");case 4:s((function(e){return N(N({},e),{},{muting:!0,isFfmpegRunning:!0})})),v({type:"mute-video",blob:a.blob,startTime:a.start*a.duration,endTime:a.end*a.duration,duration:a.duration});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=L(O().mark((function e(t,n,r,i){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning&&!a.cropping){e.next=2;break}return e.abrupt("return");case 2:if(!(a.duration>a.editLimit)||a.override){e.next=4;break}return e.abrupt("return");case 4:return s((function(e){return N(N({},e),{},{cropping:!0,isFfmpegRunning:!0})})),v({type:"crop-video",blob:a.blob,x:t,y:n,width:r,height:i}),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}(),C=function(){var e=L(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning){e.next=2;break}return e.abrupt("return");case 2:return s((function(e){return N(N({},e),{},{isFfmpegRunning:!0,reencoding:!0})})),v({type:"reencode-video",blob:a.blob,duration:a.duration}),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=L(O().mark((function e(t,n){var r,i,o,a,s;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n,i=l.current.title.replace(/[:?~<>|*]/g," ")+r,e.t1=navigator.brave,!e.t1){e.next=7;break}return e.next=6,navigator.brave.isBrave();case 6:e.t1=e.sent;case 7:if(e.t0=e.t1,e.t0){e.next=10;break}e.t0=!1;case 10:if(!e.t0){e.next=22;break}return e.next=13,fetch(t);case 13:return o=e.sent,e.next=16,o.blob();case 16:a=e.sent,(s=new FileReader).readAsDataURL(a),s.onloadend=function(){chrome.runtime.sendMessage({type:"request-download",base64:s.result,title:i}),URL.revokeObjectURL(t)},e.next=24;break;case 22:chrome.downloads.download({url:t,filename:i,saveAs:!0}),chrome.downloads.onChanged.addListener(function(){var e=L(O().mark((function e(n){var r,o,a;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.state||"interrupted"!==n.state.current||"USER_CANCELED"==n.error.current){e.next=14;break}return e.next=3,fetch(t);case 3:return r=e.sent,e.next=6,r.blob();case 6:return o=e.sent,(a=new FileReader).readAsDataURL(o),a.onloadend=function(){chrome.runtime.sendMessage({type:"request-download",base64:a.result,title:i})},URL.revokeObjectURL(t),e.abrupt("return");case 14:return URL.revokeObjectURL(t),e.abrupt("return");case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 24:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),P=function(){var e=L(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning&&!a.downloading){e.next=2;break}return e.abrupt("return");case 2:s((function(e){return N(N({},e),{},{downloading:!0,isFfmpegRunning:!0})})),t=URL.createObjectURL(a.blob),A(t,".mp4"),s((function(e){return N(N({},e),{},{downloading:!1,isFfmpegRunning:!1,saved:!0})}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=L(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning&&!a.downloadingWEBM){e.next=2;break}return e.abrupt("return");case 2:s((function(e){return N(N({},e),{},{downloadingWEBM:!0,isFfmpegRunning:!0})})),t=URL.createObjectURL(a.webm),A(t,".webm"),s((function(e){return N(N({},e),{},{downloadingWEBM:!1,isFfmpegRunning:!1,saved:!0})}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=L(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isFfmpegRunning&&!a.downloading){e.next=2;break}return e.abrupt("return");case 2:if(!(a.duration>30)){e.next=4;break}return e.abrupt("return");case 4:s((function(e){return N(N({},e),{},{downloadingGIF:!0,isFfmpegRunning:!0})})),v({type:"to-gif",blob:a.blob});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=L(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v({type:"load-ffmpeg"});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.undo=u,a.redo=d,a.addToHistory=c,a.handleTrim=_,a.handleMute=k,a.download=P,a.handleCrop=E,a.handleReencode=C,a.getFrame=w,a.downloadGIF=I,a.downloadWEBM=M,a.addAudio=x,a.loadFFmpeg=B,t.createElement(j.Provider,{value:[a,s]},e.children)};function F(e){return F="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},F(e)}function W(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */W=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==F(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(F(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function H(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){G(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==F(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===F(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Y=function(){var e=$((0,t.useContext)(j),2),n=e[0],r=e[1],i=function(){var e,t=(e=W().mark((function e(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.handleReencode();case 2:r((function(e){return q(q({},e),{},{mode:"player",start:0,end:1})}));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){H(o,r,i,a,s,"next",e)}function s(e){H(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return t.createElement("div",{className:k.editorNav},t.createElement("div",{className:k.navWrap},t.createElement("div",{className:k.editorNavLeft,onClick:function(){chrome.runtime.sendMessage({type:"open-home"})}},t.createElement("img",{src:"/assets/editor/logo.svg",alt:"Logo"})),t.createElement("div",{className:k.editorNavCenter},t.createElement("div",{className:k.editorNavTitle},chrome.i18n.getMessage("sandboxEditorMainTitle")," ",t.createElement("span",{className:k.beta},"BETA"))),t.createElement("div",{className:k.editorNavRight},t.createElement("button",{className:"button simpleButton blackButton",onClick:function(){r((function(e){return q(q({},e),{},{mode:"player",blob:n.originalBlob,start:0,end:1})}))},disabled:n.isFfmpegRunning},chrome.i18n.getMessage("sandboxEditorCancelButton")),t.createElement("button",{className:"button secondaryButton",onClick:function(){r((function(e){return q(q({},e),{},{blob:n.originalBlob,start:0,end:1})}))},disabled:n.isFfmpegRunning},chrome.i18n.getMessage("sandboxEditorRevertButton")),t.createElement("button",{className:"button primaryButton",onClick:i,disabled:n.isFfmpegRunning},n.reencoding?chrome.i18n.getMessage("sandboxEditorSaveProgressButton"):chrome.i18n.getMessage("sandboxEditorSaveButton")))))};var X=i(5893),K=i(1443),Q=i.n(K),J=i(5697),ee=i.n(J);const te=(e,t)=>{const n=new(Q())(".plyr-react",t.options||{});return t.source&&(n.source=t.source),n},ne=e=>{e&&e.destroy()},re=()=>{},ie=e=>e?()=>({plyr:e}):()=>new Proxy({plyr:{source:null}},{get:(e,t)=>"plyr"===t?e[t]:re});function oe(e,n,r=null){return function(e,n,r=[]){const[i,o]=(0,t.useState)(null),a=(0,t.useRef)(null),{instantiate:s,destroy:l,getAPI:c,params:u}=n;(0,t.useEffect)((()=>{const e=s(a.current,u);return o(e),()=>{l&&l(e,u)}}),r);const d=(0,t.useMemo)((()=>c(i,u)),[i]);return(0,t.useImperativeHandle)(e,d,[d]),a}(e,{instantiate:te,getAPI:ie,destroy:ne,params:n},r||[n.options,n.source])}const ae=t.forwardRef(((e,t)=>{const{source:n,options:r=null,...i}=e,o=oe(t,{source:n,options:r});return(0,X.jsx)("video",{ref:o,className:"plyr-react plyr",...i})}));function se(e){return se="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},se(e)}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===se(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}ae.displayName="Plyr",ae.defaultProps={options:{controls:["rewind","play","fast-forward","progress","current-time","duration","mute","volume","settings","fullscreen"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop"}},source:{type:"video",sources:[{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:720},{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:1080}]}},ae.propTypes={options:ee().object,source:ee().any};const pe=function(e){var n=de((0,t.useContext)(j),2),r=n[0],i=n[1],o=(0,t.useRef)(null),a=de((0,t.useState)(null),2),s=a[0],l=a[1],c=de((0,t.useState)(null),2),u=c[0],d=c[1],f=de((0,t.useState)(!1),2),p=f[0],h=f[1];(0,t.useEffect)((function(){o.current&&o.current.plyr&&r.updatePlayerTime&&(o.current.plyr.currentTime=r.time)}),[r.time]);var m=(0,t.useMemo)((function(){return{controls:["play","mute","captions","settings","pip","fullscreen"],ratio:"21:9",blankVideo:"chrome-extension://"+chrome.i18n.getMessage("@@extension_id")+"/assets/blank.mp4",keyboard:{global:!0}}}),[]);(0,t.useEffect)((function(){if(r.blob){var e=URL.createObjectURL(r.blob);return d({type:"video",sources:[{src:e,type:"video/mp4"}]}),l(e),function(){URL.revokeObjectURL(e)}}}),[r.blob,o]),(0,t.useEffect)((function(){return o.current&&o.current.plyr&&o.current.plyr.on("timeupdate",(function(){i((function(e){return ce(ce({},e),{},{time:o.current.plyr.currentTime,updatePlayerTime:!1})}))})),function(){o.current&&o.current.plyr&&o.current.plyr.off("timeupdate")}}),[o]);return(0,t.useEffect)((function(){if(!p){var e=function(e){o.current&&o.current.plyr&&(h(!0),o.current.plyr.on("timeupdate",(function(){i((function(e){return ce(ce({},e),{},{time:o.current.plyr.currentTime,updatePlayerTime:!1})}))})))};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}}),[p]),t.createElement("div",{className:"videoPlayer"},t.createElement("div",{className:"playerWrap",onClick:function(){p||o.current&&o.current.plyr&&(h(!0),o.current.plyr.on("timeupdate",(function(){i((function(e){return ce(ce({},e),{},{time:o.current.plyr.currentTime,updatePlayerTime:!1})}))})))}},s&&t.createElement(ae,{ref:o,id:"plyr-player",source:u,options:m})),t.createElement("style",null,"\n\t\t\t\t\t.plyr {\n\t\t\t\t\t\theight: 90%!important;\n\t\t\t\t\t}\n\t\t\t\t\t@media (max-width: 900px) {\n\t\t\t\t\t\t.videoPlayer {\n\t\t\t\t\t\t\theight: 100%!important;\n\t\t\t\t\t\t\ttop: 40px!important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.playerWrap {\n\t\t\t\t\t\t\theight: calc(100% - 400px)!important;\n\t\t\t\t\t\t}\n\t\t\t\t\t"))};var he=i(3661),me={};me.styleTagTransform=g(),me.setAttributes=f(),me.insert=u().bind(null,"head"),me.domAPI=l(),me.insertStyleElement=h();a()(he.Z,me);const ge=he.Z&&he.Z.locals?he.Z.locals:void 0;var ye=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const ve={decode:function(e,t){return ye(this,void 0,void 0,(function*(){const n=new AudioContext({sampleRate:t});return n.decodeAudioData(e).finally((()=>n.close()))}))},createBuffer:function(e,t){return"number"==typeof e[0]&&(e=[e]),function(e){const t=e[0];if(t.some((e=>e>1||e<-1))){const n=t.length;let r=0;for(let e=0;e<n;e++){const n=Math.abs(t[e]);n>r&&(r=n)}for(const t of e)for(let e=0;e<n;e++)t[e]/=r}}(e),{duration:t,length:e[0].length,sampleRate:e[0].length/t,numberOfChannels:e.length,getChannelData:t=>null==e?void 0:e[t],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};var be=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const we={fetchBlob:function(e,t,n){return be(this,void 0,void 0,(function*(){const r=yield fetch(e,n);return function(e,t){be(this,void 0,void 0,(function*(){if(!e.body||!e.headers)return;const n=e.body.getReader(),r=Number(e.headers.get("Content-Length"))||0;let i=0;const o=e=>be(this,void 0,void 0,(function*(){i+=(null==e?void 0:e.length)||0;const n=Math.round(i/r*100);t(n)})),a=()=>be(this,void 0,void 0,(function*(){let e;try{e=yield n.read()}catch(e){return}e.done||(o(e.value),yield a())}));a()}))}(r.clone(),t),r.blob()}))}};const xe=class{constructor(){this.listeners={},this.on=this.addEventListener,this.un=this.removeEventListener}addEventListener(e,t,n){if(this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),null==n?void 0:n.once){const n=()=>{this.removeEventListener(e,n),this.removeEventListener(e,t)};return this.addEventListener(e,n),n}return()=>this.removeEventListener(e,t)}removeEventListener(e,t){var n;null===(n=this.listeners[e])||void 0===n||n.delete(t)}once(e,t){return this.on(e,t,{once:!0})}unAll(){this.listeners={}}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach((e=>e(...t)))}};const _e=class extends xe{constructor(e){super(),this.isExternalMedia=!1,e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),null!=e.playbackRate&&this.onceMediaEvent("canplay",(()=>{null!=e.playbackRate&&(this.media.playbackRate=e.playbackRate)}))}onMediaEvent(e,t,n){return this.media.addEventListener(e,t,n),()=>this.media.removeEventListener(e,t)}onceMediaEvent(e,t){return this.onMediaEvent(e,t,{once:!0})}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}setSrc(e,t){if(this.getSrc()===e)return;this.revokeSrc();const n=t instanceof Blob?URL.createObjectURL(t):e;this.media.src=n,this.media.load()}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(e){this.media=e}play(){return this.media.play()}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=e}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}setPlaybackRate(e,t){null!=t&&(this.media.preservesPitch=t),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}};class ke extends xe{constructor(e,t){super(),this.timeouts=[],this.isScrolling=!1,this.audioData=null,this.resizeObserver=null,this.isDragging=!1,this.options=e;const n=this.parentFromOptionsContainer(e.container);this.parent=n;const[r,i]=this.initHtml();n.appendChild(r),this.container=r,this.scrollContainer=i.querySelector(".scroll"),this.wrapper=i.querySelector(".wrapper"),this.canvasWrapper=i.querySelector(".canvases"),this.progressWrapper=i.querySelector(".progress"),this.cursor=i.querySelector(".cursor"),t&&i.appendChild(t),this.initEvents()}parentFromOptionsContainer(e){let t;if("string"==typeof e?t=document.querySelector(e):e instanceof HTMLElement&&(t=e),!t)throw new Error("Container not found");return t}initEvents(){const e=e=>{const t=this.wrapper.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientX-t.left;return[n/t.width,r/t.height]};this.wrapper.addEventListener("click",(t=>{const[n,r]=e(t);this.emit("click",n,r)})),this.wrapper.addEventListener("dblclick",(t=>{const[n,r]=e(t);this.emit("dblclick",n,r)})),this.options.dragToSeek&&this.initDrag(),this.scrollContainer.addEventListener("scroll",(()=>{const{scrollLeft:e,scrollWidth:t,clientWidth:n}=this.scrollContainer,r=e/t,i=(e+n)/t;this.emit("scroll",r,i)}));const t=this.createDelay(100);this.resizeObserver=new ResizeObserver((()=>{t((()=>this.reRender()))})),this.resizeObserver.observe(this.scrollContainer)}initDrag(){!function(e,t,n,r,i=5){let o=()=>{};if(!e)return o;const a=a=>{if(2===a.button)return;a.preventDefault(),a.stopPropagation(),e.style.touchAction="none";let s=a.clientX,l=a.clientY,c=!1;const u=r=>{r.preventDefault(),r.stopPropagation();const o=r.clientX,a=r.clientY;if(c||Math.abs(o-s)>=i||Math.abs(a-l)>=i){const{left:r,top:i}=e.getBoundingClientRect();c||(c=!0,null==n||n(s-r,l-i)),t(o-s,a-l,o-r,a-i),s=o,l=a}},d=e=>{c&&(e.preventDefault(),e.stopPropagation())},f=()=>{e.style.touchAction="",c&&(null==r||r()),o()};document.addEventListener("pointermove",u),document.addEventListener("pointerup",f),document.addEventListener("pointerleave",f),document.addEventListener("click",d,!0),o=()=>{document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",f),document.removeEventListener("pointerleave",f),setTimeout((()=>{document.removeEventListener("click",d,!0)}),10)}};e.addEventListener("pointerdown",a)}(this.wrapper,((e,t,n)=>{this.emit("drag",Math.max(0,Math.min(1,n/this.wrapper.getBoundingClientRect().width)))}),(()=>this.isDragging=!0),(()=>this.isDragging=!1))}getHeight(){return null==this.options.height?128:isNaN(Number(this.options.height))?"auto"===this.options.height&&this.parent.clientHeight||128:Number(this.options.height)}initHtml(){const e=document.createElement("div"),t=e.attachShadow({mode:"open"});return t.innerHTML=`\n <style>\n :host {\n user-select: none;\n min-width: 1px;\n }\n :host audio {\n display: block;\n width: 100%;\n }\n :host .scroll {\n overflow-x: auto;\n overflow-y: hidden;\n width: 100%;\n position: relative;\n }\n :host .noScrollbar {\n scrollbar-color: transparent;\n scrollbar-width: none;\n }\n :host .noScrollbar::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n :host .wrapper {\n position: relative;\n overflow: visible;\n z-index: 2;\n }\n :host .canvases {\n min-height: ${this.getHeight()}px;\n }\n :host .canvases > div {\n position: relative;\n }\n :host canvas {\n display: block;\n position: absolute;\n top: 0;\n image-rendering: pixelated;\n }\n :host .progress {\n pointer-events: none;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n overflow: hidden;\n }\n :host .progress > div {\n position: relative;\n }\n :host .cursor {\n pointer-events: none;\n position: absolute;\n z-index: 5;\n top: 0;\n left: 0;\n height: 100%;\n border-radius: 2px;\n }\n </style>\n\n <div class="scroll" part="scroll">\n <div class="wrapper" part="wrapper">\n <div class="canvases"></div>\n <div class="progress" part="progress"></div>\n <div class="cursor" part="cursor"></div>\n </div>\n </div>\n `,[e,t]}setOptions(e){if(this.options.container!==e.container){const t=this.parentFromOptionsContainer(e.container);t.appendChild(this.container),this.parent=t}e.dragToSeek&&!this.options.dragToSeek&&this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getScroll(){return this.scrollContainer.scrollLeft}destroy(){var e;this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}createDelay(e=10){const t={};return this.timeouts.push(t),n=>{t.timeout&&clearTimeout(t.timeout),t.timeout=setTimeout(n,e)}}convertColorValues(e){if(!Array.isArray(e))return e||"";if(e.length<2)return e[0]||"";const t=document.createElement("canvas"),n=t.getContext("2d").createLinearGradient(0,0,0,t.height),r=1/(e.length-1);return e.forEach(((e,t)=>{const i=t*r;n.addColorStop(i,e)})),n}renderBarWaveform(e,t,n,r){const i=e[0],o=e[1]||e[0],a=i.length,{width:s,height:l}=n.canvas,c=l/2,u=window.devicePixelRatio||1,d=t.barWidth?t.barWidth*u:1,f=t.barGap?t.barGap*u:t.barWidth?d/2:0,p=t.barRadius||0,h=s/(d+f)/a,m=p&&"roundRect"in n?"roundRect":"rect";n.beginPath();let g=0,y=0,v=0;for(let e=0;e<=a;e++){const a=Math.round(e*h);if(a>g){const e=Math.round(y*c*r),i=e+Math.round(v*c*r)||1;let o=c-e;"top"===t.barAlign?o=0:"bottom"===t.barAlign&&(o=l-i),n[m](g*(d+f),o,d,i,p),g=a,y=0,v=0}const s=Math.abs(i[e]||0),u=Math.abs(o[e]||0);s>y&&(y=s),u>v&&(v=u)}n.fill(),n.closePath()}renderLineWaveform(e,t,n,r){const i=t=>{const i=e[t]||e[0],o=i.length,{height:a}=n.canvas,s=a/2,l=n.canvas.width/o;n.moveTo(0,s);let c=0,u=0;for(let e=0;e<=o;e++){const o=Math.round(e*l);if(o>c){const e=s+(Math.round(u*s*r)||1)*(0===t?-1:1);n.lineTo(c,e),c=o,u=0}const a=Math.abs(i[e]||0);a>u&&(u=a)}n.lineTo(c,s)};n.beginPath(),i(0),i(1),n.fill(),n.closePath()}renderWaveform(e,t,n){if(n.fillStyle=this.convertColorValues(t.waveColor),t.renderFunction)return void t.renderFunction(e,n);let r=t.barHeight||1;if(t.normalize){const t=Array.from(e[0]).reduce(((e,t)=>Math.max(e,Math.abs(t))),0);r=t?1/t:1}t.barWidth||t.barGap||t.barAlign?this.renderBarWaveform(e,t,n,r):this.renderLineWaveform(e,t,n,r)}renderSingleCanvas(e,t,n,r,i,o,a,s){const l=window.devicePixelRatio||1,c=document.createElement("canvas"),u=e[0].length;c.width=Math.round(n*(o-i)/u),c.height=r*l,c.style.width=`${Math.floor(c.width/l)}px`,c.style.height=`${r}px`,c.style.left=`${Math.floor(i*n/l/u)}px`,a.appendChild(c);const d=c.getContext("2d");if(this.renderWaveform(e.map((e=>e.slice(i,o))),t,d),c.width>0&&c.height>0){const e=c.cloneNode(),n=e.getContext("2d");n.drawImage(c,0,0),n.globalCompositeOperation="source-in",n.fillStyle=this.convertColorValues(t.progressColor),n.fillRect(0,0,c.width,c.height),s.appendChild(e)}}renderChannel(e,t,n){const r=document.createElement("div"),i=this.getHeight();r.style.height=`${i}px`,this.canvasWrapper.style.minHeight=`${i}px`,this.canvasWrapper.appendChild(r);const o=r.cloneNode();this.progressWrapper.appendChild(o);const{scrollLeft:a,scrollWidth:s,clientWidth:l}=this.scrollContainer,c=e[0].length,u=c/s;let d=Math.min(ke.MAX_CANVAS_WIDTH,l);if(t.barWidth||t.barGap){const e=t.barWidth||.5,n=e+(t.barGap||e/2);d%n!=0&&(d=Math.floor(d/n)*n)}const f=Math.floor(Math.abs(a)*u),p=Math.floor(f+d*u),h=p-f,m=(a,s)=>{this.renderSingleCanvas(e,t,n,i,Math.max(0,a),Math.min(s,c),r,o)},g=this.createDelay(),y=this.createDelay(),v=(e,t)=>{m(e,t),e>0&&g((()=>{v(e-h,t-h)}))},b=(e,t)=>{m(e,t),t<c&&y((()=>{b(e+h,t+h)}))};v(f,p),p<c&&b(p,p+h)}render(e){this.timeouts.forEach((e=>e.timeout&&clearTimeout(e.timeout))),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.wrapper.style.width="",null!=this.options.width&&(this.scrollContainer.style.width="number"==typeof this.options.width?`${this.options.width}px`:this.options.width);const t=window.devicePixelRatio||1,n=this.scrollContainer.clientWidth,r=Math.ceil(e.duration*(this.options.minPxPerSec||0));this.isScrolling=r>n;const i=this.options.fillParent&&!this.isScrolling,o=(i?n:r)*t;if(this.wrapper.style.width=i?"100%":`${r}px`,this.scrollContainer.style.overflowX=this.isScrolling?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.options.splitChannels)for(let t=0;t<e.numberOfChannels;t++){const n=Object.assign(Object.assign({},this.options),this.options.splitChannels[t]);this.renderChannel([e.getChannelData(t)],n,o)}else{const t=[e.getChannelData(0)];e.numberOfChannels>1&&t.push(e.getChannelData(1)),this.renderChannel(t,this.options,o)}this.audioData=e,this.emit("render")}reRender(){if(!this.audioData)return;const e=this.progressWrapper.clientWidth;this.render(this.audioData);const t=this.progressWrapper.clientWidth;this.scrollContainer.scrollLeft+=t-e}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,t=!1){const{clientWidth:n,scrollLeft:r,scrollWidth:i}=this.scrollContainer,o=i*e,a=n/2;if(o>r+(t&&this.options.autoCenter&&!this.isDragging?a:n)||o<r)if(this.options.autoCenter&&!this.isDragging){const e=a/20;o-(r+a)>=e&&o<r+n?this.scrollContainer.scrollLeft+=e:this.scrollContainer.scrollLeft=o-a}else if(this.isDragging){const e=10;this.scrollContainer.scrollLeft=o<r?o-e:o-n+e}else this.scrollContainer.scrollLeft=o;{const{scrollLeft:e}=this.scrollContainer,t=e/i,r=(e+n)/i;this.emit("scroll",t,r)}}renderProgress(e,t){if(isNaN(e))return;const n=100*e;this.canvasWrapper.style.clipPath=`polygon(${n}% 0, 100% 0, 100% 100%, ${n}% 100%)`,this.progressWrapper.style.width=`${n}%`,this.cursor.style.left=`${n}%`,this.cursor.style.marginLeft=100===Math.round(n)?`-${this.options.cursorWidth}px`:"",this.isScrolling&&this.options.autoScroll&&this.scrollIntoView(e,t)}}ke.MAX_CANVAS_WIDTH=4e3;const Ee=ke;const Se=class extends xe{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}};var Ce=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Te=class extends xe{constructor(e=new AudioContext){super(),this.bufferNode=null,this.autoplay=!1,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.audioContext=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return Ce(this,void 0,void 0,(function*(){}))}get src(){return this.currentSrc}set src(e){this.currentSrc=e,fetch(e).then((e=>e.arrayBuffer())).then((e=>this.audioContext.decodeAudioData(e))).then((e=>{this.buffer=e,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play()}))}_play(){var e;this.paused&&(this.paused=!1,null===(e=this.bufferNode)||void 0===e||e.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.bufferNode.buffer=this.buffer,this.bufferNode.connect(this.gainNode),this.playedDuration>=this.duration&&(this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,this.playedDuration),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))})}_pause(){var e;this.paused||(this.paused=!0,null===(e=this.bufferNode)||void 0===e||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime)}play(){return Ce(this,void 0,void 0,(function*(){this._play(),this.emit("play")}))}pause(){this._pause(),this.emit("pause")}stopAt(e){var t,n;const r=e-this.currentTime;null===(t=this.bufferNode)||void 0===t||t.stop(this.audioContext.currentTime+r),null===(n=this.bufferNode)||void 0===n||n.addEventListener("ended",(()=>{this.bufferNode=null,this.pause()}),{once:!0})}setSinkId(e){return Ce(this,void 0,void 0,(function*(){return this.audioContext.setSinkId(e)}))}get playbackRate(){var e,t;return null!==(t=null===(e=this.bufferNode)||void 0===e?void 0:e.playbackRate.value)&&void 0!==t?t:1}set playbackRate(e){this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return this.paused?this.playedDuration:this.playedDuration+this.audioContext.currentTime-this.playStartTime}set currentTime(e){this.emit("seeking"),this.paused?this.playedDuration=e:(this._pause(),this.playedDuration=e,this._play()),this.emit("timeupdate")}get duration(){var e;return(null===(e=this.buffer)||void 0===e?void 0:e.duration)||0}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}getGainNode(){return this.gainNode}};var Ae=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Oe={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Pe extends _e{static create(e){return new Pe(e)}constructor(e){const t=e.media||("WebAudio"===e.backend?new Te:void 0);super({media:t,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.subscriptions=[],this.mediaSubscriptions=[],this.options=Object.assign({},Oe,e),this.timer=new Se;const n=t?void 0:this.getMediaElement();this.renderer=new Ee(this.options,n),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const r=this.options.url||this.getSrc()||"";(r||this.options.peaks&&this.options.duration)&&this.load(r,this.options.peaks,this.options.duration)}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",(()=>{const e=this.getCurrentTime();this.renderer.renderProgress(e/this.getDuration(),!0),this.emit("timeupdate",e),this.emit("audioprocess",e)})))}initPlayerEvents(){this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",(()=>{const e=this.getCurrentTime();this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),this.emit("timeupdate",e)})),this.onMediaEvent("play",(()=>{this.emit("play"),this.timer.start()})),this.onMediaEvent("pause",(()=>{this.emit("pause"),this.timer.stop()})),this.onMediaEvent("emptied",(()=>{this.timer.stop()})),this.onMediaEvent("ended",(()=>{this.emit("finish")})),this.onMediaEvent("seeking",(()=>{this.emit("seeking",this.getCurrentTime())})))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",((e,t)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,t))})),this.renderer.on("dblclick",((e,t)=>{this.emit("dblclick",e,t)})),this.renderer.on("scroll",((e,t)=>{const n=this.getDuration();this.emit("scroll",e*n,t*n)})),this.renderer.on("render",(()=>{this.emit("redraw")})));{let e;this.subscriptions.push(this.renderer.on("drag",(t=>{this.options.interact&&(this.renderer.renderProgress(t),clearTimeout(e),e=setTimeout((()=>{this.seekTo(t)}),this.isPlaying()?0:200),this.emit("interaction",t*this.getDuration()),this.emit("drag",t))})))}}initPlugins(){var e;(null===(e=this.options.plugins)||void 0===e?void 0:e.length)&&this.options.plugins.forEach((e=>{this.registerPlugin(e)}))}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach((e=>e())),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),null!=e.mediaControls&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){return e.init(this),this.plugins.push(e),this.subscriptions.push(e.once("destroy",(()=>{this.plugins=this.plugins.filter((t=>t!==e))}))),e}getWrapper(){return this.renderer.getWrapper()}getScroll(){return this.renderer.getScroll()}getActivePlugins(){return this.plugins}loadAudio(e,t,n,r){return Ae(this,void 0,void 0,(function*(){if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,!t&&!n){const n=e=>this.emit("loading",e);t=yield we.fetchBlob(e,n,this.options.fetchParams)}this.setSrc(e,t);const i=(yield Promise.resolve(r||this.getDuration()))||(yield new Promise((e=>{this.onceMediaEvent("loadedmetadata",(()=>e(this.getDuration())))})));if(n)this.decodedData=ve.createBuffer(n,i||0);else if(t){const e=yield t.arrayBuffer();this.decodedData=yield ve.decode(e,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())}))}load(e,t,n){return Ae(this,void 0,void 0,(function*(){yield this.loadAudio(e,void 0,t,n)}))}loadBlob(e,t,n){return Ae(this,void 0,void 0,(function*(){yield this.loadAudio("blob",e,t,n)}))}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:t=8e3,precision:n=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const r=Math.min(e,this.decodedData.numberOfChannels),i=[];for(let e=0;e<r;e++){const r=this.decodedData.getChannelData(e),o=[],a=Math.round(r.length/t);for(let e=0;e<t;e++){const t=r.slice(e*a,(e+1)*a),i=Math.max(...t);o.push(Math.round(i*n)/n)}i.push(o)}return i}getDuration(){let e=super.getDuration()||0;return 0!==e&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}seekTo(e){const t=this.getDuration()*e;this.setTime(t)}playPause(){return Ae(this,void 0,void 0,(function*(){return this.isPlaying()?this.pause():this.play()}))}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}destroy(){this.emit("destroy"),this.plugins.forEach((e=>e.destroy())),this.subscriptions.forEach((e=>e())),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}const Le=Pe;var Re=i(497),Me={};Me.styleTagTransform=g(),Me.setAttributes=f(),Me.insert=u().bind(null,"head"),Me.domAPI=l(),Me.insertStyleElement=h();a()(Re.Z,Me);const Ne=Re.Z&&Re.Z.locals?Re.Z.locals:void 0;function Ie(e){return Ie="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},Ie(e)}function De(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */De=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Ie(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ie(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function je(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ie(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ue(o,r,i,a,s,"next",e)}function s(e){Ue(o,r,i,a,s,"throw",e)}a(void 0)}))}}function We(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return He(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ve=function(e){var n=We((0,t.useContext)(j),2),r=n[0],i=n[1],o=(0,t.useRef)(null),a=(0,t.useRef)(null),s=(0,t.useRef)(null),l=(0,t.useRef)(null),c=We((0,t.useState)(!1),2),u=c[0],d=c[1],f=(0,t.useRef)(!1);function p(e){return h.apply(this,arguments)}function h(){return(h=Fe(De().mark((function e(t){return De().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onloadend=function(){r.result instanceof ArrayBuffer?e(r.result):n(new Error("Failed to convert Blob to ArrayBuffer"))},r.onerror=n,r.readAsArrayBuffer(t)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var m=function(){var e=Fe(De().mark((function e(t){var n;return De().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o.current=Le.create({container:a.current,waveColor:"#C4C5CE",progressColor:"#9596A2",interpolation:"cubic",height:"auto",cursorWidth:0}),e.next=4,p(t);case 4:n=e.sent,o.current.loadBlob(new Blob([n],{type:"audio/wav"})),o.current.on("seeking",(function(e){var t=a.current.getBoundingClientRect().width*(e/o.current.getDuration());s.current.style.left="".concat(t,"px"),i((function(t){return ze(ze({},t),{},{time:e,updatePlayerTime:!0})}))})),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.error("Error loading waveform:",e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),g=function(){f.current||d(!0)},y=function(e){var t=a.current.getBoundingClientRect(),n=e.clientX-t.left;t.width;l.current.style.left="".concat(n,"px")},v=function(){d(!1)},b=function(e){a.current.contains(e.target)||(f.current=!0,d(!1))},w=function(){f.current=!1};return(0,t.useEffect)((function(){if(r.blob){m(r.blob);var e=a.current;return e.addEventListener("mouseover",g),e.addEventListener("mousemove",y),e.addEventListener("mouseleave",v),document.addEventListener("mousedown",b),document.addEventListener("mouseup",w),o.current&&o.current.on("seek",(function(e){var t=a.current.getBoundingClientRect(),n=t.width*e;s.current.style.left="".concat(n+t.left,"px")})),function(){o.current&&o.current.destroy(),e.removeEventListener("mouseenter",g),e.removeEventListener("mousemove",y),e.removeEventListener("mouseleave",v),document.removeEventListener("mousedown",b),document.removeEventListener("mouseup",w)}}}),[r.blob]),(0,t.useEffect)((function(){if(r.blob&&!r.updatePlayerTime&&null!==a.current){var e=document.createElement("video");e.preload="metadata",e.onloadedmetadata=Fe(De().mark((function t(){var n,i;return De().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=a.current.getBoundingClientRect(),i=n.width*(r.time/e.duration),s.current.style.left="".concat(i,"px"),URL.revokeObjectURL(e.src),e.remove();case 5:case"end":return t.stop()}}),t)}))),e.src=URL.createObjectURL(r.blob)}}),[r.time,r.blob,a.current]),t.createElement("div",{style:{height:"100%"}},t.createElement("div",{className:Ne.cursor,ref:s}),t.createElement("div",{className:Ne.ghostCursor,style:u?{opacity:1}:{opacity:0},ref:l}),t.createElement("div",{className:Ne.waveform,ref:a}))};function qe(e){return qe="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},qe(e)}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){Ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ze(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==qe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===qe(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ke=function(e){var n=Ye((0,t.useContext)(j),2),r=n[0],i=n[1],o=(0,t.useRef)(null),a=(0,t.useRef)(null),s=(0,t.useRef)(null),l=(0,t.useRef)(!1),c=(0,t.useRef)(null),u=function(e,t){e.preventDefault(),l.current=!0,c.current=t,document.addEventListener("mousemove",d),document.addEventListener("mouseup",f)},d=function(e){if(l.current){var t=o.current.getBoundingClientRect(),n=t.width,a=(e.clientX-t.left)/n;if("start"===c.current){a+=0;var s=Math.max(Math.min(a,r.end-.02),0);i((function(e){return $e($e({},e),{},{start:s})}))}else if("end"===c.current){a-=0;var u=Math.min(Math.max(a,r.start+.02),1);i((function(e){return $e($e({},e),{},{end:u})}))}}},f=function e(){l.current=!1,c.current=null,r.addToHistory(),i((function(e){return $e($e({},e),{},{dragInteracted:!0})})),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",e)};return(0,t.useEffect)((function(){a.current.style.left="calc(".concat(100*r.start,"%)"),s.current.style.left="".concat(100*r.end,"%")}),[r.start,r.end]),t.createElement("div",null,t.createElement("div",{className:ge.trimmerContainer,ref:o},t.createElement("div",{className:ge.trimWrap},t.createElement("div",{className:ge.leftOverlay,style:{width:"".concat(100*r.start,"%")}}),t.createElement("div",{className:ge.rightOverlay,style:{width:"".concat(100*(1-r.end),"%")}}),t.createElement("div",{className:ge.trimSection,style:{width:"".concat(100*(r.end-r.start),"%"),left:"".concat(100*r.start,"%")}}),t.createElement("div",{className:ge.trimmer},t.createElement("div",{className:"".concat(ge.handle," ").concat(ge.startHandle),onMouseDown:function(e){return u(e,"start")},ref:a}),t.createElement("div",{className:"".concat(ge.handle," ").concat(ge.endHandle),onMouseDown:function(e){return u(e,"end")},ref:s}))),t.createElement(Ve,null)))};var Qe=i(2827),Je={};Je.styleTagTransform=g(),Je.setAttributes=f(),Je.insert=u().bind(null,"head"),Je.domAPI=l(),Je.insertStyleElement=h();a()(Qe.Z,Je);const et=Qe.Z&&Qe.Z.locals?Qe.Z.locals:void 0;function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var rt=function(e,t){return rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},rt(e,t)};function it(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}rt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ot=function(){return ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ot.apply(this,arguments)};function at(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function st(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function lt(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}Object.create;function ct(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ut(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function dt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var ft=i(7811),pt=new Map,ht=function(e){return e.cloneNode(!0)},mt=function(){return"file:"===window.location.protocol},gt=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var i=(0,ft.Q)(t).type;if("image/svg+xml"!==i&&"text/plain"!==i)throw new Error("Invalid content type: ".concat(i))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(mt()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||mt()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},yt={},vt=function(e,t){yt[e]=yt[e]||[],yt[e].push(t)},bt=function(e,t,n){if(pt.has(e)){var r=pt.get(e);if(void 0===r)return void vt(e,n);if(r instanceof SVGSVGElement)return void n(null,ht(r))}pt.set(e,void 0),vt(e,n),gt(e,t,(function(t,n){var r;t?pt.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&pt.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(yt[e])){var n=pt.get(e),r=yt[e][t];n instanceof SVGSVGElement&&r(null,ht(n)),n instanceof Error&&r(n),t===yt[e].length-1&&delete yt[e]}}),0)},n=0,r=yt[e].length;n<r;n++)t(n)}(e)}))},wt=function(e,t,n){gt(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},xt=0,_t=[],kt={},Et="http://www.w3.org/1999/xlink",St=function(e,t,n,r,i,o,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==_t.indexOf(e))return _t.splice(_t.indexOf(e),1),void(e=null);_t.push(e),e.setAttribute("src",""),(r?bt:wt)(s,i,(function(r,i){if(!i)return _t.splice(_t.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&i.setAttribute("id",l);var c=e.getAttribute("title");c&&i.setAttribute("title",c);var u=e.getAttribute("width");u&&i.setAttribute("width",u);var d=e.getAttribute("height");d&&i.setAttribute("height",d);var f=Array.from(new Set(dt(dt(dt([],(i.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();i.setAttribute("class",f);var p=e.getAttribute("style");p&&i.setAttribute("style",p),i.setAttribute("data-src",s);var h=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(h,(function(e){e.name&&e.value&&i.setAttribute(e.name,e.value)})),n){var m,g,y,v,b,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){m=e,y=w[e];for(var t=function(e,t){var n;v=g[e].id,b=v+"-"+ ++xt,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=i.querySelectorAll("["+e+'*="'+v+'"]')).length;t<r;t++){var o=n[t].getAttribute(e);o&&!o.match(new RegExp('url\\("?#'+v+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=i.querySelectorAll("[*|href]"),o=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(Et,"href");l&&l.toString()==="#"+g[e].id&&o.push(r[a])}for(var c=0,u=o.length;c<u;c++)o[c].setAttributeNS(Et,"href","#"+b);g[e].id=b},n=0,r=(g=i.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}i.removeAttribute("xmlns:a");for(var x,_,k=i.querySelectorAll("script"),E=[],S=0,C=k.length;S<C;S++)(_=k[S].getAttribute("type"))&&"application/ecmascript"!==_&&"application/javascript"!==_&&"text/javascript"!==_||((x=k[S].innerText||k[S].textContent)&&E.push(x),i.removeChild(k[S]));if(E.length>0&&("always"===t||"once"===t&&!kt[s])){for(var T=0,A=E.length;T<A;T++)new Function(E[T])(window);kt[s]=!0}var O=i.querySelectorAll("style");if(Array.prototype.forEach.call(O,(function(e){e.textContent+=""})),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("xmlns:xlink",Et),o(i),!e.parentNode)return _t.splice(_t.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(i,e),_t.splice(_t.indexOf(e),1),e=null,a(null,i)}))}else a(new Error("Invalid data-src or src attribute"))},Ct=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Tt="http://www.w3.org/2000/svg",At="http://www.w3.org/1999/xlink",Ot=function(e){var n,r;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,nt(n,r);var o=i.prototype;return o.renderSVG=function(){var e,t=this;if(this.reactWrapper instanceof(e=this.reactWrapper,((null==e?void 0:e.ownerDocument)||document).defaultView||window).Node){var n,r,i=this.props,o=i.desc,a=i.evalScripts,s=i.httpRequestWithCredentials,l=i.renumerateIRIElements,c=i.src,u=i.title,d=i.useRequestCache,f=this.props.onError,p=this.props.beforeInjection,h=this.props.afterInjection,m=this.props.wrapper;"svg"===m?((n=document.createElementNS(Tt,m)).setAttribute("xmlns",Tt),n.setAttribute("xmlns:xlink",At),r=document.createElementNS(Tt,m)):(n=document.createElement(m),r=document.createElement(m)),n.appendChild(r),r.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(n);var g=function(e){t.removeSVG(),t._isMounted?t.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){f(e)})):f(e)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,i=void 0===r?function(){}:r,o=n.afterEach,a=void 0===o?function(){}:o,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,f=void 0===d?"never":d,p=n.httpRequestWithCredentials,h=void 0!==p&&p,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,v=0,b=e.length;v<b;v++)St(e[v],f,g,u,h,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&i(y)}));else e?St(e,f,g,u,h,l,(function(t,n){a(t,n),i(1),e=null})):i(0)}(r,{afterEach:function(e,n){e?g(e):t._isMounted&&t.setState((function(){return{isLoading:!1}}),(function(){try{h(n)}catch(e){g(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),o){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=o,e.prepend(n)}if(u){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var i=document.createElement("title");i.innerHTML=u,e.prepend(i)}try{p(e)}catch(e){g(e)}},cacheRequests:d,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},o.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},o.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},o.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(tt({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},o.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},o.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var n=e.fallback;e.httpRequestWithCredentials;var r=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var i=e.wrapper,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,Ct),a=i;return t.createElement(a,tt({},o,{ref:this.refCallback},"svg"===i?{xmlns:Tt,xmlnsXlink:At}:{}),this.state.isLoading&&r&&t.createElement(r,null),this.state.hasError&&n&&t.createElement(n,null))},i}(t.Component);function Pt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ot.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Ot.propTypes={afterInjection:J.func,beforeInjection:J.func,desc:J.string,evalScripts:J.oneOf(["always","once","never"]),fallback:J.oneOfType([J.func,J.object,J.string]),httpRequestWithCredentials:J.bool,loading:J.oneOfType([J.func,J.object,J.string]),onError:J.func,renumerateIRIElements:J.bool,src:J.string.isRequired,title:J.string,useRequestCache:J.bool,wrapper:J.oneOf(["div","span","svg"])};var Rt="/assets/",Mt=Rt+"editor/icons/trim.svg",Nt=Rt+"editor/icons/trash.svg",It=Rt+"editor/icons/mute.svg",Dt=Rt+"editor/icons/undo.svg",Bt=Rt+"editor/icons/redo.svg",zt=Rt+"editor/icons/time.svg";const jt=function(e){var n=Pt((0,t.useContext)(j),2),r=n[0],i=(n[1],Pt((0,t.useState)(!0),2)),o=i[0],a=i[1],s=Pt((0,t.useState)(!0),2),l=s[0],c=s[1],u=Pt((0,t.useState)(0),2),d=u[0],f=u[1],p=Pt((0,t.useState)(0),2),h=p[0],m=p[1];(0,t.useEffect)((function(){f(r.start*r.duration),m(r.end*r.duration)}),[r.duration,r.start,r.end]),(0,t.useEffect)((function(){r.history.length>2?a(!1):a(!0)}),[r.history]),(0,t.useEffect)((function(){r.redoHistory.length>0?c(!1):c(!0)}),[r.redoHistory]);var g=function(e){var t=Math.floor(e/60),n=Math.floor(e-60*t);return n<10?"".concat(t,":0").concat(n):"".concat(t,":").concat(n)};return t.createElement("div",{className:et.trimWrap},t.createElement("div",{className:et.controls},t.createElement("div",{className:et.actions},t.createElement("button",{className:"button secondaryButton",onClick:function(){return r.handleTrim(!1)},disabled:r.isFfmpegRunning||0===r.start&&1===r.end},t.createElement(Ot,{src:Mt}),r.trimming?chrome.i18n.getMessage("sandboxEditorTrimProgressButton"):chrome.i18n.getMessage("sandboxEditorTrimButton")),t.createElement("button",{className:"button secondaryButton",disabled:0===r.start&&1===r.end||r.isFfmpegRunning,onClick:function(){return r.handleTrim(!0)}},t.createElement(Ot,{src:Nt}),r.cutting?chrome.i18n.getMessage("sandboxEditorCutProgressButton"):chrome.i18n.getMessage("sandboxEditorCutButton")),t.createElement("button",{className:"button secondaryButton",onClick:function(){return r.handleMute()},disabled:r.isFfmpegRunning},t.createElement(Ot,{src:It}),r.muting?chrome.i18n.getMessage("sandboxEditorMuteProgressButton"):chrome.i18n.getMessage("sandboxEditorMuteButton"))),t.createElement("div",{className:et.timeWrap},t.createElement(Ot,{src:zt}),t.createElement("span",null,g(d)+" - "+g(h))),t.createElement("div",{className:et.controlsRight},t.createElement("button",{className:"button simpleButton",onClick:function(){return r.undo()},disabled:o||r.isFfmpegRunning},t.createElement(Ot,{src:Dt}),chrome.i18n.getMessage("undoLabel")),t.createElement("button",{className:"button simpleButton",onClick:function(){return r.redo()},disabled:l||r.isFfmpegRunning},t.createElement(Ot,{src:Bt}),chrome.i18n.getMessage("redoLabel")))),t.createElement(Ke,null),(!r.dragInteracted||r.duration>3)&&t.createElement("div",{className:et.trimInfo},t.createElement("div",{className:et.trimInfoLeft},t.createElement(Ot,{src:Rt+"editor/icons/alert.svg"})),t.createElement("div",{className:et.trimInfoRight},chrome.i18n.getMessage("sandboxEditorTrimInfo"),t.createElement("div",{className:et.trimInfoLink,onClick:function(){chrome.runtime.sendMessage({type:"trim-info"})}},chrome.i18n.getMessage("learnMoreDot")))),r.dragInteracted&&r.duration<=3&&t.createElement("div",{className:et.trimInfo},t.createElement("div",{className:et.trimInfoLeft},t.createElement(Ot,{src:Rt+"editor/icons/alert.svg"})),t.createElement("div",{className:et.trimInfoRight},chrome.i18n.getMessage("sandboxEditorTooSmallInfo"),t.createElement("div",{className:et.trimInfoLink,onClick:function(){chrome.runtime.sendMessage({type:"trim-info"})}},chrome.i18n.getMessage("learnMoreDot")))))};var Ut=i(893),Ft={};Ft.styleTagTransform=g(),Ft.setAttributes=f(),Ft.insert=u().bind(null,"head"),Ft.domAPI=l(),Ft.insertStyleElement=h();a()(Ut.Z,Ft);Ut.Z&&Ut.Z.locals&&Ut.Z.locals;function Wt(e){return Wt="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},Wt(e)}function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){qt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Wt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Wt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $t(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Zt=function(e){e.ffmpeg;var n=Gt((0,t.useContext)(j),2),r=n[0],i=n[1],o=function(e,t){i((function(n){return Vt(Vt({},n),{},{updatePlayerTime:t,time:e})}))};return(0,t.useEffect)((function(){i((function(e){return Vt(Vt({},e),{},{history:[{}],redoHistory:[]})})),r.addToHistory()}),[]),t.createElement("div",null,t.createElement(Y,null),t.createElement(pe,{onSeek:o}),t.createElement(jt,{blob:r.blob,onSeek:o}))};var Yt=i(1559),Xt={};Xt.styleTagTransform=g(),Xt.setAttributes=f(),Xt.insert=u().bind(null,"head"),Xt.domAPI=l(),Xt.insertStyleElement=h();a()(Yt.Z,Xt);const Kt=Yt.Z&&Yt.Z.locals?Yt.Z.locals:void 0;function Qt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var en="/assets/";const tn=function(){var e=Qt((0,t.useContext)(j),2),n=e[0],r=(e[1],(0,t.useRef)(null));return(0,t.useEffect)((function(){r.current=n}),[n]),t.createElement("div",{className:Kt.nav},t.createElement("div",{className:Kt.navWrap},t.createElement("div",{onClick:function(){chrome.runtime.sendMessage({type:"open-home"})},"aria-label":"home",className:Kt.navLeft},t.createElement("img",{src:en+"editor/logo.svg",alt:"Screenity Logo"})),t.createElement("div",{className:Kt.navRight})))};function nn(e){return nn="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},nn(e)}function rn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */rn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==nn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(nn(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function on(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function an(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){ln(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ln(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==nn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===nn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return un(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return un(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const dn=function(){var e=cn((0,t.useContext)(j),2),n=e[0],r=e[1],i=function(){var e,t=(e=rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.handleCrop(n.left,n.top,n.width,n.height);case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){on(o,r,i,a,s,"next",e)}function s(e){on(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return t.createElement("div",{className:k.editorNav},t.createElement("div",{className:k.navWrap},t.createElement("div",{className:k.editorNavLeft,onClick:function(){chrome.runtime.sendMessage({type:"open-home"})}},t.createElement("img",{src:"/assets/editor/logo.svg",alt:"Logo"})),t.createElement("div",{className:k.editorNavCenter},t.createElement("div",{className:k.editorNavTitle},chrome.i18n.getMessage("sandboxEditorMainTitle")+" "," ",t.createElement("span",{className:k.beta},"BETA"))),t.createElement("div",{className:k.editorNavRight},t.createElement("button",{className:"button simpleButton blackButton",onClick:function(){r((function(e){return sn(sn({},e),{},{mode:"player",blob:n.originalBlob,start:0,end:1,width:n.prevWidth,height:n.prevHeight,left:0,top:0,fromCropper:!1})}))},disabled:n.isFfmpegRunning},chrome.i18n.getMessage("sandboxEditorCancelButton")),t.createElement("button",{className:"button secondaryButton",onClick:function(){r((function(e){return sn(sn({},e),{},{blob:n.originalBlob,start:0,end:1,width:n.prevWidth,height:n.prevHeight,left:0,top:0,fromCropper:!1})}))},disabled:n.isFfmpegRunning},chrome.i18n.getMessage("sandboxEditorResetButton")),t.createElement("button",{className:"button primaryButton",onClick:i,disabled:n.isFfmpegRunning},n.cropping?chrome.i18n.getMessage("sandboxEditorSaveProgressButton"):chrome.i18n.getMessage("sandboxEditorSaveButton")))))};function fn(e){return fn="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},fn(e)}function pn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */pn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==fn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(fn(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function hn(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){yn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==fn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==fn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===fn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const wn=function(){var e=vn((0,t.useContext)(j),2),n=e[0],r=e[1],i=function(){var e,t=(e=pn().mark((function e(){return pn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r((function(e){return gn(gn({},e),{},{mode:"player",start:0,end:1})}));case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){hn(o,r,i,a,s,"next",e)}function s(e){hn(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return t.createElement("div",{className:k.editorNav},t.createElement("div",{className:k.navWrap},t.createElement("div",{className:k.editorNavLeft,onClick:function(){chrome.runtime.sendMessage({type:"open-home"})}},t.createElement("img",{src:"/assets/editor/logo.svg",alt:"Logo"})),t.createElement("div",{className:k.editorNavCenter},t.createElement("div",{className:k.editorNavTitle},chrome.i18n.getMessage("sandboxEditorMainTitle")+" "," ",t.createElement("span",{className:k.beta},"BETA"))),t.createElement("div",{className:k.editorNavRight},t.createElement("button",{className:"button simpleButton blackButton",onClick:function(){r((function(e){return gn(gn({},e),{},{mode:"player",blob:n.originalBlob,start:0,end:1,width:n.prevWidth,height:n.prevHeight,left:0,top:0,fromCropper:!1})}))},disabled:n.isFfmpegRunning},chrome.i18n.getMessage("sandboxEditorCancelButton")),t.createElement("button",{className:"button secondaryButton",onClick:function(){r((function(e){return gn(gn({},e),{},{blob:n.originalBlob,start:0,end:1})}))},disabled:n.isFfmpegRunning},chrome.i18n.getMessage("sandboxEditorRevertButton")),t.createElement("button",{className:"button primaryButton",onClick:i,disabled:n.isFfmpegRunning},n.cropping?chrome.i18n.getMessage("sandboxEditorSaveProgressButton"):chrome.i18n.getMessage("sandboxEditorSaveButton")))))};var xn=i(3049),_n={};_n.styleTagTransform=g(),_n.setAttributes=f(),_n.insert=u().bind(null,"head"),_n.domAPI=l(),_n.insertStyleElement=h();a()(xn.Z,_n);xn.Z&&xn.Z.locals&&xn.Z.locals;i(5733);var kn=i(3562),En={};En.styleTagTransform=g(),En.setAttributes=f(),En.insert=u().bind(null,"head"),En.domAPI=l(),En.insertStyleElement=h();a()(kn.Z,En);kn.Z&&kn.Z.locals&&kn.Z.locals;chrome.i18n.getMessage("@@extension_id");var Sn=i(5175),Cn={};Cn.styleTagTransform=g(),Cn.setAttributes=f(),Cn.insert=u().bind(null,"head"),Cn.domAPI=l(),Cn.insertStyleElement=h();a()(Sn.Z,Cn);Sn.Z&&Sn.Z.locals&&Sn.Z.locals;chrome.i18n.getMessage("@@extension_id");var Tn=i(9146),An={};An.styleTagTransform=g(),An.setAttributes=f(),An.insert=u().bind(null,"head"),An.domAPI=l(),An.insertStyleElement=h();a()(Tn.Z,An);const On=Tn.Z&&Tn.Z.locals?Tn.Z.locals:void 0;var Pn=i(4917),Ln={};Ln.styleTagTransform=g(),Ln.setAttributes=f(),Ln.insert=u().bind(null,"head"),Ln.domAPI=l(),Ln.insertStyleElement=h();a()(Pn.Z,Ln);Pn.Z&&Pn.Z.locals&&Pn.Z.locals;var Rn=i(13),Mn={};Mn.styleTagTransform=g(),Mn.setAttributes=f(),Mn.insert=u().bind(null,"head"),Mn.domAPI=l(),Mn.insertStyleElement=h();a()(Rn.Z,Mn);const Nn=Rn.Z&&Rn.Z.locals?Rn.Z.locals:void 0;var In=i(9147),Dn={};Dn.styleTagTransform=g(),Dn.setAttributes=f(),Dn.insert=u().bind(null,"head"),Dn.domAPI=l(),Dn.insertStyleElement=h();a()(In.Z,Dn);In.Z&&In.Z.locals&&In.Z.locals;var Bn=i(4855);function zn(e){return zn="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},zn(e)}function jn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==zn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(zn(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Un(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(n),!0).forEach((function(t){Hn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==zn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===zn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Gn=function(e){var n=e.videoUrl,r=e.saveVideo,i=e.videoRetryUrl,o=e.progress,a=Vn((0,t.useState)(!1),2),s=a[0],l=a[1],c=Vn((0,t.useContext)(j),2),u=c[0],d=c[1],f=(0,t.useRef)(null),p=Vn((0,t.useState)(!0),2),h=p[0],m=p[1],g=Vn((0,t.useState)(u.title),2),y=g[0],v=g[1],b=Vn((0,t.useState)(u.title),2),w=(b[0],b[1]);(0,t.useEffect)((function(){v(u.title),u.title.length>80?w(u.title.slice(0,80)+"..."):w(u.title)}),[u.title]);(0,t.useEffect)((function(){h||(f.current.focus(),f.current.select())}),[h]),(0,t.useEffect)((function(){var e=function(e){"Enter"===e.key?(m(!0),d((function(e){return Wn(Wn({},e),{},{title:y})}))):"Escape"===e.key&&(m(!0),v(u.title))};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[y]),console.log("vee",n);var x=function(){var e,t=(e=jn().mark((function e(t){return jn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(!0);case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Un(o,r,i,a,s,"next",e)}function s(e){Un(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();return t.createElement("div",{className:Nn.TitleParent},t.createElement("div",{className:Nn.TitleWrap},h?t.createElement(t.Fragment,null,t.createElement("div",null),t.createElement("div",null,t.createElement("div",{style:{display:"flex",flexDirection:"flex",gap:"3px",alignItems:"center",justifyContent:"space-between"}},t.createElement(t.Fragment,null,0==n&&t.createElement("div",{style:{display:"grid",gap:"4px",width:"100%"}},t.createElement("div",null,"Saving to drive..."),t.createElement("div",{style:{maxWidth:"550px",width:"100%",height:"20px",background:"lightgray",borderRadius:"10px"}},t.createElement("div",{style:{width:"".concat(o>=93?92:o,"%"),borderRadius:"10px",height:"100%",background:"green",display:"flex",alignItems:"center",justifyContent:"end",color:"white",paddingRight:"2px"}},o>=93?92:o,"%"))),"failed"==n&&t.createElement("div",null,t.createElement("div",{className:"mtp-font",style:{cursor:"pointer",height:"20px",background:"black",color:"white",fontSize:"14px",borderRadius:"6px",width:"120px",padding:"5px",textAlign:"center",border:" 1px solid black",marginRight:"3px"},onClick:function(){return r(i)}},t.createElement("span",null,"Save video to drive")),t.createElement("span",{style:{color:"red",fontSize:"13px",marginTop:"3px"}},"Something went wrong")),t.createElement("div",null)),t.createElement("div",null,t.createElement("div",{style:{display:"flex",flexDirection:"flex",gap:"3px",alignItems:"center",alignSelf:"flex-end",marginBottom:"4px"}},u.isFfmpegRunning||u.noffmpeg||!u.mp4ready||u.noffmpeg?t.createElement("div",null):t.createElement("div",{role:"button",className:"mtp-font",style:Hn(Hn({cursor:"pointer",height:"20px",background:"black",color:"white",fontSize:"14px",borderRadius:"6px",width:"120px",padding:"5px",textAlign:"center",border:" 1px solid black",marginRight:"3px",display:"flex",alignItems:"center"},"color","white"),"marginBottom","5px"),onClick:function(){u.mp4ready&&u.download()},disabled:u.isFfmpegRunning||u.noffmpeg||!u.mp4ready||u.noffmpeg},t.createElement("div",{className:Nn.buttonMiddle},t.createElement("div",{className:Nn.buttonTitle},u.downloading?chrome.i18n.getMessage("downloadingLabel"):chrome.i18n.getMessage("downloadMP4ButtonTitle")))),t.createElement("div",null,!1!==n&&null!==n&&"failed"!==n&&t.createElement(Bn.CopyToClipboard,{text:n,onCopy:function(){x()},style:{marginBottom:"5px"}},t.createElement("div",{className:Nn.shareButton},t.createElement(Ot,{src:"/assets/editor/icons/link.svg",className:Nn.shareIcon}),chrome.i18n.getMessage("shareSandboxButton"))),s&&t.createElement("div",{style:{color:"green"}},"Copied To Clipboard!"))))))):t.createElement("input",{type:"text",value:y,onChange:function(e){v(e.target.value)},onBlur:function(){m(!0),d((function(e){return Wn(Wn({},e),{},{title:y})}))},ref:f})))};function $n(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zn}=Object.prototype,{getPrototypeOf:Yn}=Object,Xn=(e=>t=>{const n=Zn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>Xn(t)===e),Qn=e=>t=>typeof t===e,{isArray:Jn}=Array,er=Qn("undefined");const tr=Kn("ArrayBuffer");const nr=Qn("string"),rr=Qn("function"),ir=Qn("number"),or=e=>null!==e&&"object"==typeof e,ar=e=>{if("object"!==Xn(e))return!1;const t=Yn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},sr=Kn("Date"),lr=Kn("File"),cr=Kn("Blob"),ur=Kn("FileList"),dr=Kn("URLSearchParams");function fr(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),Jn(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function pr(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const hr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,mr=e=>!er(e)&&e!==hr;const gr=(yr="undefined"!=typeof Uint8Array&&Yn(Uint8Array),e=>yr&&e instanceof yr);var yr;const vr=Kn("HTMLFormElement"),br=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wr=Kn("RegExp"),xr=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fr(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},_r="abcdefghijklmnopqrstuvwxyz",kr="0123456789",Er={DIGIT:kr,ALPHA:_r,ALPHA_DIGIT:_r+_r.toUpperCase()+kr};const Sr=Kn("AsyncFunction"),Cr={isArray:Jn,isArrayBuffer:tr,isBuffer:function(e){return null!==e&&!er(e)&&null!==e.constructor&&!er(e.constructor)&&rr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||rr(e.append)&&("formdata"===(t=Xn(e))||"object"===t&&rr(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&tr(e.buffer),t},isString:nr,isNumber:ir,isBoolean:e=>!0===e||!1===e,isObject:or,isPlainObject:ar,isUndefined:er,isDate:sr,isFile:lr,isBlob:cr,isRegExp:wr,isFunction:rr,isStream:e=>or(e)&&rr(e.pipe),isURLSearchParams:dr,isTypedArray:gr,isFileList:ur,forEach:fr,merge:function e(){const{caseless:t}=mr(this)&&this||{},n={},r=(r,i)=>{const o=t&&pr(n,i)||i;ar(n[o])&&ar(r)?n[o]=e(n[o],r):ar(r)?n[o]=e({},r):Jn(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&fr(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(fr(t,((t,r)=>{n&&rr(t)?e[r]=$n(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Yn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Xn,kindOfTest:Kn,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Jn(e))return e;let t=e.length;if(!ir(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:vr,hasOwnProperty:br,hasOwnProp:br,reduceDescriptors:xr,freezeMethods:e=>{xr(e,((t,n)=>{if(rr(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];rr(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Jn(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:pr,global:hr,isContextDefined:mr,ALPHABET:Er,generateString:(e=16,t=Er.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&rr(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(or(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=Jn(e)?[]:{};return fr(e,((e,t)=>{const o=n(e,r+1);!er(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:Sr,isThenable:e=>e&&(or(e)||rr(e))&&rr(e.then)&&rr(e.catch)};function Tr(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Cr.inherits(Tr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Cr.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ar=Tr.prototype,Or={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Or[e]={value:e}})),Object.defineProperties(Tr,Or),Object.defineProperty(Ar,"isAxiosError",{value:!0}),Tr.from=(e,t,n,r,i,o)=>{const a=Object.create(Ar);return Cr.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Tr.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Pr=Tr;function Lr(e){return Cr.isPlainObject(e)||Cr.isArray(e)}function Rr(e){return Cr.endsWith(e,"[]")?e.slice(0,-2):e}function Mr(e,t,n){return e?e.concat(t).map((function(e,t){return e=Rr(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Nr=Cr.toFlatObject(Cr,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Ir=function(e,t,n){if(!Cr.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Cr.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Cr.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Cr.isSpecCompliantForm(t);if(!Cr.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Cr.isDate(e))return e.toISOString();if(!s&&Cr.isBlob(e))throw new Pr("Blob is not supported. Use a Buffer instead.");return Cr.isArrayBuffer(e)||Cr.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(Cr.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Cr.isArray(e)&&function(e){return Cr.isArray(e)&&!e.some(Lr)}(e)||(Cr.isFileList(e)||Cr.endsWith(n,"[]"))&&(s=Cr.toArray(e)))return n=Rr(n),s.forEach((function(e,r){!Cr.isUndefined(e)&&null!==e&&t.append(!0===a?Mr([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!Lr(e)||(t.append(Mr(i,n,o),l(e)),!1)}const u=[],d=Object.assign(Nr,{defaultVisitor:c,convertValue:l,isVisitable:Lr});if(!Cr.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Cr.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Cr.forEach(n,(function(n,o){!0===(!(Cr.isUndefined(n)||null===n)&&i.call(t,n,Cr.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function Dr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Br(e,t){this._pairs=[],e&&Ir(e,this,t)}const zr=Br.prototype;zr.append=function(e,t){this._pairs.push([e,t])},zr.toString=function(e){const t=e?function(t){return e.call(this,t,Dr)}:Dr;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const jr=Br;function Ur(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fr(e,t,n){if(!t)return e;const r=n&&n.encode||Ur,i=n&&n.serialize;let o;if(o=i?i(t,n):Cr.isURLSearchParams(t)?t.toString():new jr(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const Wr=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Cr.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Hr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:jr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},qr="undefined"!=typeof window&&"undefined"!=typeof document,Gr=($r="undefined"!=typeof navigator&&navigator.product,qr&&["ReactNative","NativeScript","NS"].indexOf($r)<0);var $r;const Zr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Yr={...e,...Vr};const Xr=function(e){function t(e,n,r,i){let o=e[i++];const a=Number.isFinite(+o),s=i>=e.length;if(o=!o&&Cr.isArray(r)?r.length:o,s)return Cr.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&Cr.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&Cr.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}(r[o])),!a}if(Cr.isFormData(e)&&Cr.isFunction(e.entries)){const n={};return Cr.forEachEntry(e,((e,r)=>{t(function(e){return Cr.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Kr={transitional:Hr,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Cr.isObject(e);i&&Cr.isHTMLForm(e)&&(e=new FormData(e));if(Cr.isFormData(e))return r&&r?JSON.stringify(Xr(e)):e;if(Cr.isArrayBuffer(e)||Cr.isBuffer(e)||Cr.isStream(e)||Cr.isFile(e)||Cr.isBlob(e))return e;if(Cr.isArrayBufferView(e))return e.buffer;if(Cr.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ir(e,new Yr.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Yr.isNode&&Cr.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Cr.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ir(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Cr.isString(e))try{return(t||JSON.parse)(e),Cr.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Kr.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Cr.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Pr.from(e,Pr.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yr.classes.FormData,Blob:Yr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Cr.forEach(["delete","get","head","post","put","patch"],(e=>{Kr.headers[e]={}}));const Qr=Kr,Jr=Cr.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ei=Symbol("internals");function ti(e){return e&&String(e).trim().toLowerCase()}function ni(e){return!1===e||null==e?e:Cr.isArray(e)?e.map(ni):String(e)}function ri(e,t,n,r,i){return Cr.isFunction(r)?r.call(this,t,n):(i&&(t=n),Cr.isString(t)?Cr.isString(r)?-1!==t.indexOf(r):Cr.isRegExp(r)?r.test(t):void 0:void 0)}class ii{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=ti(t);if(!i)throw new Error("header name must be a non-empty string");const o=Cr.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=ni(e))}const o=(e,t)=>Cr.forEach(e,((e,n)=>i(e,n,t)));return Cr.isPlainObject(e)||e instanceof this.constructor?o(e,t):Cr.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Jr[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=ti(e)){const n=Cr.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Cr.isFunction(t))return t.call(this,e,n);if(Cr.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ti(e)){const n=Cr.findKey(this,e);return!(!n||void 0===this[n]||t&&!ri(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=ti(e)){const i=Cr.findKey(n,e);!i||t&&!ri(0,n[i],i,t)||(delete n[i],r=!0)}}return Cr.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!ri(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Cr.forEach(this,((r,i)=>{const o=Cr.findKey(n,i);if(o)return t[o]=ni(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=ni(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Cr.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Cr.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ei]=this[ei]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ti(e);t[r]||(!function(e,t){const n=Cr.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return Cr.isArray(e)?e.forEach(r):r(e),this}}ii.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Cr.reduceDescriptors(ii.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Cr.freezeMethods(ii);const oi=ii;function ai(e,t){const n=this||Qr,r=t||n,i=oi.from(r.headers);let o=r.data;return Cr.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function si(e){return!(!e||!e.__CANCEL__)}function li(e,t,n){Pr.call(this,null==e?"canceled":e,Pr.ERR_CANCELED,t,n),this.name="CanceledError"}Cr.inherits(li,Pr,{__CANCEL__:!0});const ci=li;const ui=Yr.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];Cr.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Cr.isString(r)&&a.push("path="+r),Cr.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function di(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const fi=Yr.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Cr.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};const pi=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];i||(i=l),n[o]=s,r[o]=l;let u=a,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}};function hi(e,t){let n=0;const r=pi(50,250);return i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,l=r(s);n=o;const c={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const mi="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=oi.from(e.headers).normalize();let o,a,{responseType:s,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(Cr.isFormData(r))if(Yr.hasStandardBrowserEnv||Yr.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(a=i.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const d=di(e.baseURL,e.url);function f(){if(!u)return;const r=oi.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Pr("Request failed with status code "+n.status,[Pr.ERR_BAD_REQUEST,Pr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:s&&"text"!==s&&"json"!==s?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),Fr(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(f)},u.onabort=function(){u&&(n(new Pr("Request aborted",Pr.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new Pr("Network Error",Pr.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Hr;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Pr(t,r.clarifyTimeoutError?Pr.ETIMEDOUT:Pr.ECONNABORTED,e,u)),u=null},Yr.hasStandardBrowserEnv&&(l&&Cr.isFunction(l)&&(l=l(e)),l||!1!==l&&fi(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ui.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in u&&Cr.forEach(i.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),Cr.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&"json"!==s&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",hi(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",hi(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{u&&(n(!t||t.type?new ci(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);p&&-1===Yr.protocols.indexOf(p)?n(new Pr("Unsupported protocol "+p+":",Pr.ERR_BAD_REQUEST,e)):u.send(r||null)}))},gi={http:null,xhr:mi};Cr.forEach(gi,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const yi=e=>`- ${e}`,vi=e=>Cr.isFunction(e)||null===e||!1===e,bi=e=>{e=Cr.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!vi(n)&&(r=gi[(t=String(n)).toLowerCase()],void 0===r))throw new Pr(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+o]=r}if(!r){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(yi).join("\n"):" "+yi(e[0]):"as no adapter specified";throw new Pr("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function wi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ci(null,e)}function xi(e){wi(e),e.headers=oi.from(e.headers),e.data=ai.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return bi(e.adapter||Qr.adapter)(e).then((function(t){return wi(e),t.data=ai.call(e,e.transformResponse,t),t.headers=oi.from(t.headers),t}),(function(t){return si(t)||(wi(e),t&&t.response&&(t.response.data=ai.call(e,e.transformResponse,t.response),t.response.headers=oi.from(t.response.headers))),Promise.reject(t)}))}const _i=e=>e instanceof oi?e.toJSON():e;function ki(e,t){t=t||{};const n={};function r(e,t,n){return Cr.isPlainObject(e)&&Cr.isPlainObject(t)?Cr.merge.call({caseless:n},e,t):Cr.isPlainObject(t)?Cr.merge({},t):Cr.isArray(t)?t.slice():t}function i(e,t,n){return Cr.isUndefined(t)?Cr.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!Cr.isUndefined(t))return r(void 0,t)}function a(e,t){return Cr.isUndefined(t)?Cr.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(_i(e),_i(t),!0)};return Cr.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||i,a=o(e[r],t[r],r);Cr.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Ei="1.6.2",Si={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Si[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ci={};Si.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Pr(r(i," has been removed"+(t?" in "+t:"")),Pr.ERR_DEPRECATED);return t&&!Ci[i]&&(Ci[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const Ti={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Pr("options must be an object",Pr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Pr("option "+o+" must be "+n,Pr.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Pr("Unknown option "+o,Pr.ERR_BAD_OPTION)}},validators:Si},Ai=Ti.validators;class Oi{constructor(e){this.defaults=e,this.interceptors={request:new Wr,response:new Wr}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ki(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&Ti.assertOptions(n,{silentJSONParsing:Ai.transitional(Ai.boolean),forcedJSONParsing:Ai.transitional(Ai.boolean),clarifyTimeoutError:Ai.transitional(Ai.boolean)},!1),null!=r&&(Cr.isFunction(r)?t.paramsSerializer={serialize:r}:Ti.assertOptions(r,{encode:Ai.function,serialize:Ai.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Cr.merge(i.common,i[t.method]);i&&Cr.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=oi.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[xi.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=xi.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Fr(di((e=ki(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Cr.forEach(["delete","get","head","options"],(function(e){Oi.prototype[e]=function(t,n){return this.request(ki(n||{},{method:e,url:t,data:(n||{}).data}))}})),Cr.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(ki(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Oi.prototype[e]=t(),Oi.prototype[e+"Form"]=t(!0)}));const Pi=Oi;class Li{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new ci(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Li((function(t){e=t})),cancel:e}}}const Ri=Li;const Mi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mi).forEach((([e,t])=>{Mi[t]=e}));const Ni=Mi;const Ii=function e(t){const n=new Pi(t),r=$n(Pi.prototype.request,n);return Cr.extend(r,Pi.prototype,n,{allOwnKeys:!0}),Cr.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ki(t,n))},r}(Qr);Ii.Axios=Pi,Ii.CanceledError=ci,Ii.CancelToken=Ri,Ii.isCancel=si,Ii.VERSION=Ei,Ii.toFormData=Ir,Ii.AxiosError=Pr,Ii.Cancel=Ii.CanceledError,Ii.all=function(e){return Promise.all(e)},Ii.spread=function(e){return function(t){return e.apply(null,t)}},Ii.isAxiosError=function(e){return Cr.isObject(e)&&!0===e.isAxiosError},Ii.mergeConfig=ki,Ii.AxiosHeaders=oi,Ii.formToJSON=e=>Xr(Cr.isHTMLForm(e)?new FormData(e):e),Ii.getAdapter=bi,Ii.HttpStatusCode=Ni,Ii.default=Ii;var Di=Ii.create({baseURL:"https://my-techpassport-dev.caprover.manaknightdigital.com"});function Bi(e){return Bi="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},Bi(e)}function zi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zi=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new P(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==n&&r.call(_,a)&&(w=_);var k=b.prototype=y.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Bi(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=T(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Bi(t)+" is not iterable")}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},E(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function ji(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Ui(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||Fi(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fi(e,t){if(e){if("string"==typeof e)return Wi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wi(e,t):void 0}}function Wi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Hi=function(e){var n=Ui((0,t.useContext)(j),2),r=n[0],i=(n[1],(0,t.useRef)(null)),o=Ui((0,t.useState)(null),2),a=o[0],s=o[1],l=Ui((0,t.useState)(null),2),c=l[0],u=l[1],d=Ui((0,t.useState)(null),2),f=d[0],p=d[1],h=Ui((0,t.useState)(null),2),m=h[0],g=h[1],y=(0,t.useRef)(r),v=(0,t.useRef)(null),b=(0,t.useRef)(!1),w=Ui((0,t.useState)(0),2),x=w[0],_=w[1];console.log("progress",x),(0,t.useEffect)((function(){y.current=r}),[r]),(0,t.useEffect)((function(){i.current&&i.current.plyr&&r.updatePlayerTime&&(i.current.plyr.currentTime=r.time)}),[r.time]);var k=(0,t.useMemo)((function(){return{controls:["play","rewind","fast-forward","progress","current-time","duration","mute","captions","settings","pip","fullscreen"],urls:null,ratio:"16:9",blankVideo:"chrome-extension://"+chrome.i18n.getMessage("@@extension_id")+"/assets/blank.mp4",keyboard:{global:!0}}}),[]);(0,t.useEffect)((function(){if(r.webm||r.webm){var e;r.blob?(v.current&&(v.current.style.display="none",v.current.remove()),e=r.blob):r.webm&&(e=r.webm);var t=Math.floor(1e3+9e3*Math.random()),n=new File([e],"MyTechPassport_video".concat(t),{type:e.type}),i=URL.createObjectURL(n);return u({type:"video",sources:[{src:i,type:r.blob?"video/mp4":"video/webm"}]}),s(i),console.log("video",e),function(){URL.revokeObjectURL(i)}}}),[r.webm,r.blob,r.hasBeenEdited,i]);var E=function(){var e,t=(e=zi().mark((function e(t){var n,r,i,o;return zi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("first",t),p(!1),e.next=4,chrome.storage.local.get(["apikey"]);case 4:return n=e.sent,r=n.apikey,(i=new FormData).append("toolId","83"),i.append("file",t),e.prev=9,e.next=12,Di.post("/drive/upload",i,{headers:{Authorization:"Bearer ".concat(r)},onUploadProgress:function(e){var t=Math.round(100*e.loaded/e.total);_(t)}});case 12:o=e.sent,p(o.data.url),console.log("File uploaded successfully:",o.data),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(9),p("failed"),console.error("Error uploading file:",e.t0);case 21:case"end":return e.stop()}}),e,null,[[9,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ji(o,r,i,a,s,"next",e)}function s(e){ji(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();return(0,t.useEffect)((function(){if(r.mp4ready&&!r.isFfmpegRunning||!(r.duration<=r.editLimit||r.override)||r.offline||r.updateChrome||r.noffmpeg){if(!b.current){var e;e=r.blob?r.blob:r.webm;var t=Math.floor(1e3+9e3*Math.random()),n=new File([e],"MyTechPassport_video".concat(t),{type:e.type});console.log(n),g(n),E(n),b.current=!0}}else console.log("")}),[r.mp4ready,r.isFfmpegRunning,r.duration,r.editLimit,r.override,r.updateChrome,r.noffmpeg]),(0,t.useEffect)((function(){if(!y.current.mp4ready&&!y.current.blob){var e=new MutationObserver((function(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Fi(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e);try{for(r.s();!(n=r.n()).done;){n.value;!document.querySelector(".plyr--video")||y.current.mp4ready||y.current.blob||v.current||y.current.noffmpeg||y.current.duration>y.current.editLimit&&!y.current.override||(v.current=document.createElement("div"),v.current.classList.add("videoBanner"),v.current.innerHTML="<img src='"+chrome.runtime.getURL("assets/editor/icons/alert-white.svg")+"'/> <span>"+chrome.i18n.getMessage("processingBannerEditor")+"</span>",document.querySelector(".plyr--video").appendChild(v.current))}}catch(e){r.e(e)}finally{r.f()}}));return e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),function(){e.disconnect(),v.current&&(v.current.style.display="none",v.current.remove(),v.current=null)}}}),[]),t.createElement("div",{className:"videoPlayer"},t.createElement("div",{className:"playerWrap"},a&&t.createElement(ae,{ref:i,id:"plyr-player",source:c,options:k}),"player"===r.mode&&t.createElement(Gn,{videoUrl:f,videoRetryUrl:m,saveVideo:E,progress:x})),t.createElement("style",null,"\n\t\t\t\n\t\t\t\t\t\t.videoPlayer {\n\t\t\t\t\t\t\tposition: relative!important;\n\t\t\n\t\t\t\t\t}\n\t\t\t\t\t"))};function Vi(e){return e.moveCoordinates||e.resizeCoordinates||e.transformImage.move||e.transformImage.rotate||e.transformImage.flip||e.transformImage.scale}function qi(e,t){var n,r;return e&&t?(n=""+e+t[0].toUpperCase()+t.slice(1),r=e+"-"+t):(n=e||t,r=e||t),{camelCase:n,snakeCase:r}}function Gi(e){return/^blob:/.test(e)}function $i(e){return Gi(e)||function(e){return/^data:/.test(e)}(e)}function Zi(e){if($i(e))return!1;var t=window.location,n=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[],r={protocol:n[1]||"",host:n[2]||"",port:n[3]||""},i=function(e){return e.port||("http"===(e.protocol||t.protocol)?80:433)};return!(!r.protocol&&!r.host&&!r.port||Boolean(r.protocol&&r.protocol==t.protocol&&r.host&&r.host==t.host&&r.host&&i(r)==i(t)))}function Yi(e){return"function"==typeof e}function Xi(e){return void 0===e}var Ki=function(e){return null!==e&&"object"==typeof e};function Qi(e,t,n){void 0===n&&(n={});var r={};return Ki(e)?(Object.keys(t).forEach((function(i){Xi(e[i])?r[i]=t[i]:Ki(t[i])?Ki(e[i])?r[i]=Qi(e[i],t[i],n[i]):r[i]=e[i]?t[i]:n[i]:!0===t[i]||!1===t[i]?r[i]=Boolean(e[i]):r[i]=e[i]})),r):e?t:n}function Ji(e){var t=Number(e);return Number.isNaN(t)?e:t}function eo(e){return!0===e||!1===e}function to(e){return"number"==typeof e}function no(e){return e!=e}function ro(e){return to(e)&&!no(e)||function(e){return"string"==typeof e}(e)&&!Number.isNaN(parseFloat(e))&&isFinite(parseFloat(e))}function io(e,t){return Math.sqrt(Math.pow(e.left-t.left,2)+Math.pow(e.top-t.top,2))}function oo(e,t,n){return void 0===n&&(n=.001),Math.abs(t-e)<n}function ao(e,t,n){return!oo(e,t,n)&&e>t}function so(e,t,n){return!oo(e,t,n)&&e<t}function lo(e){return new Promise((function(t){setTimeout((function(){t()}),e)}))}function co(e){if(!Ki(e))return e;var t={};return Array.isArray(e)?t=e.map((function(e){return co(e)})):Object.keys(e).forEach((function(n){return t[n]=co(e[n])})),t}function uo(e,t,n){if(void 0===n&&(n=.001),to(e)&&to(t)&&oo(e,t,n))return!0;if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var r,i=void 0;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(i=r;0!=i--;)if(!uo(e[i],t[i],n))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var o=Object.keys(e);if((r=o.length)!==Object.keys(t).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!uo(e[a],t[a],n))return!1}return!0}return e!=e&&t!=t}function fo(e){return"west"===e||"south"===e||"north"===e||"east"===e}function po(e,t){var n,r;function i(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=Date.now()-n,l=Yi(t)?t():t||0;s<l&&s>=0?r=setTimeout((function(){return i.apply(void 0,o)}),l-s):e.apply(void 0,o)}function o(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];n=Date.now(),r=setTimeout((function(){return i.apply(void 0,e)}),Yi(t)?t():t||0)}return o.clear=function(){clearTimeout(r)},o}var ho,mo,go,yo=["left","right","top","bottom"],vo=["left","right"],bo=["top","bottom"];function wo(e,t){return{left:e.left-t.left,top:e.top-t.top}}function xo(e){return{left:e.left+e.width/2,top:e.top+e.height/2}}function _o(e,t){return Math.pow(e.width-t.width,2)+Math.pow(e.height-t.height,2)}function ko(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width+t.left+t.right,height:e.height+t.top+t.bottom}}function Eo(e){return{left:-e.left,top:-e.top}}function So(e,t){return ot(ot({},e),{left:e.left+t.left,top:e.top+t.top})}function Co(e){return{left:e.left,top:e.top,right:e.left+e.width,bottom:e.top+e.height}}function To(e,t,n,r){if(1!==t){if("left"in e||"top"in e){if(n){var i=xo(e);return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2+(n.left-i.left)*(r||1-t),top:e.top+e.height*(1-t)/2+(n.top-i.top)*(r||1-t)}}return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2,top:e.top+e.height*(1-t)/2}}return{width:e.width*t,height:e.height*t}}return e}function Ao(e){return e.width/e.height}function Oo(e,t){return Math.min(t.maxWidth?t.maxWidth/e.width:1/0,t.maxHeight?t.maxHeight/e.height:1/0)}function Po(e,t){var n;return t.minimum&&so(e,t.minimum)?n=t.minimum:t.maximum&&ao(e,t.maximum)&&(n=t.maximum),n}function Lo(e,t){var n=Ao(e),r=1;return t.minWidth>0&&t.minHeight>0?n>t.minWidth/t.minHeight?e.height<t.minHeight&&(r=t.minHeight/e.height):e.width<t.minWidth&&(r=t.minWidth/e.width):t.minWidth>0?e.width<t.minWidth&&(r=t.minWidth/e.width):t.minHeight>0&&e.height<t.minHeight&&(r=t.minHeight/e.height),t.maxWidth<1/0&&t.maxHeight<1/0?n>t.maxWidth/t.maxHeight?e.width>t.maxWidth&&(r=t.maxWidth/e.width):e.height>t.maxHeight&&(r=t.maxHeight/e.height):t.maxWidth<1/0?e.width>t.maxWidth&&(r=t.maxWidth/e.width):t.maxHeight<1/0&&e.height>t.maxHeight&&(r=t.maxHeight/e.height),r}function Ro(e,t){var n={left:0,top:0,right:0,bottom:0};return yo.forEach((function(r){var i=t[r],o=Co(e)[r];n[r]=void 0!==i&&void 0!==o?"left"===r||"top"===r?Math.max(0,i-o):Math.max(0,o-i):0})),n}function Mo(e,t){return To(e,Lo(e,t))}function No(e,t){var n=t*Math.PI/180;return{width:Math.abs(e.width*Math.cos(n))+Math.abs(e.height*Math.sin(n)),height:Math.abs(e.width*Math.sin(n))+Math.abs(e.height*Math.cos(n))}}function Io(e,t,n){var r=t*Math.PI/180;return n?{left:(e.left-n.left)*Math.cos(r)-(e.top-n.top)*Math.sin(r)+n.left,top:(e.left-n.left)*Math.sin(r)+(e.top-n.top)*Math.cos(r)+n.top}:{left:e.left*Math.cos(r)-e.top*Math.sin(r),top:e.left*Math.sin(r)+e.top*Math.cos(r)}}function Do(e){return{minWidth:0,minHeight:0,maxWidth:void 0!==e.right&&void 0!==e.left?e.right-e.left:1/0,maxHeight:void 0!==e.bottom&&void 0!==e.top?e.bottom-e.top:1/0}}function Bo(e,t){var n={};return yo.forEach((function(r){var i=e[r],o=t[r];void 0!==i&&void 0!==o?n[r]="left"===r||"top"===r?Math.max(i,o):Math.min(i,o):void 0!==o?n[r]=o:void 0!==i&&(n[r]=i)})),n}function zo(e,t){var n={left:0,top:0},r=Ro(e,t);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function jo(e,t){return So(e,zo(e,t))}function Uo(e){return void 0===e&&(e={}),to(e)?{minimum:e,maximum:e}:{minimum:ro(e.minimum)?e.minimum:0,maximum:ro(e.maximum)?e.maximum:1/0}}function Fo(e,t){return(Xi(t.maxWidth)||!ao(e.width,t.maxWidth))&&(Xi(t.maxHeight)||!ao(e.height,t.maxHeight))&&(Xi(t.minHeight)||!so(e.height,t.minHeight))&&(Xi(t.minWidth)||!so(e.width,t.minWidth))}function Wo(e,t){return(Xi(t.left)||!so(e.left,t.left))&&(Xi(t.top)||!so(e.top,t.top))&&(Xi(t.right)||!ao(e.left+e.width,t.right))&&(Xi(t.bottom)||!ao(e.top+e.height,t.bottom))}function Ho(e){var t=ot({},e);return t.minWidth>t.maxWidth&&(t.minWidth=t.maxWidth),t.minHeight>t.maxHeight&&(t.minHeight=t.maxHeight),t}function Vo(e,t){var n=e,r=ot({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0},t);return Ho({maxHeight:Math.min(n.maxHeight,r.maxHeight),minHeight:Math.max(n.minHeight,r.minHeight),maxWidth:Math.min(n.maxWidth,r.maxWidth),minWidth:Math.max(n.minWidth,r.minWidth)})}function qo(e){return Boolean(e&&e.visibleArea&&e.coordinates)}function Go(e,t){return function(e,t){var n=Yi(t.areaSizeRestrictions)?t.areaSizeRestrictions(e,t):t.areaSizeRestrictions;return n.maxWidth<1/0&&n.maxHeight<1/0&&(Ao(e.boundary)>n.maxWidth/n.maxHeight?n.maxHeight=n.maxWidth/Ao(e.boundary):n.maxWidth=n.maxHeight*Ao(e.boundary)),Ho(n)}(e,t)}function $o(e,t){return Yi(t.areaPositionRestrictions)?t.areaPositionRestrictions(e,t):t.areaPositionRestrictions}function Zo(e,t){return function(e,t){var n=Yi(t.sizeRestrictions)?t.sizeRestrictions(e,t):t.sizeRestrictions,r=Yo(e,t),i={minWidth:ro(n.minWidth)?Ji(n.minWidth):0,minHeight:ro(n.minHeight)?Ji(n.minHeight):0,maxWidth:ro(n.maxWidth)?Ji(n.maxWidth):1/0,maxHeight:ro(n.maxHeight)?Ji(n.maxHeight):1/0};return void 0!==r.left&&void 0!==r.right&&(i.maxWidth=Math.min(i.maxWidth,r.right-r.left)),void 0!==r.bottom&&void 0!==r.top&&(i.maxHeight=Math.min(i.maxHeight,r.bottom-r.top)),Ho(i)}(e,t)}function Yo(e,t){return Yi(t.positionRestrictions)?t.positionRestrictions(e,t):t.positionRestrictions}function Xo(e){return e.visibleArea?e.visibleArea.width/e.boundary.width:0}function Ko(e){if(qo(e)){var t=e.coordinates,n=t.width,r=t.height,i=t.left,o=t.top,a=Xo(e);return{width:n/a,height:r/a,left:(i-e.visibleArea.left)/a,top:(o-e.visibleArea.top)/a}}return{left:0,top:0,width:0,height:0}}function Qo(e,t){return Uo(Yi(t.aspectRatio)?t.aspectRatio(e,t):t.aspectRatio)}function Jo(e,t){return Yi(t.defaultCoordinates)?t.defaultCoordinates(e,t):t.defaultCoordinates}function ea(e,t){return Yi(t.defaultVisibleArea)?t.defaultVisibleArea(e,t):t.defaultVisibleArea}function ta(e){return e.imageSize&&e.imageSize.width&&e.imageSize.height?No(e.imageSize,e.transforms.rotate):{width:0,height:0}}function na(e,t){return!qo(e)||!Po(Ao(e.coordinates),Qo(e,t))&&Fo(e.visibleArea,Go(e,t))&&Fo(e.coordinates,Zo(e,t))&&Wo(e.visibleArea,$o(e,t))&&Wo(e.coordinates,Yo(e,t))}function ra(e){return co(e)}function ia(e){var t=e.width,n=e.height,r=e.sizeRestrictions||{minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0},i=Uo(e.aspectRatio),o={width:Math.max(r.minWidth,Math.min(r.maxWidth,t)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))},a=[o];return i&&[i.minimum,i.maximum].forEach((function(e){e&&a.push({width:o.width,height:o.width/e},{width:o.height*e,height:o.height})})),function(e,t,n,r){var i=function(i){return e.reduce((function(e,o){var a=Yi(n)?n(o):n,s=a.maxHeight,l=a.maxWidth,c=a.minWidth,u=a.minHeight,d=Uo(Yi(r)?r(o):r);return Fo(o,i?{maxWidth:l,maxHeight:s}:{maxWidth:l,maxHeight:s,minWidth:c,minHeight:u})&&!Po(Ao(o),d)&&o.width&&o.height&&(!e||so(_o(o,t),_o(e,t)))?o:e}),null)};return i()||i(!0)}(a=a.map((function(e){return Mo(e,r)})),{width:t,height:n},r,i)}function oa(e,t){var n=ra(e);if(e.visibleArea){var r=Go(e,t);n.visibleArea=ot(ot({},e.visibleArea),ia({width:e.visibleArea.width,height:e.visibleArea.height,aspectRatio:{minimum:Ao(n.boundary),maximum:Ao(n.boundary)},sizeRestrictions:r})),n.visibleArea=So(n.visibleArea,wo(xo(e.visibleArea),xo(n.visibleArea))),n.visibleArea=jo(n.visibleArea,$o(n,t))}return n}function aa(e,t,n){var r=So(e,t);return n?jo(r,n):r}function sa(e,t,n,r){void 0===r&&(r=!0);var i=!1===r?ho.unsafe:!0===r?ho.zoom:r,o=Qo(e,t),a=Zo(e,t);e.visibleArea&&i===ho.limit&&(a=ot(ot({},a),{minWidth:Math.min(e.visibleArea.width,a.minWidth),minHeight:Math.min(e.visibleArea.height,a.minHeight),maxWidth:Math.min(e.visibleArea.width,a.maxWidth),maxHeight:Math.min(e.visibleArea.height,a.maxHeight)}));var s=Yo(e,t);e.visibleArea&&i===ho.limit&&(s=Bo(s,Co(e.visibleArea)));var l=function(e,t){return aa(e,{left:t.left-(e.left||0),top:t.top-(e.top||0)},s)},c=e.coordinates?ot({},e.coordinates):{left:0,top:0,width:0,height:0};(Array.isArray(n)?n:[n]).forEach((function(n){var r;(r="function"==typeof n?n(ot(ot({},e),{coordinates:c}),t):n)&&(Xi(r.width)&&Xi(r.height)||(c=function(e,t){var n=ot(ot(ot({},e),ia({width:t.width,height:t.height,sizeRestrictions:a,aspectRatio:o})),{left:0,top:0});return l(n,{left:e.left||0,top:e.top||0})}(c,ot(ot({},c),r))),Xi(r.left)&&Xi(r.top)||(c=l(c,ot(ot({},c),r))))}));var u=ot(ot({},ra(e)),{coordinates:c});if(u.visibleArea&&i===ho.zoom){var d=Math.max(0,u.coordinates.width-u.visibleArea.width),f=Math.max(0,u.coordinates.height-u.visibleArea.height),p=Go(e,t),h=d>f?u.coordinates.width/u.visibleArea.width:u.coordinates.height/u.visibleArea.height;return h>1&&(u.visibleArea=To(u.visibleArea,Math.min(h,Oo(u.visibleArea,p)))),u.visibleArea=So(u.visibleArea,Eo(zo(u.coordinates,Co(u.visibleArea)))),oa(u,t)}return u}function la(e,t){if(e.coordinates){var n=ra(e),r=Qo(e,t),i=Zo(e,t);return n.coordinates=ot(ot({},e.coordinates),ia({width:e.coordinates.width,height:e.coordinates.height,aspectRatio:r,sizeRestrictions:e.visibleArea?{maxWidth:Math.min(e.visibleArea.width,i.maxWidth),maxHeight:Math.min(e.visibleArea.height,i.maxHeight),minHeight:Math.min(e.visibleArea.height,i.minHeight),minWidth:Math.min(e.visibleArea.width,i.minWidth)}:i})),n.coordinates=So(n.coordinates,wo(xo(e.coordinates),xo(n.coordinates))),n.coordinates=jo(n.coordinates,e.visibleArea?Bo(Co(e.visibleArea),Yo(n,t)):Yo(n,t)),n}return e}function ca(e,t,n,r){void 0===r&&(r=!0);var i=ot(ot({},ra(e)),{visibleArea:n});return i=oa(i,t),r&&(i=la(i,t)),i}function ua(e,t){var n,r,i,o,a,s=e.boundary,l=e.image,c={boundary:{width:s.width,height:s.height},imageSize:{width:l.width,height:l.height},transforms:{rotate:(null===(n=l.transforms)||void 0===n?void 0:n.rotate)||0,flip:{horizontal:(null===(i=null===(r=l.transforms)||void 0===r?void 0:r.flip)||void 0===i?void 0:i.horizontal)||!1,vertical:(null===(a=null===(o=l.transforms)||void 0===o?void 0:o.flip)||void 0===a?void 0:a.vertical)||!1}},visibleArea:null,coordinates:null};return t.defaultTransforms&&(c.transforms=function(e,t){var n=ot(ot({},e.transforms),{flip:ot({},e.transforms.flip)});if(t.defaultTransforms){var r=Yi(t.defaultTransforms)?t.defaultTransforms(e,t):t.defaultTransforms;to(r.rotate)&&(n.rotate=r.rotate),r.flip&&(eo(r.flip.horizontal)&&(n.flip.horizontal=r.flip.horizontal),eo(r.flip.vertical)&&(n.flip.vertical=r.flip.vertical))}return n}(c,t)),c=t.priority===go.visibleArea?sa(c=ca(c,t,ea(c,t),!1),t,Jo(c,t),ho.limit):ca(c=sa(c,t,Jo(c,t),ho.unsafe),t,ea(c,t),!0)}function da(e,t,n){if(qo(e)){var r=ra(e);return r.coordinates=So(r.coordinates,n),r.coordinates=jo(r.coordinates,Bo(Co(r.visibleArea),Yo(r,t))),r}return e}function fa(e){var t=e.coordinates,n=e.directions,r=e.positionRestrictions,i=e.sizeRestrictions,o=e.preserveRatio,a=e.allowedDirections,s=e.compensate,l=void 0===s||s,c=ot({},n),u=ko(t,c).width,d=ko(t,c).height;u<0&&(c.left<0&&c.right<0?(c.left=-(t.width-i.minWidth)/(c.left/c.right),c.right=-(t.width-i.minWidth)/(c.right/c.left)):c.left<0?c.left=-(t.width-i.minWidth):c.right<0&&(c.right=-(t.width-i.minWidth))),d<0&&(c.top<0&&c.bottom<0?(c.top=-(t.height-i.minHeight)/(c.top/c.bottom),c.bottom=-(t.height-i.minHeight)/(c.bottom/c.top)):c.top<0?c.top=-(t.height-i.minHeight):c.bottom<0&&(c.bottom=-(t.height-i.minHeight)));var f=Ro(ko(t,c),r),p=yo.every((function(e){return!ao(f[(t=e,{left:"right",top:"bottom",right:"left",bottom:"top"}[t])],0)||a[e];var t}));l&&p&&(f.left&&f.left>0&&0===f.right?(c.right+=f.left,c.left-=f.left):f.right&&f.right>0&&0===f.left&&(c.left+=f.right,c.right-=f.right),f.top&&f.top>0&&0===f.bottom?(c.bottom+=f.top,c.top-=f.top):f.bottom&&f.bottom>0&&0===f.top&&(c.top+=f.bottom,c.bottom-=f.bottom),f=Ro(ko(t,c),r));var h={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(yo.forEach((function(e){var t=f[e];t&&c[e]&&(h[e]=Math.max(0,1-t/c[e]))})),o){var m=Math.min.apply(Math,yo.map((function(e){return h[e]})));m!==1/0&&yo.forEach((function(e){c[e]*=m}))}else yo.forEach((function(e){h[e]!==1/0&&(c[e]*=h[e])}));if(u=ko(t,c).width,d=ko(t,c).height,c.right+c.left&&(u>i.maxWidth?h.width=(i.maxWidth-t.width)/(c.right+c.left):u<i.minWidth&&(h.width=(i.minWidth-t.width)/(c.right+c.left))),c.bottom+c.top&&(d>i.maxHeight?h.height=(i.maxHeight-t.height)/(c.bottom+c.top):d<i.minHeight&&(h.height=(i.minHeight-t.height)/(c.bottom+c.top))),o){var g=Math.min(h.width,h.height);g!==1/0&&yo.forEach((function(e){c[e]*=g}))}else h.width!==1/0&&vo.forEach((function(e){c[e]*=h.width})),h.height!==1/0&&bo.forEach((function(e){c[e]*=h.height}));return c}function pa(e,t,n){return oo(t+n,0)?e/2:oo(t,0)?0:oo(n,0)?e:e*Math.abs(t/(t+n))}function ha(e,t){var n=t.toLowerCase();return{left:e.left+e.width*(-1!==n.indexOf("west")?1:-1!==n.indexOf("east")?0:.5),top:e.top+e.height*(-1!==n.indexOf("north")?1:-1!==n.indexOf("south")?0:.5)}}function ma(e){var t=e.toLowerCase();return{left:-1===t.indexOf("east"),top:-1===t.indexOf("south"),right:-1===t.indexOf("west"),bottom:-1===t.indexOf("north")}}function ga(e,t,n,r,i){var o=r.reference,a=function(e,t){var n=e.toLowerCase(),r={left:-1===n.indexOf("west")?t.left:-t.left,top:-t.top,right:t.left,bottom:t.top};["north","south","center"].every((function(e){return-1===n.indexOf(e)}))&&(r.top=0,r.bottom=0),["west","east","center"].every((function(e){return-1===n.indexOf(e)}))&&(r.left=0,r.right=0);var i=ma(e);return yo.forEach((function(e){i[e]||(r[e]=0)})),r}(t,n),s=ma(t),l=function(e,t,n,r){var i=r.aspectRatio,o=r.positionRestrictions,a=r.sizeRestrictions,s=ot({},e);t=ot({},t);var l=n.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};e.width<a.minWidth&&(t.left=0,t.right=0),e.height<a.minHeight&&(t.top=0,t.bottom=0),yo.forEach((function(e){l[e]||(t[e]=0)}));var c=ko(s,t=fa({coordinates:s,directions:t,sizeRestrictions:a,positionRestrictions:o,allowedDirections:l})).width,u=ko(s,t).height,d=n.preserveAspectRatio?Ao(s):Po(c/u,i);if(d){var f=n.respectDirection;if("width"!==f&&"height"!==f&&(f=s.width>=s.height||1===d?"width":"height"),"width"===f){var p=c/d-s.height;if(l.top&&l.bottom){var h=t.top,m=t.bottom;t.bottom=pa(p,m,h),t.top=pa(p,h,m)}else l.bottom?t.bottom=p:l.top?t.top=p:l.right?t.right=0:l.left&&(t.left=0)}else if("height"===f){var g=s.width-u*d;if(l.left&&l.right){var y=t.left,v=t.right;t.left=-pa(g,y,v),t.right=-pa(g,v,y)}else l.left?t.left=-g:l.right?t.right=-g:l.top?t.top=0:l.bottom&&(t.bottom=0)}t=fa({directions:t,coordinates:s,sizeRestrictions:a,positionRestrictions:o,preserveRatio:!0,compensate:n.compensate,allowedDirections:l})}return c=ko(s,t).width,u=ko(s,t).height,(d=n.preserveAspectRatio?Ao(s):Po(c/u,i))&&ao(Math.abs(d-c/u),0)&&yo.forEach((function(e){t[e]=0})),aa({width:e.width+t.right+t.left,height:e.height+t.top+t.bottom,left:e.left,top:e.top},{left:-t.left,top:-t.top},o)}(e,a,ot(ot({},r),{allowedDirections:s}),i);return o&&(l=So(l,wo(ha(o,t),ha(l,t)))),jo(l,i.positionRestrictions)}function ya(e,t,n,r,i){var o=function(e){return e.coordinates?Math.min(e.coordinates.width,e.coordinates.height,20*Xo(e)):1}(e),a=Zo(e,t);return qo(e)?ot(ot({},ra(e)),{coordinates:ga(e.coordinates,n,r,i,{positionRestrictions:Bo(Yo(e,t),Co(e.visibleArea)),sizeRestrictions:{maxWidth:Math.min(a.maxWidth,e.visibleArea.width),maxHeight:Math.min(a.maxHeight,e.visibleArea.height),minWidth:Math.max(Math.min(a.minWidth,e.visibleArea.width),o),minHeight:Math.max(Math.min(a.minHeight,e.visibleArea.height),o)},aspectRatio:Qo(e,t)})}):e}function va(e,t,n){var r=ot(ot({},ra(e)),{boundary:n});if(r.visibleArea&&r.coordinates&&e.visibleArea){r.visibleArea.height=r.visibleArea.width/Ao(n),r.visibleArea.top+=(e.visibleArea.height-r.visibleArea.height)/2;var i=Zo(r,t);(Math.max(i.minHeight,r.coordinates.height)-r.visibleArea.height>0||Math.max(i.minWidth,r.coordinates.width)-r.visibleArea.width>0)&&(r.visibleArea=To(r.visibleArea,Math.max(Math.max(i.minHeight,r.coordinates.height)/r.visibleArea.height,Math.max(i.minWidth,r.coordinates.width)/r.visibleArea.width))),r.visibleArea=Mo(r.visibleArea,Go(r,t));var o=Eo(zo(r.coordinates,Co(r.visibleArea)));r.visibleArea.width<r.coordinates.width&&(o.left=0),r.visibleArea.height<r.coordinates.height&&(o.top=0),r.visibleArea=So(r.visibleArea,o),r.visibleArea=jo(r.visibleArea,$o(r,t)),r=la(r,t)}return r}function ba(e,t,n){return n.rotate&&(e=function(e,t,n){if(qo(e)){var r=ra(e),i=to(n)?n:n.angle,o=Io(xo(ot({left:0,top:0},ta(e))),i);r.transforms.rotate+=i,r.coordinates=ot(ot({},ia({sizeRestrictions:Zo(r,t),aspectRatio:Qo(r,t),width:r.coordinates.width,height:r.coordinates.height})),Io(xo(r.coordinates),i));var a=!to(n)&&n.center?n.center:xo(e.coordinates),s=wo(xo(e.coordinates),Io(xo(e.coordinates),i,a)),l=ta(r);return r.coordinates.left-=o.left-l.width/2+r.coordinates.width/2-s.left,r.coordinates.top-=o.top-l.height/2+r.coordinates.height/2-s.top,r.visibleArea=Mo(r.visibleArea,Vo(Go(r,t),{minWidth:r.coordinates.width,minHeight:r.coordinates.height})),r.coordinates=jo(r.coordinates,Yo(r,t)),r.visibleArea=So(r.visibleArea,wo(xo(r.coordinates),xo(e.coordinates))),r.visibleArea=jo(r.visibleArea,$o(r,t)),r}return e}(e,t,n.rotate)),n.flip&&(e=function(e,t,n,r){if(qo(e)){var i=ra(e),o=e.transforms.rotate,a=ta(e),s={horizontal:n,vertical:r};if(s.horizontal||s.vertical){var l=Io({left:a.width/2,top:a.height/2},-o),c=Io(xo(i.coordinates),-o),u=Io({left:s.horizontal?l.left-(c.left-l.left):c.left,top:s.vertical?l.top-(c.top-l.top):c.top},o);i.coordinates=So(i.coordinates,wo(u,xo(i.coordinates))),c=Io(xo(i.visibleArea),-o),u=Io({left:s.horizontal?l.left-(c.left-l.left):c.left,top:s.vertical?l.top-(c.top-l.top):c.top},o),i.visibleArea=So(i.visibleArea,wo(u,xo(i.visibleArea))),i.visibleArea=jo(i.visibleArea,$o(i,t))}return s.horizontal&&(i.transforms.flip.horizontal=!e.transforms.flip.horizontal),s.vertical&&(i.transforms.flip.vertical=!e.transforms.flip.vertical),i}return e}(e,t,n.flip.horizontal,n.flip.vertical)),(n.move||n.scale)&&(e=function(e,t,n){var r,i,o,a=n.scale,s=void 0===a?1:a,l=n.move,c=void 0===l?{}:l;if(qo(e)){var u=ra(e),d=1/(to(s)?s:s.factor),f=to(s)?void 0:s.center,p=!oo(d,1),h=1,m=1;u.visibleArea=So(u.visibleArea,{left:c.left||0,top:c.top||0});var g=Zo(u,t),y=Yo(u,t),v=Go(u,t),b={stencil:{minimum:Math.max(g.minWidth?g.minWidth/u.coordinates.width:0,g.minHeight?g.minHeight/u.coordinates.height:0),maximum:Math.min(g.maxWidth?g.maxWidth/u.coordinates.width:1/0,g.maxHeight?g.maxHeight/u.coordinates.height:1/0,Oo(u.coordinates,Do(y)))},area:{maximum:Oo(u.visibleArea,v),minimum:(i=u.visibleArea,o=v,Math.max(o.minWidth?o.minWidth/i.width:0,o.minHeight?o.minHeight/i.height:0))}};d&&p&&(d<1?(m=Math.max(d,Math.max(b.area.minimum,b.stencil.minimum)))>1&&(m=1):d>1&&(m=Math.min(d,Math.min(b.area.maximum,b.stencil.maximum)))<1&&(m=1)),m&&(u.visibleArea=To(u.visibleArea,m,f));var w={left:e.coordinates.left-e.visibleArea.left,right:e.visibleArea.width+e.visibleArea.left-(e.coordinates.width+e.coordinates.left),top:e.coordinates.top-e.visibleArea.top,bottom:e.visibleArea.height+e.visibleArea.top-(e.coordinates.height+e.coordinates.top)};return u.visibleArea=jo(u.visibleArea,{left:void 0!==y.left?y.left-w.left*m:void 0,top:void 0!==y.top?y.top-w.top*m:void 0,bottom:void 0!==y.bottom?y.bottom+w.bottom*m:void 0,right:void 0!==y.right?y.right+w.right*m:void 0}),u.visibleArea=jo(u.visibleArea,$o(u,t)),u.coordinates.width=u.coordinates.width*m,u.coordinates.height=u.coordinates.height*m,u.coordinates.left=u.visibleArea.left+w.left*m,u.coordinates.top=u.visibleArea.top+w.top*m,u.coordinates=jo(u.coordinates,Bo(Co(u.visibleArea),y)),p&&d&&(null===(r=t.transformImage)||void 0===r?void 0:r.adjustStencil)&&(d>1?h=Math.min(b.area.maximum,d)/m:d<1&&(h=Math.max(u.coordinates.height/u.visibleArea.height,u.coordinates.width/u.visibleArea.width,d/m)),1!==h&&(u.visibleArea=To(u.visibleArea,h,d>1?f:xo(u.coordinates)),u.visibleArea=jo(u.visibleArea,$o(u,t)),u.visibleArea=So(u.visibleArea,Eo(zo(u.coordinates,Co(u.visibleArea)))))),u}return e}(e,t,n)),e}function wa(e,t){if(qo(e)){var n=ra(e),r=Qo(e,t),i=Zo(e,t),o=Go(e,t),a=Po(Ao(e.coordinates),r),s=a?{height:e.coordinates.height,width:e.coordinates.height*a}:e.coordinates;n.coordinates=ot(ot({},n.coordinates),ia({width:s.width,height:s.height,aspectRatio:r,sizeRestrictions:Vo(o,i)})),n.coordinates=So(n.coordinates,wo(xo(e.coordinates),xo(n.coordinates)));var l=Math.max(n.coordinates.width/n.visibleArea.width,n.coordinates.height/n.visibleArea.height,1);return n.visibleArea=ot(ot({},e.visibleArea),ia({width:e.visibleArea.width*l,height:e.visibleArea.height*l,aspectRatio:{minimum:Ao(n.boundary),maximum:Ao(n.boundary)},sizeRestrictions:o})),n.visibleArea=So(n.visibleArea,wo(xo(e.visibleArea),xo(n.visibleArea))),n.visibleArea=jo(n.visibleArea,$o(n,t)),n.coordinates=jo(n.coordinates,Bo(Co(n.visibleArea),Yo(n,t))),n}return e}function xa(e,t){var n=Xo(e);return e.visibleArea?{left:t.left*n+e.visibleArea.left,top:t.top*n+e.visibleArea.top}:t}function _a(e,t){if(e){var n=Math.abs(e.transforms.rotate%180);return n<=45||n>=135?t:{horizontal:t.vertical,vertical:t.horizontal}}return t}function ka(e,t){var n=Xo(e);return{left:to(t.left)?t.left*n:0,top:to(t.top)?t.top*n:0}}function Ea(e,t){if(e&&t){var n=t();n&&e(n)}}function Sa(e,t){e.forEach((function(e){Ea(e,t)}))}!function(e){e.limit="limit",e.zoom="zoom",e.unsafe="unsafe"}(ho||(ho={})),function(e){e.fillArea="fillArea",e.fitArea="fitArea",e.stencil="stencil",e.none="none"}(mo||(mo={})),function(e){e.coordinates="coordinates",e.visibleArea="visibleArea"}(go||(go={}));var Ca=function(){var e=this;this.getTransitions=function(){var t=e.getData(),n=e.getProps().transitions;return ot(ot({},Qi(n,{timingFunction:"ease-in-out",duration:350})),{active:t.transitions})},this.getInteractions=function(){return co(e.getData().interactions)},this.hasInteractions=function(){return Vi(e.getData().interactions)},this.startTransitions=function(){var t=e.getProps(),n=t.onTransitionsStart,r=t.onUpdate,i=t.getInstance,o=e.getData(),a=o.transitions,s=at(o,["transitions"]);e.setData(ot(ot({},s),{transitions:!0})),a||Sa([n,r],i),e.endTransitions()},this.endTransitions=po((function(){var t=e.getProps(),n=t.onTransitionsEnd,r=t.onUpdate,i=t.getInstance;e.setData(ot(ot({},e.getData()),{transitions:!1})),Sa([n,r],i)}),(function(){return e.getTransitions().duration})),this.applyPostProcess=function(t,n){var r,i=e.getProps(),o=i.settings,a=i.postProcess,s=t.name,l=t.interaction,c=void 0!==l&&l,u=t.transitions,d=void 0!==u&&u,f=t.immediately,p={name:s,interaction:c,transitions:d,immediately:void 0!==f&&f};return r=a,Array.isArray(r)?a.reduce((function(e,t){return t(e,o,p)}),n):Yi(a)?a(n,o,p):n},this.updateState=function(t,n,r){void 0===n&&(n={}),void 0===r&&(r=[]);var i=n.transitions,o=void 0!==i&&i,a=e.getProps(),s=a.onTransitionsStart,l=a.getInstance,c=a.onChange,u=a.onUpdate,d=a.settings,f=e.getData(),p=Yi(t)?t(f.state,d):t,h=p?.001*Xo(p):.001,m=!uo(f.state,p,h),g=["coordinates","boundary","visibleArea","imageSize","transforms"].some((function(e){var t;return!uo(null===(t=f.state)||void 0===t?void 0:t[e],null==p?void 0:p[e],h)})),y=f;m&&(o&&g&&e.endTransitions(),y=ot(ot({},y),{state:ra(p),transitions:o&&g}),e.setData(y),Ea(c,l)),y.transitions&&!f.transitions&&Ea(s,l),Sa(ut(r,[u]),l)},this.setInteractions=function(t){var n=e.getProps(),r=n.onInteractionStart,i=n.onInteractionEnd,o=n.getInstance,a=e.getInteractions(),s=ot(ot({},a),t);if(uo(a,s)||e.setData(ot(ot({},e.getData()),{interactions:s})),Vi(a)!==Vi(s))if(Vi(a)){var l=e.getData().state;e.updateState((function(){return l&&e.applyPostProcess({name:"interactionEnd",immediately:!0,transitions:!0},l)}),{transitions:!0},[i])}else Ea(r,o)},this.resetState=function(t,n){e.updateState(e.createDefaultState(t,n))},this.clear=function(){e.updateState(null)},this.reconcileState=function(t){void 0===t&&(t={});var n=e.getProps(),r=n.reconcileStateAlgorithm,i=n.settings,o=e.getData().state,a=t.transitions,s=void 0!==a&&a;if(o&&!na(o,i)){var l=(r||wa)(o,i);l=e.applyPostProcess({name:"reconcileState",immediately:!0,transitions:s},l),e.updateState(l,{transitions:s})}},this.transformImage=function(t,n){void 0===n&&(n={});var r=n.transitions,i=void 0===r||r,o=n.interaction,a=void 0===o||o,s=n.immediately,l=void 0!==s&&s,c=n.normalize,u=void 0===c||c,d=e.getProps(),f=d.transformImageAlgorithm,p=d.onTransformImage,h=d.onTransformImageEnd,m=d.settings,g=e.getData().state,y=[];if(g){u&&(t=function(e,t){return t.scale&&(t.scale={factor:to(t.scale)?t.scale:t.scale.factor,center:!to(t.scale)&&t.scale.center?xa(e,t.scale.center):void 0}),t.rotate&&(t.rotate={angle:to(t.rotate)?t.rotate:t.rotate.angle,center:!to(t.rotate)&&t.rotate.center?xa(e,t.rotate.center):void 0}),t.move&&(t.move=ka(e,t.move)),t}(g,t));var v=e.applyPostProcess({name:"transformImage",transitions:i,immediately:l},(f||ba)(g,m,t));y.push(p),a?e.setInteractions({transformImage:{rotate:!Xi(t.rotate),flip:!Xi(t.flip),scale:!Xi(t.scale),move:!Xi(t.move)}}):(v=e.applyPostProcess({name:"transformImageEnd",transitions:i,immediately:!0},v),y.push(h)),e.updateState(v,{transitions:l&&i},y)}},this.transformImageEnd=function(t){void 0===t&&(t={});var n=t.immediately,r=void 0===n||n,i=t.transitions,o=void 0===i||i,a=e.getData().state,s=e.getProps().onTransformImageEnd;e.updateState((function(){return a&&e.applyPostProcess({name:"transformImageEnd",immediately:r,transitions:o},a)}),{transitions:o},[s]),e.setInteractions({transformImage:{rotate:!1,flip:!1,scale:!1,move:!1}})},this.zoomImage=function(t,n){void 0===n&&(n={});var r=n.interaction,i=void 0!==r&&r,o=n.immediately,a=void 0===o||o,s=n.transitions,l=void 0===s||s,c=n.normalize,u=void 0!==c&&c;e.transformImage({scale:t},{interaction:i,immediately:a,transitions:l,normalize:u})},this.moveImage=function(t,n,r){void 0===r&&(r={});var i=r.interaction,o=void 0!==i&&i,a=r.immediately,s=void 0===a||a,l=r.transitions,c=void 0===l||l,u=r.normalize,d=void 0!==u&&u;e.transformImage({move:{left:t,top:n}},{interaction:o,immediately:s,transitions:c,normalize:d})},this.flipImage=function(t,n,r){void 0===r&&(r={});var i=r.interaction,o=void 0!==i&&i,a=r.immediately,s=void 0===a||a,l=r.transitions,c=void 0===l||l,u=r.normalize,d=void 0===u||u,f=e.getState(),p={horizontal:t,vertical:n};e.transformImage({flip:f&&d?_a(f,p):p},{interaction:o,immediately:s,transitions:c})},this.rotateImage=function(t,n){void 0===n&&(n={});var r=n.interaction,i=void 0!==r&&r,o=n.immediately,a=void 0===o||o,s=n.transitions,l=void 0===s||s,c=n.normalize,u=void 0!==c&&c;e.transformImage({rotate:t},{interaction:i,immediately:a,transitions:l,normalize:u})},this.reset=function(t,n){e.resetState(t,n)},this.setState=function(t,n){void 0===n&&(n={});var r=e.getSettings(),i=e.getData().state,o=n.transitions,a=void 0===o||o,s=n.immediately,l=void 0!==s&&s,c=n.interaction,u=void 0!==c&&c,d=n.postprocess,f=void 0!==d&&d,p=t&&(Yi(t)?t(i,r):ot(ot({},i),t));e.updateState((function(){return f?p&&e.applyPostProcess({name:"setState",immediately:l,transitions:a,interaction:u},p):p}),{transitions:a})},this.setCoordinates=function(t,n){void 0===n&&(n={});var r=e.getData().state,i=e.getProps(),o=i.setCoordinatesAlgorithm,a=i.settings,s=n.transitions,l=void 0===s||s,c=n.immediately,u=void 0===c||c;e.updateState((function(){return r&&e.applyPostProcess({name:"setCoordinates",immediately:u,transitions:l},(o||sa)(r,a,t,ho.zoom))}),{transitions:l})},this.setVisibleArea=function(t,n){void 0===n&&(n={});var r=n.transitions,i=void 0===r||r,o=n.immediately,a=void 0===o||o,s=e.getData().state,l=e.getProps(),c=l.setVisibleAreaAlgorithm,u=l.settings;e.updateState((function(){return s&&e.applyPostProcess({name:"setVisibleArea",immediately:a,transitions:i},(c||ca)(s,u,t))}),{transitions:i})},this.setBoundary=function(t,n){void 0===n&&(n={});var r=e.getData().state,i=e.getProps(),o=i.setBoundaryAlgorithm,a=i.settings,s=n.transitions,l=void 0!==s&&s,c=n.immediately,u=void 0===c||c;t?e.updateState((function(){return r&&e.applyPostProcess({name:"setBoundary",immediately:u,transitions:l},(o||va)(r,a,t))})):e.updateState(null)},this.moveCoordinates=function(t,n){void 0===n&&(n={});var r=e.getData(),i=e.getProps(),o=i.moveCoordinatesAlgorithm,a=i.onMove,s=i.onMoveEnd,l=i.settings,c=n.interaction,u=void 0===c||c,d=n.transitions,f=void 0!==d&&d,p=n.immediately,h=void 0!==p&&p,m=n.normalize,g=void 0===m||m,y=[];if(!r.transitions&&r.state){var v=g?ka(r.state,t):function(e){return{left:to(e.left)?e.left:0,top:to(e.top)?e.top:0}}(t),b=e.applyPostProcess({name:"moveCoordinates",interaction:u,immediately:h,transitions:f},(o||da)(r.state,l,v));y.push(a),u?e.setInteractions({moveCoordinates:!0}):(b=e.applyPostProcess({name:"moveCoordinatesEnd",interaction:u,immediately:h,transitions:f},b),y.push(s)),e.updateState(b,{transitions:h&&f},y)}},this.moveCoordinatesEnd=function(t){void 0===t&&(t={});var n=e.getData().state,r=e.getProps().onMoveEnd,i=t.transitions,o=void 0===i||i,a=t.immediately,s=void 0!==a&&a;e.updateState((function(){return n&&e.applyPostProcess({name:"moveCoordinatesEnd",transitions:o,immediately:s},n)}),{transitions:o},[r]),e.setInteractions({moveCoordinates:!1})},this.resizeCoordinates=function(t,n,r,i){void 0===i&&(i={});var o=e.getData().state,a=e.getProps(),s=a.resizeCoordinatesAlgorithm,l=a.onResize,c=a.onResizeEnd,u=a.settings,d=i.interaction,f=void 0===d||d,p=i.transitions,h=void 0!==p&&p,m=i.immediately,g=void 0!==m&&m,y=i.normalize,v=void 0===y||y;if(!e.getTransitions().active&&o){var b=[],w=v?function(e,t){var n=Xo(e);return{left:to(t.left)?t.left*n:0,top:to(t.top)?t.top*n:0,right:to(t.right)?t.right*n:0,bottom:to(t.bottom)?t.bottom*n:0}}(o,n):function(e){return{left:to(e.left)?e.left:0,top:to(e.top)?e.top:0,right:to(e.right)?e.right:0,bottom:to(e.bottom)?e.bottom:0}}(n),x=e.applyPostProcess({name:"resizeCoordinates",interaction:f,immediately:g,transitions:h},(s||ya)(o,u,t,w,Ki(r)?r:{}));b.push(l),f?e.setInteractions({resizeCoordinates:!0}):(x=e.applyPostProcess({name:"resizeCoordinatesEnd",interaction:f,immediately:g,transitions:h},x),b.push(c)),e.updateState(x,{transitions:g&&h},b)}},this.resizeCoordinatesEnd=function(t){void 0===t&&(t={});var n=e.getProps().onResizeEnd,r=e.getData().state,i=t.transitions,o=void 0===i||i,a=t.immediately,s=void 0!==a&&a;e.updateState((function(){return r&&e.applyPostProcess({name:"resizeCoordinatesEnd",transitions:o,immediately:s},r)}),{transitions:o},[n]),e.setInteractions({resizeCoordinates:!1})},this.getStencilCoordinates=function(){return Ko(e.getData().state)},this.getCoordinates=function(t){void 0===t&&(t={});var n=e.getData().state,r=e.getProps().settings;if(n&&n.coordinates){var i=t.round;return void 0===i||i?function(e,t){if(qo(e)){var n=Zo(e,t),r=Yo(e,t),i={width:Math.round(e.coordinates.width),height:Math.round(e.coordinates.height),left:Math.round(e.coordinates.left),top:Math.round(e.coordinates.top)};return i.width>n.maxWidth?i.width=Math.floor(e.coordinates.width):i.width<n.minWidth&&(i.width=Math.ceil(e.coordinates.width)),i.height>n.maxHeight?i.height=Math.floor(e.coordinates.height):i.height<n.minHeight&&(i.height=Math.ceil(e.coordinates.height)),jo(i,r)}return null}(n,r):ot({},n.coordinates)}return null},this.getVisibleArea=function(){var t=e.getData().state;return(null==t?void 0:t.visibleArea)?ot({},t.visibleArea):null},this.getSettings=function(){var t=e.getProps().settings;return ot({},t)},this.getState=function(){return ra(e.getData().state)},this.getTransforms=function(){var t=e.getData().state;return t?co(t.transforms):{rotate:0,flip:{horizontal:!1,vertical:!1}}},this.createDefaultState=function(t,n){var r=e.getProps(),i=r.createStateAlgorithm,o=r.settings;return e.applyPostProcess({name:"createState",immediately:!0,transitions:!1},(i||ua)({image:n,boundary:t},o))},this.isConsistent=function(){var t=e.getData().state,n=e.getProps().settings;return!t||na(t,n)}};function Ta(e,t){var n,r=e.imageSize,i=e.visibleArea,o=Zo(e,t),a=Qo(e,t);if(i)n=i;else{var s=Do(Yo(e,t));n={width:Math.max(s.minWidth,Math.min(s.maxWidth,r.width)),height:Math.max(s.minHeight,Math.min(s.maxHeight,r.height))}}var l=Math.min(a.maximum||1/0,Math.max(a.minimum||0,Ao(n))),c=n.width<n.height?{width:.8*n.width,height:.8*n.width/l}:{height:.8*n.height,width:.8*n.height*l};return ia(ot(ot({},c),{aspectRatio:a,sizeRestrictions:o}))}function Aa(e,t){return function(e){return{minWidth:ro(e.minWidth)?Ji(e.minWidth):0,minHeight:ro(e.minHeight)?Ji(e.minHeight):0,maxWidth:ro(e.maxWidth)?Ji(e.maxWidth):1/0,maxHeight:ro(e.maxHeight)?Ji(e.maxHeight):1/0}}(t)}function Oa(e){var t=e.visibleArea,n=e.coordinates,r=t||ta(e);return{left:(t?t.left:0)+r.width/2-(n?n.width/2:0),top:(t?t.top:0)+r.height/2-(n?n.height/2:0)}}function Pa(e){return function(t,n){var r=Yi(e)?e(t,n):e;return Vo(Aa(0,n),r)}}function La(e){return ot(ot({},e),{sizeRestrictions:function(t,n){return e.sizeRestrictions?Yi(e.sizeRestrictions)?e.sizeRestrictions(t,n):e.sizeRestrictions:Aa(0,n)},areaPositionRestrictions:function(t,n){return e.areaPositionRestrictions?Yi(e.areaPositionRestrictions)?e.areaPositionRestrictions(t,n):e.areaPositionRestrictions:function(e,t){var n=e.visibleArea,r=e.boundary,i=t.imageRestriction,o=ta(e),a={};return i===mo.fillArea?a={left:0,top:0,right:o.width,bottom:o.height}:i===mo.fitArea&&(Ao(r)>Ao(o)?(a={top:0,bottom:o.height},n&&(n.width>o.width?(a.left=-(n.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},n&&(n.height>o.height?(a.top=-(n.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}(t,n)},areaSizeRestrictions:function(t,n){return e.areaSizeRestrictions?Yi(e.areaSizeRestrictions)?e.areaSizeRestrictions(t,n):e.areaSizeRestrictions:function(e,t){var n=e.boundary,r=t.imageRestriction,i=ta(e),o={minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0};return r===mo.fillArea?(o.maxWidth=i.width,o.maxHeight=i.height):r===mo.fitArea&&(Ao(n)>Ao(i)?(o.maxHeight=i.height,o.maxWidth=i.height*Ao(n)):(o.maxWidth=i.width,o.maxHeight=i.width/Ao(n))),o}(t,n)},positionRestrictions:function(t,n){return e.positionRestrictions?Yi(e.positionRestrictions)?e.positionRestrictions(t,n):e.positionRestrictions:function(e,t){var n=ta(e),r={};return t.imageRestriction&&"none"!==t.imageRestriction&&(r={left:0,top:0,right:n.width,bottom:n.height}),r}(t,n)},defaultCoordinates:function(t,n){if(e.defaultCoordinates)return Yi(e.defaultCoordinates)?e.defaultCoordinates(t,n):e.defaultCoordinates;var r=e.defaultSize;r||(r=Ta);var i=Yi(r)?r(t,n):r,o=e.defaultPosition||Oa;return[i,function(e){return ot({},Yi(o)?o(e,n):o)}]},defaultVisibleArea:function(t,n){return e.defaultVisibleArea?Yi(e.defaultVisibleArea)?e.defaultVisibleArea(t,n):e.defaultVisibleArea:function(e,t){var n=e.coordinates,r=e.boundary,i=ta(e),o=Ao(r);if(n){var a={height:Math.max(n.height,i.height),width:Math.max(n.width,i.width)},s={left:0,top:0,width:Ao(a)>o?a.width:a.height*o,height:Ao(a)>o?a.width/o:a.height};(s=Mo(s,Go(e,t))).left=n.left+n.width/2-s.width/2,s.top=n.top+n.height/2-s.height/2;var l=Ro(n,Co(ot({left:0,top:0},i))),c={};return!l.left&&!l.right&&s.width<=i.width&&(c.left=0,c.right=i.width),!l.top&&!l.bottom&&s.height<=i.height&&(c.top=0,c.bottom=i.height),jo(s,c)}var u=Ao(i),d={height:u<o?i.height:i.width/o,width:u<o?i.height*o:i.width};return{left:i.width/2-d.width/2,top:i.height/2-d.height/2,width:d.width,height:d.height}}(t,n)},aspectRatio:function(t,n){return Uo(Yi(e.aspectRatio)?e.aspectRatio(t,n):e.aspectRatio)}})}var Ra=4;function Ma(e){return new Promise((function(t,n){try{if(e)if(/^data:/i.test(e))t(function(e){e=e.replace(/^data:([^;]+);base64,/gim,"");for(var t=atob(e),n=t.length,r=new ArrayBuffer(n),i=new Uint8Array(r),o=0;o<n;o++)i[o]=t.charCodeAt(o);return r}(e));else if(/^blob:/i.test(e)){var r=new FileReader;r.onload=function(e){var n;t(null===(n=e.target)||void 0===n?void 0:n.result)},o=e,a=function(e){r.readAsArrayBuffer(e)},(s=new XMLHttpRequest).open("GET",o,!0),s.responseType="blob",s.onload=function(){200!=this.status&&0!==this.status||a(this.response)},s.send()}else{var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===Ra&&(200===i.status||0===i.status?t(i.response):n("Warning: could not load an image to parse its orientation"))},i.onprogress=function(){"image/jpeg"!==i.getResponseHeader("content-type")&&i.abort()},i.withCredentials=!1,i.open("GET",e,!0),i.responseType="arraybuffer",i.send(null)}else n("Error: the image is empty")}catch(e){n(e)}var o,a,s}))}function Na(e){var t=e.rotate,n=void 0===t?0:t,r=e.flip,i=void 0===r?{horizontal:!1,vertical:!1}:r,o=e.scale,a=void 0===o?1:o;return" rotate("+n+"deg) scaleX("+a*(i.horizontal?-1:1)+") scaleY("+a*(i.vertical?-1:1)+")"}function Ia(e){try{var t,n=new DataView(e),r=void 0,i=void 0,o=void 0,a=void 0;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var s=n.byteLength,l=2;l+1<s;){if(255===n.getUint8(l)&&225===n.getUint8(l+1)){o=l;break}l++}if(o&&(r=o+10,"Exif"===function(e,t,n){var r,i="";for(r=t,n+=t;r<n;r++)i+=String.fromCharCode(e.getUint8(r));return i}(n,o+4,4))){var c=n.getUint16(r);if(((i=18761===c)||19789===c)&&42===n.getUint16(r+2,i)){var u=n.getUint32(r+4,i);u>=8&&(a=r+u)}}if(a)for(var d=n.getUint16(a,i),f=0;f<d;f++){l=a+12*f+2;if(274===n.getUint16(l,i)){l+=8,t=n.getUint16(l,i),n.setUint16(l,1,i);break}}return t}catch(e){return null}}function Da(e){var t=e.src,n=e.arrayBuffer,r=void 0===n?null:n,i=e.orientation,o=void 0===i?null:i,a={src:t,arrayBuffer:r,revoke:!1,transforms:{flip:{horizontal:!1,vertical:!1},rotate:0}};return r&&o&&o>1?Gi(t)||!$i(t)?(a.src=URL.createObjectURL(new Blob([r])),a.revoke=!0):a.src=function(e){for(var t=[],n=new Uint8Array(e);n.length>0;){var r=n.subarray(0,8192);t.push(String.fromCharCode.apply(null,Array.from?Array.from(r):r.slice())),n=n.subarray(8192)}return"data:image/jpeg;base64,"+btoa(t.join(""))}(r):a.src=t,o&&(a.transforms=function(e){var t={flip:{horizontal:!1,vertical:!1},rotate:0};if(e)switch(e){case 2:t.flip.horizontal=!0;break;case 3:t.rotate=-180;break;case 4:t.flip.vertical=!0;break;case 5:t.rotate=90,t.flip.vertical=!0;break;case 6:t.rotate=90;break;case 7:t.rotate=90,t.flip.horizontal=!0;break;case 8:t.rotate=-90}return t}(o)),a}function Ba(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});var n=t.checkOrientation,r=t.parse;return new Promise((function(t){n||r?Ma(e).then((function(n){var r=Ia(n);t(Da(n?{src:e,arrayBuffer:n,orientation:r}:{src:e,arrayBuffer:null,orientation:null}))})).catch((function(n){console.warn(n),t(Da({src:e}))})):t(Da({src:e}))}))}(e,ot(ot({},t),{crossOrigin:Zi(e)&&t.crossOrigin})).then((function(e){return new Promise((function(n,r){(function(e,t){return void 0===t&&(t={}),new Promise((function(n,r){var i=document.createElement("img");t.crossOrigin&&(i.crossOrigin=!0!==t.crossOrigin?t.crossOrigin:"anonymous"),i.src=e,i.style.visibility="hidden",i.style.position="fixed",document.body.appendChild(i),i.complete?(n(i),document.body.removeChild(i)):(i.addEventListener("load",(function(){n(i),document.body.removeChild(i)})),i.addEventListener("error",(function(){r(null),document.body.removeChild(i)})))}))})(e.src,t).then((function(t){n(ot(ot({},e),{width:t.naturalWidth,height:t.naturalHeight}))})).catch((function(){r(null)}))}))}))}function za(e,t,n,r,i){void 0===i&&(i=null);var o=e.width>e.height?{width:Math.min(512,e.width),height:Math.min(512,e.width)/(e.width/e.height)}:{height:Math.min(512,e.height),width:Math.min(512,e.height)*(e.width/e.height)},a=ta(t),s={rotate:t.transforms.rotate,flip:{horizontal:t.transforms.flip.horizontal,vertical:t.transforms.flip.vertical},translateX:n.left/r,translateY:n.top/r,scale:1/r},l={left:(o.width-a.width)/(2*r),top:(o.height-a.height)/(2*r)},c={left:(1-1/r)*o.width/2,top:(1-1/r)*o.height/2},u=ot(ot({},s),{scale:s.scale*(e.width/o.width)}),d={width:o.width+"px",height:o.height+"px",left:"0px",top:"0px",transition:"none",transform:"translate3d("+(-l.left-c.left-s.translateX)+"px, "+(-l.top-c.top-s.translateY)+"px, 0px)"+Na(u),willChange:"none"};return i&&i.active&&(d.willChange="transform",d.transition=i.duration+"ms "+i.timingFunction),d}function ja(e,t,n){t.style.width="0px",t.style.height="0px",t.style.width=Math.max(e.clientWidth,n.width)+"px";var r=n.width/n.height;t.style.height=Math.max(e.clientHeight,t.clientWidth/r)+"px",t.style.width=t.clientHeight*r+"px"}function Ua(e,t,n){t.style.width="0px",t.style.height="0px",t.style.width=Math.max(e.getBoundingClientRect().width,n.width)+"px";var r=n.width/n.height;t.style.height=Math.max(e.getBoundingClientRect().height,t.getBoundingClientRect().width/r)+"px",t.style.width=t.getBoundingClientRect().height*r+"px",t.clientWidth/t.clientHeight>e.clientWidth/e.clientHeight?t.clientWidth>e.clientWidth&&(t.style.width=e.clientWidth+"px",t.style.height=e.clientWidth/r+"px"):t.clientHeight>e.clientHeight&&(t.style.height=e.clientHeight+"px",t.style.width=e.clientHeight*r+"px")}function Fa(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}}function Wa(e,t,n,r,i){if(qo(e)){var o=e.transforms,a=e.coordinates,s=0!==o.rotate||o.flip.horizontal||o.flip.vertical?function(e,t,n){var r=n.rotate,i=n.flip,o={width:"naturalWidth"in t?t.naturalWidth:t.width,height:"naturalHeight"in t?t.naturalHeight:t.height},a=No(o,r),s=e.getContext("2d");if(e.height=a.height,e.width=a.width,s){s.save();var l=Io(xo(ot({left:0,top:0},o)),r);s.translate(-(l.left-a.width/2),-(l.top-a.height/2)),s.rotate(r*Math.PI/180),s.translate(i.horizontal?o.width:0,i.vertical?o.height:0),s.scale(i.horizontal?-1:1,i.vertical?-1:1),s.drawImage(t,0,0,o.width,o.height),s.restore()}return e}(r,t,o):t,l=ot({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:1/0,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},i),c=function(e){return e.find((function(e){return ro(e)}))},u=ia({sizeRestrictions:{minWidth:c([l.width,l.minWidth])||0,minHeight:c([l.height,l.minHeight])||0,maxWidth:c([l.width,l.maxWidth])||1/0,maxHeight:c([l.height,l.maxHeight])||1/0},width:a.width,height:a.height,aspectRatio:{minimum:a.width/a.height,maximum:a.width/a.height}});if(l.maxArea&&u.width*u.height>l.maxArea){var d=Math.sqrt(l.maxArea/(u.width*u.height));u={width:Math.round(d*u.width),height:Math.round(d*u.height)}}return function(e,t,n,r,i){e.width=r?r.width:n.width,e.height=r?r.height:n.height;var o=e.getContext("2d");if(o){o.clearRect(0,0,e.width,e.height),i&&(i.imageSmoothingEnabled&&(o.imageSmoothingEnabled=i.imageSmoothingEnabled),i.imageSmoothingQuality&&(o.imageSmoothingQuality=i.imageSmoothingQuality),i.fillColor&&(o.fillStyle=i.fillColor,o.fillRect(0,0,e.width,e.height),o.save()));var a=n.left<0?-n.left:0,s=n.top<0?-n.top:0;o.drawImage(t,n.left+a,n.top+s,n.width,n.height,a,s,e.width,e.height)}return e}(n,s,a,u,l)}return null}var Ha={linear:function(e){return e},"ease-in":function(e){return Math.pow(e,1.675)},"ease-out":function(e){return 1-Math.pow(1-e,1.675)},"ease-in-out":function(e){return.5*(Math.sin((e-.5)*Math.PI)+1)}},Va=function(){function e(){this.active=!1}return e.prototype.start=function(e){var t;this.onStart=e.onStart,this.onProgress=e.onProgress,this.onStop=e.onStop,this.active||null===(t=this.onStart)||void 0===t||t.call(this),this.id&&window.cancelAnimationFrame(this.id),this.startTime=performance.now(),this.timingFunction=e.timingFunction,this.endTime=this.startTime+e.duration,this.active=!0,this.animate()},e.prototype.animate=function(){var e=this;if(this.startTime&&this.endTime){var t=Ha[this.timingFunction];t||(t=Ha["ease-out"]);var n=1-(this.endTime-performance.now())/(this.endTime-this.startTime),r=Math.min(1,t(n));this.onProgress&&this.onProgress(r),n<1?this.id=window.requestAnimationFrame((function(){return e.animate()})):this.stop()}else this.stop()},e.prototype.stop=function(){this.active=!1,this.id&&window.cancelAnimationFrame(this.id),this.onStop&&this.onStop()},e}();function qa(e,t){var n=t.getBoundingClientRect(),r=n.left,i=n.top,o={left:0,top:0},a=0;return e.forEach((function(t){o.left+=(t.clientX-r)/e.length,o.top+=(t.clientY-i)/e.length})),e.forEach((function(e){a+=io({left:o.left,top:o.top},{left:e.clientX-r,top:e.clientY-i})})),{centerMass:o,spread:a,count:e.length}}function Ga(e,t,n){void 0===n&&(n=.1);var r,i,o=t.getBoundingClientRect(),a=o.left,s=o.top;return{scale:{factor:1-n*(r=e.deltaY||e.detail||e.wheelDelta,0===(i=+r)||no(i)?i:i>0?1:-1),center:{left:e.clientX-a,top:e.clientY-s}}}}function $a(e,t){return e.aspectRatio?{}:{aspectRatio:Uo(Yi(t.aspectRatio)?t.aspectRatio():t.aspectRatio)}}var Za=i(4184),Ya=i.n(Za);function Xa(e,t){var n=$a({},t);return{stencilSize:function(t,r){var i,o,a=Yi(e.stencilSize)?e.stencilSize(t,r):e.stencilSize;return ia(ot(ot({},a),{aspectRatio:(i=n.aspectRatio,o=Uo(Ao(a)),o?i?{minimum:Math.min(i.maximum,Math.max(i.minimum,o.minimum)),maximum:Math.max(i.minimum,Math.min(i.maximum,o.maximum))}:o:i)}))}}}function Ka(e,t){var n=e.boundary,r=Yi(t.stencilSize)?t.stencilSize(e,t):t.stencilSize;return(r.width>n.width||r.height>n.height)&&(r=ia({sizeRestrictions:{maxWidth:n.width,maxHeight:n.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:Ao(r),maximum:Ao(r)}})),r}function Qa(e,t){var n=Ka(e,ot(ot({},t),{stencilSize:t.stencilSize})),r=Go(e,t);return{maxWidth:r.maxWidth*n.width/e.boundary.width,maxHeight:r.maxHeight*n.height/e.boundary.height,minWidth:0,minHeight:0}}function Ja(e,t){var n,r,i=e.imageSize,o=e.visibleArea,a=e.boundary,s=Zo(e,t),l=Qo(e,t),c=Yi(t.stencilSize)?t.stencilSize(e,t):t.stencilSize,u=o||i;return Ao(u)>Ao(a)?r=(n=c.height*u.height/a.height)*Ao(c):n=(r=c.width*u.width/a.width)/Ao(c),ia({width:r,height:n,aspectRatio:l,sizeRestrictions:s})}function es(e,t){var n=Ao(Ka(e,t));return{minimum:n,maximum:n}}function ts(e,t,n){return n&&n.immediately?function(e,t){if(qo(e)){var n=ra(e),r=Ka(e,t);n.visibleArea=To(n.visibleArea,n.coordinates.width*n.boundary.width/(n.visibleArea.width*r.width));var i=Lo(n.visibleArea,Go(n,t));return 1!==i&&(n.visibleArea=To(n.visibleArea,i),n.coordinates=To(n.coordinates,i)),n.visibleArea=So(n.visibleArea,wo(xo(n.coordinates),xo(n.visibleArea))),n.visibleArea=jo(n.visibleArea,$o(n,t)),n.coordinates=jo(n.coordinates,Bo(Co(n.visibleArea),$o(n,t))),n}return e}(e,t):e}function ns(e,t,n){return n.immediately?function(e,t){if(qo(e)){var n=ra(e),r={width:0,height:0};Ao(n.boundary)>Ao(n.coordinates)?(r.height=.8*n.boundary.height,r.width=r.height*Ao(n.coordinates)):(r.width=.8*n.boundary.width,r.height=r.width*Ao(n.coordinates)),n.visibleArea=To(n.visibleArea,n.coordinates.width*n.boundary.width/(n.visibleArea.width*r.width));var i=Lo(n.visibleArea,Go(n,t));return n.visibleArea=To(n.visibleArea,i),1!==i&&(r.height/=i,r.width/=i),n.visibleArea=So(n.visibleArea,wo(xo(n.coordinates),xo(n.visibleArea))),n.visibleArea=jo(n.visibleArea,$o(n,t)),n.coordinates=jo(n.coordinates,Bo(Co(n.visibleArea),Yo(n,t))),n}return e}(e,t):e}function rs(){var e=(0,t.useRef)([]);return function(t){-1===e.current.indexOf(t)&&e.current.push(t)}}var is=function(e,n){var r,i=(r=(0,t.useRef)(!0)).current?(r.current=!1,!0):r.current;(0,t.useEffect)((function(){if(!i)return e()}),n)};var os=function(e){function t(t,n){var r=e.call(this)||this;return r.props=t,r.notify=n,r.data={state:null,transitions:!1,interactions:{moveCoordinates:!1,resizeCoordinates:!1,transformImage:{rotate:!1,move:!1,scale:!1,flip:!1}}},r}return it(t,e),t.prototype.getProps=function(){return this.props()},t.prototype.setData=function(e){this.data=e,this.notify()},t.prototype.getData=function(){return this.data},t}(Ca);function as(){var e=ct((0,t.useState)({}),2);e[0];var n=e[1];return function(){n({})}}function ss(e){var n=as(),r=function(e){var n=(0,t.useRef)(e);return n.current=e,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.current.apply(n,dt([],ct(e),!1))}}((function(){var t=e(),n=t.settings,r=at(t,["settings"]),i=ot({imageRestriction:mo.fitArea,transformImage:{adjustStencil:!0}},n),o=ot({transitions:!0},r);return ot({settings:ot(ot({},i),La(i))},o)}));return(0,t.useRef)(new os(r,n)).current}var ls=function(e){var n=(0,t.useRef)(e),r=function(){n.current&&n.current()};(0,t.useEffect)((function(){n.current=e}),[e]),(0,t.useEffect)((function(){return window.addEventListener("resize",r),window.addEventListener("orientationchange",r),function(){window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}}),[])};function cs(e){var n=this,r=e(),i=r.src,o=r.onReady,a=r.onError,s=r.onUpdate,l=r.canvas,c=void 0===l||l,u=r.unloadTime,d=void 0===u?500:u,f=r.crossOrigin,p=void 0===f||f,h=r.checkOrientation,m=void 0===h||h,g=r.autoReconcileState,y=void 0===g||g,v=(0,t.useRef)(null),b=(0,t.useRef)(null),w=(0,t.useRef)(null),x=(0,t.useRef)(null),_=ct(function(e){var n=ct((0,t.useState)(e),2),r=n[0],i=n[1],o=ct((0,t.useState)(null),2),a=o[0],s=o[1],l=(0,t.useRef)(e);return is((function(){a&&a(r,l.current)}),[a]),[r,function(e,t){l.current=r,i(e),s((function(){return t}))}]}(null),2),k=_[0],E=_[1],S=ss((function(){return ot(ot({},e()),{getInstance:function(){return x.current}})})),C=function(e){var n=e.src,r=e.onLoadingStart,i=e.onLoadingEnd,o=e.onError,a=e.onLoad,s=e.crossOrigin,l=e.checkOrientation,c=e.canvas,u=e.unloadTime,d=ct((0,t.useState)(!1),2),f=d[0],p=d[1],h=ct((0,t.useState)(!1),2),m=h[0],g=h[1],y=ct((0,t.useState)(null),2),v=y[0],b=y[1],w=(0,t.useRef)(null);return(0,t.useEffect)((function(){if(w.current!==n)if(w.current=n||null,g(!1),n){p(!0),null==r||r();var e=[Ba(n,{crossOrigin:Xi(s)?c:s,checkOrientation:l})];m&&u&&e.push(lo(u)),Promise.all(e).then((function(e){var t=ct(e,1)[0];w.current===n&&(b(t),null==a||a(t))})).catch((function(){w.current===n&&(null==o||o())})).finally((function(){w.current===n&&(null==i||i(),p(!1))}))}else u?lo(u).then((function(){b(null)})):b(null)}),[n]),(0,t.useEffect)((function(){v&&g(!0)}),[v]),{isLoading:function(){return f},isLoaded:function(){return m},getImage:function(){return v},setImage:b}}({src:i,crossOrigin:p,checkOrientation:m,unloadTime:d,canvas:c,onLoad:function(){x.current&&(null==o||o(x.current))},onError:function(){x.current&&(null==a||a(x.current))}}),T=function(e,n){void 0===n&&(n=!0);var r=ct((0,t.useState)(n),2),i=r[0],o=r[1];return(0,t.useLayoutEffect)((function(){i&&!e.hasInteractions()&&e.reconcileState()})),{pause:function(){o(!1)},resume:function(){o(!0)}}}(S,y),A=function(){return st(n,void 0,void 0,(function(){var e,t,n;return lt(this,(function(r){switch(r.label){case 0:return b.current?(T.pause(),e=C.getImage(),[4,null===(n=b.current)||void 0===n?void 0:n.stretchTo(e)]):[3,2];case 1:t=r.sent(),E(e,(function(){t&&e?S.reset(t,e):S.clear()})),T.resume(),r.label=2;case 2:return[2]}}))}))},O=function(){return st(n,void 0,void 0,(function(){var e,t,n,r;return lt(this,(function(i){switch(i.label){case 0:return b.current?(T.pause(),e=C.getImage(),[4,null===(r=b.current)||void 0===r?void 0:r.stretchTo(e)]):[3,2];case 1:(t=i.sent())&&e?(n=S.getState())?t.width===n.boundary.width&&t.height===n.boundary.height||(S.setBoundary(t),S.reconcileState()):S.reset(t,e):S.clear(),T.resume(),i.label=2;case 2:return[2]}}))}))},P={reset:function(){return A()},refresh:function(){return O()},setImage:function(e){return E(e)},reconcileState:S.reconcileState,moveCoordinates:S.moveCoordinates,moveCoordinatesEnd:S.moveCoordinatesEnd,resizeCoordinates:S.resizeCoordinates,clear:S.clear,resizeCoordinatesEnd:S.resizeCoordinatesEnd,moveImage:S.moveImage,flipImage:S.flipImage,zoomImage:S.zoomImage,rotateImage:S.rotateImage,transformImage:S.transformImage,transformImageEnd:S.transformImageEnd,setCoordinates:S.setCoordinates,setVisibleArea:S.setVisibleArea,startTransitions:S.startTransitions,setState:S.setState,hasInteractions:S.hasInteractions,getStencilCoordinates:S.getStencilCoordinates,getCoordinates:S.getCoordinates,getVisibleArea:S.getVisibleArea,getTransforms:S.getTransforms,getTransitions:S.getTransitions,getInteractions:S.getInteractions,getSettings:S.getSettings,getState:S.getState,getDefaultState:function(){var e=S.getState(),t=C.getImage();return e&&t?S.createDefaultState(e.boundary,t):null},getCanvas:function(e){var t=S.getState();return v.current&&w.current&&t?w.current.draw(t,v.current,e):null},getImage:function(){return k?ot({},k):null},isLoading:C.isLoading,isLoaded:C.isLoaded};return ls((function(){O()})),is((function(){A()}),[C.getImage()]),is((function(){x.current&&(null==s||s(x.current))}),[C.isLoaded(),C.isLoading()]),(0,t.useImperativeHandle)(x,(function(){return P})),{cropper:P,refs:{image:v,boundary:b,canvas:w},image:k}}var us=(0,t.forwardRef)((function(e,n){var r=e.className,i=e.style,o=e.stretcherClassName,a=e.contentClassName,s=e.stretchAlgorithm,l=void 0===s?ja:s,c=e.sizeAlgorithm,u=void 0===c?Fa:c,d=e.children,f=(0,t.useRef)(null),p=(0,t.useRef)(null);return(0,t.useImperativeHandle)(n,(function(){return{reset:function(){var e=f.current;e&&(e.style.height="",e.style.width="")},stretchTo:function(e){var t=f.current,n=p.current;if((null==e?void 0:e.width)&&(null==e?void 0:e.height)&&t&&n){l(n,t,e);var r=u(n,e);return Promise.resolve(r.width&&r.height?r:null)}return t&&(t.style.height="",t.style.width=""),Promise.resolve(null)}}})),t.createElement("div",{ref:p,style:i,className:Ya()("advanced-cropper-boundary",r)},t.createElement("div",{ref:f,className:Ya()(["advanced-cropper-boundary__stretcher",o])}),t.createElement("div",{className:Ya()(["advanced-cropper-boundary__content",a])},d))}));us.displayName="StretchableBoundary";var ds=function(e){var n=e.visible,r=e.className,i=e.style,o=e.children;return t.createElement("div",{style:i,className:Ya()(r,"advanced-cropper-fade",Boolean(n)&&"advanced-cropper-fade--visible")},o)},fs=function(e){var n=e.cropper,r=e.children,i=e.className,o=e.style,a=n?n.getState():null,s=!!n&&n.isLoaded();return t.createElement("div",{className:Ya()(i,"advanced-cropper-wrapper"),style:o},t.createElement(ds,{visible:a&&s,className:"advanced-cropper-wrapper__fade"},r))};function ps(e){e.preventDefault()}var hs=(0,t.forwardRef)((function(e,n){var r=e.className,i=e.style,o=e.cropper,a=e.crossOrigin,s=void 0===a||a,l=o.getState(),c=o.getTransitions(),u=o.getImage(),d=u&&l?function(e,t,n){return void 0===n&&(n=null),e&&t&&t.visibleArea?za(e,t,t.visibleArea,Xo(t),n):{}}(u,l,c):{},f=u?u.src:void 0;return f?t.createElement("img",{key:f,ref:n,className:Ya()("advanced-cropper-background-image",r),src:f,crossOrigin:!0===s?"anonymous":s||void 0,style:ot(ot({},d),i),onMouseDown:ps}):null}));hs.displayName="CropperBackgroundImage";var ms=(0,t.forwardRef)((function(e,n){var r=(0,t.useRef)(null),i=(0,t.useRef)(null);return(0,t.useImperativeHandle)(n,(function(){return{draw:function(e,t,n){return void 0===n&&(n={}),t&&r.current&&i.current?Wa(e,t,r.current,i.current,n):null}}})),t.createElement(t.Fragment,null,t.createElement("canvas",{className:"advanced-cropper-canvas",ref:r}),t.createElement("canvas",{className:"advanced-cropper-canvas",ref:i}))}));ms.displayName="CropperCanvas";var gs=function(e){function n(n){var r=e.call(this,n)||this;return r.processMove=function(e,t){var n,i=r.container.current;if(i&&r.touches.length){var o=i.getBoundingClientRect(),a=o.left,s=o.top;if(1===r.touches.length&&1===t.length&&r.props.onMove){var l={left:Math.abs(t[0].clientX-r.anchor.left-a)<Math.abs(r.touches[0].clientX-r.anchor.left-a),top:Math.abs(t[0].clientY-r.anchor.top-s)<Math.abs(r.touches[0].clientY-r.anchor.top-s)},c={left:0,top:0};r.props.useAnchor&&l.left||(c.left=t[0].clientX-r.touches[0].clientX),r.props.useAnchor&&l.top||(c.top=t[0].clientY-r.touches[0].clientY),null===(n=r.props)||void 0===n||n.onMove(c,e),r.touches=dt([],ct(t),!1)}}},r.processEnd=function(){var e=r.props,t=e.onMoveEnd,n=e.onLeave;!r.props.disabled&&r.touches.length&&(null==t||t()),r.hovered&&(null==n||n(),r.hovered=!1),r.touches=[]},r.initAnchor=function(e){var t=r.container.current;if(t){var n=t.getBoundingClientRect(),i=n.left,o=n.top;r.anchor={left:e.clientX-i,top:e.clientY-o}}},r.onMouseOver=function(){var e=r.props,t=e.onEnter,n=e.disabled;r.hovered||n||(r.hovered=!0,null==t||t())},r.onMouseLeave=function(){var e=r.props.onLeave;r.hovered&&!r.touches.length&&(r.hovered=!1,null==e||e())},r.onTouchStart=function(e){var t=r.props,n=t.onEnter,i=t.onMoveStart,o=t.disabled;if(e.cancelable){r.touches=Array.from(e.touches);var a=!o&&1===e.touches.length;a&&(r.touches=Array.from(e.touches),null==i||i()),r.hovered||o||(r.hovered=!0,null==n||n()),(r.started||a)&&(e.preventDefault(),e.stopPropagation())}},r.onTouchEnd=function(){r.started=!1,r.processEnd()},r.onTouchMove=function(e){r.touches.length>=1&&(r.started?(r.processMove(e,Array.from(e.touches)),e.preventDefault(),e.stopPropagation()):io({left:r.touches[0].clientX,top:r.touches[0].clientY},{left:e.touches[0].clientX,top:e.touches[0].clientY})>(r.props.activationDistance||0)&&(r.initAnchor({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}),r.started=!0))},r.onMouseDown=function(e){var t=r.props,n=t.onMoveStart;if(!t.disabled&&0===e.button){var i={clientX:e.clientX,clientY:e.clientY};r.touches=[i],r.initAnchor(i),e.stopPropagation(),null==n||n()}},r.onMouseMove=function(e){!r.props.disabled&&r.touches.length&&(r.processMove(e,[{clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.cancelable&&e.preventDefault(),e.stopPropagation())},r.onMouseUp=function(){r.processEnd()},r.touches=[],r.hovered=!1,r.started=!1,r.anchor={left:0,top:0},r.container=(0,t.createRef)(),r}return it(n,e),n.prototype.componentWillUnmount=function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd);var e=this.container.current;e&&(e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("mousedown",this.onMouseDown))},n.prototype.componentDidMount=function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1});var e=this.container.current;e&&(e.addEventListener("touchstart",this.onTouchStart,{passive:!1}),e.addEventListener("mousedown",this.onMouseDown,{passive:!1}))},n.prototype.componentDidUpdate=function(e){this.props.disabled&&!e.disabled&&(this.touches=[])},n.prototype.render=function(){var e=this.props,n=e.children,r=e.className;return t.createElement("div",{className:Ya()("advanced-cropper-draggable-element",r),ref:this.container,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},n)},n.defaultProps={disabled:!1,activationDistance:30,useAnchor:!0,rerender:!0},n}(t.Component),ys=function(e){var n=e.position,r=e.className,i=e.disabled,o=e.onDrag,a=e.onDragEnd,s=e.onLeave,l=e.onEnter,c=e.children;return t.createElement(gs,{className:Ya()(["advanced-cropper-line-wrapper",n&&"advanced-cropper-line-wrapper--".concat(n),i&&"advanced-cropper-line-wrapper--disabled",r]),disabled:i,onMove:o,onMoveEnd:a,onLeave:s,onEnter:l,activationDistance:0},t.createElement("div",{className:Ya()(["advanced-cropper-line-wrapper__content",n&&"advanced-cropper-line-wrapper__content--".concat(n)])},c))},vs=function(e){var n,r,i=e.position,o=e.hoverClassName,a=e.wrapperClassName,s=e.defaultClassName,l=e.disabled,c=e.onMove,u=e.onMoveEnd,d=ct((0,t.useState)(!1),2),f=d[0],p=d[1];return t.createElement(ys,{className:Ya()("advanced-cropper-simple-line-wrapper",a,(n={},n["advanced-cropper-simple-line-wrapper--".concat(i)]=!!i,n)),position:i,disabled:l,onDrag:c,onDragEnd:u,onLeave:function(){p(!1)},onEnter:function(){p(!0)}},t.createElement("div",{className:Ya()("advanced-cropper-simple-line",f&&"advanced-cropper-simple-line--hover",s,f&&o,(r={},r["advanced-cropper-simple-line--".concat(i)]=!!i,r))}))},bs=function(e){var n=e.horizontalPosition,r=e.verticalPosition,i=e.className,o=e.disabled,a=e.onDrag,s=e.onDragEnd,l=e.onLeave,c=e.onEnter,u=e.children,d=e.style,f=n||r?qi(n,r).snakeCase:null;return t.createElement("div",{style:d,className:Ya()(i,"advanced-cropper-handler-wrapper",f&&"advanced-cropper-handler-wrapper--".concat(f),o&&"advanced-cropper-handler-wrapper--disabled")},t.createElement(gs,{className:"advanced-cropper-handler-wrapper__draggable",disabled:o,onMove:a,onMoveEnd:s,onLeave:l,onEnter:c,activationDistance:0},u))},ws=function(e){var n,r=e.verticalPosition,i=e.horizontalPosition,o=e.hoverClassName,a=e.wrapperClassName,s=e.defaultClassName,l=e.wrapperStyle,c=e.disabled,u=e.onMove,d=e.onMoveEnd,f=ct((0,t.useState)(!1),2),p=f[0],h=f[1];return t.createElement(bs,{style:l,className:Ya()("advanced-cropper-simple-handler-wrapper",a,r&&"advanced-cropper-simple-handler-wrapper--".concat(r),i&&"advanced-cropper-simple-handler-wrapper--".concat(i),i&&r&&"advanced-cropper-simple-handler-wrapper--".concat(i,"-").concat(r),p&&"advanced-cropper-simple-handler-wrapper--hover"),verticalPosition:r,horizontalPosition:i,disabled:c,onDrag:u,onDragEnd:d,onLeave:function(){h(!1)},onEnter:function(){h(!0)}},t.createElement("div",{className:Ya()("advanced-cropper-simple-handler",p&&"advanced-cropper-simple-handler--hover",s,p&&o,(n={},n["advanced-cropper-simple-handler--".concat(r)]=!!r,n["advanced-cropper-simple-handler--".concat(i)]=!!i,n["advanced-cropper-simple-handler--".concat(i,"-").concat(r)]=i&&r,n))}))},xs=["east","west",null],_s=["south","north",null],ks=function(e){var n=e.style,r=e.className,i=e.children,o=e.onResize,a=e.onResizeEnd,s=e.handlerComponent,l=void 0===s?ws:s,c=e.handlers,u=void 0===c?{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}:c,d=e.handlerClassNames,f=void 0===d?{}:d,p=e.handlerWrapperClassNames,h=void 0===p?{}:p,m=e.lines,g=void 0===m?{west:!0,north:!0,east:!0,south:!0}:m,y=e.lineComponent,v=void 0===y?vs:y,b=e.lineClassNames,w=void 0===b?{}:b,x=e.lineWrapperClassNames,_=void 0===x?{}:x,k=e.disabled,E=void 0!==k&&k,S=e.reference,C=void 0===S?null:S,T=ct((0,t.useState)(null),2),A=T[0],O=T[1],P=(0,t.useMemo)((function(){var e=[];return xs.forEach((function(t){_s.forEach((function(n){if(t!==n){var r=qi(t,n),i=r.snakeCase,o=r.camelCase;i&&o&&e.push({name:o,className:i,verticalPosition:n,horizontalPosition:t})}}))})),e}),[]),L=(0,t.useMemo)((function(){var e=[];return P.forEach((function(t){fo(t.name)&&(Ki(g)?g[t.name]:g)&&e.push({name:t.name,component:v,className:Ya()(w.default,w[t.name],E&&w.disabled),wrapperClassName:Ya()("advanced-cropper-bounding-box__line","advanced-cropper-bounding-box__line--".concat(t.name),_.default,_[t.name],E&&_.disabled),hoverClassName:w.hover,verticalPosition:t.verticalPosition,horizontalPosition:t.horizontalPosition,disabled:E})})),e}),[P,g,v,w,_,E]),R=(0,t.useMemo)((function(){var e=[];return P.forEach((function(t){(Ki(u)?u[t.name]:u)&&e.push({name:t.name,component:l,className:Ya()(f.default,f[t.name]),containerClassName:Ya()("advanced-cropper-bounding-box__handler-wrapper","advanced-cropper-bounding-box__handler-wrapper--".concat(t.className)),wrapperClassName:Ya()("advanced-cropper-bounding-box__handler","advanced-cropper-bounding-box__handler--".concat(t.className),h.default,h[t.name]),hoverClassName:f.hover,verticalPosition:t.verticalPosition,horizontalPosition:t.horizontalPosition,disabled:E})})),e}),[P,u,l,f,h,E]),M=function(e,t){return function(n,r){var i,a={left:n.left,top:n.top};if(!t&&e?i="width":t&&!e&&(i="height"),!E){if(o){var s=qi(e,t).camelCase;s&&o(s,a,{reference:A||C,preserveAspectRatio:r&&r.shiftKey,respectDirection:i,compensate:!0})}A||O(C)}}},N=function(){null==a||a(),O(null)};return t.createElement("div",{className:Ya()("advanced-cropper-bounding-box",r),style:n},i,t.createElement("div",null,L.map((function(e){return t.createElement(e.component,{key:e.name,defaultClassName:e.className,hoverClassName:e.hoverClassName,wrapperClassName:e.wrapperClassName,position:e.name,disabled:e.disabled,onMove:M(e.horizontalPosition,e.verticalPosition),onMoveEnd:N})}))),t.createElement("div",null,R.map((function(e){var n=t.createElement(e.component,{defaultClassName:e.className,hoverClassName:e.hoverClassName,wrapperClassName:e.wrapperClassName,horizontalPosition:e.horizontalPosition,verticalPosition:e.verticalPosition,disabled:e.disabled,onMove:M(e.horizontalPosition,e.verticalPosition),onMoveEnd:N});return t.createElement("div",{key:e.name,className:e.containerClassName},n)}))))},Es=function(e){var n=e.className,r=e.children;return t.createElement("div",{className:Ya()("advanced-cropper-stencil-overlay",n)},r)};var Ss=function(e){var n=e.className,r=e.transitions,i=e.children,o=at(e,["className","transitions","children"]),a=(0,t.useRef)(null),s=(0,t.useRef)(o),l=ct((0,t.useState)(o),2),c=l[0],u=l[1],d=ct(function(e){void 0===e&&(e=null);var n=(0,t.useRef)(new Va),r=ct((0,t.useState)(!1),2),i=r[0],o=r[1];return[function(t){e&&e.active?n.current.start(ot(ot({},e),{onStart:function(){o(!0)},onProgress:function(e){t(e)},onStop:function(){o(!1)}})):n.current.active||t(1)},i]}(r),2),f=d[0],p=d[1];(0,t.useLayoutEffect)((function(){if(!uo(c,o)){u(o);var e=p?ot({},s.current):c;f((function(t){["left","top","height","width"].forEach((function(n){var r=o[n],i=e[n];s.current[n]=to(i)&&to(r)?i+(r-i)*t:r})),a.current&&(a.current.style.width="".concat(s.current.width,"px"),a.current.style.height="".concat(s.current.height,"px"),a.current.style.transform="translate3d(".concat(s.current.left,"px, ").concat(s.current.top,"px, 0px)"))}))}}),[c,p,o.width,o.height,o.top,o.left]);var h=p?s.current:o,m={left:0,top:0,width:"".concat(h.width,"px"),height:"".concat(h.height,"px"),transform:"translate3d(".concat(h.left,"px, ").concat(h.top,"px, 0px)")};return t.createElement("div",{ref:a,className:Ya()("advanced-cropper-artificial-transition",n),style:m},i)},Cs=function(e){var n=e.className,r=e.transitions,i=e.width,o=e.height,a=e.left,s=e.top,l=e.children;return t.createElement(Ss,{className:Ya()("advanced-cropper-stencil-wrapper",n),transitions:r,width:i,height:o,top:s,left:a},l)},Ts=function(e){var n=e.columns,r=void 0===n?3:n,i=e.rows,o=void 0===i?3:i,a=e.visible,s=void 0!==a&&a,l=e.className,c=[],u=ct((0,t.useState)(r),2),d=u[0],f=u[1],p=ct((0,t.useState)(o),2),h=p[0],m=p[1];is((function(){s&&(m(o),f(r))}),[s,r,o]);for(var g=0;g<h;g++){for(var y=[],v=0;v<d;v++)y.push(t.createElement("div",{key:v,className:Ya()("advanced-cropper-stencil-grid__cell",0===g&&"advanced-cropper-stencil-grid__cell--top",g===h-1&&"advanced-cropper-stencil-grid__cell--bottom",0===v&&"advanced-cropper-stencil-grid__cell--left",v===d-1&&"advanced-cropper-stencil-grid__cell--right")}));c.push(t.createElement("div",{key:g,className:"advanced-cropper-stencil-grid__row"},y))}return t.createElement("div",{className:Ya()("advanced-cropper-stencil-grid",s&&"advanced-cropper-stencil-grid--visible",l)},c)},As=(0,t.forwardRef)((function(e,n){var r=e.cropper,i=e.coordinates,o=e.aspectRatio,a=e.minAspectRatio,s=e.maxAspectRatio,l=e.handlerComponent,c=void 0===l?ws:l,u=e.handlers,d=void 0===u?{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}:u,f=e.handlerClassNames,p=void 0===f?{}:f,h=e.handlerWrapperClassNames,m=void 0===h?{}:h,g=e.lines,y=void 0===g?{west:!0,north:!0,east:!0,south:!0}:g,v=e.lineComponent,b=void 0===v?vs:v,w=e.lineClassNames,x=void 0===w?{}:w,_=e.lineWrapperClassNames,k=void 0===_?{}:_,E=e.resizable,S=void 0===E||E,C=e.movable,T=void 0===C||C,A=e.grid,O=e.gridClassName,P=e.className,L=e.movingClassName,R=e.resizingClassName,M=e.previewClassName,N=e.boundingBoxClassName,I=e.overlayClassName,D=e.draggableAreaClassName,B=r.getState(),z=r.getTransitions(),j=r.getInteractions();(0,t.useImperativeHandle)(n,(function(){return{aspectRatio:Uo(o||{minimum:a,maximum:s})}}));var U=i?Yi(i)?i(B):i:Ko(B),F=U.width,W=U.height,H=U.left,V=U.top;return B&&t.createElement(Cs,{className:Ya()("advanced-cropper-rectangle-stencil",P,j.moveCoordinates&&L,j.resizeCoordinates&&R,{"advanced-cropper-rectangle-stencil--movable":T,"advanced-cropper-rectangle-stencil--moving":j.moveCoordinates,"advanced-cropper-rectangle-stencil--resizable":S,"advanced-cropper-rectangle-stencil--resizing":j.resizeCoordinates}),width:F,height:W,left:H,top:V,transitions:z},t.createElement(ks,{reference:B.coordinates,className:Ya()(N,"advanced-cropper-rectangle-stencil__bounding-box"),handlers:d,handlerComponent:c,handlerClassNames:p,handlerWrapperClassNames:m,lines:y,lineComponent:b,lineClassNames:x,lineWrapperClassNames:k,onResize:function(e,t,n){r&&S&&r.resizeCoordinates(e,t,n)},onResizeEnd:function(){r&&r.resizeCoordinatesEnd()},disabled:!S},t.createElement(gs,{disabled:!T,onMove:function(e){r&&T&&r.moveCoordinates(e)},onMoveEnd:function(){r&&r.moveCoordinatesEnd()},className:Ya()("advanced-cropper-rectangle-stencil__draggable-area",D)},t.createElement(Es,{className:Ya()("advanced-cropper-rectangle-stencil__overlay",I)},A&&t.createElement(Ts,{visible:r.hasInteractions(),columns:j.transformImage.rotate?9:3,rows:j.transformImage.rotate?9:3,className:Ya()("advanced-cropper-rectangle-stencil__grid",O)}),t.createElement("div",{className:Ya()("advanced-cropper-rectangle-stencil__preview",M)})))))}));As.displayName="RectangleStencil";var Os,Ps=function(){function e(e){var t=e.active;this.active=t,this.defaultPrevented=!1}return e.prototype.preventDefault=function(){this.defaultPrevented=!0},e}(),Ls=function(e){function n(n){var r=e.call(this,n)||this;return r.processMove=function(e){var t=r.props,n=t.onTransform,i=t.touchScale,o=t.touchMove,a=t.touchRotate,s=r.container.current;s&&n&&(n(function(e,t,n,r){var i,o,a;if(void 0===r&&(r={}),1===t.length&&1===e.length)r.move&&(i={left:t[0].clientX-e[0].clientX,top:t[0].clientY-e[0].clientY});else if(e.length>1){var s=qa(t,n),l=qa(e,n);if(r.rotate&&2===t.length&&2===e.length){var c={left:[e[0].clientX-e[1].clientX,t[0].clientX-t[1].clientX],top:[e[0].clientY-e[1].clientY,t[0].clientY-t[1].clientY]},u=c.left[0]*c.top[1]-c.left[1]*c.top[0],d=c.left[0]*c.left[1]+c.top[0]*c.top[1];if(!oo(d,0)&&!oo(u,0)){var f=-180*Math.atan2(u,d)/Math.PI;a={center:l.centerMass,angle:f}}}r.move&&(i={left:s.centerMass.left-l.centerMass.left,top:s.centerMass.top-l.centerMass.top}),r.scale&&(o={factor:l.spread/s.spread,center:l.centerMass})}return{move:i,scale:o,rotate:a}}(e,r.touches,s,{scale:i,rotate:a,move:o})),r.touches=e)},r.processEnd=function(){var e=r.props.onTransformEnd;r.transforming&&(r.transforming=!1,e&&e())},r.processStart=function(){r.transforming=!0,r.debouncedProcessEnd.clear()},r.processEvent=function(e){var t=r.props,n=t.onEvent,i=t.disabled,o=new Ps({active:r.transforming});return n?n(o,e):(e.preventDefault(),e.stopPropagation()),!i&&!o.defaultPrevented},r.onWheel=function(e){var t=r.props,n=t.onTransform,i=t.wheelScale,o=r.container.current;i&&r.processEvent(e)&&(r.processStart(),n&&o&&n(Ga(e,o,!0===i?.1:i.ratio)),r.touches.length||r.debouncedProcessEnd())},r.onTouchStart=function(e){var t=r.props,n=t.touchMove,i=t.touchScale,o=t.touchRotate;if(e.cancelable&&(n||(i||o)&&e.touches.length>1)&&r.processEvent(e)){var a=r.container.current;if(a){var s=a.getBoundingClientRect(),l=s.left,c=s.top,u=s.bottom,d=s.right;r.touches=Array.from(e.touches).filter((function(e){return e.clientX>l&&e.clientX<d&&e.clientY>c&&e.clientY<u}))}}},r.onTouchEnd=function(e){0===e.touches.length&&(r.touches=[],r.processEnd())},r.onTouchMove=function(e){if(r.touches.length){var t=dt([],ct(e.touches),!1).filter((function(e){return!e.identifier||r.touches.find((function(t){return t.identifier===e.identifier}))}));r.processEvent(e)&&(r.processMove(t),r.processStart())}},r.onMouseDown=function(e){if(r.props.mouseMove&&"buttons"in e&&1===e.buttons&&r.processEvent(e)){var t={clientX:e.clientX,clientY:e.clientY};r.touches=[t],r.processStart()}},r.onMouseMove=function(e){r.touches.length&&r.processEvent(e)&&r.processMove([{clientX:e.clientX,clientY:e.clientY}])},r.onMouseUp=function(){r.touches=[],r.processEnd()},r.transforming=!1,r.touches=[],r.anchor={left:0,top:0},r.container=(0,t.createRef)(),r.debouncedProcessEnd=po(r.processEnd,n.timeout),r}return it(n,e),n.prototype.shouldComponentUpdate=function(){return!0},n.prototype.componentWillUnmount=function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd);var e=this.container.current;e&&(e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("wheel",this.onWheel))},n.prototype.componentDidMount=function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1});var e=this.container.current;e&&(e.addEventListener("touchstart",this.onTouchStart,{passive:!1}),e.addEventListener("mousedown",this.onMouseDown,{passive:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}))},n.prototype.render=function(){var e=this.props,n=e.className,r=e.children,i=e.style;return t.createElement("div",{className:n,style:i,ref:this.container},r)},n.defaultProps={touchMove:!0,mouseMove:!0,touchScale:!0,touchRotate:!1,wheelScale:!0,timeout:500},n}(t.Component),Rs=function(e){var n=e.scaleImage,r=void 0===n||n,i=e.moveImage,o=void 0===i||i,a=e.rotateImage,s=void 0!==a&&a,l=e.children,c=e.className,u=e.style,d=e.cropper,f=e.timeout,p=d.getTransitions(),h=function(e){return(0,t.useMemo)((function(){return Qi(e,{touch:!0},{touch:!1})}),[e])}(s),m=function(e){return(0,t.useMemo)((function(){return Qi(e,{touch:!0,wheel:{ratio:.1}},{touch:!1,wheel:!1})}),[e])}(r),g=function(e){return(0,t.useMemo)((function(){return Qi(e,{touch:!0,mouse:!0},{touch:!1,mouse:!1})}),[e])}(o);return t.createElement(Ls,{className:c,style:u,onTransform:d.transformImage,onTransformEnd:d.transformImageEnd,touchMove:g.touch,mouseMove:g.mouse,touchScale:m.touch,wheelScale:m.wheel,touchRotate:h.touch,disabled:p.active,timeout:f},l)},Ms=(Os=function(e,n){var r=e.style,i=e.className,o=e.stencilComponent,a=void 0===o?As:o,s=e.stencilConstraints,l=void 0===s?$a:s,c=e.stencilProps,u=void 0===c?{}:c,d=e.wrapperComponent,f=void 0===d?fs:d,p=e.wrapperProps,h=void 0===p?{}:p,m=e.backgroundComponent,g=void 0===m?hs:m,y=e.backgroundProps,v=void 0===y?{}:y,b=e.backgroundClassName,w=e.backgroundWrapperComponent,x=void 0===w?Rs:w,_=e.backgroundWrapperProps,k=void 0===_?{}:_,E=e.boundaryComponent,S=void 0===E?us:E,C=e.boundaryProps,T=e.boundaryClassName,A=e.canvas,O=void 0===A||A,P=e.crossOrigin,L=void 0===P||P,R=e.settings,M=at(e,["style","className","stencilComponent","stencilConstraints","stencilProps","wrapperComponent","wrapperProps","backgroundComponent","backgroundProps","backgroundClassName","backgroundWrapperComponent","backgroundWrapperProps","boundaryComponent","boundaryProps","boundaryClassName","canvas","crossOrigin","settings"]),N=(0,t.useRef)(null),I=cs((function(){return ot(ot({},M),{crossOrigin:L,stencilProps:u,canvas:O,settings:ot(ot({},R),l(R,ot(ot({},u),N.current)))})})),D=I.cropper,B=I.image,z=I.refs,j=a,U=f,F=x,W=g,H=S;(0,t.useImperativeHandle)(n,(function(){return D}));var V={loading:D.isLoading(),loaded:D.isLoaded()};return t.createElement(U,ot({},h,{className:Ya()("advanced-cropper",i),cropper:D,style:r},V),t.createElement(H,ot({},C,{ref:z.boundary,className:Ya()("advanced-cropper__boundary",T)}),t.createElement(F,ot({},k,{cropper:D,className:"advanced-cropper__background-wrapper"}),D.getState()&&t.createElement(W,ot({},v,{ref:z.image,crossOrigin:L,cropper:D,className:Ya()("advanced-cropper__background",b)})),t.createElement(j,ot({},u,{ref:N,cropper:D,image:B}))),O&&t.createElement(ms,{ref:z.canvas})))},(0,t.forwardRef)(Os)),Ns=["transformImage","moveCoordinates","resizeCoordinates","defaultCoordinates","defaultVisibleArea","areaPositionRestrictions","areaSizeRestrictions","sizeRestrictions","positionRestrictions","aspectRatio","minWidth","minHeight","maxWidth","maxHeight","defaultSize","defaultPosition","defaultTransforms","imageRestriction","priority"];function Is(e,t){void 0===t&&(t=Ns);var n={settings:{},props:{}};return Object.keys(e).forEach((function(r){t.some((function(e){return e===r}))?n.settings[r]=e[r]:n.props[r]=e[r]})),n}var Ds=(0,t.forwardRef)((function(e,n){var r=Is(e,dt(dt([],ct(Ns),!1),["stencilSize"],!1));return t.createElement(Ms,ot({postProcess:ts,stencilConstraints:Xa},r.props,{settings:ot(ot({defaultSize:Ja,aspectRatio:es,sizeRestrictions:Pa(Qa)},r.settings),{transformImage:ot(ot({},r.settings.transformImage),{adjustStencil:!1})}),ref:n}))}));Ds.displayName="FixedCropper";var Bs=(0,t.forwardRef)((function(e,n){var r=Is(e),i=r.props,o=r.settings,a=o.stencilSize,s=o.autoZoom,l=at(o,["stencilSize","autoZoom"]),c=rs();return Xi(s)||(i.postProcess||a?c("prop 'autoZoom' is deprecated now and will be removed, use 'postProcess' prop to pass your auto zoom function."):(c("prop 'autoZoom' is deprecated now and will be removed, use 'postProcess' prop to pass your auto zoom function. The 'postProcess' automatically set to 'hybridAutoZoom'"),i.postProcess=ns)),Xi(a)?t.createElement(Ms,ot({},i,{ref:n,settings:l})):(c("prop 'stencilSize' is deprecated for <Cropper/> component now and will be removed, use <FixedCropper/> component instead."),t.createElement(Ds,ot({ref:n,stencilSize:a},l,i)))}));Bs.displayName="CropperComponent";var zs=(0,t.forwardRef)((function(e,n){var r=e.cropper,i=e.coordinates,o=e.handlerComponent,a=void 0===o?ws:o,s=e.handlers,l=void 0===s?{eastNorth:!0,westNorth:!0,westSouth:!0,eastSouth:!0}:s,c=e.handlerClassNames,u=void 0===c?{}:c,d=e.handlerWrapperClassNames,f=void 0===d?{}:d,p=e.lines,h=void 0===p?{west:!0,north:!0,east:!0,south:!0}:p,m=e.lineComponent,g=void 0===m?vs:m,y=e.lineClassNames,v=void 0===y?{}:y,b=e.lineWrapperClassNames,w=void 0===b?{}:b,x=e.resizable,_=void 0===x||x,k=e.movable,E=void 0===k||k,S=e.grid,C=e.gridClassName,T=e.className,A=e.movingClassName,O=e.resizingClassName,P=e.previewClassName,L=e.boundingBoxClassName,R=e.overlayClassName,M=e.draggableAreaClassName,N=r.getState(),I=r.getTransitions(),D=r.getInteractions();(0,t.useImperativeHandle)(n,(function(){return{aspectRatio:1,boundingBox:"circle"}}));var B=i?Yi(i)?i(N):i:Ko(N),z=B.width,j=B.height,U=B.left,F=B.top;return N&&t.createElement(Cs,{className:Ya()("advanced-cropper-circle-stencil",T,D.moveCoordinates&&A,D.resizeCoordinates&&O,{"advanced-cropper-circle-stencil--movable":E,"advanced-cropper-circle-stencil--moving":D.moveCoordinates,"advanced-cropper-circle-stencil--resizable":_,"advanced-cropper-circle-stencil--resizing":D.resizeCoordinates}),width:z,height:j,left:U,top:F,transitions:I},t.createElement(ks,{reference:N.coordinates,className:Ya()(L,"advanced-cropper-circle-stencil__bounding-box"),handlers:l,handlerComponent:a,handlerClassNames:u,handlerWrapperClassNames:f,lines:h,lineComponent:g,lineClassNames:v,lineWrapperClassNames:w,onResize:function(e,t,n){r&&_&&r.resizeCoordinates(e,t,n)},onResizeEnd:function(){r&&r.resizeCoordinatesEnd()},disabled:!_},t.createElement(gs,{disabled:!E,onMove:function(e){r&&E&&r.moveCoordinates(e)},onMoveEnd:function(){r&&r.moveCoordinatesEnd()},className:Ya()("advanced-cropper-circle-stencil__draggable-area",M)},t.createElement(Es,{className:Ya()("advanced-cropper-circle-stencil__overlay",R)},S&&t.createElement(Ts,{visible:r.hasInteractions(),columns:D.transformImage.rotate?9:3,rows:D.transformImage.rotate?9:3,className:Ya()("advanced-cropper-circle-stencil__grid",C)}),t.createElement("div",{className:Ya()("advanced-cropper-circle-stencil__preview",P)})))))}));zs.displayName="CircleStencil",(0,t.forwardRef)((function(e,n){var r=e.src,i=e.crossOrigin,o=void 0===i||i,a=at(e,["src","crossOrigin"]);return r?t.createElement("img",ot({key:r,ref:n,src:r,className:Ya()("advanced-cropper-source"),crossOrigin:!0===o?"anonymous":o||void 0},a)):null})).displayName="CropperSource";var js=function(e){var n=e.children,r=e.cropper,i=e.className,o=e.style;return t.createElement("div",{className:Ya()(i,"cropper-preview-wrapper"),style:o},t.createElement(ds,{visible:null==r?void 0:r.isLoaded(),className:"cropper-preview-wrapper__fade"},n))},Us=function(e){var n=e.className,r=e.cropper,i=e.crossOrigin,o=void 0===i||i,a=e.size,s=e.style,l=r.getState(),c=r.getTransitions(),u=r.getImage(),d=a&&u&&(null==l?void 0:l.coordinates)?function(e,t,n,r){return void 0===r&&(r=null),e&&t&&t.visibleArea&&t.coordinates?za(e,t,t.coordinates,Ao(t.coordinates)>Ao(n)?t.coordinates.width/n.width:t.coordinates.height/n.height,r):{}}(u,l,a,c):{},f=u?u.src:void 0;return f?t.createElement("img",{key:f,className:Ya()("advanced-cropper-background-image",n),src:f,crossOrigin:!0===o?"anonymous":o||void 0,style:ot(ot({},d),s),onMouseDown:ps}):null};(0,t.forwardRef)((function(e,n){var r,i,o,a,s=e.className,l=e.contentClassName,c=e.state,u=void 0===c?null:c,d=e.image,f=void 0===d?null:d,p=e.transitions,h=void 0===p?null:p,m=e.backgroundComponent,g=void 0===m?Us:m,y=e.backgroundProps,v=e.backgroundClassName,b=e.boundaryComponent,w=void 0===b?us:b,x=e.boundaryProps,_=e.boundaryClassName,k=e.wrapperComponent,E=void 0===k?js:k,S=e.wrapperProps,C=e.loaded,T=void 0===C||C,A=e.loading,O=void 0!==A&&A,P=e.style,L=e.cropper,R=as(),M=(0,t.useRef)(null),N=L||{current:{getState:function(){return u},getTransitions:function(){return h},getImage:function(){return f},isLoaded:function(){return T},isLoading:function(){return O}}},I=ct((0,t.useState)(null),2),D=I[0],B=I[1],z=null===(i=null===(r=N.current)||void 0===r?void 0:r.getState())||void 0===i?void 0:i.coordinates,j=null===(a=null===(o=N.current)||void 0===o?void 0:o.getImage())||void 0===a?void 0:a.src,U=D?{width:"".concat(D.width,"px"),height:"".concat(D.height,"px")}:{},F=function(){M.current&&z&&M.current.stretchTo(z).then((function(e){e&&z?ao(Ao(z),Ao(e))?B({width:e.width,height:e.width/Ao(z)}):B({width:e.height*Ao(z),height:e.height}):B(null)})),R()};ls(F),(0,t.useLayoutEffect)(F,[null==z?void 0:z.height,null==z?void 0:z.width]),(0,t.useImperativeHandle)(n,(function(){return{refresh:R}}));var W=E,H=g,V=w;return t.createElement(W,ot({},S,{className:Ya()(s,"advanced-cropper-preview"),cropper:N.current,style:P}),t.createElement(V,ot({ref:M,stretchAlgorithm:Ua},x,{className:Ya()("advanced-cropper-preview__boundary",_)}),t.createElement("div",{className:Ya()(l,"advanced-cropper-preview__content"),style:U},N.current&&t.createElement(H,ot({},y,{cropper:N.current,size:D,className:Ya()(v,"advanced-cropper-preview__image",j&&"advanced-cropper-preview__image--visible")})))))}));var Fs=i(3516),Ws={};Ws.styleTagTransform=g(),Ws.setAttributes=f(),Ws.insert=u().bind(null,"head"),Ws.domAPI=l(),Ws.insertStyleElement=h();a()(Fs.Z,Ws);Fs.Z&&Fs.Z.locals&&Fs.Z.locals;function Hs(e){return Hs="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},Hs(e)}function Vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vs(Object(n),!0).forEach((function(t){Gs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gs(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Hs(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Hs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Hs(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ys=function(){var e=$s((0,t.useContext)(j),2),n=e[0],r=e[1],i=$s((0,t.useState)(null),2),o=i[0],a=i[1],s=(0,t.useRef)(null);(0,t.useEffect)((function(){s.current&&s.current.getCoordinates()&&(n.fromCropper||(s.current.setCoordinates({top:n.top,left:n.left,width:n.width,height:n.height}),n.top!=s.current.getCoordinates().top&&r((function(e){return qs(qs({},e),{},{top:s.current.getCoordinates().top})})),n.left!=s.current.getCoordinates().left&&r((function(e){return qs(qs({},e),{},{left:s.current.getCoordinates().left})})),n.width!=s.current.getCoordinates().width&&r((function(e){return qs(qs({},e),{},{width:s.current.getCoordinates().width})})),n.height!=s.current.getCoordinates().height&&r((function(e){return qs(qs({},e),{},{height:s.current.getCoordinates().height})}))))}),[n.width,n.height,n.top,n.left]);return(0,t.useEffect)((function(){n.blob&&a(n.frame)}),[n.frame]),t.createElement("div",null,t.createElement(Bs,{src:o,ref:s,onChange:function(e){e&&r((function(t){return qs(qs({},t),{},{top:e.getCoordinates().top,left:e.getCoordinates().left,width:e.getCoordinates().width,height:e.getCoordinates().height,fromCropper:!0})}))},className:"cropper",stencilProps:{grid:!0},defaultSize:{width:n.width,height:n.height},backgroundWrapperClassName:"CropperBackgroundWrapper",width:n.width,height:n.height,transitions:!1,style:{transition:"none"}}))};function Xs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ks(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ks(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Qs=function(){var e=Xs((0,t.useContext)(j),2),n=e[0];e[1];return t.createElement("div",{className:On.content},t.createElement("div",{className:On.wrap},"audio"===n.mode&&t.createElement(Hi,null),"player"===n.mode&&t.createElement(Hi,null),"crop"===n.mode&&t.createElement(Ys,null)))};var Js=i(930),el={};el.styleTagTransform=g(),el.setAttributes=f(),el.insert=u().bind(null,"head"),el.domAPI=l(),el.insertStyleElement=h();a()(Js.Z,el);const tl=Js.Z&&Js.Z.locals?Js.Z.locals:void 0;function nl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const il=function(){var e=nl((0,t.useContext)(j),2),n=e[0];e[1];return t.createElement("div",{className:tl.layout},"crop"===n.mode&&t.createElement(dn,null),"player"===n.mode&&t.createElement(tn,null),"audio"===n.mode&&t.createElement(wn,null),t.createElement("div",{className:tl.content},t.createElement(Qs,null)))};function ol(e,n=[]){let r=[];const i=()=>{const n=r.map((e=>(0,t.createContext)(e)));return function(r){const i=(null==r?void 0:r[e])||n;return(0,t.useMemo)((()=>({[`__scope${e}`]:{...r,[e]:i}})),[r,i])}};return i.scopeName=e,[function(n,i){const o=(0,t.createContext)(i),a=r.length;function s(n){const{scope:r,children:i,...s}=n,l=(null==r?void 0:r[e][a])||o,c=(0,t.useMemo)((()=>s),Object.values(s));return(0,t.createElement)(l.Provider,{value:c},i)}return r=[...r,i],s.displayName=n+"Provider",[s,function(r,s){const l=(null==s?void 0:s[e][a])||o,c=(0,t.useContext)(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},al(i,...n)]}function al(...e){const n=e[0];if(1===e.length)return n;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const i=r.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,t.useMemo)((()=>({[`__scope${n.scopeName}`]:i})),[i])}};return r.scopeName=n.scopeName,r}function sl(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function ll(...e){return(0,t.useCallback)(sl(...e),e)}function cl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const ul=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?t.useLayoutEffect:()=>{},dl=n["useId".toString()]||(()=>{});let fl=0;function pl(e){const[n,r]=t.useState(dl());return ul((()=>{e||r((e=>null!=e?e:String(fl++)))}),[e]),e||(n?`radix-${n}`:"")}function hl(e){const n=(0,t.useRef)(e);return(0,t.useEffect)((()=>{n.current=e})),(0,t.useMemo)((()=>(...e)=>{var t;if("function"==typeof(t=n.current))return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function ml({prop:e,defaultProp:n,onChange:r=(()=>{})}){const[i,o]=function({defaultProp:e,onChange:n}){const r=(0,t.useState)(e),[i]=r,o=(0,t.useRef)(i),a=hl(n);return(0,t.useEffect)((()=>{o.current!==i&&(a(i),o.current=i)}),[i,o,a]),r}({defaultProp:n,onChange:r}),a=void 0!==e,s=a?e:i,l=hl(r);return[s,(0,t.useCallback)((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}const gl=(0,t.forwardRef)(((e,n)=>{const{children:r,...i}=e,o=t.Children.toArray(r),a=o.find(bl);if(a){const e=a.props.children,r=o.map((n=>n===a?t.Children.count(e)>1?t.Children.only(null):(0,t.isValidElement)(e)?e.props.children:null:n));return(0,t.createElement)(yl,tt({},i,{ref:n}),(0,t.isValidElement)(e)?(0,t.cloneElement)(e,void 0,r):null)}return(0,t.createElement)(yl,tt({},i,{ref:n}),r)}));gl.displayName="Slot";const yl=(0,t.forwardRef)(((e,n)=>{const{children:r,...i}=e;return(0,t.isValidElement)(r)?(0,t.cloneElement)(r,{...wl(i,r.props),ref:n?sl(n,r.ref):r.ref}):t.Children.count(r)>1?t.Children.only(null):null}));yl.displayName="SlotClone";const vl=({children:e})=>(0,t.createElement)(t.Fragment,null,e);function bl(e){return(0,t.isValidElement)(e)&&e.type===vl}function wl(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const xl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=(0,t.forwardRef)(((e,r)=>{const{asChild:i,...o}=e,a=i?gl:n;return(0,t.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,t.createElement)(a,tt({},o,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...e,[n]:r}}),{});const _l="dismissableLayer.update",kl="dismissableLayer.pointerDownOutside",El="dismissableLayer.focusOutside";let Sl;const Cl=(0,t.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tl=(0,t.forwardRef)(((e,n)=>{var r;const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=(0,t.useContext)(Cl),[f,p]=(0,t.useState)(null),h=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,m]=(0,t.useState)({}),g=ll(n,(e=>p(e))),y=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),w=f?y.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,k=function(e,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=hl(e),i=(0,t.useRef)(!1),o=(0,t.useRef)((()=>{}));return(0,t.useEffect)((()=>{const e=e=>{if(e.target&&!i.current){const t={originalEvent:e};function a(){Ol(kl,r,t,{discrete:!0})}"touch"===e.pointerType?(n.removeEventListener("click",o.current),o.current=a,n.addEventListener("click",o.current,{once:!0})):a()}else n.removeEventListener("click",o.current);i.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",o.current)}}),[n,r]),{onPointerDownCapture:()=>i.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h),E=function(e,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=hl(e),i=(0,t.useRef)(!1);return(0,t.useEffect)((()=>{const e=e=>{if(e.target&&!i.current){Ol(El,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h);return function(e,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=hl(e);(0,t.useEffect)((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[r,n])}((e=>{w===d.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),(0,t.useEffect)((()=>{if(f)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Sl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Al(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Sl)}}),[f,h,i,d]),(0,t.useEffect)((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Al())}),[f,d]),(0,t.useEffect)((()=>{const e=()=>m({});return document.addEventListener(_l,e),()=>document.removeEventListener(_l,e)}),[]),(0,t.createElement)(xl.div,tt({},u,{ref:g,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:cl(e.onFocusCapture,E.onFocusCapture),onBlurCapture:cl(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:cl(e.onPointerDownCapture,k.onPointerDownCapture)}))}));function Al(){const e=new CustomEvent(_l);document.dispatchEvent(e)}function Ol(e,t,n,{discrete:i}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?function(e,t){e&&(0,r.flushSync)((()=>e.dispatchEvent(t)))}(o,a):o.dispatchEvent(a)}const Pl="focusScope.autoFocusOnMount",Ll="focusScope.autoFocusOnUnmount",Rl={bubbles:!1,cancelable:!0},Ml=(0,t.forwardRef)(((e,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=(0,t.useState)(null),u=hl(o),d=hl(a),f=(0,t.useRef)(null),p=ll(n,(e=>c(e))),h=(0,t.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,t.useEffect)((()=>{if(i){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Bl(f.current,{select:!0})}function t(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Bl(f.current,{select:!0}))}function n(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Bl(l)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[i,l,h.paused]),(0,t.useEffect)((()=>{if(l){zl.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Pl,Rl);l.addEventListener(Pl,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Bl(r,{select:t}),document.activeElement!==n)return}((e=Nl(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Bl(l))}return()=>{l.removeEventListener(Pl,u),setTimeout((()=>{const e=new CustomEvent(Ll,Rl);l.addEventListener(Ll,d),l.dispatchEvent(e),e.defaultPrevented||Bl(null!=t?t:document.body,{select:!0}),l.removeEventListener(Ll,d),zl.remove(h)}),0)}}var e}),[l,u,d,h]);const m=(0,t.useCallback)((e=>{if(!r&&!i)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[i,o]=function(e){const t=Nl(e),n=Il(t,e),r=Il(t.reverse(),e);return[n,r]}(t);i&&o?e.shiftKey||n!==o?e.shiftKey&&n===i&&(e.preventDefault(),r&&Bl(o,{select:!0})):(e.preventDefault(),r&&Bl(i,{select:!0})):n===t&&e.preventDefault()}}),[r,i,h.paused]);return(0,t.createElement)(xl.div,tt({tabIndex:-1},s,{ref:p,onKeyDown:m}))}));function Nl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Il(e,t){for(const n of e)if(!Dl(n,{upTo:t}))return n}function Dl(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Bl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const zl=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=jl(e,t),e.unshift(t)},remove(t){var n;e=jl(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function jl(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const Ul=(0,t.forwardRef)(((e,n)=>{var i;const{container:o=(null===globalThis||void 0===globalThis||null===(i=globalThis.document)||void 0===i?void 0:i.body),...a}=e;return o?r.createPortal((0,t.createElement)(xl.div,tt({},a,{ref:n})),o):null}));const Fl=e=>{const{present:n,children:i}=e,o=function(e){const[n,i]=(0,t.useState)(),o=(0,t.useRef)({}),a=(0,t.useRef)(e),s=(0,t.useRef)("none"),l=e?"mounted":"unmounted",[c,u]=function(e,n){return(0,t.useReducer)(((e,t)=>{const r=n[e][t];return null!=r?r:e}),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,t.useEffect)((()=>{const e=Wl(o.current);s.current="mounted"===c?e:"none"}),[c]),ul((()=>{const t=o.current,n=a.current;if(n!==e){const r=s.current,i=Wl(t);if(e)u("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,u]),ul((()=>{if(n){const e=e=>{const t=Wl(o.current).includes(e.animationName);e.target===n&&t&&(0,r.flushSync)((()=>u("ANIMATION_END")))},t=e=>{e.target===n&&(s.current=Wl(o.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:(0,t.useCallback)((e=>{e&&(o.current=getComputedStyle(e)),i(e)}),[])}}(n),a="function"==typeof i?i({present:o.isPresent}):t.Children.only(i),s=ll(o.ref,a.ref);return"function"==typeof i||o.isPresent?(0,t.cloneElement)(a,{ref:s}):null};function Wl(e){return(null==e?void 0:e.animationName)||"none"}Fl.displayName="Presence";let Hl=0;function Vl(){(0,t.useEffect)((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:ql()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ql()),Hl++,()=>{1===Hl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Hl--}}),[])}function ql(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Gl="right-scroll-bar-position",$l="width-before-scroll-bar";function Zl(e,n){return r=n||null,i=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(o=(0,t.useState)((function(){return{value:r,callback:i,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=i,o.facade;var r,i,o}function Yl(e){return e}function Xl(e,t){void 0===t&&(t=Yl);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}var Kl=function(e){void 0===e&&(e={});var t=Xl(null);return t.options=ot({async:!0,ssr:!1},e),t}(),Ql=function(){},Jl=t.forwardRef((function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:Ql,onWheelCapture:Ql,onTouchMoveCapture:Ql}),o=i[0],a=i[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=at(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,x=Zl([r,n]),_=ot(ot({},b),o);return t.createElement(t.Fragment,null,d&&t.createElement(w,{sideCar:Kl,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r}),s?t.cloneElement(t.Children.only(l),ot(ot({},_),{ref:x})):t.createElement(v,ot({},_,{className:c,ref:x}),l))}));Jl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jl.classNames={fullWidth:$l,zeroRight:Gl};var ec,tc=function(e){var n=e.sideCar,r=at(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return t.createElement(i,ot({},r))};tc.isSideCarExport=!0;function nc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ec||i.nc;return t&&e.setAttribute("nonce",t),e}var rc=function(){var e=0,t=null;return{add:function(n){var r,i;0==e&&(t=nc())&&(i=n,(r=t).styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ic=function(){var e,n=(e=rc(),function(n,r){t.useEffect((function(){return e.add(n),function(){e.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},oc={left:0,top:0,right:0,gap:0},ac=function(e){return parseInt(e||"",10)||0},sc=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return oc;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[ac(n),ac(r),ac(i)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},lc=ic(),cc=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Gl," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat($l," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Gl," .").concat(Gl," {\n right: 0 ").concat(r,";\n }\n \n .").concat($l," .").concat($l," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},uc=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,o=void 0===i?"margin":i,a=t.useMemo((function(){return sc(o)}),[o]);return t.createElement(lc,{styles:cc(a,!n,o,r?"":"!important")})},dc=!1;if("undefined"!=typeof window)try{var fc=Object.defineProperty({},"passive",{get:function(){return dc=!0,!0}});window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch(e){dc=!1}var pc=!!dc&&{passive:!1},hc=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},mc=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),gc(e,n)){var r=yc(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},gc=function(e,t){return"v"===e?function(e){return hc(e,"overflowY")}(t):function(e){return hc(e,"overflowX")}(t)},yc=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},vc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bc=function(e){return[e.deltaX,e.deltaY]},wc=function(e){return e&&"current"in e?e.current:e},xc=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},_c=0,kc=[];const Ec=(Sc=function(e){var n=t.useRef([]),r=t.useRef([0,0]),i=t.useRef(),o=t.useState(_c++)[0],a=t.useState((function(){return ic()}))[0],s=t.useRef(e);t.useEffect((function(){s.current=e}),[e]),t.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=dt([e.lockRef.current],(e.shards||[]).map(wc),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=t.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var n,o=vc(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],c="deltaY"in e?e.deltaY:a[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=mc(d,u);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=mc(d,u)),!f)return!1;if(!i.current&&"changedTouches"in e&&(l||c)&&(i.current=n),!n)return!0;var p=i.current||n;return function(e,t,n,r,i){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=yc(e,s),h=p[0],m=p[1]-p[2]-o*h;(h||m)&&gc(e,s)&&(d+=m,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(i&&0===d||!i&&a>d)||!u&&(i&&0===f||!i&&-a>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),c=t.useCallback((function(e){var t=e;if(kc.length&&kc[kc.length-1]===a){var r="deltaY"in t?bc(t):vc(t),i=n.current.filter((function(e){return e.name===t.type&&e.target===t.target&&(n=e.delta,i=r,n[0]===i[0]&&n[1]===i[1]);var n,i}))[0];if(i&&i.should)t.cancelable&&t.preventDefault();else if(!i){var o=(s.current.shards||[]).map(wc).filter(Boolean).filter((function(e){return e.contains(t.target)}));(o.length>0?l(t,o[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=t.useCallback((function(e,t,r,i){var o={name:e,delta:t,target:r,should:i};n.current.push(o),setTimeout((function(){n.current=n.current.filter((function(e){return e!==o}))}),1)}),[]),d=t.useCallback((function(e){r.current=vc(e),i.current=void 0}),[]),f=t.useCallback((function(t){u(t.type,bc(t),t.target,l(t,e.lockRef.current))}),[]),p=t.useCallback((function(t){u(t.type,vc(t),t.target,l(t,e.lockRef.current))}),[]);t.useEffect((function(){return kc.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,pc),document.addEventListener("touchmove",c,pc),document.addEventListener("touchstart",d,pc),function(){kc=kc.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,pc),document.removeEventListener("touchmove",c,pc),document.removeEventListener("touchstart",d,pc)}}),[]);var h=e.removeScrollBar,m=e.inert;return t.createElement(t.Fragment,null,m?t.createElement(a,{styles:xc(o)}):null,h?t.createElement(uc,{gapMode:"margin"}):null)},Kl.useMedium(Sc),tc);var Sc,Cc=t.forwardRef((function(e,n){return t.createElement(Jl,ot({},e,{ref:n,sideCar:Ec}))}));Cc.classNames=Jl.classNames;const Tc=Cc;var Ac=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Oc=new WeakMap,Pc=new WeakMap,Lc={},Rc=0,Mc=function(e){return e&&(e.host||Mc(e.parentNode))},Nc=function(e,t,n,r){var i=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Mc(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Lc[n]||(Lc[n]=new WeakMap);var o=Lc[n],a=[],s=new Set,l=new Set(i),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};i.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else{var t=e.getAttribute(r),i=null!==t&&"false"!==t,l=(Oc.get(e)||0)+1,c=(o.get(e)||0)+1;Oc.set(e,l),o.set(e,c),a.push(e),1===l&&i&&Pc.set(e,!0),1===c&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}}))};return u(t),s.clear(),Rc++,function(){a.forEach((function(e){var t=Oc.get(e)-1,i=o.get(e)-1;Oc.set(e,t),o.set(e,i),t||(Pc.has(e)||e.removeAttribute(r),Pc.delete(e)),i||e.removeAttribute(n)})),--Rc||(Oc=new WeakMap,Oc=new WeakMap,Pc=new WeakMap,Lc={})}},Ic=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ac(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Nc(r,i,n,"aria-hidden")):function(){return null}};const Dc="Dialog",[Bc,zc]=ol(Dc),[jc,Uc]=Bc(Dc),Fc=e=>{const{__scopeDialog:n,children:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=(0,t.useRef)(null),c=(0,t.useRef)(null),[u=!1,d]=ml({prop:i,defaultProp:o,onChange:a});return(0,t.createElement)(jc,{scope:n,triggerRef:l,contentRef:c,contentId:pl(),titleId:pl(),descriptionId:pl(),open:u,onOpenChange:d,onOpenToggle:(0,t.useCallback)((()=>d((e=>!e))),[d]),modal:s},r)},Wc="DialogTrigger",Hc=(0,t.forwardRef)(((e,n)=>{const{__scopeDialog:r,...i}=e,o=Uc(Wc,r),a=ll(n,o.triggerRef);return(0,t.createElement)(xl.button,tt({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":lu(o.open)},i,{ref:a,onClick:cl(e.onClick,o.onOpenToggle)}))})),Vc="DialogPortal",[qc,Gc]=Bc(Vc,{forceMount:void 0}),$c=e=>{const{__scopeDialog:n,forceMount:r,children:i,container:o}=e,a=Uc(Vc,n);return(0,t.createElement)(qc,{scope:n,forceMount:r},t.Children.map(i,(e=>(0,t.createElement)(Fl,{present:r||a.open},(0,t.createElement)(Ul,{asChild:!0,container:o},e)))))},Zc="DialogOverlay",Yc=(0,t.forwardRef)(((e,n)=>{const r=Gc(Zc,e.__scopeDialog),{forceMount:i=r.forceMount,...o}=e,a=Uc(Zc,e.__scopeDialog);return a.modal?(0,t.createElement)(Fl,{present:i||a.open},(0,t.createElement)(Xc,tt({},o,{ref:n}))):null})),Xc=(0,t.forwardRef)(((e,n)=>{const{__scopeDialog:r,...i}=e,o=Uc(Zc,r);return(0,t.createElement)(Tc,{as:gl,allowPinchZoom:!0,shards:[o.contentRef]},(0,t.createElement)(xl.div,tt({"data-state":lu(o.open)},i,{ref:n,style:{pointerEvents:"auto",...i.style}})))})),Kc="DialogContent",Qc=(0,t.forwardRef)(((e,n)=>{const r=Gc(Kc,e.__scopeDialog),{forceMount:i=r.forceMount,...o}=e,a=Uc(Kc,e.__scopeDialog);return(0,t.createElement)(Fl,{present:i||a.open},a.modal?(0,t.createElement)(Jc,tt({},o,{ref:n})):(0,t.createElement)(eu,tt({},o,{ref:n})))})),Jc=(0,t.forwardRef)(((e,n)=>{const r=Uc(Kc,e.__scopeDialog),i=(0,t.useRef)(null),o=ll(n,r.contentRef,i);return(0,t.useEffect)((()=>{const e=i.current;if(e)return Ic(e)}),[]),(0,t.createElement)(tu,tt({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:cl(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:cl(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:cl(e.onFocusOutside,(e=>e.preventDefault()))}))})),eu=(0,t.forwardRef)(((e,n)=>{const r=Uc(Kc,e.__scopeDialog),i=(0,t.useRef)(!1),o=(0,t.useRef)(!1);return(0,t.createElement)(tu,tt({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,a;(null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented)||(i.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());i.current=!1,o.current=!1},onInteractOutside:t=>{var n,a;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))})),tu=(0,t.forwardRef)(((e,n)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=Uc(Kc,r),c=ll(n,(0,t.useRef)(null));return Vl(),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Ml,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:a},(0,t.createElement)(Tl,tt({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":lu(l.open)},s,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)})),nu="DialogTitle",ru=(0,t.forwardRef)(((e,n)=>{const{__scopeDialog:r,...i}=e,o=Uc(nu,r);return(0,t.createElement)(xl.h2,tt({id:o.titleId},i,{ref:n}))})),iu="DialogDescription",ou=(0,t.forwardRef)(((e,n)=>{const{__scopeDialog:r,...i}=e,o=Uc(iu,r);return(0,t.createElement)(xl.p,tt({id:o.descriptionId},i,{ref:n}))})),au="DialogClose",su=(0,t.forwardRef)(((e,n)=>{const{__scopeDialog:r,...i}=e,o=Uc(au,r);return(0,t.createElement)(xl.button,tt({type:"button"},i,{ref:n,onClick:cl(e.onClick,(()=>o.onOpenChange(!1)))}))}));function lu(e){return e?"open":"closed"}const cu="DialogTitleWarning",[uu,du]=function(e,n){const r=(0,t.createContext)(n);function i(e){const{children:n,...i}=e,o=(0,t.useMemo)((()=>i),Object.values(i));return(0,t.createElement)(r.Provider,{value:o},n)}return i.displayName=e+"Provider",[i,function(i){const o=(0,t.useContext)(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${i}\` must be used within \`${e}\``)}]}(cu,{contentName:Kc,titleName:nu,docsSlug:"dialog"}),fu=Fc,pu=Hc,hu=$c,mu=Yc,gu=Qc,yu=ru,vu=ou,bu=su,wu="AlertDialog",[xu,_u]=ol(wu,[zc]),ku=zc(),Eu=e=>{const{__scopeAlertDialog:n,...r}=e,i=ku(n);return(0,t.createElement)(fu,tt({},i,r,{modal:!0}))},Su=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=ku(r);return(0,t.createElement)(pu,tt({},o,i,{ref:n}))})),Cu=e=>{const{__scopeAlertDialog:n,...r}=e,i=ku(n);return(0,t.createElement)(hu,tt({},i,r))},Tu=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=ku(r);return(0,t.createElement)(mu,tt({},o,i,{ref:n}))})),Au="AlertDialogContent",[Ou,Pu]=xu(Au),Lu=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,children:i,...o}=e,a=ku(r),s=ll(n,(0,t.useRef)(null)),l=(0,t.useRef)(null);return(0,t.createElement)(uu,{contentName:Au,titleName:Ru,docsSlug:"alert-dialog"},(0,t.createElement)(Ou,{scope:r,cancelRef:l},(0,t.createElement)(gu,tt({role:"alertdialog"},a,o,{ref:s,onOpenAutoFocus:cl(o.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=l.current)||void 0===t||t.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}),(0,t.createElement)(vl,null,i),!1)))})),Ru="AlertDialogTitle",Mu=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=ku(r);return(0,t.createElement)(yu,tt({},o,i,{ref:n}))})),Nu=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=ku(r);return(0,t.createElement)(vu,tt({},o,i,{ref:n}))})),Iu=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,...i}=e,o=ku(r);return(0,t.createElement)(bu,tt({},o,i,{ref:n}))})),Du="AlertDialogCancel",Bu=(0,t.forwardRef)(((e,n)=>{const{__scopeAlertDialog:r,...i}=e,{cancelRef:o}=Pu(Du,r),a=ku(r),s=ll(n,o);return(0,t.createElement)(bu,tt({},a,i,{ref:s}))})),zu=Eu,ju=Su,Uu=Cu,Fu=Tu,Wu=Lu,Hu=Iu,Vu=Bu,qu=Mu,Gu=Nu;function $u(e){return $u="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},$u(e)}function Zu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zu(Object(n),!0).forEach((function(t){Xu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xu(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==$u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==$u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$u(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ku(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ju=function(e){var n=Ku((0,t.useContext)(j),2),r=(n[0],n[1]),i=Ku((0,t.useState)("Test"),2),o=i[0],a=i[1],s=Ku((0,t.useState)("Description here"),2),l=s[0],c=s[1],u=Ku((0,t.useState)("Submit"),2),d=u[0],f=u[1],p=Ku((0,t.useState)("Cancel"),2),h=p[0],m=p[1],g=Ku((0,t.useState)((function(){})),2),y=g[0],v=g[1],b=Ku((0,t.useState)((function(){})),2),w=b[0],x=b[1],_=Ku((0,t.useState)(!1),2),k=_[0],E=_[1],S=Ku((0,t.useState)(null),2),C=S[0],T=S[1],A=Ku((0,t.useState)(null),2),O=A[0],P=A[1],L=Ku((0,t.useState)((function(){})),2),R=L[0],M=L[1],N=Ku((0,t.useState)(!1),2),I=N[0],D=N[1],B=Ku((0,t.useState)(!1),2),z=B[0],U=B[1],F=Ku((0,t.useState)((function(){})),2),W=F[0],H=F[1],V=(0,t.useCallback)((function(e,t,n,r,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,d=arguments.length>9&&void 0!==arguments[9]&&arguments[9],p=arguments.length>10&&void 0!==arguments[10]&&arguments[10],h=arguments.length>11&&void 0!==arguments[11]?arguments[11]:function(){};a(e),c(t),f(n),m(r),E(!0),v((function(){return i})),x((function(){return o})),T(s),P(l),M((function(){return u})),D(d),U(p),H((function(){return h}))}));return(0,t.useEffect)((function(){return r((function(e){return Yu(Yu({},e),{},{openModal:V})})),function(){r((function(e){return Yu(Yu({},e),{},{openModal:null})}))}}),[]),t.createElement(zu,{open:k,onOpenChange:function(e){E(e)}},t.createElement(ju,{asChild:!0}),t.createElement(Uu,null,t.createElement(Fu,{className:"AlertDialogOverlay"}),t.createElement(Wu,{className:"AlertDialogContent"},t.createElement(qu,{className:"AlertDialogTitle"},o),t.createElement(Gu,{className:"AlertDialogDescription"},l,O&&" ",O&&t.createElement("a",{href:"#",onClick:function(e){e.preventDefault(),e.stopPropagation(),R()},target:"_blank"},O)),C&&t.createElement("img",{src:C,style:{width:"100%",marginBottom:15,marginTop:5,borderRadius:"15px"}}),t.createElement("div",{style:{display:"flex",gap:12,justifyContent:"flex-end"}},z&&t.createElement("button",{className:"SideButtonModal",onClick:function(){W(),E(!1)}},z),h&&t.createElement(Vu,{asChild:!0},t.createElement("button",{className:"Button grey",onClick:function(){return w()}},h)),d&&t.createElement(Hu,{asChild:!0},t.createElement("button",{className:I?"Button blue":"Button red",onClick:function(){return y()}},d))))))};function ed(e){return ed="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},ed(e)}function td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?td(Object(n),!0).forEach((function(t){rd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rd(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==ed(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ed(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ed(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function id(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||od(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function od(e,t){if(e){if("string"==typeof e)return ad(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ad(e,t):void 0}}function ad(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const sd=function(){var e=id((0,t.useContext)(j),2),n=e[0],r=e[1],i=(0,t.useRef)(null),o=(0,t.useRef)("");return(0,t.useEffect)((function(){var e,t=!!(e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./))&&parseInt(e[2],10);t&&t>110?n.loadFFmpeg():r((function(e){return nd(nd({},e),{},{updateChrome:!0,ffmpeg:!0})}))}),[]),(0,t.useEffect)((function(){n.blob&&n.ffmpeg&&(n.frame||n.getFrame())}),[n.blob,n.ffmpeg]),(0,t.useEffect)((function(){if(i&&(i.current&&!(navigator.platform.toUpperCase().indexOf("MAC")>=0))){var e=i.current;e.querySelectorAll("*").forEach((function(e){e.classList.add("screenity-scrollbar")}));var t=new MutationObserver((function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=od(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("childList"===r.type){var i=Array.from(r.addedNodes),o=Array.from(r.removedNodes);i.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&e.classList.add("screenity-scrollbar")})),o.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&e.classList.remove("screenity-scrollbar")}))}}}catch(e){n.e(e)}finally{n.f()}}));return t.observe(e,{childList:!0,subtree:!0}),function(){t.disconnect()}}}),[i.current]),(0,t.useEffect)((function(){n.chunkCount>0&&(o.current="(".concat(Math.round(n.chunkIndex/n.chunkCount*100),"%)"))}),[n.chunkIndex,n.chunkCount]),t.createElement("div",{ref:i},t.createElement(Ju,null),t.createElement("video",null),n.ffmpeg&&n.ready&&"edit"===n.mode&&t.createElement(Zt,null),"edit"!=n.mode&&n.ready&&t.createElement(il,null),!n.ready&&t.createElement("div",{className:"wrap"},t.createElement("img",{className:"logo",src:"/assets/logo-text.svg"}),t.createElement("div",{className:"middle-area"},t.createElement("img",{src:"/assets/record-tab-active.svg"}),t.createElement("div",{className:"title"},chrome.i18n.getMessage("sandboxProgressTitle")+" "+o.current),t.createElement("div",{className:"subtitle"},chrome.i18n.getMessage("sandboxProgressDescription")),"function"==typeof n.openModal&&t.createElement("div",{className:"button-stop",onClick:function(){n.openModal(chrome.i18n.getMessage("havingIssuesModalTitle"),chrome.i18n.getMessage("havingIssuesModalDescription"),chrome.i18n.getMessage("restoreRecording"),chrome.i18n.getMessage("havingIssuesModalButton2"),(function(){chrome.runtime.sendMessage({type:"restore-recording"})}),(function(){chrome.runtime.sendMessage({type:"report-bug"})}))}},chrome.i18n.getMessage("havingIssuesButton")))),t.createElement("style",null,'\n\t\t\t\t\n\t\t\t\t.wrap {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t.setupBackgroundSVG {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 0px;\n\t\t\t\t\tleft: 0px;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tbackground: url(/assets/helper/pattern-svg.svg) repeat;\n\t\t\t\t\tbackground-size: 62px 23.5px;\n\t\t\t\t\tanimation: moveBackground 138s linear infinite;\n\t\t\t\t}\n\t\t\t\t.button-stop {\n\t\t\t\t\tpadding: 10px 20px;\n\t\t\t\t\tbackground: #FFF;\n\t\t\t\t\tborder-radius: 30px;\n\t\t\t\t\tcolor: #29292F;\n\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\tfont-weight: 500;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tmargin-top: 0px;\n\t\t\t\t\tborder: 1px solid #E8E8E8;\n\t\t\t\t\tmargin-left: auto;\n\t\t\t\t\tmargin-right: auto;\n\t\t\t\t\tz-index: 999999;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@keyframes moveBackground {\n\t\t\t\t\t0% {\n\t\t\t\t\t\tbackground-position: 0 0;\n\t\t\t\t\t}\n\t\t\t\t\t100% {\n\t\t\t\t\t\tbackground-position: 100% 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.logo {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tbottom: 30px;\n\t\t\t\t\tleft: 0px;\n\t\t\t\t\tright: 0px;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t\twidth: 120px;\n\t\t\t\t}\n\t\t\t\t.wrap {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tbackground-color: #F6F7FB;\n\t\t\t\t}\n\t\t\t\t\t.middle-area {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\tfont-family: Satoshi Medium, sans-serif;\n\t\t\t\t\t}\n\t\t\t\t\t.middle-area img {\n\t\t\t\t\t\twidth: 40px;\n\t\t\t\t\t\tmargin-bottom: 20px;\n\t\t\t\t\t}\n\t\t\t\t\t.title {\n\t\t\t\t\t\tfont-size: 24px;\n\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t\tcolor: #1A1A1A;\n\t\t\t\t\t\tmargin-bottom: 14px;\n\t\t\t\t\t\tfont-family: Satoshi-Medium, sans-serif;\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\t\t\t\t\t.subtitle {\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\tcolor: #6E7684;\n\t\t\t\t\t\tmargin-bottom: 24px;\n\t\t\t\t\t\tfont-family: Satoshi-Medium, sans-serif;\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\n\n.screenity-scrollbar *::-webkit-scrollbar, .screenity-scrollbar::-webkit-scrollbar {\n background-color: rgba(0,0,0,0);\n width: 16px;\n height: 16px;\n z-index: 999999;\n}\n.screenity-scrollbar *::-webkit-scrollbar-track, .screenity-scrollbar::-webkit-scrollbar-track {\n background-color: rgba(0,0,0,0);\n}\n.screenity-scrollbar *::-webkit-scrollbar-thumb, .screenity-scrollbar::-webkit-scrollbar-thumb {\n background-color: rgba(0,0,0,0);\n border-radius:16px;\n border:0px solid #fff;\n}\n.screenity-scrollbar *::-webkit-scrollbar-button, .screenity-scrollbar::-webkit-scrollbar-button {\n display:none;\n}\n.screenity-scrollbar *:hover::-webkit-scrollbar-thumb, .screenity-scrollbar:hover::-webkit-scrollbar-thumb {\n background-color: #a0a0a5;\n border:4px solid #fff;\n}\n::-webkit-scrollbar-thumb *:hover, ::-webkit-scrollbar-thumb:hover {\n background-color:#a0a0a5;\n border:4px solid #f4f4f4\n}\n.videoBanner {\n\theight: 40px!important;\n\twidth: 100%!important;\n\tposition: absolute!important;\n\ttop: 0px!important;\n\tleft: 0px!important;\n\tbackground-color: #3080F8!important;\n\tcolor: #FFF!important;\n\tfont-family: "Satoshi-Medium"!important;\n\tz-index: 99999999999!important;\n\ttext-align: center!important;\n\tdisplay: flex!important;\n\talign-items: center!important;\n\tjustify-content: center!important;\n\tflex-direction: row!important;\n\tgap: 6px!important;\n}\n\t\t\t\t\t\n\t\t\t\t\t'))};(0,r.render)(t.createElement(U,null,t.createElement(sd,null)),window.document.querySelector("#app-container"))})()})(); |