hyperframes 0.8.30 → 0.8.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,7 @@ var jOe=Object.defineProperty;var LOe=(t,e,n)=>e in t?jOe(t,e,{enumerable:!0,con
46
46
  `+Ee[D].replace(" at new "," at ");return g.displayName&&Ze.includes("<anonymous>")&&(Ze=Ze.replace("<anonymous>",g.displayName)),Ze}while(1<=D&&0<=B);break}}}finally{me=!1,Error.prepareStackTrace=k}return(k=g?g.displayName||g.name:"")?fe(k):""}function ve(g,A){switch(g.tag){case 26:case 27:case 5:return fe(g.type);case 16:return fe("Lazy");case 13:return g.child!==A&&A!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return Te(g.type,!1);case 11:return Te(g.type.render,!1);case 1:return Te(g.type,!0);case 31:return fe("Activity");default:return""}}function xe(g){try{var A="",k=null;do A+=ve(g,k),k=g,g=g.return;while(g);return A}catch(D){return`
47
47
  Error generating stack: `+D.message+`
48
48
  `+D.stack}}var we=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Qe=t.unstable_shouldYield,qe=t.unstable_requestPaint,Ge=t.unstable_now,Ye=t.unstable_getCurrentPriorityLevel,st=t.unstable_ImmediatePriority,nt=t.unstable_UserBlockingPriority,yt=t.unstable_NormalPriority,dt=t.unstable_LowPriority,zt=t.unstable_IdlePriority,Kt=t.log,dn=t.unstable_setDisableYieldValue,en=null,et=null;function Ot(g){if(typeof Kt=="function"&&dn(g),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(en,g)}catch{}}var St=Math.clz32?Math.clz32:We,Je=Math.log,Be=Math.LN2;function We(g){return g>>>=0,g===0?32:31-(Je(g)/Be|0)|0}var Ke=256,Xt=262144,Pe=4194304;function De(g){var A=g&42;if(A!==0)return A;switch(g&-g){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return g&261888;case 262144:case 524288:case 1048576:case 2097152:return g&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return g&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return g}}function ze(g,A,k){var D=g.pendingLanes;if(D===0)return 0;var B=0,Z=g.suspendedLanes,oe=g.pingedLanes;g=g.warmLanes;var pe=D&134217727;return pe!==0?(D=pe&~Z,D!==0?B=De(D):(oe&=pe,oe!==0?B=De(oe):k||(k=pe&~g,k!==0&&(B=De(k))))):(pe=D&~Z,pe!==0?B=De(pe):oe!==0?B=De(oe):k||(k=D&~g,k!==0&&(B=De(k)))),B===0?0:A!==0&&A!==B&&(A&Z)===0&&(Z=B&-B,k=A&-A,Z>=k||Z===32&&(k&4194048)!==0)?A:B}function at(g,A){return(g.pendingLanes&~(g.suspendedLanes&~g.pingedLanes)&A)===0}function Wt(g,A){switch(g){case 1:case 2:case 4:case 8:case 64:return A+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return A+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cn(){var g=Pe;return Pe<<=1,(Pe&62914560)===0&&(Pe=4194304),g}function Jt(g){for(var A=[],k=0;31>k;k++)A.push(g);return A}function Pn(g,A){g.pendingLanes|=A,A!==268435456&&(g.suspendedLanes=0,g.pingedLanes=0,g.warmLanes=0)}function Cr(g,A,k,D,B,Z){var oe=g.pendingLanes;g.pendingLanes=k,g.suspendedLanes=0,g.pingedLanes=0,g.warmLanes=0,g.expiredLanes&=k,g.entangledLanes&=k,g.errorRecoveryDisabledLanes&=k,g.shellSuspendCounter=0;var pe=g.entanglements,Ee=g.expirationTimes,Le=g.hiddenUpdates;for(k=oe&~k;0<k;){var Ze=31-St(k),Xe=1<<Ze;pe[Ze]=0,Ee[Ze]=-1;var Fe=Le[Ze];if(Fe!==null)for(Le[Ze]=null,Ze=0;Ze<Fe.length;Ze++){var Ve=Fe[Ze];Ve!==null&&(Ve.lane&=-536870913)}k&=~Xe}D!==0&&mt(g,D,0),Z!==0&&B===0&&g.tag!==0&&(g.suspendedLanes|=Z&~(oe&~A))}function mt(g,A,k){g.pendingLanes|=A,g.suspendedLanes&=~A;var D=31-St(A);g.entangledLanes|=A,g.entanglements[D]=g.entanglements[D]|1073741824|k&261930}function pn(g,A){var k=g.entangledLanes|=A;for(g=g.entanglements;k;){var D=31-St(k),B=1<<D;B&A|g[D]&A&&(g[D]|=A),k&=~B}}function un(g,A){var k=A&-A;return k=(k&42)!==0?1:Cn(k),(k&(g.suspendedLanes|A))!==0?0:k}function Cn(g){switch(g){case 2:g=1;break;case 8:g=4;break;case 32:g=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:g=128;break;case 268435456:g=134217728;break;default:g=0}return g}function Ln(g){return g&=-g,2<g?8<g?(g&134217727)!==0?32:268435456:8:2}function tt(){var g=J.p;return g!==0?g:(g=window.event,g===void 0?32:SZ(g.type))}function Yn(g,A){var k=J.p;try{return J.p=g,A()}finally{J.p=k}}var Pt=Math.random().toString(36).slice(2),mn="__reactFiber$"+Pt,Ht="__reactProps$"+Pt,gn="__reactContainer$"+Pt,tr="__reactEvents$"+Pt,_n="__reactListeners$"+Pt,br="__reactHandles$"+Pt,nr="__reactResources$"+Pt,bt="__reactMarker$"+Pt;function or(g){delete g[mn],delete g[Ht],delete g[tr],delete g[_n],delete g[br]}function wn(g){var A=g[mn];if(A)return A;for(var k=g.parentNode;k;){if(A=k[gn]||k[mn]){if(k=A.alternate,A.child!==null||k!==null&&k.child!==null)for(g=aZ(g);g!==null;){if(k=g[mn])return k;g=aZ(g)}return A}g=k,k=g.parentNode}return null}function Rn(g){if(g=g[mn]||g[gn]){var A=g.tag;if(A===5||A===6||A===13||A===31||A===26||A===27||A===3)return g}return null}function wt(g){var A=g.tag;if(A===5||A===26||A===27||A===6)return g.stateNode;throw Error(r(33))}function Zt(g){var A=g[nr];return A||(A=g[nr]={hoistableStyles:new Map,hoistableScripts:new Map}),A}function Ct(g){g[bt]=!0}var fr=new Set,Nt={};function kt(g,A){xn(g,A),xn(g+"Capture",A)}function xn(g,A){for(Nt[g]=A,g=0;g<A.length;g++)fr.add(A[g])}var Rt=RegExp("^[: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]*$"),sn={},ds={};function Fn(g){return we.call(ds,g)?!0:we.call(sn,g)?!1:Rt.test(g)?ds[g]=!0:(sn[g]=!0,!1)}function ri(g,A,k){if(Fn(A))if(k===null)g.removeAttribute(A);else{switch(typeof k){case"undefined":case"function":case"symbol":g.removeAttribute(A);return;case"boolean":var D=A.toLowerCase().slice(0,5);if(D!=="data-"&&D!=="aria-"){g.removeAttribute(A);return}}g.setAttribute(A,""+k)}}function fn(g,A,k){if(k===null)g.removeAttribute(A);else{switch(typeof k){case"undefined":case"function":case"symbol":case"boolean":g.removeAttribute(A);return}g.setAttribute(A,""+k)}}function En(g,A,k,D){if(D===null)g.removeAttribute(k);else{switch(typeof D){case"undefined":case"function":case"symbol":case"boolean":g.removeAttribute(k);return}g.setAttributeNS(A,k,""+D)}}function rr(g){switch(typeof g){case"bigint":case"boolean":case"number":case"string":case"undefined":return g;case"object":return g;default:return""}}function Ti(g){var A=g.type;return(g=g.nodeName)&&g.toLowerCase()==="input"&&(A==="checkbox"||A==="radio")}function Jr(g,A,k){var D=Object.getOwnPropertyDescriptor(g.constructor.prototype,A);if(!g.hasOwnProperty(A)&&typeof D<"u"&&typeof D.get=="function"&&typeof D.set=="function"){var B=D.get,Z=D.set;return Object.defineProperty(g,A,{configurable:!0,get:function(){return B.call(this)},set:function(oe){k=""+oe,Z.call(this,oe)}}),Object.defineProperty(g,A,{enumerable:D.enumerable}),{getValue:function(){return k},setValue:function(oe){k=""+oe},stopTracking:function(){g._valueTracker=null,delete g[A]}}}}function $i(g){if(!g._valueTracker){var A=Ti(g)?"checked":"value";g._valueTracker=Jr(g,A,""+g[A])}}function ps(g){if(!g)return!1;var A=g._valueTracker;if(!A)return!0;var k=A.getValue(),D="";return g&&(D=Ti(g)?g.checked?"true":"false":g.value),g=D,g!==k?(A.setValue(g),!0):!1}function Dr(g){if(g=g||(typeof document<"u"?document:void 0),typeof g>"u")return null;try{return g.activeElement||g.body}catch{return g.body}}var Za=/[\n"\\]/g;function bi(g){return g.replace(Za,function(A){return"\\"+A.charCodeAt(0).toString(16)+" "})}function Oa(g,A,k,D,B,Z,oe,pe){g.name="",oe!=null&&typeof oe!="function"&&typeof oe!="symbol"&&typeof oe!="boolean"?g.type=oe:g.removeAttribute("type"),A!=null?oe==="number"?(A===0&&g.value===""||g.value!=A)&&(g.value=""+rr(A)):g.value!==""+rr(A)&&(g.value=""+rr(A)):oe!=="submit"&&oe!=="reset"||g.removeAttribute("value"),A!=null?Ae(g,oe,rr(A)):k!=null?Ae(g,oe,rr(k)):D!=null&&g.removeAttribute("value"),B==null&&Z!=null&&(g.defaultChecked=!!Z),B!=null&&(g.checked=B&&typeof B!="function"&&typeof B!="symbol"),pe!=null&&typeof pe!="function"&&typeof pe!="symbol"&&typeof pe!="boolean"?g.name=""+rr(pe):g.removeAttribute("name")}function ft(g,A,k,D,B,Z,oe,pe){if(Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"&&(g.type=Z),A!=null||k!=null){if(!(Z!=="submit"&&Z!=="reset"||A!=null)){$i(g);return}k=k!=null?""+rr(k):"",A=A!=null?""+rr(A):k,pe||A===g.value||(g.value=A),g.defaultValue=A}D=D??B,D=typeof D!="function"&&typeof D!="symbol"&&!!D,g.checked=pe?g.checked:!!D,g.defaultChecked=!!D,oe!=null&&typeof oe!="function"&&typeof oe!="symbol"&&typeof oe!="boolean"&&(g.name=oe),$i(g)}function Ae(g,A,k){A==="number"&&Dr(g.ownerDocument)===g||g.defaultValue===""+k||(g.defaultValue=""+k)}function _e(g,A,k,D){if(g=g.options,A){A={};for(var B=0;B<k.length;B++)A["$"+k[B]]=!0;for(k=0;k<g.length;k++)B=A.hasOwnProperty("$"+g[k].value),g[k].selected!==B&&(g[k].selected=B),B&&D&&(g[k].defaultSelected=!0)}else{for(k=""+rr(k),A=null,B=0;B<g.length;B++){if(g[B].value===k){g[B].selected=!0,D&&(g[B].defaultSelected=!0);return}A!==null||g[B].disabled||(A=g[B])}A!==null&&(A.selected=!0)}}function lt(g,A,k){if(A!=null&&(A=""+rr(A),A!==g.value&&(g.value=A),k==null)){g.defaultValue!==A&&(g.defaultValue=A);return}g.defaultValue=k!=null?""+rr(k):""}function At(g,A,k,D){if(A==null){if(D!=null){if(k!=null)throw Error(r(92));if(q(D)){if(1<D.length)throw Error(r(93));D=D[0]}k=D}k==null&&(k=""),A=k}k=rr(A),g.defaultValue=k,D=g.textContent,D===k&&D!==""&&D!==null&&(g.value=D),$i(g)}function tn(g,A){if(A){var k=g.firstChild;if(k&&k===g.lastChild&&k.nodeType===3){k.nodeValue=A;return}}g.textContent=A}var Mn=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Vr(g,A,k){var D=A.indexOf("--")===0;k==null||typeof k=="boolean"||k===""?D?g.setProperty(A,""):A==="float"?g.cssFloat="":g[A]="":D?g.setProperty(A,k):typeof k!="number"||k===0||Mn.has(A)?A==="float"?g.cssFloat=k:g[A]=(""+k).trim():g[A]=k+"px"}function lr(g,A,k){if(A!=null&&typeof A!="object")throw Error(r(62));if(g=g.style,k!=null){for(var D in k)!k.hasOwnProperty(D)||A!=null&&A.hasOwnProperty(D)||(D.indexOf("--")===0?g.setProperty(D,""):D==="float"?g.cssFloat="":g[D]="");for(var B in A)D=A[B],A.hasOwnProperty(B)&&k[B]!==D&&Vr(g,B,D)}else for(var Z in A)A.hasOwnProperty(Z)&&Vr(g,Z,A[Z])}function vi(g){if(g.indexOf("-")===-1)return!1;switch(g){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}}var ms=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ec=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Hr(g){return ec.test(""+g)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":g}function Ss(){}var Zc=null;function Vu(g){return g=g.target||g.srcElement||window,g.correspondingUseElement&&(g=g.correspondingUseElement),g.nodeType===3?g.parentNode:g}var ka=null,Ca=null;function Gc(g){var A=Rn(g);if(A&&(g=A.stateNode)){var k=g[Ht]||null;e:switch(g=A.stateNode,A.type){case"input":if(Oa(g,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name),A=k.name,k.type==="radio"&&A!=null){for(k=g;k.parentNode;)k=k.parentNode;for(k=k.querySelectorAll('input[name="'+bi(""+A)+'"][type="radio"]'),A=0;A<k.length;A++){var D=k[A];if(D!==g&&D.form===g.form){var B=D[Ht]||null;if(!B)throw Error(r(90));Oa(D,B.value,B.defaultValue,B.defaultValue,B.checked,B.defaultChecked,B.type,B.name)}}for(A=0;A<k.length;A++)D=k[A],D.form===g.form&&ps(D)}break e;case"textarea":lt(g,k.value,k.defaultValue);break e;case"select":A=k.value,A!=null&&_e(g,!!k.multiple,A,!1)}}}var Hu=!1;function tc(g,A,k){if(Hu)return g(A,k);Hu=!0;try{var D=g(A);return D}finally{if(Hu=!1,(ka!==null||Ca!==null)&&(AO(),ka&&(A=ka,g=Ca,Ca=ka=null,Gc(A),g)))for(A=0;A<g.length;A++)Gc(g[A])}}function nc(g,A){var k=g.stateNode;if(k===null)return null;var D=k[Ht]||null;if(D===null)return null;k=D[A];e:switch(A){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(D=!D.disabled)||(g=g.type,D=!(g==="button"||g==="input"||g==="select"||g==="textarea")),g=!D;break e;default:g=!1}if(g)return null;if(k&&typeof k!="function")throw Error(r(231,A,typeof k));return k}var js=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qu=!1;if(js)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){Qu=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{Qu=!1}var gt=null,Gt=null,gr=null;function ws(){if(gr)return gr;var g,A=Gt,k=A.length,D,B="value"in gt?gt.value:gt.textContent,Z=B.length;for(g=0;g<k&&A[g]===B[g];g++);var oe=k-g;for(D=1;D<=oe&&A[k-D]===B[Z-D];D++);return gr=B.slice(g,1<D?1-D:void 0)}function Bi(g){var A=g.keyCode;return"charCode"in g?(g=g.charCode,g===0&&A===13&&(g=13)):g=A,g===10&&(g=13),32<=g||g===13?g:0}function Ea(){return!0}function mm(){return!1}function Ls(g){function A(k,D,B,Z,oe){this._reactName=k,this._targetInst=B,this.type=D,this.nativeEvent=Z,this.target=oe,this.currentTarget=null;for(var pe in g)g.hasOwnProperty(pe)&&(k=g[pe],this[pe]=k?k(Z):Z[pe]);return this.isDefaultPrevented=(Z.defaultPrevented!=null?Z.defaultPrevented:Z.returnValue===!1)?Ea:mm,this.isPropagationStopped=mm,this}return f(A.prototype,{preventDefault:function(){this.defaultPrevented=!0;var k=this.nativeEvent;k&&(k.preventDefault?k.preventDefault():typeof k.returnValue!="unknown"&&(k.returnValue=!1),this.isDefaultPrevented=Ea)},stopPropagation:function(){var k=this.nativeEvent;k&&(k.stopPropagation?k.stopPropagation():typeof k.cancelBubble!="unknown"&&(k.cancelBubble=!0),this.isPropagationStopped=Ea)},persist:function(){},isPersistent:Ea}),A}var zu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(g){return g.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sp=Ls(zu),vh=f({},zu,{view:0,detail:0}),T5=Ls(vh),ix,gm,Ah,ym=f({},vh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xm,button:0,buttons:0,relatedTarget:function(g){return g.relatedTarget===void 0?g.fromElement===g.srcElement?g.toElement:g.fromElement:g.relatedTarget},movementX:function(g){return"movementX"in g?g.movementX:(g!==Ah&&(Ah&&g.type==="mousemove"?(ix=g.screenX-Ah.screenX,gm=g.screenY-Ah.screenY):gm=ix=0,Ah=g),ix)},movementY:function(g){return"movementY"in g?g.movementY:gm}}),sx=Ls(ym),P5=f({},ym,{dataTransfer:0}),M5=Ls(P5),ax=f({},vh,{relatedTarget:0}),ox=Ls(ax),N5=f({},zu,{animationName:0,elapsedTime:0,pseudoElement:0}),lx=Ls(N5),D5=f({},zu,{clipboardData:function(g){return"clipboardData"in g?g.clipboardData:window.clipboardData}}),I5=Ls(D5),Pw=f({},zu,{data:0}),Mw=Ls(Pw),_5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R5={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"},j5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ap(g){var A=this.nativeEvent;return A.getModifierState?A.getModifierState(g):(g=j5[g])?!!A[g]:!1}function xm(){return ap}var L5=f({},vh,{key:function(g){if(g.key){var A=_5[g.key]||g.key;if(A!=="Unidentified")return A}return g.type==="keypress"?(g=Bi(g),g===13?"Enter":String.fromCharCode(g)):g.type==="keydown"||g.type==="keyup"?R5[g.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xm,charCode:function(g){return g.type==="keypress"?Bi(g):0},keyCode:function(g){return g.type==="keydown"||g.type==="keyup"?g.keyCode:0},which:function(g){return g.type==="keypress"?Bi(g):g.type==="keydown"||g.type==="keyup"?g.keyCode:0}}),re=Ls(L5),T=f({},ym,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),S=Ls(T),P=f({},vh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xm}),R=Ls(P),X=f({},zu,{propertyName:0,elapsedTime:0,pseudoElement:0}),le=Ls(X),ue=f({},ym,{deltaX:function(g){return"deltaX"in g?g.deltaX:"wheelDeltaX"in g?-g.wheelDeltaX:0},deltaY:function(g){return"deltaY"in g?g.deltaY:"wheelDeltaY"in g?-g.wheelDeltaY:"wheelDelta"in g?-g.wheelDelta:0},deltaZ:0,deltaMode:0}),be=Ls(ue),Se=f({},zu,{newState:0,oldState:0}),Ce=Ls(Se),$e=[9,13,27,32],rt=js&&"CompositionEvent"in window,ot=null;js&&"documentMode"in document&&(ot=document.documentMode);var Mt=js&&"TextEvent"in window&&!ot,Vn=js&&(!rt||ot&&8<ot&&11>=ot),Er=" ",yn=!1;function vr(g,A){switch(g){case"keyup":return $e.indexOf(A.keyCode)!==-1;case"keydown":return A.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uc(g){return g=g.detail,typeof g=="object"&&"data"in g?g.data:null}var Ta=!1;function Nw(g,A){switch(g){case"compositionend":return Uc(A);case"keypress":return A.which!==32?null:(yn=!0,Er);case"textInput":return g=A.data,g===Er&&yn?null:g;default:return null}}function Dw(g,A){if(Ta)return g==="compositionend"||!rt&&vr(g,A)?(g=ws(),gr=Gt=gt=null,Ta=!1,g):null;switch(g){case"paste":return null;case"keypress":if(!(A.ctrlKey||A.altKey||A.metaKey)||A.ctrlKey&&A.altKey){if(A.char&&1<A.char.length)return A.char;if(A.which)return String.fromCharCode(A.which)}return null;case"compositionend":return Vn&&A.locale!=="ko"?null:A.data;default:return null}}var Iw={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 cx(g){var A=g&&g.nodeName&&g.nodeName.toLowerCase();return A==="input"?!!Iw[g.type]:A==="textarea"}function ux(g,A,k,D){ka?Ca?Ca.push(D):Ca=[D]:ka=D,A=TO(A,"onChange"),0<A.length&&(k=new sp("onChange","change",null,k,D),g.push({event:k,listeners:A}))}var Sh=null,wh=null;function _w(g){Gz(g,0)}function op(g){var A=wt(g);if(ps(A))return g}function fx(g,A){if(g==="change")return A}var hx=!1;if(js){var bm;if(js){var vm="oninput"in document;if(!vm){var dx=document.createElement("div");dx.setAttribute("oninput","return;"),vm=typeof dx.oninput=="function"}bm=vm}else bm=!1;hx=bm&&(!document.documentMode||9<document.documentMode)}function px(){Sh&&(Sh.detachEvent("onpropertychange",mx),wh=Sh=null)}function mx(g){if(g.propertyName==="value"&&op(wh)){var A=[];ux(A,wh,g,Vu(g)),tc(_w,A)}}function Rw(g,A,k){g==="focusin"?(px(),Sh=A,wh=k,Sh.attachEvent("onpropertychange",mx)):g==="focusout"&&px()}function jw(g){if(g==="selectionchange"||g==="keyup"||g==="keydown")return op(wh)}function Lw(g,A){if(g==="click")return op(A)}function Fw(g,A){if(g==="input"||g==="change")return op(A)}function $w(g,A){return g===A&&(g!==0||1/g===1/A)||g!==g&&A!==A}var ra=typeof Object.is=="function"?Object.is:$w;function Oh(g,A){if(ra(g,A))return!0;if(typeof g!="object"||g===null||typeof A!="object"||A===null)return!1;var k=Object.keys(g),D=Object.keys(A);if(k.length!==D.length)return!1;for(D=0;D<k.length;D++){var B=k[D];if(!we.call(A,B)||!ra(g[B],A[B]))return!1}return!0}function gx(g){for(;g&&g.firstChild;)g=g.firstChild;return g}function yx(g,A){var k=gx(g);g=0;for(var D;k;){if(k.nodeType===3){if(D=g+k.textContent.length,g<=A&&D>=A)return{node:k,offset:A-g};g=D}e:{for(;k;){if(k.nextSibling){k=k.nextSibling;break e}k=k.parentNode}k=void 0}k=gx(k)}}function xx(g,A){return g&&A?g===A?!0:g&&g.nodeType===3?!1:A&&A.nodeType===3?xx(g,A.parentNode):"contains"in g?g.contains(A):g.compareDocumentPosition?!!(g.compareDocumentPosition(A)&16):!1:!1}function bx(g){g=g!=null&&g.ownerDocument!=null&&g.ownerDocument.defaultView!=null?g.ownerDocument.defaultView:window;for(var A=Dr(g.document);A instanceof g.HTMLIFrameElement;){try{var k=typeof A.contentWindow.location.href=="string"}catch{k=!1}if(k)g=A.contentWindow;else break;A=Dr(g.document)}return A}function Am(g){var A=g&&g.nodeName&&g.nodeName.toLowerCase();return A&&(A==="input"&&(g.type==="text"||g.type==="search"||g.type==="tel"||g.type==="url"||g.type==="password")||A==="textarea"||g.contentEditable==="true")}var Bw=js&&"documentMode"in document&&11>=document.documentMode,Zu=null,F5=null,vx=null,$5=!1;function vH(g,A,k){var D=k.window===k?k.document:k.nodeType===9?k:k.ownerDocument;$5||Zu==null||Zu!==Dr(D)||(D=Zu,"selectionStart"in D&&Am(D)?D={start:D.selectionStart,end:D.selectionEnd}:(D=(D.ownerDocument&&D.ownerDocument.defaultView||window).getSelection(),D={anchorNode:D.anchorNode,anchorOffset:D.anchorOffset,focusNode:D.focusNode,focusOffset:D.focusOffset}),vx&&Oh(vx,D)||(vx=D,D=TO(F5,"onSelect"),0<D.length&&(A=new sp("onSelect","select",null,A,k),g.push({event:A,listeners:D}),A.target=Zu)))}function lp(g,A){var k={};return k[g.toLowerCase()]=A.toLowerCase(),k["Webkit"+g]="webkit"+A,k["Moz"+g]="moz"+A,k}var Sm={animationend:lp("Animation","AnimationEnd"),animationiteration:lp("Animation","AnimationIteration"),animationstart:lp("Animation","AnimationStart"),transitionrun:lp("Transition","TransitionRun"),transitionstart:lp("Transition","TransitionStart"),transitioncancel:lp("Transition","TransitionCancel"),transitionend:lp("Transition","TransitionEnd")},B5={},AH={};js&&(AH=document.createElement("div").style,"AnimationEvent"in window||(delete Sm.animationend.animation,delete Sm.animationiteration.animation,delete Sm.animationstart.animation),"TransitionEvent"in window||delete Sm.transitionend.transition);function cp(g){if(B5[g])return B5[g];if(!Sm[g])return g;var A=Sm[g],k;for(k in A)if(A.hasOwnProperty(k)&&k in AH)return B5[g]=A[k];return g}var SH=cp("animationend"),wH=cp("animationiteration"),OH=cp("animationstart"),gwe=cp("transitionrun"),ywe=cp("transitionstart"),xwe=cp("transitioncancel"),kH=cp("transitionend"),CH=new Map,V5="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");V5.push("scrollEnd");function rc(g,A){CH.set(g,A),kt(A,[g])}var Vw=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var A=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(A))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},dl=[],wm=0,H5=0;function Hw(){for(var g=wm,A=H5=wm=0;A<g;){var k=dl[A];dl[A++]=null;var D=dl[A];dl[A++]=null;var B=dl[A];dl[A++]=null;var Z=dl[A];if(dl[A++]=null,D!==null&&B!==null){var oe=D.pending;oe===null?B.next=B:(B.next=oe.next,oe.next=B),D.pending=B}Z!==0&&EH(k,B,Z)}}function Qw(g,A,k,D){dl[wm++]=g,dl[wm++]=A,dl[wm++]=k,dl[wm++]=D,H5|=D,g.lanes|=D,g=g.alternate,g!==null&&(g.lanes|=D)}function Q5(g,A,k,D){return Qw(g,A,k,D),zw(g)}function up(g,A){return Qw(g,null,null,A),zw(g)}function EH(g,A,k){g.lanes|=k;var D=g.alternate;D!==null&&(D.lanes|=k);for(var B=!1,Z=g.return;Z!==null;)Z.childLanes|=k,D=Z.alternate,D!==null&&(D.childLanes|=k),Z.tag===22&&(g=Z.stateNode,g===null||g._visibility&1||(B=!0)),g=Z,Z=Z.return;return g.tag===3?(Z=g.stateNode,B&&A!==null&&(B=31-St(k),g=Z.hiddenUpdates,D=g[B],D===null?g[B]=[A]:D.push(A),A.lane=k|536870912),Z):null}function zw(g){if(50<Hx)throw Hx=0,KT=null,Error(r(185));for(var A=g.return;A!==null;)g=A,A=g.return;return g.tag===3?g.stateNode:null}var Om={};function bwe(g,A,k,D){this.tag=g,this.key=k,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=A,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=D,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Co(g,A,k,D){return new bwe(g,A,k,D)}function z5(g){return g=g.prototype,!(!g||!g.isReactComponent)}function Gu(g,A){var k=g.alternate;return k===null?(k=Co(g.tag,A,g.key,g.mode),k.elementType=g.elementType,k.type=g.type,k.stateNode=g.stateNode,k.alternate=g,g.alternate=k):(k.pendingProps=A,k.type=g.type,k.flags=0,k.subtreeFlags=0,k.deletions=null),k.flags=g.flags&65011712,k.childLanes=g.childLanes,k.lanes=g.lanes,k.child=g.child,k.memoizedProps=g.memoizedProps,k.memoizedState=g.memoizedState,k.updateQueue=g.updateQueue,A=g.dependencies,k.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext},k.sibling=g.sibling,k.index=g.index,k.ref=g.ref,k.refCleanup=g.refCleanup,k}function TH(g,A){g.flags&=65011714;var k=g.alternate;return k===null?(g.childLanes=0,g.lanes=A,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=k.childLanes,g.lanes=k.lanes,g.child=k.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=k.memoizedProps,g.memoizedState=k.memoizedState,g.updateQueue=k.updateQueue,g.type=k.type,A=k.dependencies,g.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext}),g}function Zw(g,A,k,D,B,Z){var oe=0;if(D=g,typeof g=="function")z5(g)&&(oe=1);else if(typeof g=="string")oe=OOe(g,k,Q.current)?26:g==="html"||g==="head"||g==="body"?27:5;else e:switch(g){case I:return g=Co(31,k,A,B),g.elementType=I,g.lanes=Z,g;case p:return fp(k.children,B,Z,A);case v:oe=8,B|=24;break;case b:return g=Co(12,k,A,B|2),g.elementType=b,g.lanes=Z,g;case E:return g=Co(13,k,A,B),g.elementType=E,g.lanes=Z,g;case M:return g=Co(19,k,A,B),g.elementType=M,g.lanes=Z,g;default:if(typeof g=="object"&&g!==null)switch(g.$$typeof){case O:oe=10;break e;case w:oe=9;break e;case C:oe=11;break e;case N:oe=14;break e;case _:oe=16,D=null;break e}oe=29,k=Error(r(130,g===null?"null":typeof g,"")),D=null}return A=Co(oe,k,A,B),A.elementType=g,A.type=D,A.lanes=Z,A}function fp(g,A,k,D){return g=Co(7,g,D,A),g.lanes=k,g}function Z5(g,A,k){return g=Co(6,g,null,A),g.lanes=k,g}function PH(g){var A=Co(18,null,null,0);return A.stateNode=g,A}function G5(g,A,k){return A=Co(4,g.children!==null?g.children:[],g.key,A),A.lanes=k,A.stateNode={containerInfo:g.containerInfo,pendingChildren:null,implementation:g.implementation},A}var MH=new WeakMap;function pl(g,A){if(typeof g=="object"&&g!==null){var k=MH.get(g);return k!==void 0?k:(A={value:g,source:A,stack:xe(A)},MH.set(g,A),A)}return{value:g,source:A,stack:xe(A)}}var km=[],Cm=0,Gw=null,Ax=0,ml=[],gl=0,kh=null,Xc=1,Wc="";function Uu(g,A){km[Cm++]=Ax,km[Cm++]=Gw,Gw=g,Ax=A}function NH(g,A,k){ml[gl++]=Xc,ml[gl++]=Wc,ml[gl++]=kh,kh=g;var D=Xc;g=Wc;var B=32-St(D)-1;D&=~(1<<B),k+=1;var Z=32-St(A)+B;if(30<Z){var oe=B-B%5;Z=(D&(1<<oe)-1).toString(32),D>>=oe,B-=oe,Xc=1<<32-St(A)+B|k<<B|D,Wc=Z+g}else Xc=1<<Z|k<<B|D,Wc=g}function U5(g){g.return!==null&&(Uu(g,1),NH(g,1,0))}function X5(g){for(;g===Gw;)Gw=km[--Cm],km[Cm]=null,Ax=km[--Cm],km[Cm]=null;for(;g===kh;)kh=ml[--gl],ml[gl]=null,Wc=ml[--gl],ml[gl]=null,Xc=ml[--gl],ml[gl]=null}function DH(g,A){ml[gl++]=Xc,ml[gl++]=Wc,ml[gl++]=kh,Xc=A.id,Wc=A.overflow,kh=g}var Fs=null,ii=null,Kn=!1,Ch=null,yl=!1,W5=Error(r(519));function Eh(g){var A=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Sx(pl(A,g)),W5}function IH(g){var A=g.stateNode,k=g.type,D=g.memoizedProps;switch(A[mn]=g,A[Ht]=D,k){case"dialog":Qn("cancel",A),Qn("close",A);break;case"iframe":case"object":case"embed":Qn("load",A);break;case"video":case"audio":for(k=0;k<zx.length;k++)Qn(zx[k],A);break;case"source":Qn("error",A);break;case"img":case"image":case"link":Qn("error",A),Qn("load",A);break;case"details":Qn("toggle",A);break;case"input":Qn("invalid",A),ft(A,D.value,D.defaultValue,D.checked,D.defaultChecked,D.type,D.name,!0);break;case"select":Qn("invalid",A);break;case"textarea":Qn("invalid",A),At(A,D.value,D.defaultValue,D.children)}k=D.children,typeof k!="string"&&typeof k!="number"&&typeof k!="bigint"||A.textContent===""+k||D.suppressHydrationWarning===!0||qz(A.textContent,k)?(D.popover!=null&&(Qn("beforetoggle",A),Qn("toggle",A)),D.onScroll!=null&&Qn("scroll",A),D.onScrollEnd!=null&&Qn("scrollend",A),D.onClick!=null&&(A.onclick=Ss),A=!0):A=!1,A||Eh(g,!0)}function _H(g){for(Fs=g.return;Fs;)switch(Fs.tag){case 5:case 31:case 13:yl=!1;return;case 27:case 3:yl=!0;return;default:Fs=Fs.return}}function Em(g){if(g!==Fs)return!1;if(!Kn)return _H(g),Kn=!0,!1;var A=g.tag,k;if((k=A!==3&&A!==27)&&((k=A===5)&&(k=g.type,k=!(k!=="form"&&k!=="button")||dP(g.type,g.memoizedProps)),k=!k),k&&ii&&Eh(g),_H(g),A===13){if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));ii=sZ(g)}else if(A===31){if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));ii=sZ(g)}else A===27?(A=ii,Vh(g.type)?(g=xP,xP=null,ii=g):ii=A):ii=Fs?bl(g.stateNode.nextSibling):null;return!0}function hp(){ii=Fs=null,Kn=!1}function q5(){var g=Ch;return g!==null&&(Wa===null?Wa=g:Wa.push.apply(Wa,g),Ch=null),g}function Sx(g){Ch===null?Ch=[g]:Ch.push(g)}var Y5=W(null),dp=null,Xu=null;function Th(g,A,k){U(Y5,A._currentValue),A._currentValue=k}function Wu(g){g._currentValue=Y5.current,F(Y5)}function K5(g,A,k){for(;g!==null;){var D=g.alternate;if((g.childLanes&A)!==A?(g.childLanes|=A,D!==null&&(D.childLanes|=A)):D!==null&&(D.childLanes&A)!==A&&(D.childLanes|=A),g===k)break;g=g.return}}function J5(g,A,k,D){var B=g.child;for(B!==null&&(B.return=g);B!==null;){var Z=B.dependencies;if(Z!==null){var oe=B.child;Z=Z.firstContext;e:for(;Z!==null;){var pe=Z;Z=B;for(var Ee=0;Ee<A.length;Ee++)if(pe.context===A[Ee]){Z.lanes|=k,pe=Z.alternate,pe!==null&&(pe.lanes|=k),K5(Z.return,k,g),D||(oe=null);break e}Z=pe.next}}else if(B.tag===18){if(oe=B.return,oe===null)throw Error(r(341));oe.lanes|=k,Z=oe.alternate,Z!==null&&(Z.lanes|=k),K5(oe,k,g),oe=null}else oe=B.child;if(oe!==null)oe.return=B;else for(oe=B;oe!==null;){if(oe===g){oe=null;break}if(B=oe.sibling,B!==null){B.return=oe.return,oe=B;break}oe=oe.return}B=oe}}function Tm(g,A,k,D){g=null;for(var B=A,Z=!1;B!==null;){if(!Z){if((B.flags&524288)!==0)Z=!0;else if((B.flags&262144)!==0)break}if(B.tag===10){var oe=B.alternate;if(oe===null)throw Error(r(387));if(oe=oe.memoizedProps,oe!==null){var pe=B.type;ra(B.pendingProps.value,oe.value)||(g!==null?g.push(pe):g=[pe])}}else if(B===se.current){if(oe=B.alternate,oe===null)throw Error(r(387));oe.memoizedState.memoizedState!==B.memoizedState.memoizedState&&(g!==null?g.push(Wx):g=[Wx])}B=B.return}g!==null&&J5(A,g,k,D),A.flags|=262144}function Uw(g){for(g=g.firstContext;g!==null;){if(!ra(g.context._currentValue,g.memoizedValue))return!0;g=g.next}return!1}function pp(g){dp=g,Xu=null,g=g.dependencies,g!==null&&(g.firstContext=null)}function $s(g){return RH(dp,g)}function Xw(g,A){return dp===null&&pp(g),RH(g,A)}function RH(g,A){var k=A._currentValue;if(A={context:A,memoizedValue:k,next:null},Xu===null){if(g===null)throw Error(r(308));Xu=A,g.dependencies={lanes:0,firstContext:A},g.flags|=524288}else Xu=Xu.next=A;return k}var vwe=typeof AbortController<"u"?AbortController:function(){var g=[],A=this.signal={aborted:!1,addEventListener:function(k,D){g.push(D)}};this.abort=function(){A.aborted=!0,g.forEach(function(k){return k()})}},Awe=t.unstable_scheduleCallback,Swe=t.unstable_NormalPriority,Ki={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eT(){return{controller:new vwe,data:new Map,refCount:0}}function wx(g){g.refCount--,g.refCount===0&&Awe(Swe,function(){g.controller.abort()})}var Ox=null,tT=0,Pm=0,Mm=null;function wwe(g,A){if(Ox===null){var k=Ox=[];tT=0,Pm=iP(),Mm={status:"pending",value:void 0,then:function(D){k.push(D)}}}return tT++,A.then(jH,jH),A}function jH(){if(--tT===0&&Ox!==null){Mm!==null&&(Mm.status="fulfilled");var g=Ox;Ox=null,Pm=0,Mm=null;for(var A=0;A<g.length;A++)(0,g[A])()}}function Owe(g,A){var k=[],D={status:"pending",value:null,reason:null,then:function(B){k.push(B)}};return g.then(function(){D.status="fulfilled",D.value=A;for(var B=0;B<k.length;B++)(0,k[B])(A)},function(B){for(D.status="rejected",D.reason=B,B=0;B<k.length;B++)(0,k[B])(void 0)}),D}var LH=Y.S;Y.S=function(g,A){vz=Ge(),typeof A=="object"&&A!==null&&typeof A.then=="function"&&wwe(g,A),LH!==null&&LH(g,A)};var mp=W(null);function nT(){var g=mp.current;return g!==null?g:Qr.pooledCache}function Ww(g,A){A===null?U(mp,mp.current):U(mp,A.pool)}function FH(){var g=nT();return g===null?null:{parent:Ki._currentValue,pool:g}}var Nm=Error(r(460)),rT=Error(r(474)),qw=Error(r(542)),Yw={then:function(){}};function $H(g){return g=g.status,g==="fulfilled"||g==="rejected"}function BH(g,A,k){switch(k=g[k],k===void 0?g.push(A):k!==A&&(A.then(Ss,Ss),A=k),A.status){case"fulfilled":return A.value;case"rejected":throw g=A.reason,HH(g),g;default:if(typeof A.status=="string")A.then(Ss,Ss);else{if(g=Qr,g!==null&&100<g.shellSuspendCounter)throw Error(r(482));g=A,g.status="pending",g.then(function(D){if(A.status==="pending"){var B=A;B.status="fulfilled",B.value=D}},function(D){if(A.status==="pending"){var B=A;B.status="rejected",B.reason=D}})}switch(A.status){case"fulfilled":return A.value;case"rejected":throw g=A.reason,HH(g),g}throw yp=A,Nm}}function gp(g){try{var A=g._init;return A(g._payload)}catch(k){throw k!==null&&typeof k=="object"&&typeof k.then=="function"?(yp=k,Nm):k}}var yp=null;function VH(){if(yp===null)throw Error(r(459));var g=yp;return yp=null,g}function HH(g){if(g===Nm||g===qw)throw Error(r(483))}var Dm=null,kx=0;function Kw(g){var A=kx;return kx+=1,Dm===null&&(Dm=[]),BH(Dm,g,A)}function Cx(g,A){A=A.props.ref,g.ref=A!==void 0?A:null}function Jw(g,A){throw A.$$typeof===h?Error(r(525)):(g=Object.prototype.toString.call(A),Error(r(31,g==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":g)))}function QH(g){function A(Ie,Ne){if(g){var je=Ie.deletions;je===null?(Ie.deletions=[Ne],Ie.flags|=16):je.push(Ne)}}function k(Ie,Ne){if(!g)return null;for(;Ne!==null;)A(Ie,Ne),Ne=Ne.sibling;return null}function D(Ie){for(var Ne=new Map;Ie!==null;)Ie.key!==null?Ne.set(Ie.key,Ie):Ne.set(Ie.index,Ie),Ie=Ie.sibling;return Ne}function B(Ie,Ne){return Ie=Gu(Ie,Ne),Ie.index=0,Ie.sibling=null,Ie}function Z(Ie,Ne,je){return Ie.index=je,g?(je=Ie.alternate,je!==null?(je=je.index,je<Ne?(Ie.flags|=67108866,Ne):je):(Ie.flags|=67108866,Ne)):(Ie.flags|=1048576,Ne)}function oe(Ie){return g&&Ie.alternate===null&&(Ie.flags|=67108866),Ie}function pe(Ie,Ne,je,Ue){return Ne===null||Ne.tag!==6?(Ne=Z5(je,Ie.mode,Ue),Ne.return=Ie,Ne):(Ne=B(Ne,je),Ne.return=Ie,Ne)}function Ee(Ie,Ne,je,Ue){var Yt=je.type;return Yt===p?Ze(Ie,Ne,je.props.children,Ue,je.key):Ne!==null&&(Ne.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===_&&gp(Yt)===Ne.type)?(Ne=B(Ne,je.props),Cx(Ne,je),Ne.return=Ie,Ne):(Ne=Zw(je.type,je.key,je.props,null,Ie.mode,Ue),Cx(Ne,je),Ne.return=Ie,Ne)}function Le(Ie,Ne,je,Ue){return Ne===null||Ne.tag!==4||Ne.stateNode.containerInfo!==je.containerInfo||Ne.stateNode.implementation!==je.implementation?(Ne=G5(je,Ie.mode,Ue),Ne.return=Ie,Ne):(Ne=B(Ne,je.children||[]),Ne.return=Ie,Ne)}function Ze(Ie,Ne,je,Ue,Yt){return Ne===null||Ne.tag!==7?(Ne=fp(je,Ie.mode,Ue,Yt),Ne.return=Ie,Ne):(Ne=B(Ne,je),Ne.return=Ie,Ne)}function Xe(Ie,Ne,je){if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint")return Ne=Z5(""+Ne,Ie.mode,je),Ne.return=Ie,Ne;if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case m:return je=Zw(Ne.type,Ne.key,Ne.props,null,Ie.mode,je),Cx(je,Ne),je.return=Ie,je;case y:return Ne=G5(Ne,Ie.mode,je),Ne.return=Ie,Ne;case _:return Ne=gp(Ne),Xe(Ie,Ne,je)}if(q(Ne)||H(Ne))return Ne=fp(Ne,Ie.mode,je,null),Ne.return=Ie,Ne;if(typeof Ne.then=="function")return Xe(Ie,Kw(Ne),je);if(Ne.$$typeof===O)return Xe(Ie,Xw(Ie,Ne),je);Jw(Ie,Ne)}return null}function Fe(Ie,Ne,je,Ue){var Yt=Ne!==null?Ne.key:null;if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return Yt!==null?null:pe(Ie,Ne,""+je,Ue);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case m:return je.key===Yt?Ee(Ie,Ne,je,Ue):null;case y:return je.key===Yt?Le(Ie,Ne,je,Ue):null;case _:return je=gp(je),Fe(Ie,Ne,je,Ue)}if(q(je)||H(je))return Yt!==null?null:Ze(Ie,Ne,je,Ue,null);if(typeof je.then=="function")return Fe(Ie,Ne,Kw(je),Ue);if(je.$$typeof===O)return Fe(Ie,Ne,Xw(Ie,je),Ue);Jw(Ie,je)}return null}function Ve(Ie,Ne,je,Ue,Yt){if(typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint")return Ie=Ie.get(je)||null,pe(Ne,Ie,""+Ue,Yt);if(typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case m:return Ie=Ie.get(Ue.key===null?je:Ue.key)||null,Ee(Ne,Ie,Ue,Yt);case y:return Ie=Ie.get(Ue.key===null?je:Ue.key)||null,Le(Ne,Ie,Ue,Yt);case _:return Ue=gp(Ue),Ve(Ie,Ne,je,Ue,Yt)}if(q(Ue)||H(Ue))return Ie=Ie.get(je)||null,Ze(Ne,Ie,Ue,Yt,null);if(typeof Ue.then=="function")return Ve(Ie,Ne,je,Kw(Ue),Yt);if(Ue.$$typeof===O)return Ve(Ie,Ne,je,Xw(Ne,Ue),Yt);Jw(Ne,Ue)}return null}function jt(Ie,Ne,je,Ue){for(var Yt=null,hr=null,Bt=Ne,Nn=Ne=0,Xn=null;Bt!==null&&Nn<je.length;Nn++){Bt.index>Nn?(Xn=Bt,Bt=null):Xn=Bt.sibling;var dr=Fe(Ie,Bt,je[Nn],Ue);if(dr===null){Bt===null&&(Bt=Xn);break}g&&Bt&&dr.alternate===null&&A(Ie,Bt),Ne=Z(dr,Ne,Nn),hr===null?Yt=dr:hr.sibling=dr,hr=dr,Bt=Xn}if(Nn===je.length)return k(Ie,Bt),Kn&&Uu(Ie,Nn),Yt;if(Bt===null){for(;Nn<je.length;Nn++)Bt=Xe(Ie,je[Nn],Ue),Bt!==null&&(Ne=Z(Bt,Ne,Nn),hr===null?Yt=Bt:hr.sibling=Bt,hr=Bt);return Kn&&Uu(Ie,Nn),Yt}for(Bt=D(Bt);Nn<je.length;Nn++)Xn=Ve(Bt,Ie,Nn,je[Nn],Ue),Xn!==null&&(g&&Xn.alternate!==null&&Bt.delete(Xn.key===null?Nn:Xn.key),Ne=Z(Xn,Ne,Nn),hr===null?Yt=Xn:hr.sibling=Xn,hr=Xn);return g&&Bt.forEach(function(Gh){return A(Ie,Gh)}),Kn&&Uu(Ie,Nn),Yt}function an(Ie,Ne,je,Ue){if(je==null)throw Error(r(151));for(var Yt=null,hr=null,Bt=Ne,Nn=Ne=0,Xn=null,dr=je.next();Bt!==null&&!dr.done;Nn++,dr=je.next()){Bt.index>Nn?(Xn=Bt,Bt=null):Xn=Bt.sibling;var Gh=Fe(Ie,Bt,dr.value,Ue);if(Gh===null){Bt===null&&(Bt=Xn);break}g&&Bt&&Gh.alternate===null&&A(Ie,Bt),Ne=Z(Gh,Ne,Nn),hr===null?Yt=Gh:hr.sibling=Gh,hr=Gh,Bt=Xn}if(dr.done)return k(Ie,Bt),Kn&&Uu(Ie,Nn),Yt;if(Bt===null){for(;!dr.done;Nn++,dr=je.next())dr=Xe(Ie,dr.value,Ue),dr!==null&&(Ne=Z(dr,Ne,Nn),hr===null?Yt=dr:hr.sibling=dr,hr=dr);return Kn&&Uu(Ie,Nn),Yt}for(Bt=D(Bt);!dr.done;Nn++,dr=je.next())dr=Ve(Bt,Ie,Nn,dr.value,Ue),dr!==null&&(g&&dr.alternate!==null&&Bt.delete(dr.key===null?Nn:dr.key),Ne=Z(dr,Ne,Nn),hr===null?Yt=dr:hr.sibling=dr,hr=dr);return g&&Bt.forEach(function(ROe){return A(Ie,ROe)}),Kn&&Uu(Ie,Nn),Yt}function Rr(Ie,Ne,je,Ue){if(typeof je=="object"&&je!==null&&je.type===p&&je.key===null&&(je=je.props.children),typeof je=="object"&&je!==null){switch(je.$$typeof){case m:e:{for(var Yt=je.key;Ne!==null;){if(Ne.key===Yt){if(Yt=je.type,Yt===p){if(Ne.tag===7){k(Ie,Ne.sibling),Ue=B(Ne,je.props.children),Ue.return=Ie,Ie=Ue;break e}}else if(Ne.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===_&&gp(Yt)===Ne.type){k(Ie,Ne.sibling),Ue=B(Ne,je.props),Cx(Ue,je),Ue.return=Ie,Ie=Ue;break e}k(Ie,Ne);break}else A(Ie,Ne);Ne=Ne.sibling}je.type===p?(Ue=fp(je.props.children,Ie.mode,Ue,je.key),Ue.return=Ie,Ie=Ue):(Ue=Zw(je.type,je.key,je.props,null,Ie.mode,Ue),Cx(Ue,je),Ue.return=Ie,Ie=Ue)}return oe(Ie);case y:e:{for(Yt=je.key;Ne!==null;){if(Ne.key===Yt)if(Ne.tag===4&&Ne.stateNode.containerInfo===je.containerInfo&&Ne.stateNode.implementation===je.implementation){k(Ie,Ne.sibling),Ue=B(Ne,je.children||[]),Ue.return=Ie,Ie=Ue;break e}else{k(Ie,Ne);break}else A(Ie,Ne);Ne=Ne.sibling}Ue=G5(je,Ie.mode,Ue),Ue.return=Ie,Ie=Ue}return oe(Ie);case _:return je=gp(je),Rr(Ie,Ne,je,Ue)}if(q(je))return jt(Ie,Ne,je,Ue);if(H(je)){if(Yt=H(je),typeof Yt!="function")throw Error(r(150));return je=Yt.call(je),an(Ie,Ne,je,Ue)}if(typeof je.then=="function")return Rr(Ie,Ne,Kw(je),Ue);if(je.$$typeof===O)return Rr(Ie,Ne,Xw(Ie,je),Ue);Jw(Ie,je)}return typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint"?(je=""+je,Ne!==null&&Ne.tag===6?(k(Ie,Ne.sibling),Ue=B(Ne,je),Ue.return=Ie,Ie=Ue):(k(Ie,Ne),Ue=Z5(je,Ie.mode,Ue),Ue.return=Ie,Ie=Ue),oe(Ie)):k(Ie,Ne)}return function(Ie,Ne,je,Ue){try{kx=0;var Yt=Rr(Ie,Ne,je,Ue);return Dm=null,Yt}catch(Bt){if(Bt===Nm||Bt===qw)throw Bt;var hr=Co(29,Bt,null,Ie.mode);return hr.lanes=Ue,hr.return=Ie,hr}finally{}}}var xp=QH(!0),zH=QH(!1),Ph=!1;function iT(g){g.updateQueue={baseState:g.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sT(g,A){g=g.updateQueue,A.updateQueue===g&&(A.updateQueue={baseState:g.baseState,firstBaseUpdate:g.firstBaseUpdate,lastBaseUpdate:g.lastBaseUpdate,shared:g.shared,callbacks:null})}function Mh(g){return{lane:g,tag:0,payload:null,callback:null,next:null}}function Nh(g,A,k){var D=g.updateQueue;if(D===null)return null;if(D=D.shared,(yr&2)!==0){var B=D.pending;return B===null?A.next=A:(A.next=B.next,B.next=A),D.pending=A,A=zw(g),EH(g,null,k),A}return Qw(g,D,A,k),zw(g)}function Ex(g,A,k){if(A=A.updateQueue,A!==null&&(A=A.shared,(k&4194048)!==0)){var D=A.lanes;D&=g.pendingLanes,k|=D,A.lanes=k,pn(g,k)}}function aT(g,A){var k=g.updateQueue,D=g.alternate;if(D!==null&&(D=D.updateQueue,k===D)){var B=null,Z=null;if(k=k.firstBaseUpdate,k!==null){do{var oe={lane:k.lane,tag:k.tag,payload:k.payload,callback:null,next:null};Z===null?B=Z=oe:Z=Z.next=oe,k=k.next}while(k!==null);Z===null?B=Z=A:Z=Z.next=A}else B=Z=A;k={baseState:D.baseState,firstBaseUpdate:B,lastBaseUpdate:Z,shared:D.shared,callbacks:D.callbacks},g.updateQueue=k;return}g=k.lastBaseUpdate,g===null?k.firstBaseUpdate=A:g.next=A,k.lastBaseUpdate=A}var oT=!1;function Tx(){if(oT){var g=Mm;if(g!==null)throw g}}function Px(g,A,k,D){oT=!1;var B=g.updateQueue;Ph=!1;var Z=B.firstBaseUpdate,oe=B.lastBaseUpdate,pe=B.shared.pending;if(pe!==null){B.shared.pending=null;var Ee=pe,Le=Ee.next;Ee.next=null,oe===null?Z=Le:oe.next=Le,oe=Ee;var Ze=g.alternate;Ze!==null&&(Ze=Ze.updateQueue,pe=Ze.lastBaseUpdate,pe!==oe&&(pe===null?Ze.firstBaseUpdate=Le:pe.next=Le,Ze.lastBaseUpdate=Ee))}if(Z!==null){var Xe=B.baseState;oe=0,Ze=Le=Ee=null,pe=Z;do{var Fe=pe.lane&-536870913,Ve=Fe!==pe.lane;if(Ve?(Un&Fe)===Fe:(D&Fe)===Fe){Fe!==0&&Fe===Pm&&(oT=!0),Ze!==null&&(Ze=Ze.next={lane:0,tag:pe.tag,payload:pe.payload,callback:null,next:null});e:{var jt=g,an=pe;Fe=A;var Rr=k;switch(an.tag){case 1:if(jt=an.payload,typeof jt=="function"){Xe=jt.call(Rr,Xe,Fe);break e}Xe=jt;break e;case 3:jt.flags=jt.flags&-65537|128;case 0:if(jt=an.payload,Fe=typeof jt=="function"?jt.call(Rr,Xe,Fe):jt,Fe==null)break e;Xe=f({},Xe,Fe);break e;case 2:Ph=!0}}Fe=pe.callback,Fe!==null&&(g.flags|=64,Ve&&(g.flags|=8192),Ve=B.callbacks,Ve===null?B.callbacks=[Fe]:Ve.push(Fe))}else Ve={lane:Fe,tag:pe.tag,payload:pe.payload,callback:pe.callback,next:null},Ze===null?(Le=Ze=Ve,Ee=Xe):Ze=Ze.next=Ve,oe|=Fe;if(pe=pe.next,pe===null){if(pe=B.shared.pending,pe===null)break;Ve=pe,pe=Ve.next,Ve.next=null,B.lastBaseUpdate=Ve,B.shared.pending=null}}while(!0);Ze===null&&(Ee=Xe),B.baseState=Ee,B.firstBaseUpdate=Le,B.lastBaseUpdate=Ze,Z===null&&(B.shared.lanes=0),jh|=oe,g.lanes=oe,g.memoizedState=Xe}}function ZH(g,A){if(typeof g!="function")throw Error(r(191,g));g.call(A)}function GH(g,A){var k=g.callbacks;if(k!==null)for(g.callbacks=null,g=0;g<k.length;g++)ZH(k[g],A)}var Im=W(null),eO=W(0);function UH(g,A){g=sf,U(eO,g),U(Im,A),sf=g|A.baseLanes}function lT(){U(eO,sf),U(Im,Im.current)}function cT(){sf=eO.current,F(Im),F(eO)}var Eo=W(null),xl=null;function Dh(g){var A=g.alternate;U(Vi,Vi.current&1),U(Eo,g),xl===null&&(A===null||Im.current!==null||A.memoizedState!==null)&&(xl=g)}function uT(g){U(Vi,Vi.current),U(Eo,g),xl===null&&(xl=g)}function XH(g){g.tag===22?(U(Vi,Vi.current),U(Eo,g),xl===null&&(xl=g)):Ih()}function Ih(){U(Vi,Vi.current),U(Eo,Eo.current)}function To(g){F(Eo),xl===g&&(xl=null),F(Vi)}var Vi=W(0);function tO(g){for(var A=g;A!==null;){if(A.tag===13){var k=A.memoizedState;if(k!==null&&(k=k.dehydrated,k===null||gP(k)||yP(k)))return A}else if(A.tag===19&&(A.memoizedProps.revealOrder==="forwards"||A.memoizedProps.revealOrder==="backwards"||A.memoizedProps.revealOrder==="unstable_legacy-backwards"||A.memoizedProps.revealOrder==="together")){if((A.flags&128)!==0)return A}else if(A.child!==null){A.child.return=A,A=A.child;continue}if(A===g)break;for(;A.sibling===null;){if(A.return===null||A.return===g)return null;A=A.return}A.sibling.return=A.return,A=A.sibling}return null}var qu=0,Tn=null,Ir=null,Ji=null,nO=!1,_m=!1,bp=!1,rO=0,Mx=0,Rm=null,kwe=0;function Pi(){throw Error(r(321))}function fT(g,A){if(A===null)return!1;for(var k=0;k<A.length&&k<g.length;k++)if(!ra(g[k],A[k]))return!1;return!0}function hT(g,A,k,D,B,Z){return qu=Z,Tn=A,A.memoizedState=null,A.updateQueue=null,A.lanes=0,Y.H=g===null||g.memoizedState===null?NQ:ET,bp=!1,Z=k(D,B),bp=!1,_m&&(Z=qH(A,k,D,B)),WH(g),Z}function WH(g){Y.H=Ix;var A=Ir!==null&&Ir.next!==null;if(qu=0,Ji=Ir=Tn=null,nO=!1,Mx=0,Rm=null,A)throw Error(r(300));g===null||es||(g=g.dependencies,g!==null&&Uw(g)&&(es=!0))}function qH(g,A,k,D){Tn=g;var B=0;do{if(_m&&(Rm=null),Mx=0,_m=!1,25<=B)throw Error(r(301));if(B+=1,Ji=Ir=null,g.updateQueue!=null){var Z=g.updateQueue;Z.lastEffect=null,Z.events=null,Z.stores=null,Z.memoCache!=null&&(Z.memoCache.index=0)}Y.H=DQ,Z=A(k,D)}while(_m);return Z}function Cwe(){var g=Y.H,A=g.useState()[0];return A=typeof A.then=="function"?Nx(A):A,g=g.useState()[0],(Ir!==null?Ir.memoizedState:null)!==g&&(Tn.flags|=1024),A}function dT(){var g=rO!==0;return rO=0,g}function pT(g,A,k){A.updateQueue=g.updateQueue,A.flags&=-2053,g.lanes&=~k}function mT(g){if(nO){for(g=g.memoizedState;g!==null;){var A=g.queue;A!==null&&(A.pending=null),g=g.next}nO=!1}qu=0,Ji=Ir=Tn=null,_m=!1,Mx=rO=0,Rm=null}function Pa(){var g={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ji===null?Tn.memoizedState=Ji=g:Ji=Ji.next=g,Ji}function Hi(){if(Ir===null){var g=Tn.alternate;g=g!==null?g.memoizedState:null}else g=Ir.next;var A=Ji===null?Tn.memoizedState:Ji.next;if(A!==null)Ji=A,Ir=g;else{if(g===null)throw Tn.alternate===null?Error(r(467)):Error(r(310));Ir=g,g={memoizedState:Ir.memoizedState,baseState:Ir.baseState,baseQueue:Ir.baseQueue,queue:Ir.queue,next:null},Ji===null?Tn.memoizedState=Ji=g:Ji=Ji.next=g}return Ji}function iO(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nx(g){var A=Mx;return Mx+=1,Rm===null&&(Rm=[]),g=BH(Rm,g,A),A=Tn,(Ji===null?A.memoizedState:Ji.next)===null&&(A=A.alternate,Y.H=A===null||A.memoizedState===null?NQ:ET),g}function sO(g){if(g!==null&&typeof g=="object"){if(typeof g.then=="function")return Nx(g);if(g.$$typeof===O)return $s(g)}throw Error(r(438,String(g)))}function gT(g){var A=null,k=Tn.updateQueue;if(k!==null&&(A=k.memoCache),A==null){var D=Tn.alternate;D!==null&&(D=D.updateQueue,D!==null&&(D=D.memoCache,D!=null&&(A={data:D.data.map(function(B){return B.slice()}),index:0})))}if(A==null&&(A={data:[],index:0}),k===null&&(k=iO(),Tn.updateQueue=k),k.memoCache=A,k=A.data[A.index],k===void 0)for(k=A.data[A.index]=Array(g),D=0;D<g;D++)k[D]=j;return A.index++,k}function Yu(g,A){return typeof A=="function"?A(g):A}function aO(g){var A=Hi();return yT(A,Ir,g)}function yT(g,A,k){var D=g.queue;if(D===null)throw Error(r(311));D.lastRenderedReducer=k;var B=g.baseQueue,Z=D.pending;if(Z!==null){if(B!==null){var oe=B.next;B.next=Z.next,Z.next=oe}A.baseQueue=B=Z,D.pending=null}if(Z=g.baseState,B===null)g.memoizedState=Z;else{A=B.next;var pe=oe=null,Ee=null,Le=A,Ze=!1;do{var Xe=Le.lane&-536870913;if(Xe!==Le.lane?(Un&Xe)===Xe:(qu&Xe)===Xe){var Fe=Le.revertLane;if(Fe===0)Ee!==null&&(Ee=Ee.next={lane:0,revertLane:0,gesture:null,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),Xe===Pm&&(Ze=!0);else if((qu&Fe)===Fe){Le=Le.next,Fe===Pm&&(Ze=!0);continue}else Xe={lane:0,revertLane:Le.revertLane,gesture:null,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null},Ee===null?(pe=Ee=Xe,oe=Z):Ee=Ee.next=Xe,Tn.lanes|=Fe,jh|=Fe;Xe=Le.action,bp&&k(Z,Xe),Z=Le.hasEagerState?Le.eagerState:k(Z,Xe)}else Fe={lane:Xe,revertLane:Le.revertLane,gesture:Le.gesture,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null},Ee===null?(pe=Ee=Fe,oe=Z):Ee=Ee.next=Fe,Tn.lanes|=Xe,jh|=Xe;Le=Le.next}while(Le!==null&&Le!==A);if(Ee===null?oe=Z:Ee.next=pe,!ra(Z,g.memoizedState)&&(es=!0,Ze&&(k=Mm,k!==null)))throw k;g.memoizedState=Z,g.baseState=oe,g.baseQueue=Ee,D.lastRenderedState=Z}return B===null&&(D.lanes=0),[g.memoizedState,D.dispatch]}function xT(g){var A=Hi(),k=A.queue;if(k===null)throw Error(r(311));k.lastRenderedReducer=g;var D=k.dispatch,B=k.pending,Z=A.memoizedState;if(B!==null){k.pending=null;var oe=B=B.next;do Z=g(Z,oe.action),oe=oe.next;while(oe!==B);ra(Z,A.memoizedState)||(es=!0),A.memoizedState=Z,A.baseQueue===null&&(A.baseState=Z),k.lastRenderedState=Z}return[Z,D]}function YH(g,A,k){var D=Tn,B=Hi(),Z=Kn;if(Z){if(k===void 0)throw Error(r(407));k=k()}else k=A();var oe=!ra((Ir||B).memoizedState,k);if(oe&&(B.memoizedState=k,es=!0),B=B.queue,AT(eQ.bind(null,D,B,g),[g]),B.getSnapshot!==A||oe||Ji!==null&&Ji.memoizedState.tag&1){if(D.flags|=2048,jm(9,{destroy:void 0},JH.bind(null,D,B,k,A),null),Qr===null)throw Error(r(349));Z||(qu&127)!==0||KH(D,A,k)}return k}function KH(g,A,k){g.flags|=16384,g={getSnapshot:A,value:k},A=Tn.updateQueue,A===null?(A=iO(),Tn.updateQueue=A,A.stores=[g]):(k=A.stores,k===null?A.stores=[g]:k.push(g))}function JH(g,A,k,D){A.value=k,A.getSnapshot=D,tQ(A)&&nQ(g)}function eQ(g,A,k){return k(function(){tQ(A)&&nQ(g)})}function tQ(g){var A=g.getSnapshot;g=g.value;try{var k=A();return!ra(g,k)}catch{return!0}}function nQ(g){var A=up(g,2);A!==null&&qa(A,g,2)}function bT(g){var A=Pa();if(typeof g=="function"){var k=g;if(g=k(),bp){Ot(!0);try{k()}finally{Ot(!1)}}}return A.memoizedState=A.baseState=g,A.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yu,lastRenderedState:g},A}function rQ(g,A,k,D){return g.baseState=k,yT(g,Ir,typeof D=="function"?D:Yu)}function Ewe(g,A,k,D,B){if(cO(g))throw Error(r(485));if(g=A.action,g!==null){var Z={payload:B,action:g,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(oe){Z.listeners.push(oe)}};Y.T!==null?k(!0):Z.isTransition=!1,D(Z),k=A.pending,k===null?(Z.next=A.pending=Z,iQ(A,Z)):(Z.next=k.next,A.pending=k.next=Z)}}function iQ(g,A){var k=A.action,D=A.payload,B=g.state;if(A.isTransition){var Z=Y.T,oe={};Y.T=oe;try{var pe=k(B,D),Ee=Y.S;Ee!==null&&Ee(oe,pe),sQ(g,A,pe)}catch(Le){vT(g,A,Le)}finally{Z!==null&&oe.types!==null&&(Z.types=oe.types),Y.T=Z}}else try{Z=k(B,D),sQ(g,A,Z)}catch(Le){vT(g,A,Le)}}function sQ(g,A,k){k!==null&&typeof k=="object"&&typeof k.then=="function"?k.then(function(D){aQ(g,A,D)},function(D){return vT(g,A,D)}):aQ(g,A,k)}function aQ(g,A,k){A.status="fulfilled",A.value=k,oQ(A),g.state=k,A=g.pending,A!==null&&(k=A.next,k===A?g.pending=null:(k=k.next,A.next=k,iQ(g,k)))}function vT(g,A,k){var D=g.pending;if(g.pending=null,D!==null){D=D.next;do A.status="rejected",A.reason=k,oQ(A),A=A.next;while(A!==D)}g.action=null}function oQ(g){g=g.listeners;for(var A=0;A<g.length;A++)(0,g[A])()}function lQ(g,A){return A}function cQ(g,A){if(Kn){var k=Qr.formState;if(k!==null){e:{var D=Tn;if(Kn){if(ii){t:{for(var B=ii,Z=yl;B.nodeType!==8;){if(!Z){B=null;break t}if(B=bl(B.nextSibling),B===null){B=null;break t}}Z=B.data,B=Z==="F!"||Z==="F"?B:null}if(B){ii=bl(B.nextSibling),D=B.data==="F!";break e}}Eh(D)}D=!1}D&&(A=k[0])}}return k=Pa(),k.memoizedState=k.baseState=A,D={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lQ,lastRenderedState:A},k.queue=D,k=TQ.bind(null,Tn,D),D.dispatch=k,D=bT(!1),Z=CT.bind(null,Tn,!1,D.queue),D=Pa(),B={state:A,dispatch:null,action:g,pending:null},D.queue=B,k=Ewe.bind(null,Tn,B,Z,k),B.dispatch=k,D.memoizedState=g,[A,k,!1]}function uQ(g){var A=Hi();return fQ(A,Ir,g)}function fQ(g,A,k){if(A=yT(g,A,lQ)[0],g=aO(Yu)[0],typeof A=="object"&&A!==null&&typeof A.then=="function")try{var D=Nx(A)}catch(oe){throw oe===Nm?qw:oe}else D=A;A=Hi();var B=A.queue,Z=B.dispatch;return k!==A.memoizedState&&(Tn.flags|=2048,jm(9,{destroy:void 0},Twe.bind(null,B,k),null)),[D,Z,g]}function Twe(g,A){g.action=A}function hQ(g){var A=Hi(),k=Ir;if(k!==null)return fQ(A,k,g);Hi(),A=A.memoizedState,k=Hi();var D=k.queue.dispatch;return k.memoizedState=g,[A,D,!1]}function jm(g,A,k,D){return g={tag:g,create:k,deps:D,inst:A,next:null},A=Tn.updateQueue,A===null&&(A=iO(),Tn.updateQueue=A),k=A.lastEffect,k===null?A.lastEffect=g.next=g:(D=k.next,k.next=g,g.next=D,A.lastEffect=g),g}function dQ(){return Hi().memoizedState}function oO(g,A,k,D){var B=Pa();Tn.flags|=g,B.memoizedState=jm(1|A,{destroy:void 0},k,D===void 0?null:D)}function lO(g,A,k,D){var B=Hi();D=D===void 0?null:D;var Z=B.memoizedState.inst;Ir!==null&&D!==null&&fT(D,Ir.memoizedState.deps)?B.memoizedState=jm(A,Z,k,D):(Tn.flags|=g,B.memoizedState=jm(1|A,Z,k,D))}function pQ(g,A){oO(8390656,8,g,A)}function AT(g,A){lO(2048,8,g,A)}function Pwe(g){Tn.flags|=4;var A=Tn.updateQueue;if(A===null)A=iO(),Tn.updateQueue=A,A.events=[g];else{var k=A.events;k===null?A.events=[g]:k.push(g)}}function mQ(g){var A=Hi().memoizedState;return Pwe({ref:A,nextImpl:g}),function(){if((yr&2)!==0)throw Error(r(440));return A.impl.apply(void 0,arguments)}}function gQ(g,A){return lO(4,2,g,A)}function yQ(g,A){return lO(4,4,g,A)}function xQ(g,A){if(typeof A=="function"){g=g();var k=A(g);return function(){typeof k=="function"?k():A(null)}}if(A!=null)return g=g(),A.current=g,function(){A.current=null}}function bQ(g,A,k){k=k!=null?k.concat([g]):null,lO(4,4,xQ.bind(null,A,g),k)}function ST(){}function vQ(g,A){var k=Hi();A=A===void 0?null:A;var D=k.memoizedState;return A!==null&&fT(A,D[1])?D[0]:(k.memoizedState=[g,A],g)}function AQ(g,A){var k=Hi();A=A===void 0?null:A;var D=k.memoizedState;if(A!==null&&fT(A,D[1]))return D[0];if(D=g(),bp){Ot(!0);try{g()}finally{Ot(!1)}}return k.memoizedState=[D,A],D}function wT(g,A,k){return k===void 0||(qu&1073741824)!==0&&(Un&261930)===0?g.memoizedState=A:(g.memoizedState=k,g=Sz(),Tn.lanes|=g,jh|=g,k)}function SQ(g,A,k,D){return ra(k,A)?k:Im.current!==null?(g=wT(g,k,D),ra(g,A)||(es=!0),g):(qu&42)===0||(qu&1073741824)!==0&&(Un&261930)===0?(es=!0,g.memoizedState=k):(g=Sz(),Tn.lanes|=g,jh|=g,A)}function wQ(g,A,k,D,B){var Z=J.p;J.p=Z!==0&&8>Z?Z:8;var oe=Y.T,pe={};Y.T=pe,CT(g,!1,A,k);try{var Ee=B(),Le=Y.S;if(Le!==null&&Le(pe,Ee),Ee!==null&&typeof Ee=="object"&&typeof Ee.then=="function"){var Ze=Owe(Ee,D);Dx(g,A,Ze,No(g))}else Dx(g,A,D,No(g))}catch(Xe){Dx(g,A,{then:function(){},status:"rejected",reason:Xe},No())}finally{J.p=Z,oe!==null&&pe.types!==null&&(oe.types=pe.types),Y.T=oe}}function Mwe(){}function OT(g,A,k,D){if(g.tag!==5)throw Error(r(476));var B=OQ(g).queue;wQ(g,B,A,ie,k===null?Mwe:function(){return kQ(g),k(D)})}function OQ(g){var A=g.memoizedState;if(A!==null)return A;A={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yu,lastRenderedState:ie},next:null};var k={};return A.next={memoizedState:k,baseState:k,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yu,lastRenderedState:k},next:null},g.memoizedState=A,g=g.alternate,g!==null&&(g.memoizedState=A),A}function kQ(g){var A=OQ(g);A.next===null&&(A=g.alternate.memoizedState),Dx(g,A.next.queue,{},No())}function kT(){return $s(Wx)}function CQ(){return Hi().memoizedState}function EQ(){return Hi().memoizedState}function Nwe(g){for(var A=g.return;A!==null;){switch(A.tag){case 24:case 3:var k=No();g=Mh(k);var D=Nh(A,g,k);D!==null&&(qa(D,A,k),Ex(D,A,k)),A={cache:eT()},g.payload=A;return}A=A.return}}function Dwe(g,A,k){var D=No();k={lane:D,revertLane:0,gesture:null,action:k,hasEagerState:!1,eagerState:null,next:null},cO(g)?PQ(A,k):(k=Q5(g,A,k,D),k!==null&&(qa(k,g,D),MQ(k,A,D)))}function TQ(g,A,k){var D=No();Dx(g,A,k,D)}function Dx(g,A,k,D){var B={lane:D,revertLane:0,gesture:null,action:k,hasEagerState:!1,eagerState:null,next:null};if(cO(g))PQ(A,B);else{var Z=g.alternate;if(g.lanes===0&&(Z===null||Z.lanes===0)&&(Z=A.lastRenderedReducer,Z!==null))try{var oe=A.lastRenderedState,pe=Z(oe,k);if(B.hasEagerState=!0,B.eagerState=pe,ra(pe,oe))return Qw(g,A,B,0),Qr===null&&Hw(),!1}catch{}finally{}if(k=Q5(g,A,B,D),k!==null)return qa(k,g,D),MQ(k,A,D),!0}return!1}function CT(g,A,k,D){if(D={lane:2,revertLane:iP(),gesture:null,action:D,hasEagerState:!1,eagerState:null,next:null},cO(g)){if(A)throw Error(r(479))}else A=Q5(g,k,D,2),A!==null&&qa(A,g,2)}function cO(g){var A=g.alternate;return g===Tn||A!==null&&A===Tn}function PQ(g,A){_m=nO=!0;var k=g.pending;k===null?A.next=A:(A.next=k.next,k.next=A),g.pending=A}function MQ(g,A,k){if((k&4194048)!==0){var D=A.lanes;D&=g.pendingLanes,k|=D,A.lanes=k,pn(g,k)}}var Ix={readContext:$s,use:sO,useCallback:Pi,useContext:Pi,useEffect:Pi,useImperativeHandle:Pi,useLayoutEffect:Pi,useInsertionEffect:Pi,useMemo:Pi,useReducer:Pi,useRef:Pi,useState:Pi,useDebugValue:Pi,useDeferredValue:Pi,useTransition:Pi,useSyncExternalStore:Pi,useId:Pi,useHostTransitionStatus:Pi,useFormState:Pi,useActionState:Pi,useOptimistic:Pi,useMemoCache:Pi,useCacheRefresh:Pi};Ix.useEffectEvent=Pi;var NQ={readContext:$s,use:sO,useCallback:function(g,A){return Pa().memoizedState=[g,A===void 0?null:A],g},useContext:$s,useEffect:pQ,useImperativeHandle:function(g,A,k){k=k!=null?k.concat([g]):null,oO(4194308,4,xQ.bind(null,A,g),k)},useLayoutEffect:function(g,A){return oO(4194308,4,g,A)},useInsertionEffect:function(g,A){oO(4,2,g,A)},useMemo:function(g,A){var k=Pa();A=A===void 0?null:A;var D=g();if(bp){Ot(!0);try{g()}finally{Ot(!1)}}return k.memoizedState=[D,A],D},useReducer:function(g,A,k){var D=Pa();if(k!==void 0){var B=k(A);if(bp){Ot(!0);try{k(A)}finally{Ot(!1)}}}else B=A;return D.memoizedState=D.baseState=B,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:g,lastRenderedState:B},D.queue=g,g=g.dispatch=Dwe.bind(null,Tn,g),[D.memoizedState,g]},useRef:function(g){var A=Pa();return g={current:g},A.memoizedState=g},useState:function(g){g=bT(g);var A=g.queue,k=TQ.bind(null,Tn,A);return A.dispatch=k,[g.memoizedState,k]},useDebugValue:ST,useDeferredValue:function(g,A){var k=Pa();return wT(k,g,A)},useTransition:function(){var g=bT(!1);return g=wQ.bind(null,Tn,g.queue,!0,!1),Pa().memoizedState=g,[!1,g]},useSyncExternalStore:function(g,A,k){var D=Tn,B=Pa();if(Kn){if(k===void 0)throw Error(r(407));k=k()}else{if(k=A(),Qr===null)throw Error(r(349));(Un&127)!==0||KH(D,A,k)}B.memoizedState=k;var Z={value:k,getSnapshot:A};return B.queue=Z,pQ(eQ.bind(null,D,Z,g),[g]),D.flags|=2048,jm(9,{destroy:void 0},JH.bind(null,D,Z,k,A),null),k},useId:function(){var g=Pa(),A=Qr.identifierPrefix;if(Kn){var k=Wc,D=Xc;k=(D&~(1<<32-St(D)-1)).toString(32)+k,A="_"+A+"R_"+k,k=rO++,0<k&&(A+="H"+k.toString(32)),A+="_"}else k=kwe++,A="_"+A+"r_"+k.toString(32)+"_";return g.memoizedState=A},useHostTransitionStatus:kT,useFormState:cQ,useActionState:cQ,useOptimistic:function(g){var A=Pa();A.memoizedState=A.baseState=g;var k={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return A.queue=k,A=CT.bind(null,Tn,!0,k),k.dispatch=A,[g,A]},useMemoCache:gT,useCacheRefresh:function(){return Pa().memoizedState=Nwe.bind(null,Tn)},useEffectEvent:function(g){var A=Pa(),k={impl:g};return A.memoizedState=k,function(){if((yr&2)!==0)throw Error(r(440));return k.impl.apply(void 0,arguments)}}},ET={readContext:$s,use:sO,useCallback:vQ,useContext:$s,useEffect:AT,useImperativeHandle:bQ,useInsertionEffect:gQ,useLayoutEffect:yQ,useMemo:AQ,useReducer:aO,useRef:dQ,useState:function(){return aO(Yu)},useDebugValue:ST,useDeferredValue:function(g,A){var k=Hi();return SQ(k,Ir.memoizedState,g,A)},useTransition:function(){var g=aO(Yu)[0],A=Hi().memoizedState;return[typeof g=="boolean"?g:Nx(g),A]},useSyncExternalStore:YH,useId:CQ,useHostTransitionStatus:kT,useFormState:uQ,useActionState:uQ,useOptimistic:function(g,A){var k=Hi();return rQ(k,Ir,g,A)},useMemoCache:gT,useCacheRefresh:EQ};ET.useEffectEvent=mQ;var DQ={readContext:$s,use:sO,useCallback:vQ,useContext:$s,useEffect:AT,useImperativeHandle:bQ,useInsertionEffect:gQ,useLayoutEffect:yQ,useMemo:AQ,useReducer:xT,useRef:dQ,useState:function(){return xT(Yu)},useDebugValue:ST,useDeferredValue:function(g,A){var k=Hi();return Ir===null?wT(k,g,A):SQ(k,Ir.memoizedState,g,A)},useTransition:function(){var g=xT(Yu)[0],A=Hi().memoizedState;return[typeof g=="boolean"?g:Nx(g),A]},useSyncExternalStore:YH,useId:CQ,useHostTransitionStatus:kT,useFormState:hQ,useActionState:hQ,useOptimistic:function(g,A){var k=Hi();return Ir!==null?rQ(k,Ir,g,A):(k.baseState=g,[g,k.queue.dispatch])},useMemoCache:gT,useCacheRefresh:EQ};DQ.useEffectEvent=mQ;function TT(g,A,k,D){A=g.memoizedState,k=k(D,A),k=k==null?A:f({},A,k),g.memoizedState=k,g.lanes===0&&(g.updateQueue.baseState=k)}var PT={enqueueSetState:function(g,A,k){g=g._reactInternals;var D=No(),B=Mh(D);B.payload=A,k!=null&&(B.callback=k),A=Nh(g,B,D),A!==null&&(qa(A,g,D),Ex(A,g,D))},enqueueReplaceState:function(g,A,k){g=g._reactInternals;var D=No(),B=Mh(D);B.tag=1,B.payload=A,k!=null&&(B.callback=k),A=Nh(g,B,D),A!==null&&(qa(A,g,D),Ex(A,g,D))},enqueueForceUpdate:function(g,A){g=g._reactInternals;var k=No(),D=Mh(k);D.tag=2,A!=null&&(D.callback=A),A=Nh(g,D,k),A!==null&&(qa(A,g,k),Ex(A,g,k))}};function IQ(g,A,k,D,B,Z,oe){return g=g.stateNode,typeof g.shouldComponentUpdate=="function"?g.shouldComponentUpdate(D,Z,oe):A.prototype&&A.prototype.isPureReactComponent?!Oh(k,D)||!Oh(B,Z):!0}function _Q(g,A,k,D){g=A.state,typeof A.componentWillReceiveProps=="function"&&A.componentWillReceiveProps(k,D),typeof A.UNSAFE_componentWillReceiveProps=="function"&&A.UNSAFE_componentWillReceiveProps(k,D),A.state!==g&&PT.enqueueReplaceState(A,A.state,null)}function vp(g,A){var k=A;if("ref"in A){k={};for(var D in A)D!=="ref"&&(k[D]=A[D])}if(g=g.defaultProps){k===A&&(k=f({},k));for(var B in g)k[B]===void 0&&(k[B]=g[B])}return k}function RQ(g){Vw(g)}function jQ(g){console.error(g)}function LQ(g){Vw(g)}function uO(g,A){try{var k=g.onUncaughtError;k(A.value,{componentStack:A.stack})}catch(D){setTimeout(function(){throw D})}}function FQ(g,A,k){try{var D=g.onCaughtError;D(k.value,{componentStack:k.stack,errorBoundary:A.tag===1?A.stateNode:null})}catch(B){setTimeout(function(){throw B})}}function MT(g,A,k){return k=Mh(k),k.tag=3,k.payload={element:null},k.callback=function(){uO(g,A)},k}function $Q(g){return g=Mh(g),g.tag=3,g}function BQ(g,A,k,D){var B=k.type.getDerivedStateFromError;if(typeof B=="function"){var Z=D.value;g.payload=function(){return B(Z)},g.callback=function(){FQ(A,k,D)}}var oe=k.stateNode;oe!==null&&typeof oe.componentDidCatch=="function"&&(g.callback=function(){FQ(A,k,D),typeof B!="function"&&(Lh===null?Lh=new Set([this]):Lh.add(this));var pe=D.stack;this.componentDidCatch(D.value,{componentStack:pe!==null?pe:""})})}function Iwe(g,A,k,D,B){if(k.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){if(A=k.alternate,A!==null&&Tm(A,k,B,!0),k=Eo.current,k!==null){switch(k.tag){case 31:case 13:return xl===null?SO():k.alternate===null&&Mi===0&&(Mi=3),k.flags&=-257,k.flags|=65536,k.lanes=B,D===Yw?k.flags|=16384:(A=k.updateQueue,A===null?k.updateQueue=new Set([D]):A.add(D),tP(g,D,B)),!1;case 22:return k.flags|=65536,D===Yw?k.flags|=16384:(A=k.updateQueue,A===null?(A={transitions:null,markerInstances:null,retryQueue:new Set([D])},k.updateQueue=A):(k=A.retryQueue,k===null?A.retryQueue=new Set([D]):k.add(D)),tP(g,D,B)),!1}throw Error(r(435,k.tag))}return tP(g,D,B),SO(),!1}if(Kn)return A=Eo.current,A!==null?((A.flags&65536)===0&&(A.flags|=256),A.flags|=65536,A.lanes=B,D!==W5&&(g=Error(r(422),{cause:D}),Sx(pl(g,k)))):(D!==W5&&(A=Error(r(423),{cause:D}),Sx(pl(A,k))),g=g.current.alternate,g.flags|=65536,B&=-B,g.lanes|=B,D=pl(D,k),B=MT(g.stateNode,D,B),aT(g,B),Mi!==4&&(Mi=2)),!1;var Z=Error(r(520),{cause:D});if(Z=pl(Z,k),Vx===null?Vx=[Z]:Vx.push(Z),Mi!==4&&(Mi=2),A===null)return!0;D=pl(D,k),k=A;do{switch(k.tag){case 3:return k.flags|=65536,g=B&-B,k.lanes|=g,g=MT(k.stateNode,D,g),aT(k,g),!1;case 1:if(A=k.type,Z=k.stateNode,(k.flags&128)===0&&(typeof A.getDerivedStateFromError=="function"||Z!==null&&typeof Z.componentDidCatch=="function"&&(Lh===null||!Lh.has(Z))))return k.flags|=65536,B&=-B,k.lanes|=B,B=$Q(B),BQ(B,g,k,D),aT(k,B),!1}k=k.return}while(k!==null);return!1}var NT=Error(r(461)),es=!1;function Bs(g,A,k,D){A.child=g===null?zH(A,null,k,D):xp(A,g.child,k,D)}function VQ(g,A,k,D,B){k=k.render;var Z=A.ref;if("ref"in D){var oe={};for(var pe in D)pe!=="ref"&&(oe[pe]=D[pe])}else oe=D;return pp(A),D=hT(g,A,k,oe,Z,B),pe=dT(),g!==null&&!es?(pT(g,A,B),Ku(g,A,B)):(Kn&&pe&&U5(A),A.flags|=1,Bs(g,A,D,B),A.child)}function HQ(g,A,k,D,B){if(g===null){var Z=k.type;return typeof Z=="function"&&!z5(Z)&&Z.defaultProps===void 0&&k.compare===null?(A.tag=15,A.type=Z,QQ(g,A,Z,D,B)):(g=Zw(k.type,null,D,A,A.mode,B),g.ref=A.ref,g.return=A,A.child=g)}if(Z=g.child,!$T(g,B)){var oe=Z.memoizedProps;if(k=k.compare,k=k!==null?k:Oh,k(oe,D)&&g.ref===A.ref)return Ku(g,A,B)}return A.flags|=1,g=Gu(Z,D),g.ref=A.ref,g.return=A,A.child=g}function QQ(g,A,k,D,B){if(g!==null){var Z=g.memoizedProps;if(Oh(Z,D)&&g.ref===A.ref)if(es=!1,A.pendingProps=D=Z,$T(g,B))(g.flags&131072)!==0&&(es=!0);else return A.lanes=g.lanes,Ku(g,A,B)}return DT(g,A,k,D,B)}function zQ(g,A,k,D){var B=D.children,Z=g!==null?g.memoizedState:null;if(g===null&&A.stateNode===null&&(A.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),D.mode==="hidden"){if((A.flags&128)!==0){if(Z=Z!==null?Z.baseLanes|k:k,g!==null){for(D=A.child=g.child,B=0;D!==null;)B=B|D.lanes|D.childLanes,D=D.sibling;D=B&~Z}else D=0,A.child=null;return ZQ(g,A,Z,k,D)}if((k&536870912)!==0)A.memoizedState={baseLanes:0,cachePool:null},g!==null&&Ww(A,Z!==null?Z.cachePool:null),Z!==null?UH(A,Z):lT(),XH(A);else return D=A.lanes=536870912,ZQ(g,A,Z!==null?Z.baseLanes|k:k,k,D)}else Z!==null?(Ww(A,Z.cachePool),UH(A,Z),Ih(),A.memoizedState=null):(g!==null&&Ww(A,null),lT(),Ih());return Bs(g,A,B,k),A.child}function _x(g,A){return g!==null&&g.tag===22||A.stateNode!==null||(A.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),A.sibling}function ZQ(g,A,k,D,B){var Z=nT();return Z=Z===null?null:{parent:Ki._currentValue,pool:Z},A.memoizedState={baseLanes:k,cachePool:Z},g!==null&&Ww(A,null),lT(),XH(A),g!==null&&Tm(g,A,D,!0),A.childLanes=B,null}function fO(g,A){return A=dO({mode:A.mode,children:A.children},g.mode),A.ref=g.ref,g.child=A,A.return=g,A}function GQ(g,A,k){return xp(A,g.child,null,k),g=fO(A,A.pendingProps),g.flags|=2,To(A),A.memoizedState=null,g}function _we(g,A,k){var D=A.pendingProps,B=(A.flags&128)!==0;if(A.flags&=-129,g===null){if(Kn){if(D.mode==="hidden")return g=fO(A,D),A.lanes=536870912,_x(null,g);if(uT(A),(g=ii)?(g=iZ(g,yl),g=g!==null&&g.data==="&"?g:null,g!==null&&(A.memoizedState={dehydrated:g,treeContext:kh!==null?{id:Xc,overflow:Wc}:null,retryLane:536870912,hydrationErrors:null},k=PH(g),k.return=A,A.child=k,Fs=A,ii=null)):g=null,g===null)throw Eh(A);return A.lanes=536870912,null}return fO(A,D)}var Z=g.memoizedState;if(Z!==null){var oe=Z.dehydrated;if(uT(A),B)if(A.flags&256)A.flags&=-257,A=GQ(g,A,k);else if(A.memoizedState!==null)A.child=g.child,A.flags|=128,A=null;else throw Error(r(558));else if(es||Tm(g,A,k,!1),B=(k&g.childLanes)!==0,es||B){if(D=Qr,D!==null&&(oe=un(D,k),oe!==0&&oe!==Z.retryLane))throw Z.retryLane=oe,up(g,oe),qa(D,g,oe),NT;SO(),A=GQ(g,A,k)}else g=Z.treeContext,ii=bl(oe.nextSibling),Fs=A,Kn=!0,Ch=null,yl=!1,g!==null&&DH(A,g),A=fO(A,D),A.flags|=4096;return A}return g=Gu(g.child,{mode:D.mode,children:D.children}),g.ref=A.ref,A.child=g,g.return=A,g}function hO(g,A){var k=A.ref;if(k===null)g!==null&&g.ref!==null&&(A.flags|=4194816);else{if(typeof k!="function"&&typeof k!="object")throw Error(r(284));(g===null||g.ref!==k)&&(A.flags|=4194816)}}function DT(g,A,k,D,B){return pp(A),k=hT(g,A,k,D,void 0,B),D=dT(),g!==null&&!es?(pT(g,A,B),Ku(g,A,B)):(Kn&&D&&U5(A),A.flags|=1,Bs(g,A,k,B),A.child)}function UQ(g,A,k,D,B,Z){return pp(A),A.updateQueue=null,k=qH(A,D,k,B),WH(g),D=dT(),g!==null&&!es?(pT(g,A,Z),Ku(g,A,Z)):(Kn&&D&&U5(A),A.flags|=1,Bs(g,A,k,Z),A.child)}function XQ(g,A,k,D,B){if(pp(A),A.stateNode===null){var Z=Om,oe=k.contextType;typeof oe=="object"&&oe!==null&&(Z=$s(oe)),Z=new k(D,Z),A.memoizedState=Z.state!==null&&Z.state!==void 0?Z.state:null,Z.updater=PT,A.stateNode=Z,Z._reactInternals=A,Z=A.stateNode,Z.props=D,Z.state=A.memoizedState,Z.refs={},iT(A),oe=k.contextType,Z.context=typeof oe=="object"&&oe!==null?$s(oe):Om,Z.state=A.memoizedState,oe=k.getDerivedStateFromProps,typeof oe=="function"&&(TT(A,k,oe,D),Z.state=A.memoizedState),typeof k.getDerivedStateFromProps=="function"||typeof Z.getSnapshotBeforeUpdate=="function"||typeof Z.UNSAFE_componentWillMount!="function"&&typeof Z.componentWillMount!="function"||(oe=Z.state,typeof Z.componentWillMount=="function"&&Z.componentWillMount(),typeof Z.UNSAFE_componentWillMount=="function"&&Z.UNSAFE_componentWillMount(),oe!==Z.state&&PT.enqueueReplaceState(Z,Z.state,null),Px(A,D,Z,B),Tx(),Z.state=A.memoizedState),typeof Z.componentDidMount=="function"&&(A.flags|=4194308),D=!0}else if(g===null){Z=A.stateNode;var pe=A.memoizedProps,Ee=vp(k,pe);Z.props=Ee;var Le=Z.context,Ze=k.contextType;oe=Om,typeof Ze=="object"&&Ze!==null&&(oe=$s(Ze));var Xe=k.getDerivedStateFromProps;Ze=typeof Xe=="function"||typeof Z.getSnapshotBeforeUpdate=="function",pe=A.pendingProps!==pe,Ze||typeof Z.UNSAFE_componentWillReceiveProps!="function"&&typeof Z.componentWillReceiveProps!="function"||(pe||Le!==oe)&&_Q(A,Z,D,oe),Ph=!1;var Fe=A.memoizedState;Z.state=Fe,Px(A,D,Z,B),Tx(),Le=A.memoizedState,pe||Fe!==Le||Ph?(typeof Xe=="function"&&(TT(A,k,Xe,D),Le=A.memoizedState),(Ee=Ph||IQ(A,k,Ee,D,Fe,Le,oe))?(Ze||typeof Z.UNSAFE_componentWillMount!="function"&&typeof Z.componentWillMount!="function"||(typeof Z.componentWillMount=="function"&&Z.componentWillMount(),typeof Z.UNSAFE_componentWillMount=="function"&&Z.UNSAFE_componentWillMount()),typeof Z.componentDidMount=="function"&&(A.flags|=4194308)):(typeof Z.componentDidMount=="function"&&(A.flags|=4194308),A.memoizedProps=D,A.memoizedState=Le),Z.props=D,Z.state=Le,Z.context=oe,D=Ee):(typeof Z.componentDidMount=="function"&&(A.flags|=4194308),D=!1)}else{Z=A.stateNode,sT(g,A),oe=A.memoizedProps,Ze=vp(k,oe),Z.props=Ze,Xe=A.pendingProps,Fe=Z.context,Le=k.contextType,Ee=Om,typeof Le=="object"&&Le!==null&&(Ee=$s(Le)),pe=k.getDerivedStateFromProps,(Le=typeof pe=="function"||typeof Z.getSnapshotBeforeUpdate=="function")||typeof Z.UNSAFE_componentWillReceiveProps!="function"&&typeof Z.componentWillReceiveProps!="function"||(oe!==Xe||Fe!==Ee)&&_Q(A,Z,D,Ee),Ph=!1,Fe=A.memoizedState,Z.state=Fe,Px(A,D,Z,B),Tx();var Ve=A.memoizedState;oe!==Xe||Fe!==Ve||Ph||g!==null&&g.dependencies!==null&&Uw(g.dependencies)?(typeof pe=="function"&&(TT(A,k,pe,D),Ve=A.memoizedState),(Ze=Ph||IQ(A,k,Ze,D,Fe,Ve,Ee)||g!==null&&g.dependencies!==null&&Uw(g.dependencies))?(Le||typeof Z.UNSAFE_componentWillUpdate!="function"&&typeof Z.componentWillUpdate!="function"||(typeof Z.componentWillUpdate=="function"&&Z.componentWillUpdate(D,Ve,Ee),typeof Z.UNSAFE_componentWillUpdate=="function"&&Z.UNSAFE_componentWillUpdate(D,Ve,Ee)),typeof Z.componentDidUpdate=="function"&&(A.flags|=4),typeof Z.getSnapshotBeforeUpdate=="function"&&(A.flags|=1024)):(typeof Z.componentDidUpdate!="function"||oe===g.memoizedProps&&Fe===g.memoizedState||(A.flags|=4),typeof Z.getSnapshotBeforeUpdate!="function"||oe===g.memoizedProps&&Fe===g.memoizedState||(A.flags|=1024),A.memoizedProps=D,A.memoizedState=Ve),Z.props=D,Z.state=Ve,Z.context=Ee,D=Ze):(typeof Z.componentDidUpdate!="function"||oe===g.memoizedProps&&Fe===g.memoizedState||(A.flags|=4),typeof Z.getSnapshotBeforeUpdate!="function"||oe===g.memoizedProps&&Fe===g.memoizedState||(A.flags|=1024),D=!1)}return Z=D,hO(g,A),D=(A.flags&128)!==0,Z||D?(Z=A.stateNode,k=D&&typeof k.getDerivedStateFromError!="function"?null:Z.render(),A.flags|=1,g!==null&&D?(A.child=xp(A,g.child,null,B),A.child=xp(A,null,k,B)):Bs(g,A,k,B),A.memoizedState=Z.state,g=A.child):g=Ku(g,A,B),g}function WQ(g,A,k,D){return hp(),A.flags|=256,Bs(g,A,k,D),A.child}var IT={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _T(g){return{baseLanes:g,cachePool:FH()}}function RT(g,A,k){return g=g!==null?g.childLanes&~k:0,A&&(g|=Mo),g}function qQ(g,A,k){var D=A.pendingProps,B=!1,Z=(A.flags&128)!==0,oe;if((oe=Z)||(oe=g!==null&&g.memoizedState===null?!1:(Vi.current&2)!==0),oe&&(B=!0,A.flags&=-129),oe=(A.flags&32)!==0,A.flags&=-33,g===null){if(Kn){if(B?Dh(A):Ih(),(g=ii)?(g=iZ(g,yl),g=g!==null&&g.data!=="&"?g:null,g!==null&&(A.memoizedState={dehydrated:g,treeContext:kh!==null?{id:Xc,overflow:Wc}:null,retryLane:536870912,hydrationErrors:null},k=PH(g),k.return=A,A.child=k,Fs=A,ii=null)):g=null,g===null)throw Eh(A);return yP(g)?A.lanes=32:A.lanes=536870912,null}var pe=D.children;return D=D.fallback,B?(Ih(),B=A.mode,pe=dO({mode:"hidden",children:pe},B),D=fp(D,B,k,null),pe.return=A,D.return=A,pe.sibling=D,A.child=pe,D=A.child,D.memoizedState=_T(k),D.childLanes=RT(g,oe,k),A.memoizedState=IT,_x(null,D)):(Dh(A),jT(A,pe))}var Ee=g.memoizedState;if(Ee!==null&&(pe=Ee.dehydrated,pe!==null)){if(Z)A.flags&256?(Dh(A),A.flags&=-257,A=LT(g,A,k)):A.memoizedState!==null?(Ih(),A.child=g.child,A.flags|=128,A=null):(Ih(),pe=D.fallback,B=A.mode,D=dO({mode:"visible",children:D.children},B),pe=fp(pe,B,k,null),pe.flags|=2,D.return=A,pe.return=A,D.sibling=pe,A.child=D,xp(A,g.child,null,k),D=A.child,D.memoizedState=_T(k),D.childLanes=RT(g,oe,k),A.memoizedState=IT,A=_x(null,D));else if(Dh(A),yP(pe)){if(oe=pe.nextSibling&&pe.nextSibling.dataset,oe)var Le=oe.dgst;oe=Le,D=Error(r(419)),D.stack="",D.digest=oe,Sx({value:D,source:null,stack:null}),A=LT(g,A,k)}else if(es||Tm(g,A,k,!1),oe=(k&g.childLanes)!==0,es||oe){if(oe=Qr,oe!==null&&(D=un(oe,k),D!==0&&D!==Ee.retryLane))throw Ee.retryLane=D,up(g,D),qa(oe,g,D),NT;gP(pe)||SO(),A=LT(g,A,k)}else gP(pe)?(A.flags|=192,A.child=g.child,A=null):(g=Ee.treeContext,ii=bl(pe.nextSibling),Fs=A,Kn=!0,Ch=null,yl=!1,g!==null&&DH(A,g),A=jT(A,D.children),A.flags|=4096);return A}return B?(Ih(),pe=D.fallback,B=A.mode,Ee=g.child,Le=Ee.sibling,D=Gu(Ee,{mode:"hidden",children:D.children}),D.subtreeFlags=Ee.subtreeFlags&65011712,Le!==null?pe=Gu(Le,pe):(pe=fp(pe,B,k,null),pe.flags|=2),pe.return=A,D.return=A,D.sibling=pe,A.child=D,_x(null,D),D=A.child,pe=g.child.memoizedState,pe===null?pe=_T(k):(B=pe.cachePool,B!==null?(Ee=Ki._currentValue,B=B.parent!==Ee?{parent:Ee,pool:Ee}:B):B=FH(),pe={baseLanes:pe.baseLanes|k,cachePool:B}),D.memoizedState=pe,D.childLanes=RT(g,oe,k),A.memoizedState=IT,_x(g.child,D)):(Dh(A),k=g.child,g=k.sibling,k=Gu(k,{mode:"visible",children:D.children}),k.return=A,k.sibling=null,g!==null&&(oe=A.deletions,oe===null?(A.deletions=[g],A.flags|=16):oe.push(g)),A.child=k,A.memoizedState=null,k)}function jT(g,A){return A=dO({mode:"visible",children:A},g.mode),A.return=g,g.child=A}function dO(g,A){return g=Co(22,g,null,A),g.lanes=0,g}function LT(g,A,k){return xp(A,g.child,null,k),g=jT(A,A.pendingProps.children),g.flags|=2,A.memoizedState=null,g}function YQ(g,A,k){g.lanes|=A;var D=g.alternate;D!==null&&(D.lanes|=A),K5(g.return,A,k)}function FT(g,A,k,D,B,Z){var oe=g.memoizedState;oe===null?g.memoizedState={isBackwards:A,rendering:null,renderingStartTime:0,last:D,tail:k,tailMode:B,treeForkCount:Z}:(oe.isBackwards=A,oe.rendering=null,oe.renderingStartTime=0,oe.last=D,oe.tail=k,oe.tailMode=B,oe.treeForkCount=Z)}function KQ(g,A,k){var D=A.pendingProps,B=D.revealOrder,Z=D.tail;D=D.children;var oe=Vi.current,pe=(oe&2)!==0;if(pe?(oe=oe&1|2,A.flags|=128):oe&=1,U(Vi,oe),Bs(g,A,D,k),D=Kn?Ax:0,!pe&&g!==null&&(g.flags&128)!==0)e:for(g=A.child;g!==null;){if(g.tag===13)g.memoizedState!==null&&YQ(g,k,A);else if(g.tag===19)YQ(g,k,A);else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===A)break e;for(;g.sibling===null;){if(g.return===null||g.return===A)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}switch(B){case"forwards":for(k=A.child,B=null;k!==null;)g=k.alternate,g!==null&&tO(g)===null&&(B=k),k=k.sibling;k=B,k===null?(B=A.child,A.child=null):(B=k.sibling,k.sibling=null),FT(A,!1,B,k,Z,D);break;case"backwards":case"unstable_legacy-backwards":for(k=null,B=A.child,A.child=null;B!==null;){if(g=B.alternate,g!==null&&tO(g)===null){A.child=B;break}g=B.sibling,B.sibling=k,k=B,B=g}FT(A,!0,k,null,Z,D);break;case"together":FT(A,!1,null,null,void 0,D);break;default:A.memoizedState=null}return A.child}function Ku(g,A,k){if(g!==null&&(A.dependencies=g.dependencies),jh|=A.lanes,(k&A.childLanes)===0)if(g!==null){if(Tm(g,A,k,!1),(k&A.childLanes)===0)return null}else return null;if(g!==null&&A.child!==g.child)throw Error(r(153));if(A.child!==null){for(g=A.child,k=Gu(g,g.pendingProps),A.child=k,k.return=A;g.sibling!==null;)g=g.sibling,k=k.sibling=Gu(g,g.pendingProps),k.return=A;k.sibling=null}return A.child}function $T(g,A){return(g.lanes&A)!==0?!0:(g=g.dependencies,!!(g!==null&&Uw(g)))}function Rwe(g,A,k){switch(A.tag){case 3:z(A,A.stateNode.containerInfo),Th(A,Ki,g.memoizedState.cache),hp();break;case 27:case 5:ae(A);break;case 4:z(A,A.stateNode.containerInfo);break;case 10:Th(A,A.type,A.memoizedProps.value);break;case 31:if(A.memoizedState!==null)return A.flags|=128,uT(A),null;break;case 13:var D=A.memoizedState;if(D!==null)return D.dehydrated!==null?(Dh(A),A.flags|=128,null):(k&A.child.childLanes)!==0?qQ(g,A,k):(Dh(A),g=Ku(g,A,k),g!==null?g.sibling:null);Dh(A);break;case 19:var B=(g.flags&128)!==0;if(D=(k&A.childLanes)!==0,D||(Tm(g,A,k,!1),D=(k&A.childLanes)!==0),B){if(D)return KQ(g,A,k);A.flags|=128}if(B=A.memoizedState,B!==null&&(B.rendering=null,B.tail=null,B.lastEffect=null),U(Vi,Vi.current),D)break;return null;case 22:return A.lanes=0,zQ(g,A,k,A.pendingProps);case 24:Th(A,Ki,g.memoizedState.cache)}return Ku(g,A,k)}function JQ(g,A,k){if(g!==null)if(g.memoizedProps!==A.pendingProps)es=!0;else{if(!$T(g,k)&&(A.flags&128)===0)return es=!1,Rwe(g,A,k);es=(g.flags&131072)!==0}else es=!1,Kn&&(A.flags&1048576)!==0&&NH(A,Ax,A.index);switch(A.lanes=0,A.tag){case 16:e:{var D=A.pendingProps;if(g=gp(A.elementType),A.type=g,typeof g=="function")z5(g)?(D=vp(g,D),A.tag=1,A=XQ(null,A,g,D,k)):(A.tag=0,A=DT(null,A,g,D,k));else{if(g!=null){var B=g.$$typeof;if(B===C){A.tag=11,A=VQ(null,A,g,D,k);break e}else if(B===N){A.tag=14,A=HQ(null,A,g,D,k);break e}}throw A=G(g)||g,Error(r(306,A,""))}}return A;case 0:return DT(g,A,A.type,A.pendingProps,k);case 1:return D=A.type,B=vp(D,A.pendingProps),XQ(g,A,D,B,k);case 3:e:{if(z(A,A.stateNode.containerInfo),g===null)throw Error(r(387));D=A.pendingProps;var Z=A.memoizedState;B=Z.element,sT(g,A),Px(A,D,null,k);var oe=A.memoizedState;if(D=oe.cache,Th(A,Ki,D),D!==Z.cache&&J5(A,[Ki],k,!0),Tx(),D=oe.element,Z.isDehydrated)if(Z={element:D,isDehydrated:!1,cache:oe.cache},A.updateQueue.baseState=Z,A.memoizedState=Z,A.flags&256){A=WQ(g,A,D,k);break e}else if(D!==B){B=pl(Error(r(424)),A),Sx(B),A=WQ(g,A,D,k);break e}else{switch(g=A.stateNode.containerInfo,g.nodeType){case 9:g=g.body;break;default:g=g.nodeName==="HTML"?g.ownerDocument.body:g}for(ii=bl(g.firstChild),Fs=A,Kn=!0,Ch=null,yl=!0,k=zH(A,null,D,k),A.child=k;k;)k.flags=k.flags&-3|4096,k=k.sibling}else{if(hp(),D===B){A=Ku(g,A,k);break e}Bs(g,A,D,k)}A=A.child}return A;case 26:return hO(g,A),g===null?(k=uZ(A.type,null,A.pendingProps,null))?A.memoizedState=k:Kn||(k=A.type,g=A.pendingProps,D=PO(ee.current).createElement(k),D[mn]=A,D[Ht]=g,Vs(D,k,g),Ct(D),A.stateNode=D):A.memoizedState=uZ(A.type,g.memoizedProps,A.pendingProps,g.memoizedState),null;case 27:return ae(A),g===null&&Kn&&(D=A.stateNode=oZ(A.type,A.pendingProps,ee.current),Fs=A,yl=!0,B=ii,Vh(A.type)?(xP=B,ii=bl(D.firstChild)):ii=B),Bs(g,A,A.pendingProps.children,k),hO(g,A),g===null&&(A.flags|=4194304),A.child;case 5:return g===null&&Kn&&((B=D=ii)&&(D=fOe(D,A.type,A.pendingProps,yl),D!==null?(A.stateNode=D,Fs=A,ii=bl(D.firstChild),yl=!1,B=!0):B=!1),B||Eh(A)),ae(A),B=A.type,Z=A.pendingProps,oe=g!==null?g.memoizedProps:null,D=Z.children,dP(B,Z)?D=null:oe!==null&&dP(B,oe)&&(A.flags|=32),A.memoizedState!==null&&(B=hT(g,A,Cwe,null,null,k),Wx._currentValue=B),hO(g,A),Bs(g,A,D,k),A.child;case 6:return g===null&&Kn&&((g=k=ii)&&(k=hOe(k,A.pendingProps,yl),k!==null?(A.stateNode=k,Fs=A,ii=null,g=!0):g=!1),g||Eh(A)),null;case 13:return qQ(g,A,k);case 4:return z(A,A.stateNode.containerInfo),D=A.pendingProps,g===null?A.child=xp(A,null,D,k):Bs(g,A,D,k),A.child;case 11:return VQ(g,A,A.type,A.pendingProps,k);case 7:return Bs(g,A,A.pendingProps,k),A.child;case 8:return Bs(g,A,A.pendingProps.children,k),A.child;case 12:return Bs(g,A,A.pendingProps.children,k),A.child;case 10:return D=A.pendingProps,Th(A,A.type,D.value),Bs(g,A,D.children,k),A.child;case 9:return B=A.type._context,D=A.pendingProps.children,pp(A),B=$s(B),D=D(B),A.flags|=1,Bs(g,A,D,k),A.child;case 14:return HQ(g,A,A.type,A.pendingProps,k);case 15:return QQ(g,A,A.type,A.pendingProps,k);case 19:return KQ(g,A,k);case 31:return _we(g,A,k);case 22:return zQ(g,A,k,A.pendingProps);case 24:return pp(A),D=$s(Ki),g===null?(B=nT(),B===null&&(B=Qr,Z=eT(),B.pooledCache=Z,Z.refCount++,Z!==null&&(B.pooledCacheLanes|=k),B=Z),A.memoizedState={parent:D,cache:B},iT(A),Th(A,Ki,B)):((g.lanes&k)!==0&&(sT(g,A),Px(A,null,null,k),Tx()),B=g.memoizedState,Z=A.memoizedState,B.parent!==D?(B={parent:D,cache:D},A.memoizedState=B,A.lanes===0&&(A.memoizedState=A.updateQueue.baseState=B),Th(A,Ki,D)):(D=Z.cache,Th(A,Ki,D),D!==B.cache&&J5(A,[Ki],k,!0))),Bs(g,A,A.pendingProps.children,k),A.child;case 29:throw A.pendingProps}throw Error(r(156,A.tag))}function Ju(g){g.flags|=4}function BT(g,A,k,D,B){if((A=(g.mode&32)!==0)&&(A=!1),A){if(g.flags|=16777216,(B&335544128)===B)if(g.stateNode.complete)g.flags|=8192;else if(Cz())g.flags|=8192;else throw yp=Yw,rT}else g.flags&=-16777217}function ez(g,A){if(A.type!=="stylesheet"||(A.state.loading&4)!==0)g.flags&=-16777217;else if(g.flags|=16777216,!mZ(A))if(Cz())g.flags|=8192;else throw yp=Yw,rT}function pO(g,A){A!==null&&(g.flags|=4),g.flags&16384&&(A=g.tag!==22?cn():536870912,g.lanes|=A,Bm|=A)}function Rx(g,A){if(!Kn)switch(g.tailMode){case"hidden":A=g.tail;for(var k=null;A!==null;)A.alternate!==null&&(k=A),A=A.sibling;k===null?g.tail=null:k.sibling=null;break;case"collapsed":k=g.tail;for(var D=null;k!==null;)k.alternate!==null&&(D=k),k=k.sibling;D===null?A||g.tail===null?g.tail=null:g.tail.sibling=null:D.sibling=null}}function si(g){var A=g.alternate!==null&&g.alternate.child===g.child,k=0,D=0;if(A)for(var B=g.child;B!==null;)k|=B.lanes|B.childLanes,D|=B.subtreeFlags&65011712,D|=B.flags&65011712,B.return=g,B=B.sibling;else for(B=g.child;B!==null;)k|=B.lanes|B.childLanes,D|=B.subtreeFlags,D|=B.flags,B.return=g,B=B.sibling;return g.subtreeFlags|=D,g.childLanes=k,A}function jwe(g,A,k){var D=A.pendingProps;switch(X5(A),A.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return si(A),null;case 1:return si(A),null;case 3:return k=A.stateNode,D=null,g!==null&&(D=g.memoizedState.cache),A.memoizedState.cache!==D&&(A.flags|=2048),Wu(Ki),V(),k.pendingContext&&(k.context=k.pendingContext,k.pendingContext=null),(g===null||g.child===null)&&(Em(A)?Ju(A):g===null||g.memoizedState.isDehydrated&&(A.flags&256)===0||(A.flags|=1024,q5())),si(A),null;case 26:var B=A.type,Z=A.memoizedState;return g===null?(Ju(A),Z!==null?(si(A),ez(A,Z)):(si(A),BT(A,B,null,D,k))):Z?Z!==g.memoizedState?(Ju(A),si(A),ez(A,Z)):(si(A),A.flags&=-16777217):(g=g.memoizedProps,g!==D&&Ju(A),si(A),BT(A,B,g,D,k)),null;case 27:if(he(A),k=ee.current,B=A.type,g!==null&&A.stateNode!=null)g.memoizedProps!==D&&Ju(A);else{if(!D){if(A.stateNode===null)throw Error(r(166));return si(A),null}g=Q.current,Em(A)?IH(A):(g=oZ(B,D,k),A.stateNode=g,Ju(A))}return si(A),null;case 5:if(he(A),B=A.type,g!==null&&A.stateNode!=null)g.memoizedProps!==D&&Ju(A);else{if(!D){if(A.stateNode===null)throw Error(r(166));return si(A),null}if(Z=Q.current,Em(A))IH(A);else{var oe=PO(ee.current);switch(Z){case 1:Z=oe.createElementNS("http://www.w3.org/2000/svg",B);break;case 2:Z=oe.createElementNS("http://www.w3.org/1998/Math/MathML",B);break;default:switch(B){case"svg":Z=oe.createElementNS("http://www.w3.org/2000/svg",B);break;case"math":Z=oe.createElementNS("http://www.w3.org/1998/Math/MathML",B);break;case"script":Z=oe.createElement("div"),Z.innerHTML="<script><\/script>",Z=Z.removeChild(Z.firstChild);break;case"select":Z=typeof D.is=="string"?oe.createElement("select",{is:D.is}):oe.createElement("select"),D.multiple?Z.multiple=!0:D.size&&(Z.size=D.size);break;default:Z=typeof D.is=="string"?oe.createElement(B,{is:D.is}):oe.createElement(B)}}Z[mn]=A,Z[Ht]=D;e:for(oe=A.child;oe!==null;){if(oe.tag===5||oe.tag===6)Z.appendChild(oe.stateNode);else if(oe.tag!==4&&oe.tag!==27&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===A)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===A)break e;oe=oe.return}oe.sibling.return=oe.return,oe=oe.sibling}A.stateNode=Z;e:switch(Vs(Z,B,D),B){case"button":case"input":case"select":case"textarea":D=!!D.autoFocus;break e;case"img":D=!0;break e;default:D=!1}D&&Ju(A)}}return si(A),BT(A,A.type,g===null?null:g.memoizedProps,A.pendingProps,k),null;case 6:if(g&&A.stateNode!=null)g.memoizedProps!==D&&Ju(A);else{if(typeof D!="string"&&A.stateNode===null)throw Error(r(166));if(g=ee.current,Em(A)){if(g=A.stateNode,k=A.memoizedProps,D=null,B=Fs,B!==null)switch(B.tag){case 27:case 5:D=B.memoizedProps}g[mn]=A,g=!!(g.nodeValue===k||D!==null&&D.suppressHydrationWarning===!0||qz(g.nodeValue,k)),g||Eh(A,!0)}else g=PO(g).createTextNode(D),g[mn]=A,A.stateNode=g}return si(A),null;case 31:if(k=A.memoizedState,g===null||g.memoizedState!==null){if(D=Em(A),k!==null){if(g===null){if(!D)throw Error(r(318));if(g=A.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(557));g[mn]=A}else hp(),(A.flags&128)===0&&(A.memoizedState=null),A.flags|=4;si(A),g=!1}else k=q5(),g!==null&&g.memoizedState!==null&&(g.memoizedState.hydrationErrors=k),g=!0;if(!g)return A.flags&256?(To(A),A):(To(A),null);if((A.flags&128)!==0)throw Error(r(558))}return si(A),null;case 13:if(D=A.memoizedState,g===null||g.memoizedState!==null&&g.memoizedState.dehydrated!==null){if(B=Em(A),D!==null&&D.dehydrated!==null){if(g===null){if(!B)throw Error(r(318));if(B=A.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(r(317));B[mn]=A}else hp(),(A.flags&128)===0&&(A.memoizedState=null),A.flags|=4;si(A),B=!1}else B=q5(),g!==null&&g.memoizedState!==null&&(g.memoizedState.hydrationErrors=B),B=!0;if(!B)return A.flags&256?(To(A),A):(To(A),null)}return To(A),(A.flags&128)!==0?(A.lanes=k,A):(k=D!==null,g=g!==null&&g.memoizedState!==null,k&&(D=A.child,B=null,D.alternate!==null&&D.alternate.memoizedState!==null&&D.alternate.memoizedState.cachePool!==null&&(B=D.alternate.memoizedState.cachePool.pool),Z=null,D.memoizedState!==null&&D.memoizedState.cachePool!==null&&(Z=D.memoizedState.cachePool.pool),Z!==B&&(D.flags|=2048)),k!==g&&k&&(A.child.flags|=8192),pO(A,A.updateQueue),si(A),null);case 4:return V(),g===null&&lP(A.stateNode.containerInfo),si(A),null;case 10:return Wu(A.type),si(A),null;case 19:if(F(Vi),D=A.memoizedState,D===null)return si(A),null;if(B=(A.flags&128)!==0,Z=D.rendering,Z===null)if(B)Rx(D,!1);else{if(Mi!==0||g!==null&&(g.flags&128)!==0)for(g=A.child;g!==null;){if(Z=tO(g),Z!==null){for(A.flags|=128,Rx(D,!1),g=Z.updateQueue,A.updateQueue=g,pO(A,g),A.subtreeFlags=0,g=k,k=A.child;k!==null;)TH(k,g),k=k.sibling;return U(Vi,Vi.current&1|2),Kn&&Uu(A,D.treeForkCount),A.child}g=g.sibling}D.tail!==null&&Ge()>bO&&(A.flags|=128,B=!0,Rx(D,!1),A.lanes=4194304)}else{if(!B)if(g=tO(Z),g!==null){if(A.flags|=128,B=!0,g=g.updateQueue,A.updateQueue=g,pO(A,g),Rx(D,!0),D.tail===null&&D.tailMode==="hidden"&&!Z.alternate&&!Kn)return si(A),null}else 2*Ge()-D.renderingStartTime>bO&&k!==536870912&&(A.flags|=128,B=!0,Rx(D,!1),A.lanes=4194304);D.isBackwards?(Z.sibling=A.child,A.child=Z):(g=D.last,g!==null?g.sibling=Z:A.child=Z,D.last=Z)}return D.tail!==null?(g=D.tail,D.rendering=g,D.tail=g.sibling,D.renderingStartTime=Ge(),g.sibling=null,k=Vi.current,U(Vi,B?k&1|2:k&1),Kn&&Uu(A,D.treeForkCount),g):(si(A),null);case 22:case 23:return To(A),cT(),D=A.memoizedState!==null,g!==null?g.memoizedState!==null!==D&&(A.flags|=8192):D&&(A.flags|=8192),D?(k&536870912)!==0&&(A.flags&128)===0&&(si(A),A.subtreeFlags&6&&(A.flags|=8192)):si(A),k=A.updateQueue,k!==null&&pO(A,k.retryQueue),k=null,g!==null&&g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(k=g.memoizedState.cachePool.pool),D=null,A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(D=A.memoizedState.cachePool.pool),D!==k&&(A.flags|=2048),g!==null&&F(mp),null;case 24:return k=null,g!==null&&(k=g.memoizedState.cache),A.memoizedState.cache!==k&&(A.flags|=2048),Wu(Ki),si(A),null;case 25:return null;case 30:return null}throw Error(r(156,A.tag))}function Lwe(g,A){switch(X5(A),A.tag){case 1:return g=A.flags,g&65536?(A.flags=g&-65537|128,A):null;case 3:return Wu(Ki),V(),g=A.flags,(g&65536)!==0&&(g&128)===0?(A.flags=g&-65537|128,A):null;case 26:case 27:case 5:return he(A),null;case 31:if(A.memoizedState!==null){if(To(A),A.alternate===null)throw Error(r(340));hp()}return g=A.flags,g&65536?(A.flags=g&-65537|128,A):null;case 13:if(To(A),g=A.memoizedState,g!==null&&g.dehydrated!==null){if(A.alternate===null)throw Error(r(340));hp()}return g=A.flags,g&65536?(A.flags=g&-65537|128,A):null;case 19:return F(Vi),null;case 4:return V(),null;case 10:return Wu(A.type),null;case 22:case 23:return To(A),cT(),g!==null&&F(mp),g=A.flags,g&65536?(A.flags=g&-65537|128,A):null;case 24:return Wu(Ki),null;case 25:return null;default:return null}}function tz(g,A){switch(X5(A),A.tag){case 3:Wu(Ki),V();break;case 26:case 27:case 5:he(A);break;case 4:V();break;case 31:A.memoizedState!==null&&To(A);break;case 13:To(A);break;case 19:F(Vi);break;case 10:Wu(A.type);break;case 22:case 23:To(A),cT(),g!==null&&F(mp);break;case 24:Wu(Ki)}}function jx(g,A){try{var k=A.updateQueue,D=k!==null?k.lastEffect:null;if(D!==null){var B=D.next;k=B;do{if((k.tag&g)===g){D=void 0;var Z=k.create,oe=k.inst;D=Z(),oe.destroy=D}k=k.next}while(k!==B)}}catch(pe){Pr(A,A.return,pe)}}function _h(g,A,k){try{var D=A.updateQueue,B=D!==null?D.lastEffect:null;if(B!==null){var Z=B.next;D=Z;do{if((D.tag&g)===g){var oe=D.inst,pe=oe.destroy;if(pe!==void 0){oe.destroy=void 0,B=A;var Ee=k,Le=pe;try{Le()}catch(Ze){Pr(B,Ee,Ze)}}}D=D.next}while(D!==Z)}}catch(Ze){Pr(A,A.return,Ze)}}function nz(g){var A=g.updateQueue;if(A!==null){var k=g.stateNode;try{GH(A,k)}catch(D){Pr(g,g.return,D)}}}function rz(g,A,k){k.props=vp(g.type,g.memoizedProps),k.state=g.memoizedState;try{k.componentWillUnmount()}catch(D){Pr(g,A,D)}}function Lx(g,A){try{var k=g.ref;if(k!==null){switch(g.tag){case 26:case 27:case 5:var D=g.stateNode;break;case 30:D=g.stateNode;break;default:D=g.stateNode}typeof k=="function"?g.refCleanup=k(D):k.current=D}}catch(B){Pr(g,A,B)}}function qc(g,A){var k=g.ref,D=g.refCleanup;if(k!==null)if(typeof D=="function")try{D()}catch(B){Pr(g,A,B)}finally{g.refCleanup=null,g=g.alternate,g!=null&&(g.refCleanup=null)}else if(typeof k=="function")try{k(null)}catch(B){Pr(g,A,B)}else k.current=null}function iz(g){var A=g.type,k=g.memoizedProps,D=g.stateNode;try{e:switch(A){case"button":case"input":case"select":case"textarea":k.autoFocus&&D.focus();break e;case"img":k.src?D.src=k.src:k.srcSet&&(D.srcset=k.srcSet)}}catch(B){Pr(g,g.return,B)}}function VT(g,A,k){try{var D=g.stateNode;sOe(D,g.type,k,A),D[Ht]=A}catch(B){Pr(g,g.return,B)}}function sz(g){return g.tag===5||g.tag===3||g.tag===26||g.tag===27&&Vh(g.type)||g.tag===4}function HT(g){e:for(;;){for(;g.sibling===null;){if(g.return===null||sz(g.return))return null;g=g.return}for(g.sibling.return=g.return,g=g.sibling;g.tag!==5&&g.tag!==6&&g.tag!==18;){if(g.tag===27&&Vh(g.type)||g.flags&2||g.child===null||g.tag===4)continue e;g.child.return=g,g=g.child}if(!(g.flags&2))return g.stateNode}}function QT(g,A,k){var D=g.tag;if(D===5||D===6)g=g.stateNode,A?(k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k).insertBefore(g,A):(A=k.nodeType===9?k.body:k.nodeName==="HTML"?k.ownerDocument.body:k,A.appendChild(g),k=k._reactRootContainer,k!=null||A.onclick!==null||(A.onclick=Ss));else if(D!==4&&(D===27&&Vh(g.type)&&(k=g.stateNode,A=null),g=g.child,g!==null))for(QT(g,A,k),g=g.sibling;g!==null;)QT(g,A,k),g=g.sibling}function mO(g,A,k){var D=g.tag;if(D===5||D===6)g=g.stateNode,A?k.insertBefore(g,A):k.appendChild(g);else if(D!==4&&(D===27&&Vh(g.type)&&(k=g.stateNode),g=g.child,g!==null))for(mO(g,A,k),g=g.sibling;g!==null;)mO(g,A,k),g=g.sibling}function az(g){var A=g.stateNode,k=g.memoizedProps;try{for(var D=g.type,B=A.attributes;B.length;)A.removeAttributeNode(B[0]);Vs(A,D,k),A[mn]=g,A[Ht]=k}catch(Z){Pr(g,g.return,Z)}}var ef=!1,ts=!1,zT=!1,oz=typeof WeakSet=="function"?WeakSet:Set,Os=null;function Fwe(g,A){if(g=g.containerInfo,fP=jO,g=bx(g),Am(g)){if("selectionStart"in g)var k={start:g.selectionStart,end:g.selectionEnd};else e:{k=(k=g.ownerDocument)&&k.defaultView||window;var D=k.getSelection&&k.getSelection();if(D&&D.rangeCount!==0){k=D.anchorNode;var B=D.anchorOffset,Z=D.focusNode;D=D.focusOffset;try{k.nodeType,Z.nodeType}catch{k=null;break e}var oe=0,pe=-1,Ee=-1,Le=0,Ze=0,Xe=g,Fe=null;t:for(;;){for(var Ve;Xe!==k||B!==0&&Xe.nodeType!==3||(pe=oe+B),Xe!==Z||D!==0&&Xe.nodeType!==3||(Ee=oe+D),Xe.nodeType===3&&(oe+=Xe.nodeValue.length),(Ve=Xe.firstChild)!==null;)Fe=Xe,Xe=Ve;for(;;){if(Xe===g)break t;if(Fe===k&&++Le===B&&(pe=oe),Fe===Z&&++Ze===D&&(Ee=oe),(Ve=Xe.nextSibling)!==null)break;Xe=Fe,Fe=Xe.parentNode}Xe=Ve}k=pe===-1||Ee===-1?null:{start:pe,end:Ee}}else k=null}k=k||{start:0,end:0}}else k=null;for(hP={focusedElem:g,selectionRange:k},jO=!1,Os=A;Os!==null;)if(A=Os,g=A.child,(A.subtreeFlags&1028)!==0&&g!==null)g.return=A,Os=g;else for(;Os!==null;){switch(A=Os,Z=A.alternate,g=A.flags,A.tag){case 0:if((g&4)!==0&&(g=A.updateQueue,g=g!==null?g.events:null,g!==null))for(k=0;k<g.length;k++)B=g[k],B.ref.impl=B.nextImpl;break;case 11:case 15:break;case 1:if((g&1024)!==0&&Z!==null){g=void 0,k=A,B=Z.memoizedProps,Z=Z.memoizedState,D=k.stateNode;try{var jt=vp(k.type,B);g=D.getSnapshotBeforeUpdate(jt,Z),D.__reactInternalSnapshotBeforeUpdate=g}catch(an){Pr(k,k.return,an)}}break;case 3:if((g&1024)!==0){if(g=A.stateNode.containerInfo,k=g.nodeType,k===9)mP(g);else if(k===1)switch(g.nodeName){case"HEAD":case"HTML":case"BODY":mP(g);break;default:g.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((g&1024)!==0)throw Error(r(163))}if(g=A.sibling,g!==null){g.return=A.return,Os=g;break}Os=A.return}}function lz(g,A,k){var D=k.flags;switch(k.tag){case 0:case 11:case 15:nf(g,k),D&4&&jx(5,k);break;case 1:if(nf(g,k),D&4)if(g=k.stateNode,A===null)try{g.componentDidMount()}catch(oe){Pr(k,k.return,oe)}else{var B=vp(k.type,A.memoizedProps);A=A.memoizedState;try{g.componentDidUpdate(B,A,g.__reactInternalSnapshotBeforeUpdate)}catch(oe){Pr(k,k.return,oe)}}D&64&&nz(k),D&512&&Lx(k,k.return);break;case 3:if(nf(g,k),D&64&&(g=k.updateQueue,g!==null)){if(A=null,k.child!==null)switch(k.child.tag){case 27:case 5:A=k.child.stateNode;break;case 1:A=k.child.stateNode}try{GH(g,A)}catch(oe){Pr(k,k.return,oe)}}break;case 27:A===null&&D&4&&az(k);case 26:case 5:nf(g,k),A===null&&D&4&&iz(k),D&512&&Lx(k,k.return);break;case 12:nf(g,k);break;case 31:nf(g,k),D&4&&fz(g,k);break;case 13:nf(g,k),D&4&&hz(g,k),D&64&&(g=k.memoizedState,g!==null&&(g=g.dehydrated,g!==null&&(k=Uwe.bind(null,k),dOe(g,k))));break;case 22:if(D=k.memoizedState!==null||ef,!D){A=A!==null&&A.memoizedState!==null||ts,B=ef;var Z=ts;ef=D,(ts=A)&&!Z?rf(g,k,(k.subtreeFlags&8772)!==0):nf(g,k),ef=B,ts=Z}break;case 30:break;default:nf(g,k)}}function cz(g){var A=g.alternate;A!==null&&(g.alternate=null,cz(A)),g.child=null,g.deletions=null,g.sibling=null,g.tag===5&&(A=g.stateNode,A!==null&&or(A)),g.stateNode=null,g.return=null,g.dependencies=null,g.memoizedProps=null,g.memoizedState=null,g.pendingProps=null,g.stateNode=null,g.updateQueue=null}var ci=null,Ga=!1;function tf(g,A,k){for(k=k.child;k!==null;)uz(g,A,k),k=k.sibling}function uz(g,A,k){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(en,k)}catch{}switch(k.tag){case 26:ts||qc(k,A),tf(g,A,k),k.memoizedState?k.memoizedState.count--:k.stateNode&&(k=k.stateNode,k.parentNode.removeChild(k));break;case 27:ts||qc(k,A);var D=ci,B=Ga;Vh(k.type)&&(ci=k.stateNode,Ga=!1),tf(g,A,k),Gx(k.stateNode),ci=D,Ga=B;break;case 5:ts||qc(k,A);case 6:if(D=ci,B=Ga,ci=null,tf(g,A,k),ci=D,Ga=B,ci!==null)if(Ga)try{(ci.nodeType===9?ci.body:ci.nodeName==="HTML"?ci.ownerDocument.body:ci).removeChild(k.stateNode)}catch(Z){Pr(k,A,Z)}else try{ci.removeChild(k.stateNode)}catch(Z){Pr(k,A,Z)}break;case 18:ci!==null&&(Ga?(g=ci,nZ(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,k.stateNode),Xm(g)):nZ(ci,k.stateNode));break;case 4:D=ci,B=Ga,ci=k.stateNode.containerInfo,Ga=!0,tf(g,A,k),ci=D,Ga=B;break;case 0:case 11:case 14:case 15:_h(2,k,A),ts||_h(4,k,A),tf(g,A,k);break;case 1:ts||(qc(k,A),D=k.stateNode,typeof D.componentWillUnmount=="function"&&rz(k,A,D)),tf(g,A,k);break;case 21:tf(g,A,k);break;case 22:ts=(D=ts)||k.memoizedState!==null,tf(g,A,k),ts=D;break;default:tf(g,A,k)}}function fz(g,A){if(A.memoizedState===null&&(g=A.alternate,g!==null&&(g=g.memoizedState,g!==null))){g=g.dehydrated;try{Xm(g)}catch(k){Pr(A,A.return,k)}}}function hz(g,A){if(A.memoizedState===null&&(g=A.alternate,g!==null&&(g=g.memoizedState,g!==null&&(g=g.dehydrated,g!==null))))try{Xm(g)}catch(k){Pr(A,A.return,k)}}function $we(g){switch(g.tag){case 31:case 13:case 19:var A=g.stateNode;return A===null&&(A=g.stateNode=new oz),A;case 22:return g=g.stateNode,A=g._retryCache,A===null&&(A=g._retryCache=new oz),A;default:throw Error(r(435,g.tag))}}function gO(g,A){var k=$we(g);A.forEach(function(D){if(!k.has(D)){k.add(D);var B=Xwe.bind(null,g,D);D.then(B,B)}})}function Ua(g,A){var k=A.deletions;if(k!==null)for(var D=0;D<k.length;D++){var B=k[D],Z=g,oe=A,pe=oe;e:for(;pe!==null;){switch(pe.tag){case 27:if(Vh(pe.type)){ci=pe.stateNode,Ga=!1;break e}break;case 5:ci=pe.stateNode,Ga=!1;break e;case 3:case 4:ci=pe.stateNode.containerInfo,Ga=!0;break e}pe=pe.return}if(ci===null)throw Error(r(160));uz(Z,oe,B),ci=null,Ga=!1,Z=B.alternate,Z!==null&&(Z.return=null),B.return=null}if(A.subtreeFlags&13886)for(A=A.child;A!==null;)dz(A,g),A=A.sibling}var ic=null;function dz(g,A){var k=g.alternate,D=g.flags;switch(g.tag){case 0:case 11:case 14:case 15:Ua(A,g),Xa(g),D&4&&(_h(3,g,g.return),jx(3,g),_h(5,g,g.return));break;case 1:Ua(A,g),Xa(g),D&512&&(ts||k===null||qc(k,k.return)),D&64&&ef&&(g=g.updateQueue,g!==null&&(D=g.callbacks,D!==null&&(k=g.shared.hiddenCallbacks,g.shared.hiddenCallbacks=k===null?D:k.concat(D))));break;case 26:var B=ic;if(Ua(A,g),Xa(g),D&512&&(ts||k===null||qc(k,k.return)),D&4){var Z=k!==null?k.memoizedState:null;if(D=g.memoizedState,k===null)if(D===null)if(g.stateNode===null){e:{D=g.type,k=g.memoizedProps,B=B.ownerDocument||B;t:switch(D){case"title":Z=B.getElementsByTagName("title")[0],(!Z||Z[bt]||Z[mn]||Z.namespaceURI==="http://www.w3.org/2000/svg"||Z.hasAttribute("itemprop"))&&(Z=B.createElement(D),B.head.insertBefore(Z,B.querySelector("head > title"))),Vs(Z,D,k),Z[mn]=g,Ct(Z),D=Z;break e;case"link":var oe=dZ("link","href",B).get(D+(k.href||""));if(oe){for(var pe=0;pe<oe.length;pe++)if(Z=oe[pe],Z.getAttribute("href")===(k.href==null||k.href===""?null:k.href)&&Z.getAttribute("rel")===(k.rel==null?null:k.rel)&&Z.getAttribute("title")===(k.title==null?null:k.title)&&Z.getAttribute("crossorigin")===(k.crossOrigin==null?null:k.crossOrigin)){oe.splice(pe,1);break t}}Z=B.createElement(D),Vs(Z,D,k),B.head.appendChild(Z);break;case"meta":if(oe=dZ("meta","content",B).get(D+(k.content||""))){for(pe=0;pe<oe.length;pe++)if(Z=oe[pe],Z.getAttribute("content")===(k.content==null?null:""+k.content)&&Z.getAttribute("name")===(k.name==null?null:k.name)&&Z.getAttribute("property")===(k.property==null?null:k.property)&&Z.getAttribute("http-equiv")===(k.httpEquiv==null?null:k.httpEquiv)&&Z.getAttribute("charset")===(k.charSet==null?null:k.charSet)){oe.splice(pe,1);break t}}Z=B.createElement(D),Vs(Z,D,k),B.head.appendChild(Z);break;default:throw Error(r(468,D))}Z[mn]=g,Ct(Z),D=Z}g.stateNode=D}else pZ(B,g.type,g.stateNode);else g.stateNode=hZ(B,D,g.memoizedProps);else Z!==D?(Z===null?k.stateNode!==null&&(k=k.stateNode,k.parentNode.removeChild(k)):Z.count--,D===null?pZ(B,g.type,g.stateNode):hZ(B,D,g.memoizedProps)):D===null&&g.stateNode!==null&&VT(g,g.memoizedProps,k.memoizedProps)}break;case 27:Ua(A,g),Xa(g),D&512&&(ts||k===null||qc(k,k.return)),k!==null&&D&4&&VT(g,g.memoizedProps,k.memoizedProps);break;case 5:if(Ua(A,g),Xa(g),D&512&&(ts||k===null||qc(k,k.return)),g.flags&32){B=g.stateNode;try{tn(B,"")}catch(jt){Pr(g,g.return,jt)}}D&4&&g.stateNode!=null&&(B=g.memoizedProps,VT(g,B,k!==null?k.memoizedProps:B)),D&1024&&(zT=!0);break;case 6:if(Ua(A,g),Xa(g),D&4){if(g.stateNode===null)throw Error(r(162));D=g.memoizedProps,k=g.stateNode;try{k.nodeValue=D}catch(jt){Pr(g,g.return,jt)}}break;case 3:if(DO=null,B=ic,ic=MO(A.containerInfo),Ua(A,g),ic=B,Xa(g),D&4&&k!==null&&k.memoizedState.isDehydrated)try{Xm(A.containerInfo)}catch(jt){Pr(g,g.return,jt)}zT&&(zT=!1,pz(g));break;case 4:D=ic,ic=MO(g.stateNode.containerInfo),Ua(A,g),Xa(g),ic=D;break;case 12:Ua(A,g),Xa(g);break;case 31:Ua(A,g),Xa(g),D&4&&(D=g.updateQueue,D!==null&&(g.updateQueue=null,gO(g,D)));break;case 13:Ua(A,g),Xa(g),g.child.flags&8192&&g.memoizedState!==null!=(k!==null&&k.memoizedState!==null)&&(xO=Ge()),D&4&&(D=g.updateQueue,D!==null&&(g.updateQueue=null,gO(g,D)));break;case 22:B=g.memoizedState!==null;var Ee=k!==null&&k.memoizedState!==null,Le=ef,Ze=ts;if(ef=Le||B,ts=Ze||Ee,Ua(A,g),ts=Ze,ef=Le,Xa(g),D&8192)e:for(A=g.stateNode,A._visibility=B?A._visibility&-2:A._visibility|1,B&&(k===null||Ee||ef||ts||Ap(g)),k=null,A=g;;){if(A.tag===5||A.tag===26){if(k===null){Ee=k=A;try{if(Z=Ee.stateNode,B)oe=Z.style,typeof oe.setProperty=="function"?oe.setProperty("display","none","important"):oe.display="none";else{pe=Ee.stateNode;var Xe=Ee.memoizedProps.style,Fe=Xe!=null&&Xe.hasOwnProperty("display")?Xe.display:null;pe.style.display=Fe==null||typeof Fe=="boolean"?"":(""+Fe).trim()}}catch(jt){Pr(Ee,Ee.return,jt)}}}else if(A.tag===6){if(k===null){Ee=A;try{Ee.stateNode.nodeValue=B?"":Ee.memoizedProps}catch(jt){Pr(Ee,Ee.return,jt)}}}else if(A.tag===18){if(k===null){Ee=A;try{var Ve=Ee.stateNode;B?rZ(Ve,!0):rZ(Ee.stateNode,!1)}catch(jt){Pr(Ee,Ee.return,jt)}}}else if((A.tag!==22&&A.tag!==23||A.memoizedState===null||A===g)&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===g)break e;for(;A.sibling===null;){if(A.return===null||A.return===g)break e;k===A&&(k=null),A=A.return}k===A&&(k=null),A.sibling.return=A.return,A=A.sibling}D&4&&(D=g.updateQueue,D!==null&&(k=D.retryQueue,k!==null&&(D.retryQueue=null,gO(g,k))));break;case 19:Ua(A,g),Xa(g),D&4&&(D=g.updateQueue,D!==null&&(g.updateQueue=null,gO(g,D)));break;case 30:break;case 21:break;default:Ua(A,g),Xa(g)}}function Xa(g){var A=g.flags;if(A&2){try{for(var k,D=g.return;D!==null;){if(sz(D)){k=D;break}D=D.return}if(k==null)throw Error(r(160));switch(k.tag){case 27:var B=k.stateNode,Z=HT(g);mO(g,Z,B);break;case 5:var oe=k.stateNode;k.flags&32&&(tn(oe,""),k.flags&=-33);var pe=HT(g);mO(g,pe,oe);break;case 3:case 4:var Ee=k.stateNode.containerInfo,Le=HT(g);QT(g,Le,Ee);break;default:throw Error(r(161))}}catch(Ze){Pr(g,g.return,Ze)}g.flags&=-3}A&4096&&(g.flags&=-4097)}function pz(g){if(g.subtreeFlags&1024)for(g=g.child;g!==null;){var A=g;pz(A),A.tag===5&&A.flags&1024&&A.stateNode.reset(),g=g.sibling}}function nf(g,A){if(A.subtreeFlags&8772)for(A=A.child;A!==null;)lz(g,A.alternate,A),A=A.sibling}function Ap(g){for(g=g.child;g!==null;){var A=g;switch(A.tag){case 0:case 11:case 14:case 15:_h(4,A,A.return),Ap(A);break;case 1:qc(A,A.return);var k=A.stateNode;typeof k.componentWillUnmount=="function"&&rz(A,A.return,k),Ap(A);break;case 27:Gx(A.stateNode);case 26:case 5:qc(A,A.return),Ap(A);break;case 22:A.memoizedState===null&&Ap(A);break;case 30:Ap(A);break;default:Ap(A)}g=g.sibling}}function rf(g,A,k){for(k=k&&(A.subtreeFlags&8772)!==0,A=A.child;A!==null;){var D=A.alternate,B=g,Z=A,oe=Z.flags;switch(Z.tag){case 0:case 11:case 15:rf(B,Z,k),jx(4,Z);break;case 1:if(rf(B,Z,k),D=Z,B=D.stateNode,typeof B.componentDidMount=="function")try{B.componentDidMount()}catch(Le){Pr(D,D.return,Le)}if(D=Z,B=D.updateQueue,B!==null){var pe=D.stateNode;try{var Ee=B.shared.hiddenCallbacks;if(Ee!==null)for(B.shared.hiddenCallbacks=null,B=0;B<Ee.length;B++)ZH(Ee[B],pe)}catch(Le){Pr(D,D.return,Le)}}k&&oe&64&&nz(Z),Lx(Z,Z.return);break;case 27:az(Z);case 26:case 5:rf(B,Z,k),k&&D===null&&oe&4&&iz(Z),Lx(Z,Z.return);break;case 12:rf(B,Z,k);break;case 31:rf(B,Z,k),k&&oe&4&&fz(B,Z);break;case 13:rf(B,Z,k),k&&oe&4&&hz(B,Z);break;case 22:Z.memoizedState===null&&rf(B,Z,k),Lx(Z,Z.return);break;case 30:break;default:rf(B,Z,k)}A=A.sibling}}function ZT(g,A){var k=null;g!==null&&g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(k=g.memoizedState.cachePool.pool),g=null,A.memoizedState!==null&&A.memoizedState.cachePool!==null&&(g=A.memoizedState.cachePool.pool),g!==k&&(g!=null&&g.refCount++,k!=null&&wx(k))}function GT(g,A){g=null,A.alternate!==null&&(g=A.alternate.memoizedState.cache),A=A.memoizedState.cache,A!==g&&(A.refCount++,g!=null&&wx(g))}function sc(g,A,k,D){if(A.subtreeFlags&10256)for(A=A.child;A!==null;)mz(g,A,k,D),A=A.sibling}function mz(g,A,k,D){var B=A.flags;switch(A.tag){case 0:case 11:case 15:sc(g,A,k,D),B&2048&&jx(9,A);break;case 1:sc(g,A,k,D);break;case 3:sc(g,A,k,D),B&2048&&(g=null,A.alternate!==null&&(g=A.alternate.memoizedState.cache),A=A.memoizedState.cache,A!==g&&(A.refCount++,g!=null&&wx(g)));break;case 12:if(B&2048){sc(g,A,k,D),g=A.stateNode;try{var Z=A.memoizedProps,oe=Z.id,pe=Z.onPostCommit;typeof pe=="function"&&pe(oe,A.alternate===null?"mount":"update",g.passiveEffectDuration,-0)}catch(Ee){Pr(A,A.return,Ee)}}else sc(g,A,k,D);break;case 31:sc(g,A,k,D);break;case 13:sc(g,A,k,D);break;case 23:break;case 22:Z=A.stateNode,oe=A.alternate,A.memoizedState!==null?Z._visibility&2?sc(g,A,k,D):Fx(g,A):Z._visibility&2?sc(g,A,k,D):(Z._visibility|=2,Lm(g,A,k,D,(A.subtreeFlags&10256)!==0||!1)),B&2048&&ZT(oe,A);break;case 24:sc(g,A,k,D),B&2048&&GT(A.alternate,A);break;default:sc(g,A,k,D)}}function Lm(g,A,k,D,B){for(B=B&&((A.subtreeFlags&10256)!==0||!1),A=A.child;A!==null;){var Z=g,oe=A,pe=k,Ee=D,Le=oe.flags;switch(oe.tag){case 0:case 11:case 15:Lm(Z,oe,pe,Ee,B),jx(8,oe);break;case 23:break;case 22:var Ze=oe.stateNode;oe.memoizedState!==null?Ze._visibility&2?Lm(Z,oe,pe,Ee,B):Fx(Z,oe):(Ze._visibility|=2,Lm(Z,oe,pe,Ee,B)),B&&Le&2048&&ZT(oe.alternate,oe);break;case 24:Lm(Z,oe,pe,Ee,B),B&&Le&2048&&GT(oe.alternate,oe);break;default:Lm(Z,oe,pe,Ee,B)}A=A.sibling}}function Fx(g,A){if(A.subtreeFlags&10256)for(A=A.child;A!==null;){var k=g,D=A,B=D.flags;switch(D.tag){case 22:Fx(k,D),B&2048&&ZT(D.alternate,D);break;case 24:Fx(k,D),B&2048&&GT(D.alternate,D);break;default:Fx(k,D)}A=A.sibling}}var $x=8192;function Fm(g,A,k){if(g.subtreeFlags&$x)for(g=g.child;g!==null;)gz(g,A,k),g=g.sibling}function gz(g,A,k){switch(g.tag){case 26:Fm(g,A,k),g.flags&$x&&g.memoizedState!==null&&kOe(k,ic,g.memoizedState,g.memoizedProps);break;case 5:Fm(g,A,k);break;case 3:case 4:var D=ic;ic=MO(g.stateNode.containerInfo),Fm(g,A,k),ic=D;break;case 22:g.memoizedState===null&&(D=g.alternate,D!==null&&D.memoizedState!==null?(D=$x,$x=16777216,Fm(g,A,k),$x=D):Fm(g,A,k));break;default:Fm(g,A,k)}}function yz(g){var A=g.alternate;if(A!==null&&(g=A.child,g!==null)){A.child=null;do A=g.sibling,g.sibling=null,g=A;while(g!==null)}}function Bx(g){var A=g.deletions;if((g.flags&16)!==0){if(A!==null)for(var k=0;k<A.length;k++){var D=A[k];Os=D,bz(D,g)}yz(g)}if(g.subtreeFlags&10256)for(g=g.child;g!==null;)xz(g),g=g.sibling}function xz(g){switch(g.tag){case 0:case 11:case 15:Bx(g),g.flags&2048&&_h(9,g,g.return);break;case 3:Bx(g);break;case 12:Bx(g);break;case 22:var A=g.stateNode;g.memoizedState!==null&&A._visibility&2&&(g.return===null||g.return.tag!==13)?(A._visibility&=-3,yO(g)):Bx(g);break;default:Bx(g)}}function yO(g){var A=g.deletions;if((g.flags&16)!==0){if(A!==null)for(var k=0;k<A.length;k++){var D=A[k];Os=D,bz(D,g)}yz(g)}for(g=g.child;g!==null;){switch(A=g,A.tag){case 0:case 11:case 15:_h(8,A,A.return),yO(A);break;case 22:k=A.stateNode,k._visibility&2&&(k._visibility&=-3,yO(A));break;default:yO(A)}g=g.sibling}}function bz(g,A){for(;Os!==null;){var k=Os;switch(k.tag){case 0:case 11:case 15:_h(8,k,A);break;case 23:case 22:if(k.memoizedState!==null&&k.memoizedState.cachePool!==null){var D=k.memoizedState.cachePool.pool;D!=null&&D.refCount++}break;case 24:wx(k.memoizedState.cache)}if(D=k.child,D!==null)D.return=k,Os=D;else e:for(k=g;Os!==null;){D=Os;var B=D.sibling,Z=D.return;if(cz(D),D===k){Os=null;break e}if(B!==null){B.return=Z,Os=B;break e}Os=Z}}}var Bwe={getCacheForType:function(g){var A=$s(Ki),k=A.data.get(g);return k===void 0&&(k=g(),A.data.set(g,k)),k},cacheSignal:function(){return $s(Ki).controller.signal}},Vwe=typeof WeakMap=="function"?WeakMap:Map,yr=0,Qr=null,Hn=null,Un=0,Tr=0,Po=null,Rh=!1,$m=!1,UT=!1,sf=0,Mi=0,jh=0,Sp=0,XT=0,Mo=0,Bm=0,Vx=null,Wa=null,WT=!1,xO=0,vz=0,bO=1/0,vO=null,Lh=null,gs=0,Fh=null,Vm=null,af=0,qT=0,YT=null,Az=null,Hx=0,KT=null;function No(){return(yr&2)!==0&&Un!==0?Un&-Un:Y.T!==null?iP():tt()}function Sz(){if(Mo===0)if((Un&536870912)===0||Kn){var g=Xt;Xt<<=1,(Xt&3932160)===0&&(Xt=262144),Mo=g}else Mo=536870912;return g=Eo.current,g!==null&&(g.flags|=32),Mo}function qa(g,A,k){(g===Qr&&(Tr===2||Tr===9)||g.cancelPendingCommit!==null)&&(Hm(g,0),$h(g,Un,Mo,!1)),Pn(g,k),((yr&2)===0||g!==Qr)&&(g===Qr&&((yr&2)===0&&(Sp|=k),Mi===4&&$h(g,Un,Mo,!1)),Yc(g))}function wz(g,A,k){if((yr&6)!==0)throw Error(r(327));var D=!k&&(A&127)===0&&(A&g.expiredLanes)===0||at(g,A),B=D?zwe(g,A):eP(g,A,!0),Z=D;do{if(B===0){$m&&!D&&$h(g,A,0,!1);break}else{if(k=g.current.alternate,Z&&!Hwe(k)){B=eP(g,A,!1),Z=!1;continue}if(B===2){if(Z=A,g.errorRecoveryDisabledLanes&Z)var oe=0;else oe=g.pendingLanes&-536870913,oe=oe!==0?oe:oe&536870912?536870912:0;if(oe!==0){A=oe;e:{var pe=g;B=Vx;var Ee=pe.current.memoizedState.isDehydrated;if(Ee&&(Hm(pe,oe).flags|=256),oe=eP(pe,oe,!1),oe!==2){if(UT&&!Ee){pe.errorRecoveryDisabledLanes|=Z,Sp|=Z,B=4;break e}Z=Wa,Wa=B,Z!==null&&(Wa===null?Wa=Z:Wa.push.apply(Wa,Z))}B=oe}if(Z=!1,B!==2)continue}}if(B===1){Hm(g,0),$h(g,A,0,!0);break}e:{switch(D=g,Z=B,Z){case 0:case 1:throw Error(r(345));case 4:if((A&4194048)!==A)break;case 6:$h(D,A,Mo,!Rh);break e;case 2:Wa=null;break;case 3:case 5:break;default:throw Error(r(329))}if((A&62914560)===A&&(B=xO+300-Ge(),10<B)){if($h(D,A,Mo,!Rh),ze(D,0,!0)!==0)break e;af=A,D.timeoutHandle=eZ(Oz.bind(null,D,k,Wa,vO,WT,A,Mo,Sp,Bm,Rh,Z,"Throttled",-0,0),B);break e}Oz(D,k,Wa,vO,WT,A,Mo,Sp,Bm,Rh,Z,null,-0,0)}}break}while(!0);Yc(g)}function Oz(g,A,k,D,B,Z,oe,pe,Ee,Le,Ze,Xe,Fe,Ve){if(g.timeoutHandle=-1,Xe=A.subtreeFlags,Xe&8192||(Xe&16785408)===16785408){Xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ss},gz(A,Z,Xe);var jt=(Z&62914560)===Z?xO-Ge():(Z&4194048)===Z?vz-Ge():0;if(jt=COe(Xe,jt),jt!==null){af=Z,g.cancelPendingCommit=jt(Dz.bind(null,g,A,Z,k,D,B,oe,pe,Ee,Ze,Xe,null,Fe,Ve)),$h(g,Z,oe,!Le);return}}Dz(g,A,Z,k,D,B,oe,pe,Ee)}function Hwe(g){for(var A=g;;){var k=A.tag;if((k===0||k===11||k===15)&&A.flags&16384&&(k=A.updateQueue,k!==null&&(k=k.stores,k!==null)))for(var D=0;D<k.length;D++){var B=k[D],Z=B.getSnapshot;B=B.value;try{if(!ra(Z(),B))return!1}catch{return!1}}if(k=A.child,A.subtreeFlags&16384&&k!==null)k.return=A,A=k;else{if(A===g)break;for(;A.sibling===null;){if(A.return===null||A.return===g)return!0;A=A.return}A.sibling.return=A.return,A=A.sibling}}return!0}function $h(g,A,k,D){A&=~XT,A&=~Sp,g.suspendedLanes|=A,g.pingedLanes&=~A,D&&(g.warmLanes|=A),D=g.expirationTimes;for(var B=A;0<B;){var Z=31-St(B),oe=1<<Z;D[Z]=-1,B&=~oe}k!==0&&mt(g,k,A)}function AO(){return(yr&6)===0?(Qx(0),!1):!0}function JT(){if(Hn!==null){if(Tr===0)var g=Hn.return;else g=Hn,Xu=dp=null,mT(g),Dm=null,kx=0,g=Hn;for(;g!==null;)tz(g.alternate,g),g=g.return;Hn=null}}function Hm(g,A){var k=g.timeoutHandle;k!==-1&&(g.timeoutHandle=-1,lOe(k)),k=g.cancelPendingCommit,k!==null&&(g.cancelPendingCommit=null,k()),af=0,JT(),Qr=g,Hn=k=Gu(g.current,null),Un=A,Tr=0,Po=null,Rh=!1,$m=at(g,A),UT=!1,Bm=Mo=XT=Sp=jh=Mi=0,Wa=Vx=null,WT=!1,(A&8)!==0&&(A|=A&32);var D=g.entangledLanes;if(D!==0)for(g=g.entanglements,D&=A;0<D;){var B=31-St(D),Z=1<<B;A|=g[B],D&=~Z}return sf=A,Hw(),k}function kz(g,A){Tn=null,Y.H=Ix,A===Nm||A===qw?(A=VH(),Tr=3):A===rT?(A=VH(),Tr=4):Tr=A===NT?8:A!==null&&typeof A=="object"&&typeof A.then=="function"?6:1,Po=A,Hn===null&&(Mi=1,uO(g,pl(A,g.current)))}function Cz(){var g=Eo.current;return g===null?!0:(Un&4194048)===Un?xl===null:(Un&62914560)===Un||(Un&536870912)!==0?g===xl:!1}function Ez(){var g=Y.H;return Y.H=Ix,g===null?Ix:g}function Tz(){var g=Y.A;return Y.A=Bwe,g}function SO(){Mi=4,Rh||(Un&4194048)!==Un&&Eo.current!==null||($m=!0),(jh&134217727)===0&&(Sp&134217727)===0||Qr===null||$h(Qr,Un,Mo,!1)}function eP(g,A,k){var D=yr;yr|=2;var B=Ez(),Z=Tz();(Qr!==g||Un!==A)&&(vO=null,Hm(g,A)),A=!1;var oe=Mi;e:do try{if(Tr!==0&&Hn!==null){var pe=Hn,Ee=Po;switch(Tr){case 8:JT(),oe=6;break e;case 3:case 2:case 9:case 6:Eo.current===null&&(A=!0);var Le=Tr;if(Tr=0,Po=null,Qm(g,pe,Ee,Le),k&&$m){oe=0;break e}break;default:Le=Tr,Tr=0,Po=null,Qm(g,pe,Ee,Le)}}Qwe(),oe=Mi;break}catch(Ze){kz(g,Ze)}while(!0);return A&&g.shellSuspendCounter++,Xu=dp=null,yr=D,Y.H=B,Y.A=Z,Hn===null&&(Qr=null,Un=0,Hw()),oe}function Qwe(){for(;Hn!==null;)Pz(Hn)}function zwe(g,A){var k=yr;yr|=2;var D=Ez(),B=Tz();Qr!==g||Un!==A?(vO=null,bO=Ge()+500,Hm(g,A)):$m=at(g,A);e:do try{if(Tr!==0&&Hn!==null){A=Hn;var Z=Po;t:switch(Tr){case 1:Tr=0,Po=null,Qm(g,A,Z,1);break;case 2:case 9:if($H(Z)){Tr=0,Po=null,Mz(A);break}A=function(){Tr!==2&&Tr!==9||Qr!==g||(Tr=7),Yc(g)},Z.then(A,A);break e;case 3:Tr=7;break e;case 4:Tr=5;break e;case 7:$H(Z)?(Tr=0,Po=null,Mz(A)):(Tr=0,Po=null,Qm(g,A,Z,7));break;case 5:var oe=null;switch(Hn.tag){case 26:oe=Hn.memoizedState;case 5:case 27:var pe=Hn;if(oe?mZ(oe):pe.stateNode.complete){Tr=0,Po=null;var Ee=pe.sibling;if(Ee!==null)Hn=Ee;else{var Le=pe.return;Le!==null?(Hn=Le,wO(Le)):Hn=null}break t}}Tr=0,Po=null,Qm(g,A,Z,5);break;case 6:Tr=0,Po=null,Qm(g,A,Z,6);break;case 8:JT(),Mi=6;break e;default:throw Error(r(462))}}Zwe();break}catch(Ze){kz(g,Ze)}while(!0);return Xu=dp=null,Y.H=D,Y.A=B,yr=k,Hn!==null?0:(Qr=null,Un=0,Hw(),Mi)}function Zwe(){for(;Hn!==null&&!Qe();)Pz(Hn)}function Pz(g){var A=JQ(g.alternate,g,sf);g.memoizedProps=g.pendingProps,A===null?wO(g):Hn=A}function Mz(g){var A=g,k=A.alternate;switch(A.tag){case 15:case 0:A=UQ(k,A,A.pendingProps,A.type,void 0,Un);break;case 11:A=UQ(k,A,A.pendingProps,A.type.render,A.ref,Un);break;case 5:mT(A);default:tz(k,A),A=Hn=TH(A,sf),A=JQ(k,A,sf)}g.memoizedProps=g.pendingProps,A===null?wO(g):Hn=A}function Qm(g,A,k,D){Xu=dp=null,mT(A),Dm=null,kx=0;var B=A.return;try{if(Iwe(g,B,A,k,Un)){Mi=1,uO(g,pl(k,g.current)),Hn=null;return}}catch(Z){if(B!==null)throw Hn=B,Z;Mi=1,uO(g,pl(k,g.current)),Hn=null;return}A.flags&32768?(Kn||D===1?g=!0:$m||(Un&536870912)!==0?g=!1:(Rh=g=!0,(D===2||D===9||D===3||D===6)&&(D=Eo.current,D!==null&&D.tag===13&&(D.flags|=16384))),Nz(A,g)):wO(A)}function wO(g){var A=g;do{if((A.flags&32768)!==0){Nz(A,Rh);return}g=A.return;var k=jwe(A.alternate,A,sf);if(k!==null){Hn=k;return}if(A=A.sibling,A!==null){Hn=A;return}Hn=A=g}while(A!==null);Mi===0&&(Mi=5)}function Nz(g,A){do{var k=Lwe(g.alternate,g);if(k!==null){k.flags&=32767,Hn=k;return}if(k=g.return,k!==null&&(k.flags|=32768,k.subtreeFlags=0,k.deletions=null),!A&&(g=g.sibling,g!==null)){Hn=g;return}Hn=g=k}while(g!==null);Mi=6,Hn=null}function Dz(g,A,k,D,B,Z,oe,pe,Ee){g.cancelPendingCommit=null;do OO();while(gs!==0);if((yr&6)!==0)throw Error(r(327));if(A!==null){if(A===g.current)throw Error(r(177));if(Z=A.lanes|A.childLanes,Z|=H5,Cr(g,k,Z,oe,pe,Ee),g===Qr&&(Hn=Qr=null,Un=0),Vm=A,Fh=g,af=k,qT=Z,YT=B,Az=D,(A.subtreeFlags&10256)!==0||(A.flags&10256)!==0?(g.callbackNode=null,g.callbackPriority=0,Wwe(yt,function(){return Lz(),null})):(g.callbackNode=null,g.callbackPriority=0),D=(A.flags&13878)!==0,(A.subtreeFlags&13878)!==0||D){D=Y.T,Y.T=null,B=J.p,J.p=2,oe=yr,yr|=4;try{Fwe(g,A,k)}finally{yr=oe,J.p=B,Y.T=D}}gs=1,Iz(),_z(),Rz()}}function Iz(){if(gs===1){gs=0;var g=Fh,A=Vm,k=(A.flags&13878)!==0;if((A.subtreeFlags&13878)!==0||k){k=Y.T,Y.T=null;var D=J.p;J.p=2;var B=yr;yr|=4;try{dz(A,g);var Z=hP,oe=bx(g.containerInfo),pe=Z.focusedElem,Ee=Z.selectionRange;if(oe!==pe&&pe&&pe.ownerDocument&&xx(pe.ownerDocument.documentElement,pe)){if(Ee!==null&&Am(pe)){var Le=Ee.start,Ze=Ee.end;if(Ze===void 0&&(Ze=Le),"selectionStart"in pe)pe.selectionStart=Le,pe.selectionEnd=Math.min(Ze,pe.value.length);else{var Xe=pe.ownerDocument||document,Fe=Xe&&Xe.defaultView||window;if(Fe.getSelection){var Ve=Fe.getSelection(),jt=pe.textContent.length,an=Math.min(Ee.start,jt),Rr=Ee.end===void 0?an:Math.min(Ee.end,jt);!Ve.extend&&an>Rr&&(oe=Rr,Rr=an,an=oe);var Ie=yx(pe,an),Ne=yx(pe,Rr);if(Ie&&Ne&&(Ve.rangeCount!==1||Ve.anchorNode!==Ie.node||Ve.anchorOffset!==Ie.offset||Ve.focusNode!==Ne.node||Ve.focusOffset!==Ne.offset)){var je=Xe.createRange();je.setStart(Ie.node,Ie.offset),Ve.removeAllRanges(),an>Rr?(Ve.addRange(je),Ve.extend(Ne.node,Ne.offset)):(je.setEnd(Ne.node,Ne.offset),Ve.addRange(je))}}}}for(Xe=[],Ve=pe;Ve=Ve.parentNode;)Ve.nodeType===1&&Xe.push({element:Ve,left:Ve.scrollLeft,top:Ve.scrollTop});for(typeof pe.focus=="function"&&pe.focus(),pe=0;pe<Xe.length;pe++){var Ue=Xe[pe];Ue.element.scrollLeft=Ue.left,Ue.element.scrollTop=Ue.top}}jO=!!fP,hP=fP=null}finally{yr=B,J.p=D,Y.T=k}}g.current=A,gs=2}}function _z(){if(gs===2){gs=0;var g=Fh,A=Vm,k=(A.flags&8772)!==0;if((A.subtreeFlags&8772)!==0||k){k=Y.T,Y.T=null;var D=J.p;J.p=2;var B=yr;yr|=4;try{lz(g,A.alternate,A)}finally{yr=B,J.p=D,Y.T=k}}gs=3}}function Rz(){if(gs===4||gs===3){gs=0,qe();var g=Fh,A=Vm,k=af,D=Az;(A.subtreeFlags&10256)!==0||(A.flags&10256)!==0?gs=5:(gs=0,Vm=Fh=null,jz(g,g.pendingLanes));var B=g.pendingLanes;if(B===0&&(Lh=null),Ln(k),A=A.stateNode,et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(en,A,void 0,(A.current.flags&128)===128)}catch{}if(D!==null){A=Y.T,B=J.p,J.p=2,Y.T=null;try{for(var Z=g.onRecoverableError,oe=0;oe<D.length;oe++){var pe=D[oe];Z(pe.value,{componentStack:pe.stack})}}finally{Y.T=A,J.p=B}}(af&3)!==0&&OO(),Yc(g),B=g.pendingLanes,(k&261930)!==0&&(B&42)!==0?g===KT?Hx++:(Hx=0,KT=g):Hx=0,Qx(0)}}function jz(g,A){(g.pooledCacheLanes&=A)===0&&(A=g.pooledCache,A!=null&&(g.pooledCache=null,wx(A)))}function OO(){return Iz(),_z(),Rz(),Lz()}function Lz(){if(gs!==5)return!1;var g=Fh,A=qT;qT=0;var k=Ln(af),D=Y.T,B=J.p;try{J.p=32>k?32:k,Y.T=null,k=YT,YT=null;var Z=Fh,oe=af;if(gs=0,Vm=Fh=null,af=0,(yr&6)!==0)throw Error(r(331));var pe=yr;if(yr|=4,xz(Z.current),mz(Z,Z.current,oe,k),yr=pe,Qx(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(en,Z)}catch{}return!0}finally{J.p=B,Y.T=D,jz(g,A)}}function Fz(g,A,k){A=pl(k,A),A=MT(g.stateNode,A,2),g=Nh(g,A,2),g!==null&&(Pn(g,2),Yc(g))}function Pr(g,A,k){if(g.tag===3)Fz(g,g,k);else for(;A!==null;){if(A.tag===3){Fz(A,g,k);break}else if(A.tag===1){var D=A.stateNode;if(typeof A.type.getDerivedStateFromError=="function"||typeof D.componentDidCatch=="function"&&(Lh===null||!Lh.has(D))){g=pl(k,g),k=$Q(2),D=Nh(A,k,2),D!==null&&(BQ(k,D,A,g),Pn(D,2),Yc(D));break}}A=A.return}}function tP(g,A,k){var D=g.pingCache;if(D===null){D=g.pingCache=new Vwe;var B=new Set;D.set(A,B)}else B=D.get(A),B===void 0&&(B=new Set,D.set(A,B));B.has(k)||(UT=!0,B.add(k),g=Gwe.bind(null,g,A,k),A.then(g,g))}function Gwe(g,A,k){var D=g.pingCache;D!==null&&D.delete(A),g.pingedLanes|=g.suspendedLanes&k,g.warmLanes&=~k,Qr===g&&(Un&k)===k&&(Mi===4||Mi===3&&(Un&62914560)===Un&&300>Ge()-xO?(yr&2)===0&&Hm(g,0):XT|=k,Bm===Un&&(Bm=0)),Yc(g)}function $z(g,A){A===0&&(A=cn()),g=up(g,A),g!==null&&(Pn(g,A),Yc(g))}function Uwe(g){var A=g.memoizedState,k=0;A!==null&&(k=A.retryLane),$z(g,k)}function Xwe(g,A){var k=0;switch(g.tag){case 31:case 13:var D=g.stateNode,B=g.memoizedState;B!==null&&(k=B.retryLane);break;case 19:D=g.stateNode;break;case 22:D=g.stateNode._retryCache;break;default:throw Error(r(314))}D!==null&&D.delete(A),$z(g,k)}function Wwe(g,A){return ke(g,A)}var kO=null,zm=null,nP=!1,CO=!1,rP=!1,Bh=0;function Yc(g){g!==zm&&g.next===null&&(zm===null?kO=zm=g:zm=zm.next=g),CO=!0,nP||(nP=!0,Ywe())}function Qx(g,A){if(!rP&&CO){rP=!0;do for(var k=!1,D=kO;D!==null;){if(g!==0){var B=D.pendingLanes;if(B===0)var Z=0;else{var oe=D.suspendedLanes,pe=D.pingedLanes;Z=(1<<31-St(42|g)+1)-1,Z&=B&~(oe&~pe),Z=Z&201326741?Z&201326741|1:Z?Z|2:0}Z!==0&&(k=!0,Qz(D,Z))}else Z=Un,Z=ze(D,D===Qr?Z:0,D.cancelPendingCommit!==null||D.timeoutHandle!==-1),(Z&3)===0||at(D,Z)||(k=!0,Qz(D,Z));D=D.next}while(k);rP=!1}}function qwe(){Bz()}function Bz(){CO=nP=!1;var g=0;Bh!==0&&oOe()&&(g=Bh);for(var A=Ge(),k=null,D=kO;D!==null;){var B=D.next,Z=Vz(D,A);Z===0?(D.next=null,k===null?kO=B:k.next=B,B===null&&(zm=k)):(k=D,(g!==0||(Z&3)!==0)&&(CO=!0)),D=B}gs!==0&&gs!==5||Qx(g),Bh!==0&&(Bh=0)}function Vz(g,A){for(var k=g.suspendedLanes,D=g.pingedLanes,B=g.expirationTimes,Z=g.pendingLanes&-62914561;0<Z;){var oe=31-St(Z),pe=1<<oe,Ee=B[oe];Ee===-1?((pe&k)===0||(pe&D)!==0)&&(B[oe]=Wt(pe,A)):Ee<=A&&(g.expiredLanes|=pe),Z&=~pe}if(A=Qr,k=Un,k=ze(g,g===A?k:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),D=g.callbackNode,k===0||g===A&&(Tr===2||Tr===9)||g.cancelPendingCommit!==null)return D!==null&&D!==null&&Me(D),g.callbackNode=null,g.callbackPriority=0;if((k&3)===0||at(g,k)){if(A=k&-k,A===g.callbackPriority)return A;switch(D!==null&&Me(D),Ln(k)){case 2:case 8:k=nt;break;case 32:k=yt;break;case 268435456:k=zt;break;default:k=yt}return D=Hz.bind(null,g),k=ke(k,D),g.callbackPriority=A,g.callbackNode=k,A}return D!==null&&D!==null&&Me(D),g.callbackPriority=2,g.callbackNode=null,2}function Hz(g,A){if(gs!==0&&gs!==5)return g.callbackNode=null,g.callbackPriority=0,null;var k=g.callbackNode;if(OO()&&g.callbackNode!==k)return null;var D=Un;return D=ze(g,g===Qr?D:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),D===0?null:(wz(g,D,A),Vz(g,Ge()),g.callbackNode!=null&&g.callbackNode===k?Hz.bind(null,g):null)}function Qz(g,A){if(OO())return null;wz(g,A,!0)}function Ywe(){cOe(function(){(yr&6)!==0?ke(st,qwe):Bz()})}function iP(){if(Bh===0){var g=Pm;g===0&&(g=Ke,Ke<<=1,(Ke&261888)===0&&(Ke=256)),Bh=g}return Bh}function zz(g){return g==null||typeof g=="symbol"||typeof g=="boolean"?null:typeof g=="function"?g:Hr(""+g)}function Zz(g,A){var k=A.ownerDocument.createElement("input");return k.name=A.name,k.value=A.value,g.id&&k.setAttribute("form",g.id),A.parentNode.insertBefore(k,A),g=new FormData(g),k.parentNode.removeChild(k),g}function Kwe(g,A,k,D,B){if(A==="submit"&&k&&k.stateNode===B){var Z=zz((B[Ht]||null).action),oe=D.submitter;oe&&(A=(A=oe[Ht]||null)?zz(A.formAction):oe.getAttribute("formAction"),A!==null&&(Z=A,oe=null));var pe=new sp("action","action",null,D,B);g.push({event:pe,listeners:[{instance:null,listener:function(){if(D.defaultPrevented){if(Bh!==0){var Ee=oe?Zz(B,oe):new FormData(B);OT(k,{pending:!0,data:Ee,method:B.method,action:Z},null,Ee)}}else typeof Z=="function"&&(pe.preventDefault(),Ee=oe?Zz(B,oe):new FormData(B),OT(k,{pending:!0,data:Ee,method:B.method,action:Z},Z,Ee))},currentTarget:B}]})}}for(var sP=0;sP<V5.length;sP++){var aP=V5[sP],Jwe=aP.toLowerCase(),eOe=aP[0].toUpperCase()+aP.slice(1);rc(Jwe,"on"+eOe)}rc(SH,"onAnimationEnd"),rc(wH,"onAnimationIteration"),rc(OH,"onAnimationStart"),rc("dblclick","onDoubleClick"),rc("focusin","onFocus"),rc("focusout","onBlur"),rc(gwe,"onTransitionRun"),rc(ywe,"onTransitionStart"),rc(xwe,"onTransitionCancel"),rc(kH,"onTransitionEnd"),xn("onMouseEnter",["mouseout","mouseover"]),xn("onMouseLeave",["mouseout","mouseover"]),xn("onPointerEnter",["pointerout","pointerover"]),xn("onPointerLeave",["pointerout","pointerover"]),kt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kt("onBeforeInput",["compositionend","keypress","textInput","paste"]),kt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zx="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),tOe=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zx));function Gz(g,A){A=(A&4)!==0;for(var k=0;k<g.length;k++){var D=g[k],B=D.event;D=D.listeners;e:{var Z=void 0;if(A)for(var oe=D.length-1;0<=oe;oe--){var pe=D[oe],Ee=pe.instance,Le=pe.currentTarget;if(pe=pe.listener,Ee!==Z&&B.isPropagationStopped())break e;Z=pe,B.currentTarget=Le;try{Z(B)}catch(Ze){Vw(Ze)}B.currentTarget=null,Z=Ee}else for(oe=0;oe<D.length;oe++){if(pe=D[oe],Ee=pe.instance,Le=pe.currentTarget,pe=pe.listener,Ee!==Z&&B.isPropagationStopped())break e;Z=pe,B.currentTarget=Le;try{Z(B)}catch(Ze){Vw(Ze)}B.currentTarget=null,Z=Ee}}}}function Qn(g,A){var k=A[tr];k===void 0&&(k=A[tr]=new Set);var D=g+"__bubble";k.has(D)||(Uz(A,g,2,!1),k.add(D))}function oP(g,A,k){var D=0;A&&(D|=4),Uz(k,g,D,A)}var EO="_reactListening"+Math.random().toString(36).slice(2);function lP(g){if(!g[EO]){g[EO]=!0,fr.forEach(function(k){k!=="selectionchange"&&(tOe.has(k)||oP(k,!1,g),oP(k,!0,g))});var A=g.nodeType===9?g:g.ownerDocument;A===null||A[EO]||(A[EO]=!0,oP("selectionchange",!1,A))}}function Uz(g,A,k,D){switch(SZ(A)){case 2:var B=POe;break;case 8:B=MOe;break;default:B=wP}k=B.bind(null,A,k,g),B=void 0,!Qu||A!=="touchstart"&&A!=="touchmove"&&A!=="wheel"||(B=!0),D?B!==void 0?g.addEventListener(A,k,{capture:!0,passive:B}):g.addEventListener(A,k,!0):B!==void 0?g.addEventListener(A,k,{passive:B}):g.addEventListener(A,k,!1)}function cP(g,A,k,D,B){var Z=D;if((A&1)===0&&(A&2)===0&&D!==null)e:for(;;){if(D===null)return;var oe=D.tag;if(oe===3||oe===4){var pe=D.stateNode.containerInfo;if(pe===B)break;if(oe===4)for(oe=D.return;oe!==null;){var Ee=oe.tag;if((Ee===3||Ee===4)&&oe.stateNode.containerInfo===B)return;oe=oe.return}for(;pe!==null;){if(oe=wn(pe),oe===null)return;if(Ee=oe.tag,Ee===5||Ee===6||Ee===26||Ee===27){D=Z=oe;continue e}pe=pe.parentNode}}D=D.return}tc(function(){var Le=Z,Ze=Vu(k),Xe=[];e:{var Fe=CH.get(g);if(Fe!==void 0){var Ve=sp,jt=g;switch(g){case"keypress":if(Bi(k)===0)break e;case"keydown":case"keyup":Ve=re;break;case"focusin":jt="focus",Ve=ox;break;case"focusout":jt="blur",Ve=ox;break;case"beforeblur":case"afterblur":Ve=ox;break;case"click":if(k.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ve=sx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ve=M5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ve=R;break;case SH:case wH:case OH:Ve=lx;break;case kH:Ve=le;break;case"scroll":case"scrollend":Ve=T5;break;case"wheel":Ve=be;break;case"copy":case"cut":case"paste":Ve=I5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ve=S;break;case"toggle":case"beforetoggle":Ve=Ce}var an=(A&4)!==0,Rr=!an&&(g==="scroll"||g==="scrollend"),Ie=an?Fe!==null?Fe+"Capture":null:Fe;an=[];for(var Ne=Le,je;Ne!==null;){var Ue=Ne;if(je=Ue.stateNode,Ue=Ue.tag,Ue!==5&&Ue!==26&&Ue!==27||je===null||Ie===null||(Ue=nc(Ne,Ie),Ue!=null&&an.push(Zx(Ne,Ue,je))),Rr)break;Ne=Ne.return}0<an.length&&(Fe=new Ve(Fe,jt,null,k,Ze),Xe.push({event:Fe,listeners:an}))}}if((A&7)===0){e:{if(Fe=g==="mouseover"||g==="pointerover",Ve=g==="mouseout"||g==="pointerout",Fe&&k!==Zc&&(jt=k.relatedTarget||k.fromElement)&&(wn(jt)||jt[gn]))break e;if((Ve||Fe)&&(Fe=Ze.window===Ze?Ze:(Fe=Ze.ownerDocument)?Fe.defaultView||Fe.parentWindow:window,Ve?(jt=k.relatedTarget||k.toElement,Ve=Le,jt=jt?wn(jt):null,jt!==null&&(Rr=s(jt),an=jt.tag,jt!==Rr||an!==5&&an!==27&&an!==6)&&(jt=null)):(Ve=null,jt=Le),Ve!==jt)){if(an=sx,Ue="onMouseLeave",Ie="onMouseEnter",Ne="mouse",(g==="pointerout"||g==="pointerover")&&(an=S,Ue="onPointerLeave",Ie="onPointerEnter",Ne="pointer"),Rr=Ve==null?Fe:wt(Ve),je=jt==null?Fe:wt(jt),Fe=new an(Ue,Ne+"leave",Ve,k,Ze),Fe.target=Rr,Fe.relatedTarget=je,Ue=null,wn(Ze)===Le&&(an=new an(Ie,Ne+"enter",jt,k,Ze),an.target=je,an.relatedTarget=Rr,Ue=an),Rr=Ue,Ve&&jt)t:{for(an=nOe,Ie=Ve,Ne=jt,je=0,Ue=Ie;Ue;Ue=an(Ue))je++;Ue=0;for(var Yt=Ne;Yt;Yt=an(Yt))Ue++;for(;0<je-Ue;)Ie=an(Ie),je--;for(;0<Ue-je;)Ne=an(Ne),Ue--;for(;je--;){if(Ie===Ne||Ne!==null&&Ie===Ne.alternate){an=Ie;break t}Ie=an(Ie),Ne=an(Ne)}an=null}else an=null;Ve!==null&&Xz(Xe,Fe,Ve,an,!1),jt!==null&&Rr!==null&&Xz(Xe,Rr,jt,an,!0)}}e:{if(Fe=Le?wt(Le):window,Ve=Fe.nodeName&&Fe.nodeName.toLowerCase(),Ve==="select"||Ve==="input"&&Fe.type==="file")var hr=fx;else if(cx(Fe))if(hx)hr=Fw;else{hr=jw;var Bt=Rw}else Ve=Fe.nodeName,!Ve||Ve.toLowerCase()!=="input"||Fe.type!=="checkbox"&&Fe.type!=="radio"?Le&&vi(Le.elementType)&&(hr=fx):hr=Lw;if(hr&&(hr=hr(g,Le))){ux(Xe,hr,k,Ze);break e}Bt&&Bt(g,Fe,Le),g==="focusout"&&Le&&Fe.type==="number"&&Le.memoizedProps.value!=null&&Ae(Fe,"number",Fe.value)}switch(Bt=Le?wt(Le):window,g){case"focusin":(cx(Bt)||Bt.contentEditable==="true")&&(Zu=Bt,F5=Le,vx=null);break;case"focusout":vx=F5=Zu=null;break;case"mousedown":$5=!0;break;case"contextmenu":case"mouseup":case"dragend":$5=!1,vH(Xe,k,Ze);break;case"selectionchange":if(Bw)break;case"keydown":case"keyup":vH(Xe,k,Ze)}var Nn;if(rt)e:{switch(g){case"compositionstart":var Xn="onCompositionStart";break e;case"compositionend":Xn="onCompositionEnd";break e;case"compositionupdate":Xn="onCompositionUpdate";break e}Xn=void 0}else Ta?vr(g,k)&&(Xn="onCompositionEnd"):g==="keydown"&&k.keyCode===229&&(Xn="onCompositionStart");Xn&&(Vn&&k.locale!=="ko"&&(Ta||Xn!=="onCompositionStart"?Xn==="onCompositionEnd"&&Ta&&(Nn=ws()):(gt=Ze,Gt="value"in gt?gt.value:gt.textContent,Ta=!0)),Bt=TO(Le,Xn),0<Bt.length&&(Xn=new Mw(Xn,g,null,k,Ze),Xe.push({event:Xn,listeners:Bt}),Nn?Xn.data=Nn:(Nn=Uc(k),Nn!==null&&(Xn.data=Nn)))),(Nn=Mt?Nw(g,k):Dw(g,k))&&(Xn=TO(Le,"onBeforeInput"),0<Xn.length&&(Bt=new Mw("onBeforeInput","beforeinput",null,k,Ze),Xe.push({event:Bt,listeners:Xn}),Bt.data=Nn)),Kwe(Xe,g,Le,k,Ze)}Gz(Xe,A)})}function Zx(g,A,k){return{instance:g,listener:A,currentTarget:k}}function TO(g,A){for(var k=A+"Capture",D=[];g!==null;){var B=g,Z=B.stateNode;if(B=B.tag,B!==5&&B!==26&&B!==27||Z===null||(B=nc(g,k),B!=null&&D.unshift(Zx(g,B,Z)),B=nc(g,A),B!=null&&D.push(Zx(g,B,Z))),g.tag===3)return D;g=g.return}return[]}function nOe(g){if(g===null)return null;do g=g.return;while(g&&g.tag!==5&&g.tag!==27);return g||null}function Xz(g,A,k,D,B){for(var Z=A._reactName,oe=[];k!==null&&k!==D;){var pe=k,Ee=pe.alternate,Le=pe.stateNode;if(pe=pe.tag,Ee!==null&&Ee===D)break;pe!==5&&pe!==26&&pe!==27||Le===null||(Ee=Le,B?(Le=nc(k,Z),Le!=null&&oe.unshift(Zx(k,Le,Ee))):B||(Le=nc(k,Z),Le!=null&&oe.push(Zx(k,Le,Ee)))),k=k.return}oe.length!==0&&g.push({event:A,listeners:oe})}var rOe=/\r\n?/g,iOe=/\u0000|\uFFFD/g;function Wz(g){return(typeof g=="string"?g:""+g).replace(rOe,`
49
- `).replace(iOe,"")}function qz(g,A){return A=Wz(A),Wz(g)===A}function _r(g,A,k,D,B,Z){switch(k){case"children":typeof D=="string"?A==="body"||A==="textarea"&&D===""||tn(g,D):(typeof D=="number"||typeof D=="bigint")&&A!=="body"&&tn(g,""+D);break;case"className":fn(g,"class",D);break;case"tabIndex":fn(g,"tabindex",D);break;case"dir":case"role":case"viewBox":case"width":case"height":fn(g,k,D);break;case"style":lr(g,D,Z);break;case"data":if(A!=="object"){fn(g,"data",D);break}case"src":case"href":if(D===""&&(A!=="a"||k!=="href")){g.removeAttribute(k);break}if(D==null||typeof D=="function"||typeof D=="symbol"||typeof D=="boolean"){g.removeAttribute(k);break}D=Hr(""+D),g.setAttribute(k,D);break;case"action":case"formAction":if(typeof D=="function"){g.setAttribute(k,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof Z=="function"&&(k==="formAction"?(A!=="input"&&_r(g,A,"name",B.name,B,null),_r(g,A,"formEncType",B.formEncType,B,null),_r(g,A,"formMethod",B.formMethod,B,null),_r(g,A,"formTarget",B.formTarget,B,null)):(_r(g,A,"encType",B.encType,B,null),_r(g,A,"method",B.method,B,null),_r(g,A,"target",B.target,B,null)));if(D==null||typeof D=="symbol"||typeof D=="boolean"){g.removeAttribute(k);break}D=Hr(""+D),g.setAttribute(k,D);break;case"onClick":D!=null&&(g.onclick=Ss);break;case"onScroll":D!=null&&Qn("scroll",g);break;case"onScrollEnd":D!=null&&Qn("scrollend",g);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));g.innerHTML=k}}break;case"multiple":g.multiple=D&&typeof D!="function"&&typeof D!="symbol";break;case"muted":g.muted=D&&typeof D!="function"&&typeof D!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(D==null||typeof D=="function"||typeof D=="boolean"||typeof D=="symbol"){g.removeAttribute("xlink:href");break}k=Hr(""+D),g.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",k);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":D!=null&&typeof D!="function"&&typeof D!="symbol"?g.setAttribute(k,""+D):g.removeAttribute(k);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":D&&typeof D!="function"&&typeof D!="symbol"?g.setAttribute(k,""):g.removeAttribute(k);break;case"capture":case"download":D===!0?g.setAttribute(k,""):D!==!1&&D!=null&&typeof D!="function"&&typeof D!="symbol"?g.setAttribute(k,D):g.removeAttribute(k);break;case"cols":case"rows":case"size":case"span":D!=null&&typeof D!="function"&&typeof D!="symbol"&&!isNaN(D)&&1<=D?g.setAttribute(k,D):g.removeAttribute(k);break;case"rowSpan":case"start":D==null||typeof D=="function"||typeof D=="symbol"||isNaN(D)?g.removeAttribute(k):g.setAttribute(k,D);break;case"popover":Qn("beforetoggle",g),Qn("toggle",g),ri(g,"popover",D);break;case"xlinkActuate":En(g,"http://www.w3.org/1999/xlink","xlink:actuate",D);break;case"xlinkArcrole":En(g,"http://www.w3.org/1999/xlink","xlink:arcrole",D);break;case"xlinkRole":En(g,"http://www.w3.org/1999/xlink","xlink:role",D);break;case"xlinkShow":En(g,"http://www.w3.org/1999/xlink","xlink:show",D);break;case"xlinkTitle":En(g,"http://www.w3.org/1999/xlink","xlink:title",D);break;case"xlinkType":En(g,"http://www.w3.org/1999/xlink","xlink:type",D);break;case"xmlBase":En(g,"http://www.w3.org/XML/1998/namespace","xml:base",D);break;case"xmlLang":En(g,"http://www.w3.org/XML/1998/namespace","xml:lang",D);break;case"xmlSpace":En(g,"http://www.w3.org/XML/1998/namespace","xml:space",D);break;case"is":ri(g,"is",D);break;case"innerText":case"textContent":break;default:(!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(k=ms.get(k)||k,ri(g,k,D))}}function uP(g,A,k,D,B,Z){switch(k){case"style":lr(g,D,Z);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));g.innerHTML=k}}break;case"children":typeof D=="string"?tn(g,D):(typeof D=="number"||typeof D=="bigint")&&tn(g,""+D);break;case"onScroll":D!=null&&Qn("scroll",g);break;case"onScrollEnd":D!=null&&Qn("scrollend",g);break;case"onClick":D!=null&&(g.onclick=Ss);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nt.hasOwnProperty(k))e:{if(k[0]==="o"&&k[1]==="n"&&(B=k.endsWith("Capture"),A=k.slice(2,B?k.length-7:void 0),Z=g[Ht]||null,Z=Z!=null?Z[k]:null,typeof Z=="function"&&g.removeEventListener(A,Z,B),typeof D=="function")){typeof Z!="function"&&Z!==null&&(k in g?g[k]=null:g.hasAttribute(k)&&g.removeAttribute(k)),g.addEventListener(A,D,B);break e}k in g?g[k]=D:D===!0?g.setAttribute(k,""):ri(g,k,D)}}}function Vs(g,A,k){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qn("error",g),Qn("load",g);var D=!1,B=!1,Z;for(Z in k)if(k.hasOwnProperty(Z)){var oe=k[Z];if(oe!=null)switch(Z){case"src":D=!0;break;case"srcSet":B=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:_r(g,A,Z,oe,k,null)}}B&&_r(g,A,"srcSet",k.srcSet,k,null),D&&_r(g,A,"src",k.src,k,null);return;case"input":Qn("invalid",g);var pe=Z=oe=B=null,Ee=null,Le=null;for(D in k)if(k.hasOwnProperty(D)){var Ze=k[D];if(Ze!=null)switch(D){case"name":B=Ze;break;case"type":oe=Ze;break;case"checked":Ee=Ze;break;case"defaultChecked":Le=Ze;break;case"value":Z=Ze;break;case"defaultValue":pe=Ze;break;case"children":case"dangerouslySetInnerHTML":if(Ze!=null)throw Error(r(137,A));break;default:_r(g,A,D,Ze,k,null)}}ft(g,Z,pe,Ee,Le,oe,B,!1);return;case"select":Qn("invalid",g),D=oe=Z=null;for(B in k)if(k.hasOwnProperty(B)&&(pe=k[B],pe!=null))switch(B){case"value":Z=pe;break;case"defaultValue":oe=pe;break;case"multiple":D=pe;default:_r(g,A,B,pe,k,null)}A=Z,k=oe,g.multiple=!!D,A!=null?_e(g,!!D,A,!1):k!=null&&_e(g,!!D,k,!0);return;case"textarea":Qn("invalid",g),Z=B=D=null;for(oe in k)if(k.hasOwnProperty(oe)&&(pe=k[oe],pe!=null))switch(oe){case"value":D=pe;break;case"defaultValue":B=pe;break;case"children":Z=pe;break;case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(91));break;default:_r(g,A,oe,pe,k,null)}At(g,D,B,Z);return;case"option":for(Ee in k)if(k.hasOwnProperty(Ee)&&(D=k[Ee],D!=null))switch(Ee){case"selected":g.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:_r(g,A,Ee,D,k,null)}return;case"dialog":Qn("beforetoggle",g),Qn("toggle",g),Qn("cancel",g),Qn("close",g);break;case"iframe":case"object":Qn("load",g);break;case"video":case"audio":for(D=0;D<zx.length;D++)Qn(zx[D],g);break;case"image":Qn("error",g),Qn("load",g);break;case"details":Qn("toggle",g);break;case"embed":case"source":case"link":Qn("error",g),Qn("load",g);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Le in k)if(k.hasOwnProperty(Le)&&(D=k[Le],D!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:_r(g,A,Le,D,k,null)}return;default:if(vi(A)){for(Ze in k)k.hasOwnProperty(Ze)&&(D=k[Ze],D!==void 0&&uP(g,A,Ze,D,k,void 0));return}}for(pe in k)k.hasOwnProperty(pe)&&(D=k[pe],D!=null&&_r(g,A,pe,D,k,null))}function sOe(g,A,k,D){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var B=null,Z=null,oe=null,pe=null,Ee=null,Le=null,Ze=null;for(Ve in k){var Xe=k[Ve];if(k.hasOwnProperty(Ve)&&Xe!=null)switch(Ve){case"checked":break;case"value":break;case"defaultValue":Ee=Xe;default:D.hasOwnProperty(Ve)||_r(g,A,Ve,null,D,Xe)}}for(var Fe in D){var Ve=D[Fe];if(Xe=k[Fe],D.hasOwnProperty(Fe)&&(Ve!=null||Xe!=null))switch(Fe){case"type":Z=Ve;break;case"name":B=Ve;break;case"checked":Le=Ve;break;case"defaultChecked":Ze=Ve;break;case"value":oe=Ve;break;case"defaultValue":pe=Ve;break;case"children":case"dangerouslySetInnerHTML":if(Ve!=null)throw Error(r(137,A));break;default:Ve!==Xe&&_r(g,A,Fe,Ve,D,Xe)}}Oa(g,oe,pe,Ee,Le,Ze,Z,B);return;case"select":Ve=oe=pe=Fe=null;for(Z in k)if(Ee=k[Z],k.hasOwnProperty(Z)&&Ee!=null)switch(Z){case"value":break;case"multiple":Ve=Ee;default:D.hasOwnProperty(Z)||_r(g,A,Z,null,D,Ee)}for(B in D)if(Z=D[B],Ee=k[B],D.hasOwnProperty(B)&&(Z!=null||Ee!=null))switch(B){case"value":Fe=Z;break;case"defaultValue":pe=Z;break;case"multiple":oe=Z;default:Z!==Ee&&_r(g,A,B,Z,D,Ee)}A=pe,k=oe,D=Ve,Fe!=null?_e(g,!!k,Fe,!1):!!D!=!!k&&(A!=null?_e(g,!!k,A,!0):_e(g,!!k,k?[]:"",!1));return;case"textarea":Ve=Fe=null;for(pe in k)if(B=k[pe],k.hasOwnProperty(pe)&&B!=null&&!D.hasOwnProperty(pe))switch(pe){case"value":break;case"children":break;default:_r(g,A,pe,null,D,B)}for(oe in D)if(B=D[oe],Z=k[oe],D.hasOwnProperty(oe)&&(B!=null||Z!=null))switch(oe){case"value":Fe=B;break;case"defaultValue":Ve=B;break;case"children":break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:B!==Z&&_r(g,A,oe,B,D,Z)}lt(g,Fe,Ve);return;case"option":for(var jt in k)if(Fe=k[jt],k.hasOwnProperty(jt)&&Fe!=null&&!D.hasOwnProperty(jt))switch(jt){case"selected":g.selected=!1;break;default:_r(g,A,jt,null,D,Fe)}for(Ee in D)if(Fe=D[Ee],Ve=k[Ee],D.hasOwnProperty(Ee)&&Fe!==Ve&&(Fe!=null||Ve!=null))switch(Ee){case"selected":g.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:_r(g,A,Ee,Fe,D,Ve)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var an in k)Fe=k[an],k.hasOwnProperty(an)&&Fe!=null&&!D.hasOwnProperty(an)&&_r(g,A,an,null,D,Fe);for(Le in D)if(Fe=D[Le],Ve=k[Le],D.hasOwnProperty(Le)&&Fe!==Ve&&(Fe!=null||Ve!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(r(137,A));break;default:_r(g,A,Le,Fe,D,Ve)}return;default:if(vi(A)){for(var Rr in k)Fe=k[Rr],k.hasOwnProperty(Rr)&&Fe!==void 0&&!D.hasOwnProperty(Rr)&&uP(g,A,Rr,void 0,D,Fe);for(Ze in D)Fe=D[Ze],Ve=k[Ze],!D.hasOwnProperty(Ze)||Fe===Ve||Fe===void 0&&Ve===void 0||uP(g,A,Ze,Fe,D,Ve);return}}for(var Ie in k)Fe=k[Ie],k.hasOwnProperty(Ie)&&Fe!=null&&!D.hasOwnProperty(Ie)&&_r(g,A,Ie,null,D,Fe);for(Xe in D)Fe=D[Xe],Ve=k[Xe],!D.hasOwnProperty(Xe)||Fe===Ve||Fe==null&&Ve==null||_r(g,A,Xe,Fe,D,Ve)}function Yz(g){switch(g){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aOe(){if(typeof performance.getEntriesByType=="function"){for(var g=0,A=0,k=performance.getEntriesByType("resource"),D=0;D<k.length;D++){var B=k[D],Z=B.transferSize,oe=B.initiatorType,pe=B.duration;if(Z&&pe&&Yz(oe)){for(oe=0,pe=B.responseEnd,D+=1;D<k.length;D++){var Ee=k[D],Le=Ee.startTime;if(Le>pe)break;var Ze=Ee.transferSize,Xe=Ee.initiatorType;Ze&&Yz(Xe)&&(Ee=Ee.responseEnd,oe+=Ze*(Ee<pe?1:(pe-Le)/(Ee-Le)))}if(--D,A+=8*(Z+oe)/(B.duration/1e3),g++,10<g)break}}if(0<g)return A/g/1e6}return navigator.connection&&(g=navigator.connection.downlink,typeof g=="number")?g:5}var fP=null,hP=null;function PO(g){return g.nodeType===9?g:g.ownerDocument}function Kz(g){switch(g){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jz(g,A){if(g===0)switch(A){case"svg":return 1;case"math":return 2;default:return 0}return g===1&&A==="foreignObject"?0:g}function dP(g,A){return g==="textarea"||g==="noscript"||typeof A.children=="string"||typeof A.children=="number"||typeof A.children=="bigint"||typeof A.dangerouslySetInnerHTML=="object"&&A.dangerouslySetInnerHTML!==null&&A.dangerouslySetInnerHTML.__html!=null}var pP=null;function oOe(){var g=window.event;return g&&g.type==="popstate"?g===pP?!1:(pP=g,!0):(pP=null,!1)}var eZ=typeof setTimeout=="function"?setTimeout:void 0,lOe=typeof clearTimeout=="function"?clearTimeout:void 0,tZ=typeof Promise=="function"?Promise:void 0,cOe=typeof queueMicrotask=="function"?queueMicrotask:typeof tZ<"u"?function(g){return tZ.resolve(null).then(g).catch(uOe)}:eZ;function uOe(g){setTimeout(function(){throw g})}function Vh(g){return g==="head"}function nZ(g,A){var k=A,D=0;do{var B=k.nextSibling;if(g.removeChild(k),B&&B.nodeType===8)if(k=B.data,k==="/$"||k==="/&"){if(D===0){g.removeChild(B),Xm(A);return}D--}else if(k==="$"||k==="$?"||k==="$~"||k==="$!"||k==="&")D++;else if(k==="html")Gx(g.ownerDocument.documentElement);else if(k==="head"){k=g.ownerDocument.head,Gx(k);for(var Z=k.firstChild;Z;){var oe=Z.nextSibling,pe=Z.nodeName;Z[bt]||pe==="SCRIPT"||pe==="STYLE"||pe==="LINK"&&Z.rel.toLowerCase()==="stylesheet"||k.removeChild(Z),Z=oe}}else k==="body"&&Gx(g.ownerDocument.body);k=B}while(k);Xm(A)}function rZ(g,A){var k=g;g=0;do{var D=k.nextSibling;if(k.nodeType===1?A?(k._stashedDisplay=k.style.display,k.style.display="none"):(k.style.display=k._stashedDisplay||"",k.getAttribute("style")===""&&k.removeAttribute("style")):k.nodeType===3&&(A?(k._stashedText=k.nodeValue,k.nodeValue=""):k.nodeValue=k._stashedText||""),D&&D.nodeType===8)if(k=D.data,k==="/$"){if(g===0)break;g--}else k!=="$"&&k!=="$?"&&k!=="$~"&&k!=="$!"||g++;k=D}while(k)}function mP(g){var A=g.firstChild;for(A&&A.nodeType===10&&(A=A.nextSibling);A;){var k=A;switch(A=A.nextSibling,k.nodeName){case"HTML":case"HEAD":case"BODY":mP(k),or(k);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(k.rel.toLowerCase()==="stylesheet")continue}g.removeChild(k)}}function fOe(g,A,k,D){for(;g.nodeType===1;){var B=k;if(g.nodeName.toLowerCase()!==A.toLowerCase()){if(!D&&(g.nodeName!=="INPUT"||g.type!=="hidden"))break}else if(D){if(!g[bt])switch(A){case"meta":if(!g.hasAttribute("itemprop"))break;return g;case"link":if(Z=g.getAttribute("rel"),Z==="stylesheet"&&g.hasAttribute("data-precedence"))break;if(Z!==B.rel||g.getAttribute("href")!==(B.href==null||B.href===""?null:B.href)||g.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin)||g.getAttribute("title")!==(B.title==null?null:B.title))break;return g;case"style":if(g.hasAttribute("data-precedence"))break;return g;case"script":if(Z=g.getAttribute("src"),(Z!==(B.src==null?null:B.src)||g.getAttribute("type")!==(B.type==null?null:B.type)||g.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin))&&Z&&g.hasAttribute("async")&&!g.hasAttribute("itemprop"))break;return g;default:return g}}else if(A==="input"&&g.type==="hidden"){var Z=B.name==null?null:""+B.name;if(B.type==="hidden"&&g.getAttribute("name")===Z)return g}else return g;if(g=bl(g.nextSibling),g===null)break}return null}function hOe(g,A,k){if(A==="")return null;for(;g.nodeType!==3;)if((g.nodeType!==1||g.nodeName!=="INPUT"||g.type!=="hidden")&&!k||(g=bl(g.nextSibling),g===null))return null;return g}function iZ(g,A){for(;g.nodeType!==8;)if((g.nodeType!==1||g.nodeName!=="INPUT"||g.type!=="hidden")&&!A||(g=bl(g.nextSibling),g===null))return null;return g}function gP(g){return g.data==="$?"||g.data==="$~"}function yP(g){return g.data==="$!"||g.data==="$?"&&g.ownerDocument.readyState!=="loading"}function dOe(g,A){var k=g.ownerDocument;if(g.data==="$~")g._reactRetry=A;else if(g.data!=="$?"||k.readyState!=="loading")A();else{var D=function(){A(),k.removeEventListener("DOMContentLoaded",D)};k.addEventListener("DOMContentLoaded",D),g._reactRetry=D}}function bl(g){for(;g!=null;g=g.nextSibling){var A=g.nodeType;if(A===1||A===3)break;if(A===8){if(A=g.data,A==="$"||A==="$!"||A==="$?"||A==="$~"||A==="&"||A==="F!"||A==="F")break;if(A==="/$"||A==="/&")return null}}return g}var xP=null;function sZ(g){g=g.nextSibling;for(var A=0;g;){if(g.nodeType===8){var k=g.data;if(k==="/$"||k==="/&"){if(A===0)return bl(g.nextSibling);A--}else k!=="$"&&k!=="$!"&&k!=="$?"&&k!=="$~"&&k!=="&"||A++}g=g.nextSibling}return null}function aZ(g){g=g.previousSibling;for(var A=0;g;){if(g.nodeType===8){var k=g.data;if(k==="$"||k==="$!"||k==="$?"||k==="$~"||k==="&"){if(A===0)return g;A--}else k!=="/$"&&k!=="/&"||A++}g=g.previousSibling}return null}function oZ(g,A,k){switch(A=PO(k),g){case"html":if(g=A.documentElement,!g)throw Error(r(452));return g;case"head":if(g=A.head,!g)throw Error(r(453));return g;case"body":if(g=A.body,!g)throw Error(r(454));return g;default:throw Error(r(451))}}function Gx(g){for(var A=g.attributes;A.length;)g.removeAttributeNode(A[0]);or(g)}var vl=new Map,lZ=new Set;function MO(g){return typeof g.getRootNode=="function"?g.getRootNode():g.nodeType===9?g:g.ownerDocument}var of=J.d;J.d={f:pOe,r:mOe,D:gOe,C:yOe,L:xOe,m:bOe,X:AOe,S:vOe,M:SOe};function pOe(){var g=of.f(),A=AO();return g||A}function mOe(g){var A=Rn(g);A!==null&&A.tag===5&&A.type==="form"?kQ(A):of.r(g)}var Zm=typeof document>"u"?null:document;function cZ(g,A,k){var D=Zm;if(D&&typeof A=="string"&&A){var B=bi(A);B='link[rel="'+g+'"][href="'+B+'"]',typeof k=="string"&&(B+='[crossorigin="'+k+'"]'),lZ.has(B)||(lZ.add(B),g={rel:g,crossOrigin:k,href:A},D.querySelector(B)===null&&(A=D.createElement("link"),Vs(A,"link",g),Ct(A),D.head.appendChild(A)))}}function gOe(g){of.D(g),cZ("dns-prefetch",g,null)}function yOe(g,A){of.C(g,A),cZ("preconnect",g,A)}function xOe(g,A,k){of.L(g,A,k);var D=Zm;if(D&&g&&A){var B='link[rel="preload"][as="'+bi(A)+'"]';A==="image"&&k&&k.imageSrcSet?(B+='[imagesrcset="'+bi(k.imageSrcSet)+'"]',typeof k.imageSizes=="string"&&(B+='[imagesizes="'+bi(k.imageSizes)+'"]')):B+='[href="'+bi(g)+'"]';var Z=B;switch(A){case"style":Z=Gm(g);break;case"script":Z=Um(g)}vl.has(Z)||(g=f({rel:"preload",href:A==="image"&&k&&k.imageSrcSet?void 0:g,as:A},k),vl.set(Z,g),D.querySelector(B)!==null||A==="style"&&D.querySelector(Ux(Z))||A==="script"&&D.querySelector(Xx(Z))||(A=D.createElement("link"),Vs(A,"link",g),Ct(A),D.head.appendChild(A)))}}function bOe(g,A){of.m(g,A);var k=Zm;if(k&&g){var D=A&&typeof A.as=="string"?A.as:"script",B='link[rel="modulepreload"][as="'+bi(D)+'"][href="'+bi(g)+'"]',Z=B;switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Z=Um(g)}if(!vl.has(Z)&&(g=f({rel:"modulepreload",href:g},A),vl.set(Z,g),k.querySelector(B)===null)){switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(k.querySelector(Xx(Z)))return}D=k.createElement("link"),Vs(D,"link",g),Ct(D),k.head.appendChild(D)}}}function vOe(g,A,k){of.S(g,A,k);var D=Zm;if(D&&g){var B=Zt(D).hoistableStyles,Z=Gm(g);A=A||"default";var oe=B.get(Z);if(!oe){var pe={loading:0,preload:null};if(oe=D.querySelector(Ux(Z)))pe.loading=5;else{g=f({rel:"stylesheet",href:g,"data-precedence":A},k),(k=vl.get(Z))&&bP(g,k);var Ee=oe=D.createElement("link");Ct(Ee),Vs(Ee,"link",g),Ee._p=new Promise(function(Le,Ze){Ee.onload=Le,Ee.onerror=Ze}),Ee.addEventListener("load",function(){pe.loading|=1}),Ee.addEventListener("error",function(){pe.loading|=2}),pe.loading|=4,NO(oe,A,D)}oe={type:"stylesheet",instance:oe,count:1,state:pe},B.set(Z,oe)}}}function AOe(g,A){of.X(g,A);var k=Zm;if(k&&g){var D=Zt(k).hoistableScripts,B=Um(g),Z=D.get(B);Z||(Z=k.querySelector(Xx(B)),Z||(g=f({src:g,async:!0},A),(A=vl.get(B))&&vP(g,A),Z=k.createElement("script"),Ct(Z),Vs(Z,"link",g),k.head.appendChild(Z)),Z={type:"script",instance:Z,count:1,state:null},D.set(B,Z))}}function SOe(g,A){of.M(g,A);var k=Zm;if(k&&g){var D=Zt(k).hoistableScripts,B=Um(g),Z=D.get(B);Z||(Z=k.querySelector(Xx(B)),Z||(g=f({src:g,async:!0,type:"module"},A),(A=vl.get(B))&&vP(g,A),Z=k.createElement("script"),Ct(Z),Vs(Z,"link",g),k.head.appendChild(Z)),Z={type:"script",instance:Z,count:1,state:null},D.set(B,Z))}}function uZ(g,A,k,D){var B=(B=ee.current)?MO(B):null;if(!B)throw Error(r(446));switch(g){case"meta":case"title":return null;case"style":return typeof k.precedence=="string"&&typeof k.href=="string"?(A=Gm(k.href),k=Zt(B).hoistableStyles,D=k.get(A),D||(D={type:"style",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};case"link":if(k.rel==="stylesheet"&&typeof k.href=="string"&&typeof k.precedence=="string"){g=Gm(k.href);var Z=Zt(B).hoistableStyles,oe=Z.get(g);if(oe||(B=B.ownerDocument||B,oe={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},Z.set(g,oe),(Z=B.querySelector(Ux(g)))&&!Z._p&&(oe.instance=Z,oe.state.loading=5),vl.has(g)||(k={rel:"preload",as:"style",href:k.href,crossOrigin:k.crossOrigin,integrity:k.integrity,media:k.media,hrefLang:k.hrefLang,referrerPolicy:k.referrerPolicy},vl.set(g,k),Z||wOe(B,g,k,oe.state))),A&&D===null)throw Error(r(528,""));return oe}if(A&&D!==null)throw Error(r(529,""));return null;case"script":return A=k.async,k=k.src,typeof k=="string"&&A&&typeof A!="function"&&typeof A!="symbol"?(A=Um(k),k=Zt(B).hoistableScripts,D=k.get(A),D||(D={type:"script",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,g))}}function Gm(g){return'href="'+bi(g)+'"'}function Ux(g){return'link[rel="stylesheet"]['+g+"]"}function fZ(g){return f({},g,{"data-precedence":g.precedence,precedence:null})}function wOe(g,A,k,D){g.querySelector('link[rel="preload"][as="style"]['+A+"]")?D.loading=1:(A=g.createElement("link"),D.preload=A,A.addEventListener("load",function(){return D.loading|=1}),A.addEventListener("error",function(){return D.loading|=2}),Vs(A,"link",k),Ct(A),g.head.appendChild(A))}function Um(g){return'[src="'+bi(g)+'"]'}function Xx(g){return"script[async]"+g}function hZ(g,A,k){if(A.count++,A.instance===null)switch(A.type){case"style":var D=g.querySelector('style[data-href~="'+bi(k.href)+'"]');if(D)return A.instance=D,Ct(D),D;var B=f({},k,{"data-href":k.href,"data-precedence":k.precedence,href:null,precedence:null});return D=(g.ownerDocument||g).createElement("style"),Ct(D),Vs(D,"style",B),NO(D,k.precedence,g),A.instance=D;case"stylesheet":B=Gm(k.href);var Z=g.querySelector(Ux(B));if(Z)return A.state.loading|=4,A.instance=Z,Ct(Z),Z;D=fZ(k),(B=vl.get(B))&&bP(D,B),Z=(g.ownerDocument||g).createElement("link"),Ct(Z);var oe=Z;return oe._p=new Promise(function(pe,Ee){oe.onload=pe,oe.onerror=Ee}),Vs(Z,"link",D),A.state.loading|=4,NO(Z,k.precedence,g),A.instance=Z;case"script":return Z=Um(k.src),(B=g.querySelector(Xx(Z)))?(A.instance=B,Ct(B),B):(D=k,(B=vl.get(Z))&&(D=f({},k),vP(D,B)),g=g.ownerDocument||g,B=g.createElement("script"),Ct(B),Vs(B,"link",D),g.head.appendChild(B),A.instance=B);case"void":return null;default:throw Error(r(443,A.type))}else A.type==="stylesheet"&&(A.state.loading&4)===0&&(D=A.instance,A.state.loading|=4,NO(D,k.precedence,g));return A.instance}function NO(g,A,k){for(var D=k.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),B=D.length?D[D.length-1]:null,Z=B,oe=0;oe<D.length;oe++){var pe=D[oe];if(pe.dataset.precedence===A)Z=pe;else if(Z!==B)break}Z?Z.parentNode.insertBefore(g,Z.nextSibling):(A=k.nodeType===9?k.head:k,A.insertBefore(g,A.firstChild))}function bP(g,A){g.crossOrigin==null&&(g.crossOrigin=A.crossOrigin),g.referrerPolicy==null&&(g.referrerPolicy=A.referrerPolicy),g.title==null&&(g.title=A.title)}function vP(g,A){g.crossOrigin==null&&(g.crossOrigin=A.crossOrigin),g.referrerPolicy==null&&(g.referrerPolicy=A.referrerPolicy),g.integrity==null&&(g.integrity=A.integrity)}var DO=null;function dZ(g,A,k){if(DO===null){var D=new Map,B=DO=new Map;B.set(k,D)}else B=DO,D=B.get(k),D||(D=new Map,B.set(k,D));if(D.has(g))return D;for(D.set(g,null),k=k.getElementsByTagName(g),B=0;B<k.length;B++){var Z=k[B];if(!(Z[bt]||Z[mn]||g==="link"&&Z.getAttribute("rel")==="stylesheet")&&Z.namespaceURI!=="http://www.w3.org/2000/svg"){var oe=Z.getAttribute(A)||"";oe=g+oe;var pe=D.get(oe);pe?pe.push(Z):D.set(oe,[Z])}}return D}function pZ(g,A,k){g=g.ownerDocument||g,g.head.insertBefore(k,A==="title"?g.querySelector("head > title"):null)}function OOe(g,A,k){if(k===1||A.itemProp!=null)return!1;switch(g){case"meta":case"title":return!0;case"style":if(typeof A.precedence!="string"||typeof A.href!="string"||A.href==="")break;return!0;case"link":if(typeof A.rel!="string"||typeof A.href!="string"||A.href===""||A.onLoad||A.onError)break;switch(A.rel){case"stylesheet":return g=A.disabled,typeof A.precedence=="string"&&g==null;default:return!0}case"script":if(A.async&&typeof A.async!="function"&&typeof A.async!="symbol"&&!A.onLoad&&!A.onError&&A.src&&typeof A.src=="string")return!0}return!1}function mZ(g){return!(g.type==="stylesheet"&&(g.state.loading&3)===0)}function kOe(g,A,k,D){if(k.type==="stylesheet"&&(typeof D.media!="string"||matchMedia(D.media).matches!==!1)&&(k.state.loading&4)===0){if(k.instance===null){var B=Gm(D.href),Z=A.querySelector(Ux(B));if(Z){A=Z._p,A!==null&&typeof A=="object"&&typeof A.then=="function"&&(g.count++,g=IO.bind(g),A.then(g,g)),k.state.loading|=4,k.instance=Z,Ct(Z);return}Z=A.ownerDocument||A,D=fZ(D),(B=vl.get(B))&&bP(D,B),Z=Z.createElement("link"),Ct(Z);var oe=Z;oe._p=new Promise(function(pe,Ee){oe.onload=pe,oe.onerror=Ee}),Vs(Z,"link",D),k.instance=Z}g.stylesheets===null&&(g.stylesheets=new Map),g.stylesheets.set(k,A),(A=k.state.preload)&&(k.state.loading&3)===0&&(g.count++,k=IO.bind(g),A.addEventListener("load",k),A.addEventListener("error",k))}}var AP=0;function COe(g,A){return g.stylesheets&&g.count===0&&RO(g,g.stylesheets),0<g.count||0<g.imgCount?function(k){var D=setTimeout(function(){if(g.stylesheets&&RO(g,g.stylesheets),g.unsuspend){var Z=g.unsuspend;g.unsuspend=null,Z()}},6e4+A);0<g.imgBytes&&AP===0&&(AP=62500*aOe());var B=setTimeout(function(){if(g.waitingForImages=!1,g.count===0&&(g.stylesheets&&RO(g,g.stylesheets),g.unsuspend)){var Z=g.unsuspend;g.unsuspend=null,Z()}},(g.imgBytes>AP?50:800)+A);return g.unsuspend=k,function(){g.unsuspend=null,clearTimeout(D),clearTimeout(B)}}:null}function IO(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)RO(this,this.stylesheets);else if(this.unsuspend){var g=this.unsuspend;this.unsuspend=null,g()}}}var _O=null;function RO(g,A){g.stylesheets=null,g.unsuspend!==null&&(g.count++,_O=new Map,A.forEach(EOe,g),_O=null,IO.call(g))}function EOe(g,A){if(!(A.state.loading&4)){var k=_O.get(g);if(k)var D=k.get(null);else{k=new Map,_O.set(g,k);for(var B=g.querySelectorAll("link[data-precedence],style[data-precedence]"),Z=0;Z<B.length;Z++){var oe=B[Z];(oe.nodeName==="LINK"||oe.getAttribute("media")!=="not all")&&(k.set(oe.dataset.precedence,oe),D=oe)}D&&k.set(null,D)}B=A.instance,oe=B.getAttribute("data-precedence"),Z=k.get(oe)||D,Z===D&&k.set(null,B),k.set(oe,B),this.count++,D=IO.bind(this),B.addEventListener("load",D),B.addEventListener("error",D),Z?Z.parentNode.insertBefore(B,Z.nextSibling):(g=g.nodeType===9?g.head:g,g.insertBefore(B,g.firstChild)),A.state.loading|=4}}var Wx={$$typeof:O,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function TOe(g,A,k,D,B,Z,oe,pe,Ee){this.tag=1,this.containerInfo=g,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Jt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jt(0),this.hiddenUpdates=Jt(null),this.identifierPrefix=D,this.onUncaughtError=B,this.onCaughtError=Z,this.onRecoverableError=oe,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ee,this.incompleteTransitions=new Map}function gZ(g,A,k,D,B,Z,oe,pe,Ee,Le,Ze,Xe){return g=new TOe(g,A,k,oe,Ee,Le,Ze,Xe,pe),A=1,Z===!0&&(A|=24),Z=Co(3,null,null,A),g.current=Z,Z.stateNode=g,A=eT(),A.refCount++,g.pooledCache=A,A.refCount++,Z.memoizedState={element:D,isDehydrated:k,cache:A},iT(Z),g}function yZ(g){return g?(g=Om,g):Om}function xZ(g,A,k,D,B,Z){B=yZ(B),D.context===null?D.context=B:D.pendingContext=B,D=Mh(A),D.payload={element:k},Z=Z===void 0?null:Z,Z!==null&&(D.callback=Z),k=Nh(g,D,A),k!==null&&(qa(k,g,A),Ex(k,g,A))}function bZ(g,A){if(g=g.memoizedState,g!==null&&g.dehydrated!==null){var k=g.retryLane;g.retryLane=k!==0&&k<A?k:A}}function SP(g,A){bZ(g,A),(g=g.alternate)&&bZ(g,A)}function vZ(g){if(g.tag===13||g.tag===31){var A=up(g,67108864);A!==null&&qa(A,g,67108864),SP(g,67108864)}}function AZ(g){if(g.tag===13||g.tag===31){var A=No();A=Cn(A);var k=up(g,A);k!==null&&qa(k,g,A),SP(g,A)}}var jO=!0;function POe(g,A,k,D){var B=Y.T;Y.T=null;var Z=J.p;try{J.p=2,wP(g,A,k,D)}finally{J.p=Z,Y.T=B}}function MOe(g,A,k,D){var B=Y.T;Y.T=null;var Z=J.p;try{J.p=8,wP(g,A,k,D)}finally{J.p=Z,Y.T=B}}function wP(g,A,k,D){if(jO){var B=OP(D);if(B===null)cP(g,A,D,LO,k),wZ(g,D);else if(DOe(B,g,A,k,D))D.stopPropagation();else if(wZ(g,D),A&4&&-1<NOe.indexOf(g)){for(;B!==null;){var Z=Rn(B);if(Z!==null)switch(Z.tag){case 3:if(Z=Z.stateNode,Z.current.memoizedState.isDehydrated){var oe=De(Z.pendingLanes);if(oe!==0){var pe=Z;for(pe.pendingLanes|=2,pe.entangledLanes|=2;oe;){var Ee=1<<31-St(oe);pe.entanglements[1]|=Ee,oe&=~Ee}Yc(Z),(yr&6)===0&&(bO=Ge()+500,Qx(0))}}break;case 31:case 13:pe=up(Z,2),pe!==null&&qa(pe,Z,2),AO(),SP(Z,2)}if(Z=OP(D),Z===null&&cP(g,A,D,LO,k),Z===B)break;B=Z}B!==null&&D.stopPropagation()}else cP(g,A,D,null,k)}}function OP(g){return g=Vu(g),kP(g)}var LO=null;function kP(g){if(LO=null,g=wn(g),g!==null){var A=s(g);if(A===null)g=null;else{var k=A.tag;if(k===13){if(g=a(A),g!==null)return g;g=null}else if(k===31){if(g=o(A),g!==null)return g;g=null}else if(k===3){if(A.stateNode.current.memoizedState.isDehydrated)return A.tag===3?A.stateNode.containerInfo:null;g=null}else A!==g&&(g=null)}}return LO=g,null}function SZ(g){switch(g){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ye()){case st:return 2;case nt:return 8;case yt:case dt:return 32;case zt:return 268435456;default:return 32}default:return 32}}var CP=!1,Hh=null,Qh=null,zh=null,qx=new Map,Yx=new Map,Zh=[],NOe="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".split(" ");function wZ(g,A){switch(g){case"focusin":case"focusout":Hh=null;break;case"dragenter":case"dragleave":Qh=null;break;case"mouseover":case"mouseout":zh=null;break;case"pointerover":case"pointerout":qx.delete(A.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yx.delete(A.pointerId)}}function Kx(g,A,k,D,B,Z){return g===null||g.nativeEvent!==Z?(g={blockedOn:A,domEventName:k,eventSystemFlags:D,nativeEvent:Z,targetContainers:[B]},A!==null&&(A=Rn(A),A!==null&&vZ(A)),g):(g.eventSystemFlags|=D,A=g.targetContainers,B!==null&&A.indexOf(B)===-1&&A.push(B),g)}function DOe(g,A,k,D,B){switch(A){case"focusin":return Hh=Kx(Hh,g,A,k,D,B),!0;case"dragenter":return Qh=Kx(Qh,g,A,k,D,B),!0;case"mouseover":return zh=Kx(zh,g,A,k,D,B),!0;case"pointerover":var Z=B.pointerId;return qx.set(Z,Kx(qx.get(Z)||null,g,A,k,D,B)),!0;case"gotpointercapture":return Z=B.pointerId,Yx.set(Z,Kx(Yx.get(Z)||null,g,A,k,D,B)),!0}return!1}function OZ(g){var A=wn(g.target);if(A!==null){var k=s(A);if(k!==null){if(A=k.tag,A===13){if(A=a(k),A!==null){g.blockedOn=A,Yn(g.priority,function(){AZ(k)});return}}else if(A===31){if(A=o(k),A!==null){g.blockedOn=A,Yn(g.priority,function(){AZ(k)});return}}else if(A===3&&k.stateNode.current.memoizedState.isDehydrated){g.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}g.blockedOn=null}function FO(g){if(g.blockedOn!==null)return!1;for(var A=g.targetContainers;0<A.length;){var k=OP(g.nativeEvent);if(k===null){k=g.nativeEvent;var D=new k.constructor(k.type,k);Zc=D,k.target.dispatchEvent(D),Zc=null}else return A=Rn(k),A!==null&&vZ(A),g.blockedOn=k,!1;A.shift()}return!0}function kZ(g,A,k){FO(g)&&k.delete(A)}function IOe(){CP=!1,Hh!==null&&FO(Hh)&&(Hh=null),Qh!==null&&FO(Qh)&&(Qh=null),zh!==null&&FO(zh)&&(zh=null),qx.forEach(kZ),Yx.forEach(kZ)}function $O(g,A){g.blockedOn===A&&(g.blockedOn=null,CP||(CP=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IOe)))}var BO=null;function CZ(g){BO!==g&&(BO=g,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){BO===g&&(BO=null);for(var A=0;A<g.length;A+=3){var k=g[A],D=g[A+1],B=g[A+2];if(typeof D!="function"){if(kP(D||k)===null)continue;break}var Z=Rn(k);Z!==null&&(g.splice(A,3),A-=3,OT(Z,{pending:!0,data:B,method:k.method,action:D},D,B))}}))}function Xm(g){function A(Ee){return $O(Ee,g)}Hh!==null&&$O(Hh,g),Qh!==null&&$O(Qh,g),zh!==null&&$O(zh,g),qx.forEach(A),Yx.forEach(A);for(var k=0;k<Zh.length;k++){var D=Zh[k];D.blockedOn===g&&(D.blockedOn=null)}for(;0<Zh.length&&(k=Zh[0],k.blockedOn===null);)OZ(k),k.blockedOn===null&&Zh.shift();if(k=(g.ownerDocument||g).$$reactFormReplay,k!=null)for(D=0;D<k.length;D+=3){var B=k[D],Z=k[D+1],oe=B[Ht]||null;if(typeof Z=="function")oe||CZ(k);else if(oe){var pe=null;if(Z&&Z.hasAttribute("formAction")){if(B=Z,oe=Z[Ht]||null)pe=oe.formAction;else if(kP(B)!==null)continue}else pe=oe.action;typeof pe=="function"?k[D+1]=pe:(k.splice(D,3),D-=3),CZ(k)}}}function EZ(){function g(Z){Z.canIntercept&&Z.info==="react-transition"&&Z.intercept({handler:function(){return new Promise(function(oe){return B=oe})},focusReset:"manual",scroll:"manual"})}function A(){B!==null&&(B(),B=null),D||setTimeout(k,20)}function k(){if(!D&&!navigation.transition){var Z=navigation.currentEntry;Z&&Z.url!=null&&navigation.navigate(Z.url,{state:Z.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var D=!1,B=null;return navigation.addEventListener("navigate",g),navigation.addEventListener("navigatesuccess",A),navigation.addEventListener("navigateerror",A),setTimeout(k,100),function(){D=!0,navigation.removeEventListener("navigate",g),navigation.removeEventListener("navigatesuccess",A),navigation.removeEventListener("navigateerror",A),B!==null&&(B(),B=null)}}}function EP(g){this._internalRoot=g}VO.prototype.render=EP.prototype.render=function(g){var A=this._internalRoot;if(A===null)throw Error(r(409));var k=A.current,D=No();xZ(k,D,g,A,null,null)},VO.prototype.unmount=EP.prototype.unmount=function(){var g=this._internalRoot;if(g!==null){this._internalRoot=null;var A=g.containerInfo;xZ(g.current,2,null,g,null,null),AO(),A[gn]=null}};function VO(g){this._internalRoot=g}VO.prototype.unstable_scheduleHydration=function(g){if(g){var A=tt();g={blockedOn:null,target:g,priority:A};for(var k=0;k<Zh.length&&A!==0&&A<Zh[k].priority;k++);Zh.splice(k,0,g),k===0&&OZ(g)}};var TZ=e.version;if(TZ!=="19.2.6")throw Error(r(527,TZ,"19.2.6"));J.findDOMNode=function(g){var A=g._reactInternals;if(A===void 0)throw typeof g.render=="function"?Error(r(188)):(g=Object.keys(g).join(","),Error(r(268,g)));return g=c(A),g=g!==null?u(g):null,g=g===null?null:g.stateNode,g};var _Oe={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var HO=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!HO.isDisabled&&HO.supportsFiber)try{en=HO.inject(_Oe),et=HO}catch{}}return eb.createRoot=function(g,A){if(!i(g))throw Error(r(299));var k=!1,D="",B=RQ,Z=jQ,oe=LQ;return A!=null&&(A.unstable_strictMode===!0&&(k=!0),A.identifierPrefix!==void 0&&(D=A.identifierPrefix),A.onUncaughtError!==void 0&&(B=A.onUncaughtError),A.onCaughtError!==void 0&&(Z=A.onCaughtError),A.onRecoverableError!==void 0&&(oe=A.onRecoverableError)),A=gZ(g,1,!1,null,null,k,D,null,B,Z,oe,EZ),g[gn]=A.current,lP(g),new EP(A)},eb.hydrateRoot=function(g,A,k){if(!i(g))throw Error(r(299));var D=!1,B="",Z=RQ,oe=jQ,pe=LQ,Ee=null;return k!=null&&(k.unstable_strictMode===!0&&(D=!0),k.identifierPrefix!==void 0&&(B=k.identifierPrefix),k.onUncaughtError!==void 0&&(Z=k.onUncaughtError),k.onCaughtError!==void 0&&(oe=k.onCaughtError),k.onRecoverableError!==void 0&&(pe=k.onRecoverableError),k.formState!==void 0&&(Ee=k.formState)),A=gZ(g,1,!0,A,k??null,D,B,Ee,Z,oe,pe,EZ),A.context=yZ(null),k=A.current,D=No(),D=Cn(D),B=Mh(D),B.callback=null,Nh(k,B,D),k=D,A.current.lanes=k,Pn(A,k),Yc(A),g[gn]=A.current,lP(g),new VO(A)},eb.version="19.2.6",eb}var FZ;function ZOe(){if(FZ)return MP.exports;FZ=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),MP.exports=zOe(),MP.exports}var GOe=ZOe();function Mf(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function fS(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function fj(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}const Sie="hyperframes-studio:anonymousId",wie="hf-studio-anon-id";let wp=null;function UOe(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_DISTINCT_ID;return typeof t=="string"&&t.length>0?t:null}catch{return null}}function _P(t,e){for(const n of[Sie,wie])try{t.setItem(n,e)}catch{}}function hj(){if(wp)return wp;const t=fS(),e=UOe();if(e)return wp=e,t&&_P(t,e),e;if(t){let r=null;try{r=t.getItem(Sie)??t.getItem(wie)}catch{}if(r)return wp=r,_P(t,r),r}else return wp=Mf(),wp;const n=Mf();return wp=n,_P(t,n),n}const XOe="hyperframes-studio:telemetryDisabled",Oie="hyperframes-studio:telemetryNoticeShown";function kie(){return hj()}function Cie(t){var e;try{return((e=fS())==null?void 0:e.getItem(t))==="1"}catch{return!1}}function WOe(){return Cie(XOe)}function qOe(){return Cie(Oie)}function YOe(){var t;try{(t=fS())==null||t.setItem(Oie,"1")}catch{}}const Eie="hyperframes-studio:sessionStartFired";function KOe(){var t;return((t=fj())==null?void 0:t.getItem(Eie))==="1"}function JOe(){var t;try{(t=fj())==null||t.setItem(Eie,"1")}catch{}}const e8e="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",t8e="hf-studio-telemetry-opt-out";function n8e(){try{return localStorage.getItem(t8e)==="1"}catch{return!1}}function r8e(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function i8e(){return e8e.startsWith("phc_")}function s8e(){try{return!1}catch{return!1}}function a8e(){try{return!1}catch{return!1}}function hS(){try{return o8e()}catch{return!1}}function o8e(){return i8e()&&!s8e()&&!a8e()&&!WOe()&&!n8e()&&!r8e()}let Wm;function l8e(){if(Wm!==void 0)return Wm;if(typeof window>"u")return Wm=null,Wm;const t=window.__HF_CLI_AGENT_RUNTIME;return Wm=typeof t=="string"&&t.length>0?t:null,Wm}function Tie(){return l8e()??"none"}const c8e={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1,studio_version:"dev",agent_runtime:"none"};let qm=null;function u8e(){if(qm)return qm;if(typeof navigator>"u"||typeof window>"u")return qm=c8e,qm;const t=navigator.userAgent,e=window.screen;return qm={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t),studio_version:"0.8.30",agent_runtime:Tie()},qm}function f8e(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e>>>0}function h8e(t,e){return f8e(`${t}:${e}`)%100}function d8e(t){var i;if(t.override===!0)return{enabled:!0,reason:"forced_on"};if(t.override===!1)return{enabled:!1,reason:"forced_off"};const e=Math.max(0,Math.min(100,Math.trunc(t.percentage)));if(e<=0)return{enabled:!1,reason:"out_of_cohort"};if(e>=100)return{enabled:!0,reason:"in_cohort"};if(t.exclude)return{enabled:!1,reason:"excluded"};const n=(i=t.unitId)==null?void 0:i.trim();if(!n)return{enabled:!1,reason:"no_unit_id"};const r=h8e(t.feature,n);return r<e?{enabled:!0,reason:"in_cohort",bucket:r}:{enabled:!1,reason:"out_of_cohort",bucket:r}}function $Z(t){const e=t==null?void 0:t.trim().toLowerCase();if(!(e===void 0||e==="")){if(e==="1"||e==="true"||e==="on"||e==="yes")return!0;if(e==="0"||e==="false"||e==="off"||e==="no")return!1}}const p8e="$feature/canary-";function m8e(t){return`${p8e}${t}`}function g8e(t){return`canary_reason_${t.replace(/[^A-Za-z0-9]+/g,"_")}`}function y8e(t){const e={};for(const n of t)e[m8e(n.name)]=n.enabled?"true":"false",n.reason!==void 0&&(e[g8e(n.name)]=n.reason);return e}const Pie=[{name:"calibration-10",percentage:10,description:"Inert. Validates rollout accuracy and cumulative-exposure drift at 10%.",owner:"vance",sunsetAfter:"2026-09-15"},{name:"calibration-50",percentage:50,description:"Inert. Second calibration point, and an independence check against calibration-10.",owner:"vance",sunsetAfter:"2026-09-15"}];function x8e(t){return Pie.find(e=>e.name===t)}function b8e(t){return`hf_canary_${t.toLowerCase().replace(/[^a-z0-9]+/g,"_")}`}function v8e(t){var e;try{if(typeof window>"u")return;const n=(e=window.__HF_CLI_CANARY_DECISIONS)==null?void 0:e[t];return typeof(n==null?void 0:n.enabled)!="boolean"?void 0:{enabled:n.enabled,forced:n.forced===!0}}catch{return}}function A8e(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_BUCKET_SEED;if(typeof t=="string"&&t.length>0)return t}catch{}return hj()}const S8e="hyperframes-studio:canary:";function w8e(t){if(typeof window>"u")return;const e=b8e(t),n=`${S8e}${t}`,r=fj();let i=null;try{i=new URLSearchParams(window.location.search).get(e)}catch{i=null}if(i!==null){if(i.trim().toLowerCase()==="reset"){r==null||r.removeItem(n);return}try{r==null||r.setItem(n,i)}catch{}return $Z(i)}return $Z((r==null?void 0:r.getItem(n))??void 0)}function BZ(){return typeof navigator>"u"?!1:navigator.webdriver===!0}const VZ=new Map,HZ=t=>({enabled:t,reason:t?"forced_on":"forced_off"}),O8e=t=>({enabled:t,reason:t?"in_cohort":"out_of_cohort"});function k8e(t){const e=x8e(t);if(!e)return{enabled:!1,reason:"out_of_cohort"};const n=v8e(e.name);if(n!=null&&n.forced)return HZ(n.enabled);const r=w8e(e.name);if(r===void 0){if(!hS())return{enabled:!1,reason:"telemetry_opt_out"};if(BZ())return{enabled:!1,reason:"excluded"};if(n!==void 0)return O8e(n.enabled)}return r!==void 0?HZ(r):d8e({feature:e.name,unitId:A8e(),percentage:e.percentage,exclude:BZ()})}function C8e(t){const e=VZ.get(t);if(e)return e;const n=k8e(t);return VZ.set(t,n),n}function Mie(){return y8e(Pie.map(t=>{const{enabled:e,reason:n}=C8e(t.name);return{name:t.name,enabled:e,reason:n}}))}const E8e=14,T8e=["action","tab","panel","status","mode","reason","format","via"],D4=[],P8e=Date.now();function M8e(t){for(const e of T8e){const n=t[e];if(typeof n=="string"&&n.length>0&&n.length<=24)return`:${n}`;if(typeof n=="number"||typeof n=="boolean")return`:${String(n)}`}return""}function N8e(t,e){const n=t.replace(/^studio[:_]/,"");D4.push({at:Date.now()-P8e,label:`${n}${M8e(e)}`}),D4.length>E8e&&D4.shift()}function D8e(){return D4.map(t=>`${(t.at/1e3).toFixed(1)} ${t.label}`).join(" > ")}const I8e="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",_8e="https://us.i.posthog.com",R8e=1e3;let I4=[],RP=null;function j8e(){return hS()}function _s(t,e={}){if(!j8e())return;N8e(t,e);const n=u8e();I4.push({event:t,properties:{...e,...n,...Mie()},timestamp:new Date().toISOString()}),RP===null&&(RP=setTimeout(()=>{RP=null,VI()},R8e)),F8e()}function VI(){if(I4.length===0)return;const t=kie(),e=I4.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));I4=[],L8e(`${_8e}/batch/`,JSON.stringify({api_key:I8e,batch:e}))}function L8e(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function F8e(){qOe()||(YOe(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>VI(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&VI()}));function $8e(t){_s("studio_session_start",{has_project:t.has_project})}function B8e(t){_s("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function V8e(t){_s("studio_timeline_performance",t)}function H8e(){var t,e;try{const n=navigator,i=[`ua=${((t=n.userAgentData)==null?void 0:t.platform)??navigator.platform??"unknown"}`,`screen=${screen.width}x${screen.height}@${devicePixelRatio}x`,`lang=${navigator.language}`];return n.deviceMemory&&i.push(`mem=${n.deviceMemory}GB`),(e=n.connection)!=null&&e.effectiveType&&i.push(`net=${n.connection.effectiveType}`),navigator.hardwareConcurrency&&i.push(`cpu=${navigator.hardwareConcurrency}cores`),i.join(" ")}catch{return""}}function Q8e(t){_s("studio_razor_split",{mode:t.mode,count:t.count})}function Ym(t){_s("studio_expanded_clip_edit",{action:t.action})}function QZ(t){_s("studio_keyframe_lane_expand",{expanded:t.expanded})}function dj(t){_s("studio_segment_ease_edit",{action:t.action,ease:t.ease})}function z8e(t){_s("studio_feedback_shown",{reason:t.reason,render_id:t.render_id,source:"studio"})}function Z8e(t){_s("studio_feedback_dismissed",{reason:t.reason,render_id:t.render_id,via:t.via,had_rating:t.had_rating,source:"studio"})}function G8e(t){_s("studio_feedback_interview_click",{reason:t.reason,source:"studio"})}function U8e(t){_s("studio_feedback",{...t.rating===void 0?{}:{rating:t.rating,rating_scale:10},...t.comment?{comment:t.comment}:{},...t.context,reason:t.reason,render_id:t.render_id,question:t.question,answer_kind:t.answer_kind,doctor_summary:H8e(),breadcrumbs:D8e(),source:"studio"})}function QO(t){_s("studio_block_param_commit",{tone:t.tone,block_name:t.blockName,param_key:t.key})}async function X8e(t){try{const e=await t.json();if(typeof e=="object"&&e!==null){const{error:n,hint:r}=e;if(typeof n=="string"&&n)return typeof r=="string"&&r?`${n}. ${r}`:n}}catch{}return`Server error (${t.status}). Check the terminal for details.`}function W8e(t){const e=(t==null?void 0:t.title)??"FFmpeg not found",n=(t==null?void 0:t.command)??(t==null?void 0:t.hint);return n?`${e}. Install it with: ${n}`:`${e}. Install FFmpeg to export.`}let tb=null;const zO=t=>typeof t=="string"&&t?t:void 0;function q8e(t){if(typeof t!="object"||t===null)return null;const{ok:e,title:n,detail:r,hint:i,command:s}=t;return typeof e!="boolean"?null:{ok:e,title:zO(n),detail:zO(r),hint:zO(i),command:zO(s)}}async function Y8e(){try{const t=await fetch("/api/environment/ffmpeg");return t.ok?q8e(await t.json()):null}catch{return null}}function K8e(){const[t,e]=x.useState(tb),[n,r]=x.useState(tb===null),i=x.useRef(!0);x.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const s=x.useCallback(async()=>{r(!0);const o=await Y8e();tb=o,i.current&&(e(o),r(!1))},[]);x.useEffect(()=>{tb===null&&s()},[s]);const a=x.useCallback(()=>{tb=null,s()},[s]);return{status:t,checking:n,recheck:a}}function zZ(t){return t!=="render_complete"}const ZZ=[{id:"remove",prompt:"What would you cut from Studio?",placeholder:"The part you never use",presets:[{label:"Layers panel",hint:"The layer tree on the right"},{label:"Variables panel",hint:"Composition variables on the right"},{label:"Blocks browser",hint:"The block library in the sidebar"},{label:"Storyboard mode",hint:"The storyboard view next to Preview"},{label:"Caption editing",hint:"Editing caption words and presets in Studio"},{label:"Render history",hint:"The list of past exports"},{label:"Nothing",hint:"It all earns its place"}]},{id:"workaround",prompt:"What did you have to do outside Studio?",placeholder:"The step you finished somewhere else",presets:[{label:"Fix the exported file",hint:"Remuxing or re-encoding the output by hand"},{label:"Convert source media",hint:"Re-encoding footage before it would import cleanly"},{label:"Match loudness",hint:"Normalising levels across the finished audio"},{label:"Make images or graphics",hint:"Creating visual assets in another tool"},{label:"Record footage",hint:"Capturing screen or camera video"},{label:"Nothing, it was all here",hint:"No outside tools needed"}]},{id:"fix",prompt:"What should we fix first?",placeholder:"The thing that slowed you down",presets:[{label:"Audio mixing",hint:"Levels, ducking or the balance in the exported mix"},{label:"Export encoding",hint:"The render fails, or the finished file is wrong"},{label:"Export matches preview",hint:"The exported video differs from the preview"},{label:"Media and fonts",hint:"Adding video, images or fonts to a project"},{label:"Render speed",hint:"Exports take too long to finish"},{label:"Re-rendering everything",hint:"A small change means rendering the whole thing"},{label:"Checks and warnings",hint:"Lint flags things that are fine, or misses real ones"}]}],J8e={id:"detractor",prompt:"What went wrong?",placeholder:"The thing that made that a low score",presets:[{label:"Export failed",hint:"The render did not finish"},{label:"Output looked wrong",hint:"It rendered, but not the way I built it"},{label:"Crashed or froze",hint:"The editor stopped responding"},{label:"Lost my edits",hint:"Changes did not save, or came back changed"},{label:"Too slow",hint:"Waiting on renders, or the editor itself lagging"},{label:"Could not figure it out",hint:"Could not find or understand something"}]},e4e=6;function t4e(t){return t<=e4e?J8e:ZZ[Math.floor(Math.random()*ZZ.length)]}const E6={dismissedAt:"hyperframes-studio:feedbackDismissedAt",answeredAt:"hyperframes-studio:feedbackAnsweredAt"},Nie="hyperframes-studio:feedbackAskedThisSession",Die=864e5,n4e=30*Die,r4e=7*Die;let X2=null;function i4e(){try{return!1}catch{return!1}}function GZ(t){try{return parseInt(window.localStorage.getItem(t)||"0",10)||0}catch{return 0}}function Iie(t,e){try{window.localStorage.setItem(t,String(e))}catch{}}function s4e(){try{return window.sessionStorage.getItem(Nie)==="1"}catch{return!0}}function a4e(){try{window.sessionStorage.setItem(Nie,"1")}catch{}}function o4e(t){return!(i4e()||!hS()||s4e()||t-GZ(E6.answeredAt)<n4e||t-GZ(E6.dismissedAt)<r4e)}function _ie(t){X2&&o4e(Date.now())&&(a4e(),X2(t))}function l4e(t){return X2=t,()=>{X2===t&&(X2=null)}}function c4e(){Iie(E6.answeredAt,Date.now())}function u4e(){Iie(E6.dismissedAt,Date.now())}function Rie(t){return`hf-studio-hidden-renders:${t}`}function UZ(t){try{const e=window.localStorage.getItem(Rie(t)),n=e?JSON.parse(e):[];return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function f4e(t,e){try{window.localStorage.setItem(Rie(t),JSON.stringify([...e].slice(-200)))}catch{}}function h4e(t,e){const[n,r]=x.useState([]),[i,s]=x.useState(null),[a,o]=x.useState(null),{status:l,checking:c,recheck:u}=K8e(),f=l!==null&&!l.ok,h=x.useRef(null),m=x.useRef(null),y=x.useRef(new Map),p=x.useRef(new Set),v=x.useCallback((I,j)=>{y.current.set(I.id,j),r(L=>[...L,I])},[]),b=x.useCallback(I=>{var j;I&&m.current!==I||((j=h.current)==null||j.close(),h.current=null,m.current=null)},[]),w=x.useCallback(async()=>{if(t)try{const I=await fetch(`/api/projects/${t}/renders`);if(!I.ok){s(`Couldn't load render history (server error ${I.status}).`);return}const j=await I.json();if(s(null),Array.isArray(j.renders)){const L=UZ(t);r(H=>{const $=new Set(H.map(q=>q.id)),G=j.renders.filter(q=>!$.has(q.id)&&!L.has(q.id)).map(q=>({id:q.id,status:q.status==="failed"?"failed":"complete",progress:100,filename:q.filename,createdAt:q.createdAt,durationMs:q.durationMs}));return[...H,...G]})}}catch{s("Couldn't load render history. Is the studio server running?")}},[t]);x.useEffect(()=>{w()},[w]);const O=x.useCallback(async(I={})=>{if(!t)return;if(f){v({id:Mf(),status:"failed",progress:0,error:W8e(l),filename:"Export blocked",createdAt:Date.now()},{});return}const j=I.fps??30,L=I.quality??"standard",H=I.format??"mp4",$=I.resolution,G=I.composition??e.current??void 0;B8e({fps:j,quality:L,format:H,resolution:$,composition:G});const q=Date.now(),Y={render_format:H,render_quality:L,render_fps:j,render_resolution:$??"auto",render_composition:G??"index.html",render_has_variables:!!(I.variables&&Object.keys(I.variables).length>0)},J={fps:j,quality:L,format:H};hS()?J.telemetryDistinctId=kie():J.telemetryOptOut=!0,$&&$!=="auto"&&(J.resolution=$),G&&(J.composition=G),I.variables&&Object.keys(I.variables).length>0&&(J.variables=I.variables);let ie;try{ie=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)})}catch(Q){const K=Q instanceof Error?Q.message:String(Q),ee={id:Mf(),status:"failed",progress:0,error:`Could not reach render server: ${K}. Use \`hyperframes render\` from the CLI instead.`,filename:"Export failed",createdAt:q};v(ee,Y);return}if(!ie.ok){const Q={id:Mf(),status:"failed",progress:0,error:await X8e(ie),filename:"Export failed",createdAt:q};v(Q,Y);return}const{jobId:te}=await ie.json(),W={mp4:".mp4",webm:".webm",mov:".mov"}[H]??".mp4",F={id:te,status:"rendering",progress:0,filename:`${te}${W}`,createdAt:q};v(F,Y),m.current=te;const U=new EventSource(`/api/render/${te}/progress`);return h.current=U,U.addEventListener("progress",Q=>{try{const K=JSON.parse(Q.data),ee=K.status==="complete"||K.status==="failed"||K.status==="cancelled";r(se=>se.map(z=>z.id===te?{...z,progress:K.progress??z.progress,stage:K.stage??K.message??z.stage,status:ee?K.status:z.status,durationMs:K.status==="complete"?Date.now()-q:void 0,error:K.error??z.error}:z)),ee&&b(te)}catch{}}),U.onerror=()=>{U.close(),r(Q=>Q.map(K=>K.id===te&&K.status==="rendering"?{...K,status:"failed",error:"Connection lost. Is the render server running?"}:K)),m.current=null},te},[t,e,b,v,l,f]),C=x.useCallback(async I=>{o(null),b(I),r(j=>j.map(L=>L.id===I&&L.status==="rendering"?{...L,status:"cancelled"}:L));try{const j=await fetch(`/api/render/${I}/cancel`,{method:"POST"});if(!j.ok&&j.status!==404){o("Couldn't cancel on the server — the render may still be running.");return}if(j.ok){const L=await j.json().catch(()=>null);L!=null&&L.status&&L.status!=="cancelled"&&w()}}catch{o("Couldn't reach the server to cancel — the render may still be running.")}},[b,w]),E=x.useCallback(async I=>{o(null),b(I);try{if(!(await fetch(`/api/render/${I}`,{method:"DELETE"})).ok){o("Couldn't delete the render — it's still on disk.");return}}catch{o("Couldn't reach the server to delete the render.");return}r(j=>j.filter(L=>L.id!==I))},[b]),M=x.useCallback(()=>{r(I=>{const j=I.filter(L=>L.status!=="rendering");if(t&&j.length>0){const L=UZ(t);for(const H of j)L.add(H.id);f4e(t,L)}return I.filter(L=>L.status==="rendering")})},[t]),N=x.useCallback(()=>o(null),[]);x.useEffect(()=>{for(const I of n){if(I.status==="rendering"||I.status==="cancelled")continue;const j=y.current.get(I.id);!j||p.current.has(I.id)||(p.current.add(I.id),_ie({reason:I.status==="complete"?"render_complete":"render_failed",renderId:I.id,detail:I.error,context:{...j,render_progress:I.progress,render_duration_ms:I.durationMs??Date.now()-I.createdAt,render_stage:I.stage,render_error:I.error,renders_this_session:y.current.size}}))}},[n]),x.useEffect(()=>()=>{var I;(I=h.current)==null||I.close(),h.current=null},[t]);const _=n.some(I=>I.status==="rendering");return x.useMemo(()=>({jobs:n,isRendering:_,loadError:i,actionError:a,dismissActionError:N,reloadRenders:w,deleteRender:E,cancelRender:C,clearCompleted:M,startRender:O,ffmpeg:l,ffmpegMissing:f,ffmpegChecking:c,recheckFfmpeg:u}),[n,_,i,a,N,w,E,C,M,O,l,f,c,u])}const d4e="modulepreload",p4e=function(t){return"/"+t},XZ={},Sy=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=a(n.map(c=>{if(c=p4e(c),c in XZ)return;XZ[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":d4e,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((m,y)=>{h.addEventListener("load",m),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};function m4e(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function kr(t){x.useEffect(t,[])}const WZ=t=>{let e;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const h=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(m=>m(e,h))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=e=t(r,i,o);return o},g4e=(t=>t?WZ(t):WZ),y4e=t=>t;function x4e(t,e=y4e){const n=Gb.useSyncExternalStore(t.subscribe,Gb.useCallback(()=>e(t.getState()),[t,e]),Gb.useCallback(()=>e(t.getInitialState()),[t,e]));return Gb.useDebugValue(n),n}const qZ=t=>{const e=g4e(t),n=r=>x4e(e,r);return Object.assign(n,e),n},AE=(t=>t?qZ(t):qZ),zv=AE(t=>({values:null,setValues:e=>t({values:e&&Object.keys(e).length>0?e:null})}));function jie(t){const e=zv.getState().values;e?t.searchParams.set("variables",JSON.stringify(e)):t.searchParams.delete("variables")}const Lie={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","enabled:hover:bg-neutral-200","enabled:active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","enabled:hover:bg-surface-hover enabled:hover:text-white enabled:hover:border-border-strong","enabled:active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","enabled:hover:bg-red-600","enabled:active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","enabled:hover:bg-surface-hover enabled:hover:text-white","enabled:active:scale-[0.98]"].join(" ")},b4e={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},Uo=x.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:s="",disabled:a,...o},l)=>d.jsxs("button",{ref:l,disabled:a||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",Lie[t],b4e[e],s].join(" "),...o,children:[n?d.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?d.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&d.jsx("span",{children:i})]}));Uo.displayName="Button";const v4e={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},A4e=x.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},s)=>d.jsx("button",{ref:s,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",Lie[n],v4e[e],r].join(" "),...i,children:t}));A4e.displayName="IconButton";function Fie({viewBox:t="0 0 100 100",...e}){const n=x.useId(),r=`${n}-left`,i=`${n}-right`;return d.jsxs("svg",{viewBox:t,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...e,children:[d.jsx("g",{transform:"translate(50 50)",opacity:".92",children:d.jsxs("g",{transform:"translate(-50 -50)",children:[d.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:`url(#${r})`}),d.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:`url(#${i})`})]})}),d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:r,x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#06E3FA"}),d.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),d.jsxs("linearGradient",{id:i,x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#06E3FA"}),d.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}function YZ({title:t,detail:e,mono:n,size:r=64,progress:i}){const s=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,a=Math.round(r*1.16);return d.jsxs("div",{className:"hf-loader",role:"status",draggable:!1,children:[d.jsx("div",{className:"hf-loader-mark-frame",style:{width:a,height:a},draggable:!1,children:d.jsx(Fie,{className:"hf-loader-mark",width:r,height:r})}),d.jsx("div",{className:"hf-loader-title",children:t}),e&&d.jsx("div",{className:"hf-loader-detail",children:e}),s!==void 0&&d.jsx("div",{className:"hf-loader-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s*100),children:d.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${s})`}})}),n&&d.jsx("div",{className:"hf-loader-mono",children:n})]})}var Zl=Aie();function _4(t,e,n){return Math.max(e,Math.min(n,t))}function S4e(t,e,n,r){const i=e/2,s=i+r;return _4(t,s,Math.max(s,n-i-r))}function pj(t,e,n,r){const i=(r==null?void 0:r.offset)??8,s=(r==null?void 0:r.margin)??12,a=Math.max(s,e.width-n.width-s),o=t.left+t.width/2-n.width/2,l=_4(o,s,a),c=t.bottom+i,u=t.top-n.height-i,f=c+n.height<=e.height-s,h=u>=s;return f||!h?{left:l,top:_4(c,s,Math.max(s,e.height-n.height-s)),placement:"bottom"}:{left:l,top:_4(u,s,Math.max(s,e.height-n.height-s)),placement:"top"}}const KZ=28,jP=8;function Ar({label:t,children:e,delay:n=400,side:r="top"}){const[i,s]=x.useState(!1),[a,o]=x.useState({x:0,y:0}),[l,c]=x.useState(r),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),[m,y]=x.useState(0),p=x.useId(),v=x.useCallback(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{const O=f.current;if(!O)return;const E=(O.firstElementChild??O).getBoundingClientRect();if(E.width===0&&E.height===0)return;let M=r;r==="top"&&E.top-KZ-6<jP?M="bottom":r==="bottom"&&E.bottom+KZ+6>window.innerHeight-jP&&(M="top"),c(M),o({x:E.left+E.width/2,y:M==="top"?E.top-6:E.bottom+6}),s(!0)},n)},[n,r]),b=x.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),s(!1)},[]);x.useLayoutEffect(()=>{var O;y(i?((O=h.current)==null?void 0:O.offsetWidth)??0:0)},[i,t]),x.useEffect(()=>{if(!i)return;const O=C=>{C.key==="Escape"&&b()};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[i,b]);const w=S4e(a.x,m,window.innerWidth,jP);return d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:f,onPointerEnter:v,onPointerLeave:b,onFocus:v,onBlur:b,"aria-describedby":i?p:void 0,className:"contents",children:e}),i&&Zl.createPortal(d.jsx("div",{className:"fixed z-[200] pointer-events-none",style:{left:w,top:a.y,transform:l==="top"?"translate(-50%, -100%)":"translate(-50%, 0)"},children:d.jsx("div",{ref:h,role:"tooltip",id:p,className:"px-2 py-1 rounded-md bg-neutral-800 border border-neutral-700/50 text-[10px] font-medium text-neutral-200 whitespace-nowrap shadow-lg",children:t})}),document.body)]})}const w4e=3,O4e=3;function HI(t){return typeof t=="object"&&t!==null}function k4e(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!HI(e))return null;const n=e.state;return HI(n)?n.loading===!0&&n.ready!==!0:null}const C4e=400,JZ="The composition preview did not become ready.";function E4e(t){return!(t instanceof CustomEvent)||!HI(t.detail)?JZ:typeof t.detail.message=="string"&&t.detail.message.trim()?t.detail.message:JZ}function T4e(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function P4e(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function eG(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const s of r.querySelectorAll("video, audio"))if(P4e(s)&&!s.error&&s.networkState!==O4e&&s.readyState<w4e)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const s of i)if(!m4e(s))return!0}return!1}catch{return e}}const QI=x.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:s,suppressLoadingOverlay:a},o)=>{const l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),m=x.useRef(0),[y,p]=x.useState(!1),[v,b]=x.useState(!1),[w,O]=x.useState(!1),[C,E]=x.useState(!1),[M,N]=x.useState(!1),[_,I]=x.useState(!0),[j,L]=x.useState(!0),[H,$]=x.useState(null);x.useEffect(()=>{if(!_){L(!0);return}const J=setTimeout(()=>L(!1),C4e);return()=>clearTimeout(J)},[_]),kr(()=>{const J=l.current;if(!J)return;let ie=!1,te;return Sy(()=>import("./hyperframes-player-jDyYPwpC.js"),[]).then(()=>{if(ie)return;const ne=document.createElement("hyperframes-player"),W=new URL(e||`/api/projects/${t}/preview`,window.location.origin);jie(W);const F=W.pathname+W.search,U=()=>{m.current+=1;const ae=new URL(F,window.location.origin);ae.searchParams.set("_hfStudioRetry",String(m.current)),$(null),I(!0),ne.setAttribute("src",ae.pathname+ae.search)};h.current=U;const Q=ne.iframeElement,K=ae=>ae.stopImmediatePropagation(),ee=ae=>{const he=k4e(ae);he!==null&&N(he)},se=()=>{$(null),I(!1)},z=ae=>{$(E4e(ae)),I(!1)},V=()=>{if(c.current++,$(null),N(!1),I(!0),c.current>1){J.classList.remove("preview-revealing"),J.offsetWidth,J.classList.add("preview-revealing");const ge=()=>J.classList.remove("preview-revealing");J.addEventListener("animationend",ge,{once:!0})}n(),u.current&&clearInterval(u.current);let he=c.current>1?!1:eG(Q,!1);if(he){p(!0);let ge=0;u.current=setInterval(()=>{ge+=1,he=eG(Q,he),(!he||ge>100)&&(he&&ge>100&&console.debug("[studio] asset readiness poll hit the 10s cap — continuing with unloaded assets"),u.current&&clearInterval(u.current),u.current=null,p(!1))},100)}else p(!1)};if(Q.addEventListener("load",V),ne.addEventListener("click",K,{capture:!0}),ne.addEventListener("shadertransitionstate",ee),ne.addEventListener("ready",se),ne.addEventListener("error",z),typeof o=="function"?o(Q):o&&(o.current=Q),ne.setAttribute("shader-capture-scale","1"),ne.setAttribute("shader-loading","player"),ne.setAttribute("width",String(i?1080:1920)),ne.setAttribute("height",String(i?1920:1080)),ne.style.width="100%",ne.style.height="100%",ne.style.display="block",ne.style.background="transparent",ne.setAttribute("src",F),J.appendChild(ne),ne.shadowRoot){const ae=document.createElement("style");ae.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",ne.shadowRoot.appendChild(ae)}T4e(ne),te=()=>{if(Q.removeEventListener("load",V),ne.removeEventListener("click",K,{capture:!0}),ne.removeEventListener("shadertransitionstate",ee),ne.removeEventListener("ready",se),ne.removeEventListener("error",z),u.current&&clearInterval(u.current),u.current=null,ne.remove(),h.current===U&&(h.current=null),typeof o!="function"){if(o){const ae=o;ae.current===Q&&(ae.current=null)}}}}),()=>{ie=!0,te==null||te()}}),x.useEffect(()=>{if(!y){E(!1);return}const J=setTimeout(()=>E(!0),3e3);return()=>clearTimeout(J)},[y]),x.useEffect(()=>{if(f.current&&(clearTimeout(f.current),f.current=null),y){b(!0),O(!1);return}return O(!0),f.current=setTimeout(()=>{b(!1),O(!1),f.current=null},240),()=>{f.current&&(clearTimeout(f.current),f.current=null)}},[y]);const G=()=>{u.current&&(clearInterval(u.current),u.current=null),p(!1)},q=!a&&!j&&_,Y=v&&!M&&!q&&!H;return x.useEffect(()=>{r==null||r(q||Y)},[r,q,Y]),d.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:s,children:[d.jsx("div",{ref:l,className:"w-full h-full"}),q&&d.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-30 select-none","data-hyperframes-ignore":"","data-testid":"composition-loading-overlay",draggable:!1,onDragStart:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),onPointerDown:J=>J.preventDefault(),children:d.jsx(YZ,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),Y&&d.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:w?0:1,pointerEvents:w?"none":"auto",transition:"opacity 180ms ease-in"},onDragStart:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),children:d.jsxs("div",{className:"flex flex-col items-center gap-3",children:[d.jsx(YZ,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56}),C&&d.jsx("button",{type:"button",onClick:G,className:"px-3 py-1.5 text-[11px] rounded-md border border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800 transition-colors",children:"Continue anyway"})]})}),H&&d.jsx("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/90 px-6 text-center","data-hyperframes-ignore":"","data-testid":"composition-preview-error",children:d.jsxs("div",{className:"max-w-sm",children:[d.jsx("p",{className:"text-sm font-semibold text-white",children:"Preview failed to load"}),d.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:H}),d.jsx("button",{type:"button",className:"mt-4 rounded-md bg-white px-3 py-1.5 text-xs font-semibold text-black transition-colors hover:bg-neutral-200",onClick:()=>{var J;return(J=h.current)==null?void 0:J.call(h)},children:"Retry preview"})]})})]})});QI.displayName="Player";function ff(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $ie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
49
+ `).replace(iOe,"")}function qz(g,A){return A=Wz(A),Wz(g)===A}function _r(g,A,k,D,B,Z){switch(k){case"children":typeof D=="string"?A==="body"||A==="textarea"&&D===""||tn(g,D):(typeof D=="number"||typeof D=="bigint")&&A!=="body"&&tn(g,""+D);break;case"className":fn(g,"class",D);break;case"tabIndex":fn(g,"tabindex",D);break;case"dir":case"role":case"viewBox":case"width":case"height":fn(g,k,D);break;case"style":lr(g,D,Z);break;case"data":if(A!=="object"){fn(g,"data",D);break}case"src":case"href":if(D===""&&(A!=="a"||k!=="href")){g.removeAttribute(k);break}if(D==null||typeof D=="function"||typeof D=="symbol"||typeof D=="boolean"){g.removeAttribute(k);break}D=Hr(""+D),g.setAttribute(k,D);break;case"action":case"formAction":if(typeof D=="function"){g.setAttribute(k,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof Z=="function"&&(k==="formAction"?(A!=="input"&&_r(g,A,"name",B.name,B,null),_r(g,A,"formEncType",B.formEncType,B,null),_r(g,A,"formMethod",B.formMethod,B,null),_r(g,A,"formTarget",B.formTarget,B,null)):(_r(g,A,"encType",B.encType,B,null),_r(g,A,"method",B.method,B,null),_r(g,A,"target",B.target,B,null)));if(D==null||typeof D=="symbol"||typeof D=="boolean"){g.removeAttribute(k);break}D=Hr(""+D),g.setAttribute(k,D);break;case"onClick":D!=null&&(g.onclick=Ss);break;case"onScroll":D!=null&&Qn("scroll",g);break;case"onScrollEnd":D!=null&&Qn("scrollend",g);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));g.innerHTML=k}}break;case"multiple":g.multiple=D&&typeof D!="function"&&typeof D!="symbol";break;case"muted":g.muted=D&&typeof D!="function"&&typeof D!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(D==null||typeof D=="function"||typeof D=="boolean"||typeof D=="symbol"){g.removeAttribute("xlink:href");break}k=Hr(""+D),g.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",k);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":D!=null&&typeof D!="function"&&typeof D!="symbol"?g.setAttribute(k,""+D):g.removeAttribute(k);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":D&&typeof D!="function"&&typeof D!="symbol"?g.setAttribute(k,""):g.removeAttribute(k);break;case"capture":case"download":D===!0?g.setAttribute(k,""):D!==!1&&D!=null&&typeof D!="function"&&typeof D!="symbol"?g.setAttribute(k,D):g.removeAttribute(k);break;case"cols":case"rows":case"size":case"span":D!=null&&typeof D!="function"&&typeof D!="symbol"&&!isNaN(D)&&1<=D?g.setAttribute(k,D):g.removeAttribute(k);break;case"rowSpan":case"start":D==null||typeof D=="function"||typeof D=="symbol"||isNaN(D)?g.removeAttribute(k):g.setAttribute(k,D);break;case"popover":Qn("beforetoggle",g),Qn("toggle",g),ri(g,"popover",D);break;case"xlinkActuate":En(g,"http://www.w3.org/1999/xlink","xlink:actuate",D);break;case"xlinkArcrole":En(g,"http://www.w3.org/1999/xlink","xlink:arcrole",D);break;case"xlinkRole":En(g,"http://www.w3.org/1999/xlink","xlink:role",D);break;case"xlinkShow":En(g,"http://www.w3.org/1999/xlink","xlink:show",D);break;case"xlinkTitle":En(g,"http://www.w3.org/1999/xlink","xlink:title",D);break;case"xlinkType":En(g,"http://www.w3.org/1999/xlink","xlink:type",D);break;case"xmlBase":En(g,"http://www.w3.org/XML/1998/namespace","xml:base",D);break;case"xmlLang":En(g,"http://www.w3.org/XML/1998/namespace","xml:lang",D);break;case"xmlSpace":En(g,"http://www.w3.org/XML/1998/namespace","xml:space",D);break;case"is":ri(g,"is",D);break;case"innerText":case"textContent":break;default:(!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(k=ms.get(k)||k,ri(g,k,D))}}function uP(g,A,k,D,B,Z){switch(k){case"style":lr(g,D,Z);break;case"dangerouslySetInnerHTML":if(D!=null){if(typeof D!="object"||!("__html"in D))throw Error(r(61));if(k=D.__html,k!=null){if(B.children!=null)throw Error(r(60));g.innerHTML=k}}break;case"children":typeof D=="string"?tn(g,D):(typeof D=="number"||typeof D=="bigint")&&tn(g,""+D);break;case"onScroll":D!=null&&Qn("scroll",g);break;case"onScrollEnd":D!=null&&Qn("scrollend",g);break;case"onClick":D!=null&&(g.onclick=Ss);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nt.hasOwnProperty(k))e:{if(k[0]==="o"&&k[1]==="n"&&(B=k.endsWith("Capture"),A=k.slice(2,B?k.length-7:void 0),Z=g[Ht]||null,Z=Z!=null?Z[k]:null,typeof Z=="function"&&g.removeEventListener(A,Z,B),typeof D=="function")){typeof Z!="function"&&Z!==null&&(k in g?g[k]=null:g.hasAttribute(k)&&g.removeAttribute(k)),g.addEventListener(A,D,B);break e}k in g?g[k]=D:D===!0?g.setAttribute(k,""):ri(g,k,D)}}}function Vs(g,A,k){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qn("error",g),Qn("load",g);var D=!1,B=!1,Z;for(Z in k)if(k.hasOwnProperty(Z)){var oe=k[Z];if(oe!=null)switch(Z){case"src":D=!0;break;case"srcSet":B=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:_r(g,A,Z,oe,k,null)}}B&&_r(g,A,"srcSet",k.srcSet,k,null),D&&_r(g,A,"src",k.src,k,null);return;case"input":Qn("invalid",g);var pe=Z=oe=B=null,Ee=null,Le=null;for(D in k)if(k.hasOwnProperty(D)){var Ze=k[D];if(Ze!=null)switch(D){case"name":B=Ze;break;case"type":oe=Ze;break;case"checked":Ee=Ze;break;case"defaultChecked":Le=Ze;break;case"value":Z=Ze;break;case"defaultValue":pe=Ze;break;case"children":case"dangerouslySetInnerHTML":if(Ze!=null)throw Error(r(137,A));break;default:_r(g,A,D,Ze,k,null)}}ft(g,Z,pe,Ee,Le,oe,B,!1);return;case"select":Qn("invalid",g),D=oe=Z=null;for(B in k)if(k.hasOwnProperty(B)&&(pe=k[B],pe!=null))switch(B){case"value":Z=pe;break;case"defaultValue":oe=pe;break;case"multiple":D=pe;default:_r(g,A,B,pe,k,null)}A=Z,k=oe,g.multiple=!!D,A!=null?_e(g,!!D,A,!1):k!=null&&_e(g,!!D,k,!0);return;case"textarea":Qn("invalid",g),Z=B=D=null;for(oe in k)if(k.hasOwnProperty(oe)&&(pe=k[oe],pe!=null))switch(oe){case"value":D=pe;break;case"defaultValue":B=pe;break;case"children":Z=pe;break;case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(91));break;default:_r(g,A,oe,pe,k,null)}At(g,D,B,Z);return;case"option":for(Ee in k)if(k.hasOwnProperty(Ee)&&(D=k[Ee],D!=null))switch(Ee){case"selected":g.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:_r(g,A,Ee,D,k,null)}return;case"dialog":Qn("beforetoggle",g),Qn("toggle",g),Qn("cancel",g),Qn("close",g);break;case"iframe":case"object":Qn("load",g);break;case"video":case"audio":for(D=0;D<zx.length;D++)Qn(zx[D],g);break;case"image":Qn("error",g),Qn("load",g);break;case"details":Qn("toggle",g);break;case"embed":case"source":case"link":Qn("error",g),Qn("load",g);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Le in k)if(k.hasOwnProperty(Le)&&(D=k[Le],D!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,A));default:_r(g,A,Le,D,k,null)}return;default:if(vi(A)){for(Ze in k)k.hasOwnProperty(Ze)&&(D=k[Ze],D!==void 0&&uP(g,A,Ze,D,k,void 0));return}}for(pe in k)k.hasOwnProperty(pe)&&(D=k[pe],D!=null&&_r(g,A,pe,D,k,null))}function sOe(g,A,k,D){switch(A){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var B=null,Z=null,oe=null,pe=null,Ee=null,Le=null,Ze=null;for(Ve in k){var Xe=k[Ve];if(k.hasOwnProperty(Ve)&&Xe!=null)switch(Ve){case"checked":break;case"value":break;case"defaultValue":Ee=Xe;default:D.hasOwnProperty(Ve)||_r(g,A,Ve,null,D,Xe)}}for(var Fe in D){var Ve=D[Fe];if(Xe=k[Fe],D.hasOwnProperty(Fe)&&(Ve!=null||Xe!=null))switch(Fe){case"type":Z=Ve;break;case"name":B=Ve;break;case"checked":Le=Ve;break;case"defaultChecked":Ze=Ve;break;case"value":oe=Ve;break;case"defaultValue":pe=Ve;break;case"children":case"dangerouslySetInnerHTML":if(Ve!=null)throw Error(r(137,A));break;default:Ve!==Xe&&_r(g,A,Fe,Ve,D,Xe)}}Oa(g,oe,pe,Ee,Le,Ze,Z,B);return;case"select":Ve=oe=pe=Fe=null;for(Z in k)if(Ee=k[Z],k.hasOwnProperty(Z)&&Ee!=null)switch(Z){case"value":break;case"multiple":Ve=Ee;default:D.hasOwnProperty(Z)||_r(g,A,Z,null,D,Ee)}for(B in D)if(Z=D[B],Ee=k[B],D.hasOwnProperty(B)&&(Z!=null||Ee!=null))switch(B){case"value":Fe=Z;break;case"defaultValue":pe=Z;break;case"multiple":oe=Z;default:Z!==Ee&&_r(g,A,B,Z,D,Ee)}A=pe,k=oe,D=Ve,Fe!=null?_e(g,!!k,Fe,!1):!!D!=!!k&&(A!=null?_e(g,!!k,A,!0):_e(g,!!k,k?[]:"",!1));return;case"textarea":Ve=Fe=null;for(pe in k)if(B=k[pe],k.hasOwnProperty(pe)&&B!=null&&!D.hasOwnProperty(pe))switch(pe){case"value":break;case"children":break;default:_r(g,A,pe,null,D,B)}for(oe in D)if(B=D[oe],Z=k[oe],D.hasOwnProperty(oe)&&(B!=null||Z!=null))switch(oe){case"value":Fe=B;break;case"defaultValue":Ve=B;break;case"children":break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:B!==Z&&_r(g,A,oe,B,D,Z)}lt(g,Fe,Ve);return;case"option":for(var jt in k)if(Fe=k[jt],k.hasOwnProperty(jt)&&Fe!=null&&!D.hasOwnProperty(jt))switch(jt){case"selected":g.selected=!1;break;default:_r(g,A,jt,null,D,Fe)}for(Ee in D)if(Fe=D[Ee],Ve=k[Ee],D.hasOwnProperty(Ee)&&Fe!==Ve&&(Fe!=null||Ve!=null))switch(Ee){case"selected":g.selected=Fe&&typeof Fe!="function"&&typeof Fe!="symbol";break;default:_r(g,A,Ee,Fe,D,Ve)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var an in k)Fe=k[an],k.hasOwnProperty(an)&&Fe!=null&&!D.hasOwnProperty(an)&&_r(g,A,an,null,D,Fe);for(Le in D)if(Fe=D[Le],Ve=k[Le],D.hasOwnProperty(Le)&&Fe!==Ve&&(Fe!=null||Ve!=null))switch(Le){case"children":case"dangerouslySetInnerHTML":if(Fe!=null)throw Error(r(137,A));break;default:_r(g,A,Le,Fe,D,Ve)}return;default:if(vi(A)){for(var Rr in k)Fe=k[Rr],k.hasOwnProperty(Rr)&&Fe!==void 0&&!D.hasOwnProperty(Rr)&&uP(g,A,Rr,void 0,D,Fe);for(Ze in D)Fe=D[Ze],Ve=k[Ze],!D.hasOwnProperty(Ze)||Fe===Ve||Fe===void 0&&Ve===void 0||uP(g,A,Ze,Fe,D,Ve);return}}for(var Ie in k)Fe=k[Ie],k.hasOwnProperty(Ie)&&Fe!=null&&!D.hasOwnProperty(Ie)&&_r(g,A,Ie,null,D,Fe);for(Xe in D)Fe=D[Xe],Ve=k[Xe],!D.hasOwnProperty(Xe)||Fe===Ve||Fe==null&&Ve==null||_r(g,A,Xe,Fe,D,Ve)}function Yz(g){switch(g){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aOe(){if(typeof performance.getEntriesByType=="function"){for(var g=0,A=0,k=performance.getEntriesByType("resource"),D=0;D<k.length;D++){var B=k[D],Z=B.transferSize,oe=B.initiatorType,pe=B.duration;if(Z&&pe&&Yz(oe)){for(oe=0,pe=B.responseEnd,D+=1;D<k.length;D++){var Ee=k[D],Le=Ee.startTime;if(Le>pe)break;var Ze=Ee.transferSize,Xe=Ee.initiatorType;Ze&&Yz(Xe)&&(Ee=Ee.responseEnd,oe+=Ze*(Ee<pe?1:(pe-Le)/(Ee-Le)))}if(--D,A+=8*(Z+oe)/(B.duration/1e3),g++,10<g)break}}if(0<g)return A/g/1e6}return navigator.connection&&(g=navigator.connection.downlink,typeof g=="number")?g:5}var fP=null,hP=null;function PO(g){return g.nodeType===9?g:g.ownerDocument}function Kz(g){switch(g){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jz(g,A){if(g===0)switch(A){case"svg":return 1;case"math":return 2;default:return 0}return g===1&&A==="foreignObject"?0:g}function dP(g,A){return g==="textarea"||g==="noscript"||typeof A.children=="string"||typeof A.children=="number"||typeof A.children=="bigint"||typeof A.dangerouslySetInnerHTML=="object"&&A.dangerouslySetInnerHTML!==null&&A.dangerouslySetInnerHTML.__html!=null}var pP=null;function oOe(){var g=window.event;return g&&g.type==="popstate"?g===pP?!1:(pP=g,!0):(pP=null,!1)}var eZ=typeof setTimeout=="function"?setTimeout:void 0,lOe=typeof clearTimeout=="function"?clearTimeout:void 0,tZ=typeof Promise=="function"?Promise:void 0,cOe=typeof queueMicrotask=="function"?queueMicrotask:typeof tZ<"u"?function(g){return tZ.resolve(null).then(g).catch(uOe)}:eZ;function uOe(g){setTimeout(function(){throw g})}function Vh(g){return g==="head"}function nZ(g,A){var k=A,D=0;do{var B=k.nextSibling;if(g.removeChild(k),B&&B.nodeType===8)if(k=B.data,k==="/$"||k==="/&"){if(D===0){g.removeChild(B),Xm(A);return}D--}else if(k==="$"||k==="$?"||k==="$~"||k==="$!"||k==="&")D++;else if(k==="html")Gx(g.ownerDocument.documentElement);else if(k==="head"){k=g.ownerDocument.head,Gx(k);for(var Z=k.firstChild;Z;){var oe=Z.nextSibling,pe=Z.nodeName;Z[bt]||pe==="SCRIPT"||pe==="STYLE"||pe==="LINK"&&Z.rel.toLowerCase()==="stylesheet"||k.removeChild(Z),Z=oe}}else k==="body"&&Gx(g.ownerDocument.body);k=B}while(k);Xm(A)}function rZ(g,A){var k=g;g=0;do{var D=k.nextSibling;if(k.nodeType===1?A?(k._stashedDisplay=k.style.display,k.style.display="none"):(k.style.display=k._stashedDisplay||"",k.getAttribute("style")===""&&k.removeAttribute("style")):k.nodeType===3&&(A?(k._stashedText=k.nodeValue,k.nodeValue=""):k.nodeValue=k._stashedText||""),D&&D.nodeType===8)if(k=D.data,k==="/$"){if(g===0)break;g--}else k!=="$"&&k!=="$?"&&k!=="$~"&&k!=="$!"||g++;k=D}while(k)}function mP(g){var A=g.firstChild;for(A&&A.nodeType===10&&(A=A.nextSibling);A;){var k=A;switch(A=A.nextSibling,k.nodeName){case"HTML":case"HEAD":case"BODY":mP(k),or(k);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(k.rel.toLowerCase()==="stylesheet")continue}g.removeChild(k)}}function fOe(g,A,k,D){for(;g.nodeType===1;){var B=k;if(g.nodeName.toLowerCase()!==A.toLowerCase()){if(!D&&(g.nodeName!=="INPUT"||g.type!=="hidden"))break}else if(D){if(!g[bt])switch(A){case"meta":if(!g.hasAttribute("itemprop"))break;return g;case"link":if(Z=g.getAttribute("rel"),Z==="stylesheet"&&g.hasAttribute("data-precedence"))break;if(Z!==B.rel||g.getAttribute("href")!==(B.href==null||B.href===""?null:B.href)||g.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin)||g.getAttribute("title")!==(B.title==null?null:B.title))break;return g;case"style":if(g.hasAttribute("data-precedence"))break;return g;case"script":if(Z=g.getAttribute("src"),(Z!==(B.src==null?null:B.src)||g.getAttribute("type")!==(B.type==null?null:B.type)||g.getAttribute("crossorigin")!==(B.crossOrigin==null?null:B.crossOrigin))&&Z&&g.hasAttribute("async")&&!g.hasAttribute("itemprop"))break;return g;default:return g}}else if(A==="input"&&g.type==="hidden"){var Z=B.name==null?null:""+B.name;if(B.type==="hidden"&&g.getAttribute("name")===Z)return g}else return g;if(g=bl(g.nextSibling),g===null)break}return null}function hOe(g,A,k){if(A==="")return null;for(;g.nodeType!==3;)if((g.nodeType!==1||g.nodeName!=="INPUT"||g.type!=="hidden")&&!k||(g=bl(g.nextSibling),g===null))return null;return g}function iZ(g,A){for(;g.nodeType!==8;)if((g.nodeType!==1||g.nodeName!=="INPUT"||g.type!=="hidden")&&!A||(g=bl(g.nextSibling),g===null))return null;return g}function gP(g){return g.data==="$?"||g.data==="$~"}function yP(g){return g.data==="$!"||g.data==="$?"&&g.ownerDocument.readyState!=="loading"}function dOe(g,A){var k=g.ownerDocument;if(g.data==="$~")g._reactRetry=A;else if(g.data!=="$?"||k.readyState!=="loading")A();else{var D=function(){A(),k.removeEventListener("DOMContentLoaded",D)};k.addEventListener("DOMContentLoaded",D),g._reactRetry=D}}function bl(g){for(;g!=null;g=g.nextSibling){var A=g.nodeType;if(A===1||A===3)break;if(A===8){if(A=g.data,A==="$"||A==="$!"||A==="$?"||A==="$~"||A==="&"||A==="F!"||A==="F")break;if(A==="/$"||A==="/&")return null}}return g}var xP=null;function sZ(g){g=g.nextSibling;for(var A=0;g;){if(g.nodeType===8){var k=g.data;if(k==="/$"||k==="/&"){if(A===0)return bl(g.nextSibling);A--}else k!=="$"&&k!=="$!"&&k!=="$?"&&k!=="$~"&&k!=="&"||A++}g=g.nextSibling}return null}function aZ(g){g=g.previousSibling;for(var A=0;g;){if(g.nodeType===8){var k=g.data;if(k==="$"||k==="$!"||k==="$?"||k==="$~"||k==="&"){if(A===0)return g;A--}else k!=="/$"&&k!=="/&"||A++}g=g.previousSibling}return null}function oZ(g,A,k){switch(A=PO(k),g){case"html":if(g=A.documentElement,!g)throw Error(r(452));return g;case"head":if(g=A.head,!g)throw Error(r(453));return g;case"body":if(g=A.body,!g)throw Error(r(454));return g;default:throw Error(r(451))}}function Gx(g){for(var A=g.attributes;A.length;)g.removeAttributeNode(A[0]);or(g)}var vl=new Map,lZ=new Set;function MO(g){return typeof g.getRootNode=="function"?g.getRootNode():g.nodeType===9?g:g.ownerDocument}var of=J.d;J.d={f:pOe,r:mOe,D:gOe,C:yOe,L:xOe,m:bOe,X:AOe,S:vOe,M:SOe};function pOe(){var g=of.f(),A=AO();return g||A}function mOe(g){var A=Rn(g);A!==null&&A.tag===5&&A.type==="form"?kQ(A):of.r(g)}var Zm=typeof document>"u"?null:document;function cZ(g,A,k){var D=Zm;if(D&&typeof A=="string"&&A){var B=bi(A);B='link[rel="'+g+'"][href="'+B+'"]',typeof k=="string"&&(B+='[crossorigin="'+k+'"]'),lZ.has(B)||(lZ.add(B),g={rel:g,crossOrigin:k,href:A},D.querySelector(B)===null&&(A=D.createElement("link"),Vs(A,"link",g),Ct(A),D.head.appendChild(A)))}}function gOe(g){of.D(g),cZ("dns-prefetch",g,null)}function yOe(g,A){of.C(g,A),cZ("preconnect",g,A)}function xOe(g,A,k){of.L(g,A,k);var D=Zm;if(D&&g&&A){var B='link[rel="preload"][as="'+bi(A)+'"]';A==="image"&&k&&k.imageSrcSet?(B+='[imagesrcset="'+bi(k.imageSrcSet)+'"]',typeof k.imageSizes=="string"&&(B+='[imagesizes="'+bi(k.imageSizes)+'"]')):B+='[href="'+bi(g)+'"]';var Z=B;switch(A){case"style":Z=Gm(g);break;case"script":Z=Um(g)}vl.has(Z)||(g=f({rel:"preload",href:A==="image"&&k&&k.imageSrcSet?void 0:g,as:A},k),vl.set(Z,g),D.querySelector(B)!==null||A==="style"&&D.querySelector(Ux(Z))||A==="script"&&D.querySelector(Xx(Z))||(A=D.createElement("link"),Vs(A,"link",g),Ct(A),D.head.appendChild(A)))}}function bOe(g,A){of.m(g,A);var k=Zm;if(k&&g){var D=A&&typeof A.as=="string"?A.as:"script",B='link[rel="modulepreload"][as="'+bi(D)+'"][href="'+bi(g)+'"]',Z=B;switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Z=Um(g)}if(!vl.has(Z)&&(g=f({rel:"modulepreload",href:g},A),vl.set(Z,g),k.querySelector(B)===null)){switch(D){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(k.querySelector(Xx(Z)))return}D=k.createElement("link"),Vs(D,"link",g),Ct(D),k.head.appendChild(D)}}}function vOe(g,A,k){of.S(g,A,k);var D=Zm;if(D&&g){var B=Zt(D).hoistableStyles,Z=Gm(g);A=A||"default";var oe=B.get(Z);if(!oe){var pe={loading:0,preload:null};if(oe=D.querySelector(Ux(Z)))pe.loading=5;else{g=f({rel:"stylesheet",href:g,"data-precedence":A},k),(k=vl.get(Z))&&bP(g,k);var Ee=oe=D.createElement("link");Ct(Ee),Vs(Ee,"link",g),Ee._p=new Promise(function(Le,Ze){Ee.onload=Le,Ee.onerror=Ze}),Ee.addEventListener("load",function(){pe.loading|=1}),Ee.addEventListener("error",function(){pe.loading|=2}),pe.loading|=4,NO(oe,A,D)}oe={type:"stylesheet",instance:oe,count:1,state:pe},B.set(Z,oe)}}}function AOe(g,A){of.X(g,A);var k=Zm;if(k&&g){var D=Zt(k).hoistableScripts,B=Um(g),Z=D.get(B);Z||(Z=k.querySelector(Xx(B)),Z||(g=f({src:g,async:!0},A),(A=vl.get(B))&&vP(g,A),Z=k.createElement("script"),Ct(Z),Vs(Z,"link",g),k.head.appendChild(Z)),Z={type:"script",instance:Z,count:1,state:null},D.set(B,Z))}}function SOe(g,A){of.M(g,A);var k=Zm;if(k&&g){var D=Zt(k).hoistableScripts,B=Um(g),Z=D.get(B);Z||(Z=k.querySelector(Xx(B)),Z||(g=f({src:g,async:!0,type:"module"},A),(A=vl.get(B))&&vP(g,A),Z=k.createElement("script"),Ct(Z),Vs(Z,"link",g),k.head.appendChild(Z)),Z={type:"script",instance:Z,count:1,state:null},D.set(B,Z))}}function uZ(g,A,k,D){var B=(B=ee.current)?MO(B):null;if(!B)throw Error(r(446));switch(g){case"meta":case"title":return null;case"style":return typeof k.precedence=="string"&&typeof k.href=="string"?(A=Gm(k.href),k=Zt(B).hoistableStyles,D=k.get(A),D||(D={type:"style",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};case"link":if(k.rel==="stylesheet"&&typeof k.href=="string"&&typeof k.precedence=="string"){g=Gm(k.href);var Z=Zt(B).hoistableStyles,oe=Z.get(g);if(oe||(B=B.ownerDocument||B,oe={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},Z.set(g,oe),(Z=B.querySelector(Ux(g)))&&!Z._p&&(oe.instance=Z,oe.state.loading=5),vl.has(g)||(k={rel:"preload",as:"style",href:k.href,crossOrigin:k.crossOrigin,integrity:k.integrity,media:k.media,hrefLang:k.hrefLang,referrerPolicy:k.referrerPolicy},vl.set(g,k),Z||wOe(B,g,k,oe.state))),A&&D===null)throw Error(r(528,""));return oe}if(A&&D!==null)throw Error(r(529,""));return null;case"script":return A=k.async,k=k.src,typeof k=="string"&&A&&typeof A!="function"&&typeof A!="symbol"?(A=Um(k),k=Zt(B).hoistableScripts,D=k.get(A),D||(D={type:"script",instance:null,count:0,state:null},k.set(A,D)),D):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,g))}}function Gm(g){return'href="'+bi(g)+'"'}function Ux(g){return'link[rel="stylesheet"]['+g+"]"}function fZ(g){return f({},g,{"data-precedence":g.precedence,precedence:null})}function wOe(g,A,k,D){g.querySelector('link[rel="preload"][as="style"]['+A+"]")?D.loading=1:(A=g.createElement("link"),D.preload=A,A.addEventListener("load",function(){return D.loading|=1}),A.addEventListener("error",function(){return D.loading|=2}),Vs(A,"link",k),Ct(A),g.head.appendChild(A))}function Um(g){return'[src="'+bi(g)+'"]'}function Xx(g){return"script[async]"+g}function hZ(g,A,k){if(A.count++,A.instance===null)switch(A.type){case"style":var D=g.querySelector('style[data-href~="'+bi(k.href)+'"]');if(D)return A.instance=D,Ct(D),D;var B=f({},k,{"data-href":k.href,"data-precedence":k.precedence,href:null,precedence:null});return D=(g.ownerDocument||g).createElement("style"),Ct(D),Vs(D,"style",B),NO(D,k.precedence,g),A.instance=D;case"stylesheet":B=Gm(k.href);var Z=g.querySelector(Ux(B));if(Z)return A.state.loading|=4,A.instance=Z,Ct(Z),Z;D=fZ(k),(B=vl.get(B))&&bP(D,B),Z=(g.ownerDocument||g).createElement("link"),Ct(Z);var oe=Z;return oe._p=new Promise(function(pe,Ee){oe.onload=pe,oe.onerror=Ee}),Vs(Z,"link",D),A.state.loading|=4,NO(Z,k.precedence,g),A.instance=Z;case"script":return Z=Um(k.src),(B=g.querySelector(Xx(Z)))?(A.instance=B,Ct(B),B):(D=k,(B=vl.get(Z))&&(D=f({},k),vP(D,B)),g=g.ownerDocument||g,B=g.createElement("script"),Ct(B),Vs(B,"link",D),g.head.appendChild(B),A.instance=B);case"void":return null;default:throw Error(r(443,A.type))}else A.type==="stylesheet"&&(A.state.loading&4)===0&&(D=A.instance,A.state.loading|=4,NO(D,k.precedence,g));return A.instance}function NO(g,A,k){for(var D=k.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),B=D.length?D[D.length-1]:null,Z=B,oe=0;oe<D.length;oe++){var pe=D[oe];if(pe.dataset.precedence===A)Z=pe;else if(Z!==B)break}Z?Z.parentNode.insertBefore(g,Z.nextSibling):(A=k.nodeType===9?k.head:k,A.insertBefore(g,A.firstChild))}function bP(g,A){g.crossOrigin==null&&(g.crossOrigin=A.crossOrigin),g.referrerPolicy==null&&(g.referrerPolicy=A.referrerPolicy),g.title==null&&(g.title=A.title)}function vP(g,A){g.crossOrigin==null&&(g.crossOrigin=A.crossOrigin),g.referrerPolicy==null&&(g.referrerPolicy=A.referrerPolicy),g.integrity==null&&(g.integrity=A.integrity)}var DO=null;function dZ(g,A,k){if(DO===null){var D=new Map,B=DO=new Map;B.set(k,D)}else B=DO,D=B.get(k),D||(D=new Map,B.set(k,D));if(D.has(g))return D;for(D.set(g,null),k=k.getElementsByTagName(g),B=0;B<k.length;B++){var Z=k[B];if(!(Z[bt]||Z[mn]||g==="link"&&Z.getAttribute("rel")==="stylesheet")&&Z.namespaceURI!=="http://www.w3.org/2000/svg"){var oe=Z.getAttribute(A)||"";oe=g+oe;var pe=D.get(oe);pe?pe.push(Z):D.set(oe,[Z])}}return D}function pZ(g,A,k){g=g.ownerDocument||g,g.head.insertBefore(k,A==="title"?g.querySelector("head > title"):null)}function OOe(g,A,k){if(k===1||A.itemProp!=null)return!1;switch(g){case"meta":case"title":return!0;case"style":if(typeof A.precedence!="string"||typeof A.href!="string"||A.href==="")break;return!0;case"link":if(typeof A.rel!="string"||typeof A.href!="string"||A.href===""||A.onLoad||A.onError)break;switch(A.rel){case"stylesheet":return g=A.disabled,typeof A.precedence=="string"&&g==null;default:return!0}case"script":if(A.async&&typeof A.async!="function"&&typeof A.async!="symbol"&&!A.onLoad&&!A.onError&&A.src&&typeof A.src=="string")return!0}return!1}function mZ(g){return!(g.type==="stylesheet"&&(g.state.loading&3)===0)}function kOe(g,A,k,D){if(k.type==="stylesheet"&&(typeof D.media!="string"||matchMedia(D.media).matches!==!1)&&(k.state.loading&4)===0){if(k.instance===null){var B=Gm(D.href),Z=A.querySelector(Ux(B));if(Z){A=Z._p,A!==null&&typeof A=="object"&&typeof A.then=="function"&&(g.count++,g=IO.bind(g),A.then(g,g)),k.state.loading|=4,k.instance=Z,Ct(Z);return}Z=A.ownerDocument||A,D=fZ(D),(B=vl.get(B))&&bP(D,B),Z=Z.createElement("link"),Ct(Z);var oe=Z;oe._p=new Promise(function(pe,Ee){oe.onload=pe,oe.onerror=Ee}),Vs(Z,"link",D),k.instance=Z}g.stylesheets===null&&(g.stylesheets=new Map),g.stylesheets.set(k,A),(A=k.state.preload)&&(k.state.loading&3)===0&&(g.count++,k=IO.bind(g),A.addEventListener("load",k),A.addEventListener("error",k))}}var AP=0;function COe(g,A){return g.stylesheets&&g.count===0&&RO(g,g.stylesheets),0<g.count||0<g.imgCount?function(k){var D=setTimeout(function(){if(g.stylesheets&&RO(g,g.stylesheets),g.unsuspend){var Z=g.unsuspend;g.unsuspend=null,Z()}},6e4+A);0<g.imgBytes&&AP===0&&(AP=62500*aOe());var B=setTimeout(function(){if(g.waitingForImages=!1,g.count===0&&(g.stylesheets&&RO(g,g.stylesheets),g.unsuspend)){var Z=g.unsuspend;g.unsuspend=null,Z()}},(g.imgBytes>AP?50:800)+A);return g.unsuspend=k,function(){g.unsuspend=null,clearTimeout(D),clearTimeout(B)}}:null}function IO(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)RO(this,this.stylesheets);else if(this.unsuspend){var g=this.unsuspend;this.unsuspend=null,g()}}}var _O=null;function RO(g,A){g.stylesheets=null,g.unsuspend!==null&&(g.count++,_O=new Map,A.forEach(EOe,g),_O=null,IO.call(g))}function EOe(g,A){if(!(A.state.loading&4)){var k=_O.get(g);if(k)var D=k.get(null);else{k=new Map,_O.set(g,k);for(var B=g.querySelectorAll("link[data-precedence],style[data-precedence]"),Z=0;Z<B.length;Z++){var oe=B[Z];(oe.nodeName==="LINK"||oe.getAttribute("media")!=="not all")&&(k.set(oe.dataset.precedence,oe),D=oe)}D&&k.set(null,D)}B=A.instance,oe=B.getAttribute("data-precedence"),Z=k.get(oe)||D,Z===D&&k.set(null,B),k.set(oe,B),this.count++,D=IO.bind(this),B.addEventListener("load",D),B.addEventListener("error",D),Z?Z.parentNode.insertBefore(B,Z.nextSibling):(g=g.nodeType===9?g.head:g,g.insertBefore(B,g.firstChild)),A.state.loading|=4}}var Wx={$$typeof:O,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function TOe(g,A,k,D,B,Z,oe,pe,Ee){this.tag=1,this.containerInfo=g,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Jt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jt(0),this.hiddenUpdates=Jt(null),this.identifierPrefix=D,this.onUncaughtError=B,this.onCaughtError=Z,this.onRecoverableError=oe,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ee,this.incompleteTransitions=new Map}function gZ(g,A,k,D,B,Z,oe,pe,Ee,Le,Ze,Xe){return g=new TOe(g,A,k,oe,Ee,Le,Ze,Xe,pe),A=1,Z===!0&&(A|=24),Z=Co(3,null,null,A),g.current=Z,Z.stateNode=g,A=eT(),A.refCount++,g.pooledCache=A,A.refCount++,Z.memoizedState={element:D,isDehydrated:k,cache:A},iT(Z),g}function yZ(g){return g?(g=Om,g):Om}function xZ(g,A,k,D,B,Z){B=yZ(B),D.context===null?D.context=B:D.pendingContext=B,D=Mh(A),D.payload={element:k},Z=Z===void 0?null:Z,Z!==null&&(D.callback=Z),k=Nh(g,D,A),k!==null&&(qa(k,g,A),Ex(k,g,A))}function bZ(g,A){if(g=g.memoizedState,g!==null&&g.dehydrated!==null){var k=g.retryLane;g.retryLane=k!==0&&k<A?k:A}}function SP(g,A){bZ(g,A),(g=g.alternate)&&bZ(g,A)}function vZ(g){if(g.tag===13||g.tag===31){var A=up(g,67108864);A!==null&&qa(A,g,67108864),SP(g,67108864)}}function AZ(g){if(g.tag===13||g.tag===31){var A=No();A=Cn(A);var k=up(g,A);k!==null&&qa(k,g,A),SP(g,A)}}var jO=!0;function POe(g,A,k,D){var B=Y.T;Y.T=null;var Z=J.p;try{J.p=2,wP(g,A,k,D)}finally{J.p=Z,Y.T=B}}function MOe(g,A,k,D){var B=Y.T;Y.T=null;var Z=J.p;try{J.p=8,wP(g,A,k,D)}finally{J.p=Z,Y.T=B}}function wP(g,A,k,D){if(jO){var B=OP(D);if(B===null)cP(g,A,D,LO,k),wZ(g,D);else if(DOe(B,g,A,k,D))D.stopPropagation();else if(wZ(g,D),A&4&&-1<NOe.indexOf(g)){for(;B!==null;){var Z=Rn(B);if(Z!==null)switch(Z.tag){case 3:if(Z=Z.stateNode,Z.current.memoizedState.isDehydrated){var oe=De(Z.pendingLanes);if(oe!==0){var pe=Z;for(pe.pendingLanes|=2,pe.entangledLanes|=2;oe;){var Ee=1<<31-St(oe);pe.entanglements[1]|=Ee,oe&=~Ee}Yc(Z),(yr&6)===0&&(bO=Ge()+500,Qx(0))}}break;case 31:case 13:pe=up(Z,2),pe!==null&&qa(pe,Z,2),AO(),SP(Z,2)}if(Z=OP(D),Z===null&&cP(g,A,D,LO,k),Z===B)break;B=Z}B!==null&&D.stopPropagation()}else cP(g,A,D,null,k)}}function OP(g){return g=Vu(g),kP(g)}var LO=null;function kP(g){if(LO=null,g=wn(g),g!==null){var A=s(g);if(A===null)g=null;else{var k=A.tag;if(k===13){if(g=a(A),g!==null)return g;g=null}else if(k===31){if(g=o(A),g!==null)return g;g=null}else if(k===3){if(A.stateNode.current.memoizedState.isDehydrated)return A.tag===3?A.stateNode.containerInfo:null;g=null}else A!==g&&(g=null)}}return LO=g,null}function SZ(g){switch(g){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ye()){case st:return 2;case nt:return 8;case yt:case dt:return 32;case zt:return 268435456;default:return 32}default:return 32}}var CP=!1,Hh=null,Qh=null,zh=null,qx=new Map,Yx=new Map,Zh=[],NOe="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".split(" ");function wZ(g,A){switch(g){case"focusin":case"focusout":Hh=null;break;case"dragenter":case"dragleave":Qh=null;break;case"mouseover":case"mouseout":zh=null;break;case"pointerover":case"pointerout":qx.delete(A.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yx.delete(A.pointerId)}}function Kx(g,A,k,D,B,Z){return g===null||g.nativeEvent!==Z?(g={blockedOn:A,domEventName:k,eventSystemFlags:D,nativeEvent:Z,targetContainers:[B]},A!==null&&(A=Rn(A),A!==null&&vZ(A)),g):(g.eventSystemFlags|=D,A=g.targetContainers,B!==null&&A.indexOf(B)===-1&&A.push(B),g)}function DOe(g,A,k,D,B){switch(A){case"focusin":return Hh=Kx(Hh,g,A,k,D,B),!0;case"dragenter":return Qh=Kx(Qh,g,A,k,D,B),!0;case"mouseover":return zh=Kx(zh,g,A,k,D,B),!0;case"pointerover":var Z=B.pointerId;return qx.set(Z,Kx(qx.get(Z)||null,g,A,k,D,B)),!0;case"gotpointercapture":return Z=B.pointerId,Yx.set(Z,Kx(Yx.get(Z)||null,g,A,k,D,B)),!0}return!1}function OZ(g){var A=wn(g.target);if(A!==null){var k=s(A);if(k!==null){if(A=k.tag,A===13){if(A=a(k),A!==null){g.blockedOn=A,Yn(g.priority,function(){AZ(k)});return}}else if(A===31){if(A=o(k),A!==null){g.blockedOn=A,Yn(g.priority,function(){AZ(k)});return}}else if(A===3&&k.stateNode.current.memoizedState.isDehydrated){g.blockedOn=k.tag===3?k.stateNode.containerInfo:null;return}}}g.blockedOn=null}function FO(g){if(g.blockedOn!==null)return!1;for(var A=g.targetContainers;0<A.length;){var k=OP(g.nativeEvent);if(k===null){k=g.nativeEvent;var D=new k.constructor(k.type,k);Zc=D,k.target.dispatchEvent(D),Zc=null}else return A=Rn(k),A!==null&&vZ(A),g.blockedOn=k,!1;A.shift()}return!0}function kZ(g,A,k){FO(g)&&k.delete(A)}function IOe(){CP=!1,Hh!==null&&FO(Hh)&&(Hh=null),Qh!==null&&FO(Qh)&&(Qh=null),zh!==null&&FO(zh)&&(zh=null),qx.forEach(kZ),Yx.forEach(kZ)}function $O(g,A){g.blockedOn===A&&(g.blockedOn=null,CP||(CP=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IOe)))}var BO=null;function CZ(g){BO!==g&&(BO=g,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){BO===g&&(BO=null);for(var A=0;A<g.length;A+=3){var k=g[A],D=g[A+1],B=g[A+2];if(typeof D!="function"){if(kP(D||k)===null)continue;break}var Z=Rn(k);Z!==null&&(g.splice(A,3),A-=3,OT(Z,{pending:!0,data:B,method:k.method,action:D},D,B))}}))}function Xm(g){function A(Ee){return $O(Ee,g)}Hh!==null&&$O(Hh,g),Qh!==null&&$O(Qh,g),zh!==null&&$O(zh,g),qx.forEach(A),Yx.forEach(A);for(var k=0;k<Zh.length;k++){var D=Zh[k];D.blockedOn===g&&(D.blockedOn=null)}for(;0<Zh.length&&(k=Zh[0],k.blockedOn===null);)OZ(k),k.blockedOn===null&&Zh.shift();if(k=(g.ownerDocument||g).$$reactFormReplay,k!=null)for(D=0;D<k.length;D+=3){var B=k[D],Z=k[D+1],oe=B[Ht]||null;if(typeof Z=="function")oe||CZ(k);else if(oe){var pe=null;if(Z&&Z.hasAttribute("formAction")){if(B=Z,oe=Z[Ht]||null)pe=oe.formAction;else if(kP(B)!==null)continue}else pe=oe.action;typeof pe=="function"?k[D+1]=pe:(k.splice(D,3),D-=3),CZ(k)}}}function EZ(){function g(Z){Z.canIntercept&&Z.info==="react-transition"&&Z.intercept({handler:function(){return new Promise(function(oe){return B=oe})},focusReset:"manual",scroll:"manual"})}function A(){B!==null&&(B(),B=null),D||setTimeout(k,20)}function k(){if(!D&&!navigation.transition){var Z=navigation.currentEntry;Z&&Z.url!=null&&navigation.navigate(Z.url,{state:Z.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var D=!1,B=null;return navigation.addEventListener("navigate",g),navigation.addEventListener("navigatesuccess",A),navigation.addEventListener("navigateerror",A),setTimeout(k,100),function(){D=!0,navigation.removeEventListener("navigate",g),navigation.removeEventListener("navigatesuccess",A),navigation.removeEventListener("navigateerror",A),B!==null&&(B(),B=null)}}}function EP(g){this._internalRoot=g}VO.prototype.render=EP.prototype.render=function(g){var A=this._internalRoot;if(A===null)throw Error(r(409));var k=A.current,D=No();xZ(k,D,g,A,null,null)},VO.prototype.unmount=EP.prototype.unmount=function(){var g=this._internalRoot;if(g!==null){this._internalRoot=null;var A=g.containerInfo;xZ(g.current,2,null,g,null,null),AO(),A[gn]=null}};function VO(g){this._internalRoot=g}VO.prototype.unstable_scheduleHydration=function(g){if(g){var A=tt();g={blockedOn:null,target:g,priority:A};for(var k=0;k<Zh.length&&A!==0&&A<Zh[k].priority;k++);Zh.splice(k,0,g),k===0&&OZ(g)}};var TZ=e.version;if(TZ!=="19.2.6")throw Error(r(527,TZ,"19.2.6"));J.findDOMNode=function(g){var A=g._reactInternals;if(A===void 0)throw typeof g.render=="function"?Error(r(188)):(g=Object.keys(g).join(","),Error(r(268,g)));return g=c(A),g=g!==null?u(g):null,g=g===null?null:g.stateNode,g};var _Oe={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var HO=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!HO.isDisabled&&HO.supportsFiber)try{en=HO.inject(_Oe),et=HO}catch{}}return eb.createRoot=function(g,A){if(!i(g))throw Error(r(299));var k=!1,D="",B=RQ,Z=jQ,oe=LQ;return A!=null&&(A.unstable_strictMode===!0&&(k=!0),A.identifierPrefix!==void 0&&(D=A.identifierPrefix),A.onUncaughtError!==void 0&&(B=A.onUncaughtError),A.onCaughtError!==void 0&&(Z=A.onCaughtError),A.onRecoverableError!==void 0&&(oe=A.onRecoverableError)),A=gZ(g,1,!1,null,null,k,D,null,B,Z,oe,EZ),g[gn]=A.current,lP(g),new EP(A)},eb.hydrateRoot=function(g,A,k){if(!i(g))throw Error(r(299));var D=!1,B="",Z=RQ,oe=jQ,pe=LQ,Ee=null;return k!=null&&(k.unstable_strictMode===!0&&(D=!0),k.identifierPrefix!==void 0&&(B=k.identifierPrefix),k.onUncaughtError!==void 0&&(Z=k.onUncaughtError),k.onCaughtError!==void 0&&(oe=k.onCaughtError),k.onRecoverableError!==void 0&&(pe=k.onRecoverableError),k.formState!==void 0&&(Ee=k.formState)),A=gZ(g,1,!0,A,k??null,D,B,Ee,Z,oe,pe,EZ),A.context=yZ(null),k=A.current,D=No(),D=Cn(D),B=Mh(D),B.callback=null,Nh(k,B,D),k=D,A.current.lanes=k,Pn(A,k),Yc(A),g[gn]=A.current,lP(g),new VO(A)},eb.version="19.2.6",eb}var FZ;function ZOe(){if(FZ)return MP.exports;FZ=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),MP.exports=zOe(),MP.exports}var GOe=ZOe();function Mf(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function fS(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function fj(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}const Sie="hyperframes-studio:anonymousId",wie="hf-studio-anon-id";let wp=null;function UOe(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_DISTINCT_ID;return typeof t=="string"&&t.length>0?t:null}catch{return null}}function _P(t,e){for(const n of[Sie,wie])try{t.setItem(n,e)}catch{}}function hj(){if(wp)return wp;const t=fS(),e=UOe();if(e)return wp=e,t&&_P(t,e),e;if(t){let r=null;try{r=t.getItem(Sie)??t.getItem(wie)}catch{}if(r)return wp=r,_P(t,r),r}else return wp=Mf(),wp;const n=Mf();return wp=n,_P(t,n),n}const XOe="hyperframes-studio:telemetryDisabled",Oie="hyperframes-studio:telemetryNoticeShown";function kie(){return hj()}function Cie(t){var e;try{return((e=fS())==null?void 0:e.getItem(t))==="1"}catch{return!1}}function WOe(){return Cie(XOe)}function qOe(){return Cie(Oie)}function YOe(){var t;try{(t=fS())==null||t.setItem(Oie,"1")}catch{}}const Eie="hyperframes-studio:sessionStartFired";function KOe(){var t;return((t=fj())==null?void 0:t.getItem(Eie))==="1"}function JOe(){var t;try{(t=fj())==null||t.setItem(Eie,"1")}catch{}}const e8e="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",t8e="hf-studio-telemetry-opt-out";function n8e(){try{return localStorage.getItem(t8e)==="1"}catch{return!1}}function r8e(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function i8e(){return e8e.startsWith("phc_")}function s8e(){try{return!1}catch{return!1}}function a8e(){try{return!1}catch{return!1}}function hS(){try{return o8e()}catch{return!1}}function o8e(){return i8e()&&!s8e()&&!a8e()&&!WOe()&&!n8e()&&!r8e()}let Wm;function l8e(){if(Wm!==void 0)return Wm;if(typeof window>"u")return Wm=null,Wm;const t=window.__HF_CLI_AGENT_RUNTIME;return Wm=typeof t=="string"&&t.length>0?t:null,Wm}function Tie(){return l8e()??"none"}const c8e={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1,studio_version:"dev",agent_runtime:"none"};let qm=null;function u8e(){if(qm)return qm;if(typeof navigator>"u"||typeof window>"u")return qm=c8e,qm;const t=navigator.userAgent,e=window.screen;return qm={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t),studio_version:"0.8.31",agent_runtime:Tie()},qm}function f8e(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e>>>0}function h8e(t,e){return f8e(`${t}:${e}`)%100}function d8e(t){var i;if(t.override===!0)return{enabled:!0,reason:"forced_on"};if(t.override===!1)return{enabled:!1,reason:"forced_off"};const e=Math.max(0,Math.min(100,Math.trunc(t.percentage)));if(e<=0)return{enabled:!1,reason:"out_of_cohort"};if(e>=100)return{enabled:!0,reason:"in_cohort"};if(t.exclude)return{enabled:!1,reason:"excluded"};const n=(i=t.unitId)==null?void 0:i.trim();if(!n)return{enabled:!1,reason:"no_unit_id"};const r=h8e(t.feature,n);return r<e?{enabled:!0,reason:"in_cohort",bucket:r}:{enabled:!1,reason:"out_of_cohort",bucket:r}}function $Z(t){const e=t==null?void 0:t.trim().toLowerCase();if(!(e===void 0||e==="")){if(e==="1"||e==="true"||e==="on"||e==="yes")return!0;if(e==="0"||e==="false"||e==="off"||e==="no")return!1}}const p8e="$feature/canary-";function m8e(t){return`${p8e}${t}`}function g8e(t){return`canary_reason_${t.replace(/[^A-Za-z0-9]+/g,"_")}`}function y8e(t){const e={};for(const n of t)e[m8e(n.name)]=n.enabled?"true":"false",n.reason!==void 0&&(e[g8e(n.name)]=n.reason);return e}const Pie=[{name:"calibration-10",percentage:10,description:"Inert. Validates rollout accuracy and cumulative-exposure drift at 10%.",owner:"vance",sunsetAfter:"2026-09-15"},{name:"calibration-50",percentage:50,description:"Inert. Second calibration point, and an independence check against calibration-10.",owner:"vance",sunsetAfter:"2026-09-15"}];function x8e(t){return Pie.find(e=>e.name===t)}function b8e(t){return`hf_canary_${t.toLowerCase().replace(/[^a-z0-9]+/g,"_")}`}function v8e(t){var e;try{if(typeof window>"u")return;const n=(e=window.__HF_CLI_CANARY_DECISIONS)==null?void 0:e[t];return typeof(n==null?void 0:n.enabled)!="boolean"?void 0:{enabled:n.enabled,forced:n.forced===!0}}catch{return}}function A8e(){try{const t=typeof window>"u"?void 0:window.__HF_CLI_BUCKET_SEED;if(typeof t=="string"&&t.length>0)return t}catch{}return hj()}const S8e="hyperframes-studio:canary:";function w8e(t){if(typeof window>"u")return;const e=b8e(t),n=`${S8e}${t}`,r=fj();let i=null;try{i=new URLSearchParams(window.location.search).get(e)}catch{i=null}if(i!==null){if(i.trim().toLowerCase()==="reset"){r==null||r.removeItem(n);return}try{r==null||r.setItem(n,i)}catch{}return $Z(i)}return $Z((r==null?void 0:r.getItem(n))??void 0)}function BZ(){return typeof navigator>"u"?!1:navigator.webdriver===!0}const VZ=new Map,HZ=t=>({enabled:t,reason:t?"forced_on":"forced_off"}),O8e=t=>({enabled:t,reason:t?"in_cohort":"out_of_cohort"});function k8e(t){const e=x8e(t);if(!e)return{enabled:!1,reason:"out_of_cohort"};const n=v8e(e.name);if(n!=null&&n.forced)return HZ(n.enabled);const r=w8e(e.name);if(r===void 0){if(!hS())return{enabled:!1,reason:"telemetry_opt_out"};if(BZ())return{enabled:!1,reason:"excluded"};if(n!==void 0)return O8e(n.enabled)}return r!==void 0?HZ(r):d8e({feature:e.name,unitId:A8e(),percentage:e.percentage,exclude:BZ()})}function C8e(t){const e=VZ.get(t);if(e)return e;const n=k8e(t);return VZ.set(t,n),n}function Mie(){return y8e(Pie.map(t=>{const{enabled:e,reason:n}=C8e(t.name);return{name:t.name,enabled:e,reason:n}}))}const E8e=14,T8e=["action","tab","panel","status","mode","reason","format","via"],D4=[],P8e=Date.now();function M8e(t){for(const e of T8e){const n=t[e];if(typeof n=="string"&&n.length>0&&n.length<=24)return`:${n}`;if(typeof n=="number"||typeof n=="boolean")return`:${String(n)}`}return""}function N8e(t,e){const n=t.replace(/^studio[:_]/,"");D4.push({at:Date.now()-P8e,label:`${n}${M8e(e)}`}),D4.length>E8e&&D4.shift()}function D8e(){return D4.map(t=>`${(t.at/1e3).toFixed(1)} ${t.label}`).join(" > ")}const I8e="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",_8e="https://us.i.posthog.com",R8e=1e3;let I4=[],RP=null;function j8e(){return hS()}function _s(t,e={}){if(!j8e())return;N8e(t,e);const n=u8e();I4.push({event:t,properties:{...e,...n,...Mie()},timestamp:new Date().toISOString()}),RP===null&&(RP=setTimeout(()=>{RP=null,VI()},R8e)),F8e()}function VI(){if(I4.length===0)return;const t=kie(),e=I4.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));I4=[],L8e(`${_8e}/batch/`,JSON.stringify({api_key:I8e,batch:e}))}function L8e(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function F8e(){qOe()||(YOe(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>VI(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&VI()}));function $8e(t){_s("studio_session_start",{has_project:t.has_project})}function B8e(t){_s("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function V8e(t){_s("studio_timeline_performance",t)}function H8e(){var t,e;try{const n=navigator,i=[`ua=${((t=n.userAgentData)==null?void 0:t.platform)??navigator.platform??"unknown"}`,`screen=${screen.width}x${screen.height}@${devicePixelRatio}x`,`lang=${navigator.language}`];return n.deviceMemory&&i.push(`mem=${n.deviceMemory}GB`),(e=n.connection)!=null&&e.effectiveType&&i.push(`net=${n.connection.effectiveType}`),navigator.hardwareConcurrency&&i.push(`cpu=${navigator.hardwareConcurrency}cores`),i.join(" ")}catch{return""}}function Q8e(t){_s("studio_razor_split",{mode:t.mode,count:t.count})}function Ym(t){_s("studio_expanded_clip_edit",{action:t.action})}function QZ(t){_s("studio_keyframe_lane_expand",{expanded:t.expanded})}function dj(t){_s("studio_segment_ease_edit",{action:t.action,ease:t.ease})}function z8e(t){_s("studio_feedback_shown",{reason:t.reason,render_id:t.render_id,source:"studio"})}function Z8e(t){_s("studio_feedback_dismissed",{reason:t.reason,render_id:t.render_id,via:t.via,had_rating:t.had_rating,source:"studio"})}function G8e(t){_s("studio_feedback_interview_click",{reason:t.reason,source:"studio"})}function U8e(t){_s("studio_feedback",{...t.rating===void 0?{}:{rating:t.rating,rating_scale:10},...t.comment?{comment:t.comment}:{},...t.context,reason:t.reason,render_id:t.render_id,question:t.question,answer_kind:t.answer_kind,doctor_summary:H8e(),breadcrumbs:D8e(),source:"studio"})}function QO(t){_s("studio_block_param_commit",{tone:t.tone,block_name:t.blockName,param_key:t.key})}async function X8e(t){try{const e=await t.json();if(typeof e=="object"&&e!==null){const{error:n,hint:r}=e;if(typeof n=="string"&&n)return typeof r=="string"&&r?`${n}. ${r}`:n}}catch{}return`Server error (${t.status}). Check the terminal for details.`}function W8e(t){const e=(t==null?void 0:t.title)??"FFmpeg not found",n=(t==null?void 0:t.command)??(t==null?void 0:t.hint);return n?`${e}. Install it with: ${n}`:`${e}. Install FFmpeg to export.`}let tb=null;const zO=t=>typeof t=="string"&&t?t:void 0;function q8e(t){if(typeof t!="object"||t===null)return null;const{ok:e,title:n,detail:r,hint:i,command:s}=t;return typeof e!="boolean"?null:{ok:e,title:zO(n),detail:zO(r),hint:zO(i),command:zO(s)}}async function Y8e(){try{const t=await fetch("/api/environment/ffmpeg");return t.ok?q8e(await t.json()):null}catch{return null}}function K8e(){const[t,e]=x.useState(tb),[n,r]=x.useState(tb===null),i=x.useRef(!0);x.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[]);const s=x.useCallback(async()=>{r(!0);const o=await Y8e();tb=o,i.current&&(e(o),r(!1))},[]);x.useEffect(()=>{tb===null&&s()},[s]);const a=x.useCallback(()=>{tb=null,s()},[s]);return{status:t,checking:n,recheck:a}}function zZ(t){return t!=="render_complete"}const ZZ=[{id:"remove",prompt:"What would you cut from Studio?",placeholder:"The part you never use",presets:[{label:"Layers panel",hint:"The layer tree on the right"},{label:"Variables panel",hint:"Composition variables on the right"},{label:"Blocks browser",hint:"The block library in the sidebar"},{label:"Storyboard mode",hint:"The storyboard view next to Preview"},{label:"Caption editing",hint:"Editing caption words and presets in Studio"},{label:"Render history",hint:"The list of past exports"},{label:"Nothing",hint:"It all earns its place"}]},{id:"workaround",prompt:"What did you have to do outside Studio?",placeholder:"The step you finished somewhere else",presets:[{label:"Fix the exported file",hint:"Remuxing or re-encoding the output by hand"},{label:"Convert source media",hint:"Re-encoding footage before it would import cleanly"},{label:"Match loudness",hint:"Normalising levels across the finished audio"},{label:"Make images or graphics",hint:"Creating visual assets in another tool"},{label:"Record footage",hint:"Capturing screen or camera video"},{label:"Nothing, it was all here",hint:"No outside tools needed"}]},{id:"fix",prompt:"What should we fix first?",placeholder:"The thing that slowed you down",presets:[{label:"Audio mixing",hint:"Levels, ducking or the balance in the exported mix"},{label:"Export encoding",hint:"The render fails, or the finished file is wrong"},{label:"Export matches preview",hint:"The exported video differs from the preview"},{label:"Media and fonts",hint:"Adding video, images or fonts to a project"},{label:"Render speed",hint:"Exports take too long to finish"},{label:"Re-rendering everything",hint:"A small change means rendering the whole thing"},{label:"Checks and warnings",hint:"Lint flags things that are fine, or misses real ones"}]}],J8e={id:"detractor",prompt:"What went wrong?",placeholder:"The thing that made that a low score",presets:[{label:"Export failed",hint:"The render did not finish"},{label:"Output looked wrong",hint:"It rendered, but not the way I built it"},{label:"Crashed or froze",hint:"The editor stopped responding"},{label:"Lost my edits",hint:"Changes did not save, or came back changed"},{label:"Too slow",hint:"Waiting on renders, or the editor itself lagging"},{label:"Could not figure it out",hint:"Could not find or understand something"}]},e4e=6;function t4e(t){return t<=e4e?J8e:ZZ[Math.floor(Math.random()*ZZ.length)]}const E6={dismissedAt:"hyperframes-studio:feedbackDismissedAt",answeredAt:"hyperframes-studio:feedbackAnsweredAt"},Nie="hyperframes-studio:feedbackAskedThisSession",Die=864e5,n4e=30*Die,r4e=7*Die;let X2=null;function i4e(){try{return!1}catch{return!1}}function GZ(t){try{return parseInt(window.localStorage.getItem(t)||"0",10)||0}catch{return 0}}function Iie(t,e){try{window.localStorage.setItem(t,String(e))}catch{}}function s4e(){try{return window.sessionStorage.getItem(Nie)==="1"}catch{return!0}}function a4e(){try{window.sessionStorage.setItem(Nie,"1")}catch{}}function o4e(t){return!(i4e()||!hS()||s4e()||t-GZ(E6.answeredAt)<n4e||t-GZ(E6.dismissedAt)<r4e)}function _ie(t){X2&&o4e(Date.now())&&(a4e(),X2(t))}function l4e(t){return X2=t,()=>{X2===t&&(X2=null)}}function c4e(){Iie(E6.answeredAt,Date.now())}function u4e(){Iie(E6.dismissedAt,Date.now())}function Rie(t){return`hf-studio-hidden-renders:${t}`}function UZ(t){try{const e=window.localStorage.getItem(Rie(t)),n=e?JSON.parse(e):[];return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function f4e(t,e){try{window.localStorage.setItem(Rie(t),JSON.stringify([...e].slice(-200)))}catch{}}function h4e(t,e){const[n,r]=x.useState([]),[i,s]=x.useState(null),[a,o]=x.useState(null),{status:l,checking:c,recheck:u}=K8e(),f=l!==null&&!l.ok,h=x.useRef(null),m=x.useRef(null),y=x.useRef(new Map),p=x.useRef(new Set),v=x.useCallback((I,j)=>{y.current.set(I.id,j),r(L=>[...L,I])},[]),b=x.useCallback(I=>{var j;I&&m.current!==I||((j=h.current)==null||j.close(),h.current=null,m.current=null)},[]),w=x.useCallback(async()=>{if(t)try{const I=await fetch(`/api/projects/${t}/renders`);if(!I.ok){s(`Couldn't load render history (server error ${I.status}).`);return}const j=await I.json();if(s(null),Array.isArray(j.renders)){const L=UZ(t);r(H=>{const $=new Set(H.map(q=>q.id)),G=j.renders.filter(q=>!$.has(q.id)&&!L.has(q.id)).map(q=>({id:q.id,status:q.status==="failed"?"failed":"complete",progress:100,filename:q.filename,createdAt:q.createdAt,durationMs:q.durationMs}));return[...H,...G]})}}catch{s("Couldn't load render history. Is the studio server running?")}},[t]);x.useEffect(()=>{w()},[w]);const O=x.useCallback(async(I={})=>{if(!t)return;if(f){v({id:Mf(),status:"failed",progress:0,error:W8e(l),filename:"Export blocked",createdAt:Date.now()},{});return}const j=I.fps??30,L=I.quality??"standard",H=I.format??"mp4",$=I.resolution,G=I.composition??e.current??void 0;B8e({fps:j,quality:L,format:H,resolution:$,composition:G});const q=Date.now(),Y={render_format:H,render_quality:L,render_fps:j,render_resolution:$??"auto",render_composition:G??"index.html",render_has_variables:!!(I.variables&&Object.keys(I.variables).length>0)},J={fps:j,quality:L,format:H};hS()?J.telemetryDistinctId=kie():J.telemetryOptOut=!0,$&&$!=="auto"&&(J.resolution=$),G&&(J.composition=G),I.variables&&Object.keys(I.variables).length>0&&(J.variables=I.variables);let ie;try{ie=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)})}catch(Q){const K=Q instanceof Error?Q.message:String(Q),ee={id:Mf(),status:"failed",progress:0,error:`Could not reach render server: ${K}. Use \`hyperframes render\` from the CLI instead.`,filename:"Export failed",createdAt:q};v(ee,Y);return}if(!ie.ok){const Q={id:Mf(),status:"failed",progress:0,error:await X8e(ie),filename:"Export failed",createdAt:q};v(Q,Y);return}const{jobId:te}=await ie.json(),W={mp4:".mp4",webm:".webm",mov:".mov"}[H]??".mp4",F={id:te,status:"rendering",progress:0,filename:`${te}${W}`,createdAt:q};v(F,Y),m.current=te;const U=new EventSource(`/api/render/${te}/progress`);return h.current=U,U.addEventListener("progress",Q=>{try{const K=JSON.parse(Q.data),ee=K.status==="complete"||K.status==="failed"||K.status==="cancelled";r(se=>se.map(z=>z.id===te?{...z,progress:K.progress??z.progress,stage:K.stage??K.message??z.stage,status:ee?K.status:z.status,durationMs:K.status==="complete"?Date.now()-q:void 0,error:K.error??z.error}:z)),ee&&b(te)}catch{}}),U.onerror=()=>{U.close(),r(Q=>Q.map(K=>K.id===te&&K.status==="rendering"?{...K,status:"failed",error:"Connection lost. Is the render server running?"}:K)),m.current=null},te},[t,e,b,v,l,f]),C=x.useCallback(async I=>{o(null),b(I),r(j=>j.map(L=>L.id===I&&L.status==="rendering"?{...L,status:"cancelled"}:L));try{const j=await fetch(`/api/render/${I}/cancel`,{method:"POST"});if(!j.ok&&j.status!==404){o("Couldn't cancel on the server — the render may still be running.");return}if(j.ok){const L=await j.json().catch(()=>null);L!=null&&L.status&&L.status!=="cancelled"&&w()}}catch{o("Couldn't reach the server to cancel — the render may still be running.")}},[b,w]),E=x.useCallback(async I=>{o(null),b(I);try{if(!(await fetch(`/api/render/${I}`,{method:"DELETE"})).ok){o("Couldn't delete the render — it's still on disk.");return}}catch{o("Couldn't reach the server to delete the render.");return}r(j=>j.filter(L=>L.id!==I))},[b]),M=x.useCallback(()=>{r(I=>{const j=I.filter(L=>L.status!=="rendering");if(t&&j.length>0){const L=UZ(t);for(const H of j)L.add(H.id);f4e(t,L)}return I.filter(L=>L.status==="rendering")})},[t]),N=x.useCallback(()=>o(null),[]);x.useEffect(()=>{for(const I of n){if(I.status==="rendering"||I.status==="cancelled")continue;const j=y.current.get(I.id);!j||p.current.has(I.id)||(p.current.add(I.id),_ie({reason:I.status==="complete"?"render_complete":"render_failed",renderId:I.id,detail:I.error,context:{...j,render_progress:I.progress,render_duration_ms:I.durationMs??Date.now()-I.createdAt,render_stage:I.stage,render_error:I.error,renders_this_session:y.current.size}}))}},[n]),x.useEffect(()=>()=>{var I;(I=h.current)==null||I.close(),h.current=null},[t]);const _=n.some(I=>I.status==="rendering");return x.useMemo(()=>({jobs:n,isRendering:_,loadError:i,actionError:a,dismissActionError:N,reloadRenders:w,deleteRender:E,cancelRender:C,clearCompleted:M,startRender:O,ffmpeg:l,ffmpegMissing:f,ffmpegChecking:c,recheckFfmpeg:u}),[n,_,i,a,N,w,E,C,M,O,l,f,c,u])}const d4e="modulepreload",p4e=function(t){return"/"+t},XZ={},Sy=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=a(n.map(c=>{if(c=p4e(c),c in XZ)return;XZ[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":d4e,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((m,y)=>{h.addEventListener("load",m),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};function m4e(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function kr(t){x.useEffect(t,[])}const WZ=t=>{let e;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const h=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(m=>m(e,h))}},i=()=>e,o={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=e=t(r,i,o);return o},g4e=(t=>t?WZ(t):WZ),y4e=t=>t;function x4e(t,e=y4e){const n=Gb.useSyncExternalStore(t.subscribe,Gb.useCallback(()=>e(t.getState()),[t,e]),Gb.useCallback(()=>e(t.getInitialState()),[t,e]));return Gb.useDebugValue(n),n}const qZ=t=>{const e=g4e(t),n=r=>x4e(e,r);return Object.assign(n,e),n},AE=(t=>t?qZ(t):qZ),zv=AE(t=>({values:null,setValues:e=>t({values:e&&Object.keys(e).length>0?e:null})}));function jie(t){const e=zv.getState().values;e?t.searchParams.set("variables",JSON.stringify(e)):t.searchParams.delete("variables")}const Lie={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","enabled:hover:bg-neutral-200","enabled:active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","enabled:hover:bg-surface-hover enabled:hover:text-white enabled:hover:border-border-strong","enabled:active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","enabled:hover:bg-red-600","enabled:active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","enabled:hover:bg-surface-hover enabled:hover:text-white","enabled:active:scale-[0.98]"].join(" ")},b4e={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},Uo=x.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:s="",disabled:a,...o},l)=>d.jsxs("button",{ref:l,disabled:a||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",Lie[t],b4e[e],s].join(" "),...o,children:[n?d.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?d.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&d.jsx("span",{children:i})]}));Uo.displayName="Button";const v4e={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},A4e=x.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},s)=>d.jsx("button",{ref:s,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:cursor-not-allowed","select-none cursor-pointer","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-studio-accent",Lie[n],v4e[e],r].join(" "),...i,children:t}));A4e.displayName="IconButton";function Fie({viewBox:t="0 0 100 100",...e}){const n=x.useId(),r=`${n}-left`,i=`${n}-right`;return d.jsxs("svg",{viewBox:t,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...e,children:[d.jsx("g",{transform:"translate(50 50)",opacity:".92",children:d.jsxs("g",{transform:"translate(-50 -50)",children:[d.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:`url(#${r})`}),d.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:`url(#${i})`})]})}),d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:r,x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#06E3FA"}),d.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),d.jsxs("linearGradient",{id:i,x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{stopColor:"#06E3FA"}),d.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}function YZ({title:t,detail:e,mono:n,size:r=64,progress:i}){const s=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,a=Math.round(r*1.16);return d.jsxs("div",{className:"hf-loader",role:"status",draggable:!1,children:[d.jsx("div",{className:"hf-loader-mark-frame",style:{width:a,height:a},draggable:!1,children:d.jsx(Fie,{className:"hf-loader-mark",width:r,height:r})}),d.jsx("div",{className:"hf-loader-title",children:t}),e&&d.jsx("div",{className:"hf-loader-detail",children:e}),s!==void 0&&d.jsx("div",{className:"hf-loader-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s*100),children:d.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${s})`}})}),n&&d.jsx("div",{className:"hf-loader-mono",children:n})]})}var Zl=Aie();function _4(t,e,n){return Math.max(e,Math.min(n,t))}function S4e(t,e,n,r){const i=e/2,s=i+r;return _4(t,s,Math.max(s,n-i-r))}function pj(t,e,n,r){const i=(r==null?void 0:r.offset)??8,s=(r==null?void 0:r.margin)??12,a=Math.max(s,e.width-n.width-s),o=t.left+t.width/2-n.width/2,l=_4(o,s,a),c=t.bottom+i,u=t.top-n.height-i,f=c+n.height<=e.height-s,h=u>=s;return f||!h?{left:l,top:_4(c,s,Math.max(s,e.height-n.height-s)),placement:"bottom"}:{left:l,top:_4(u,s,Math.max(s,e.height-n.height-s)),placement:"top"}}const KZ=28,jP=8;function Ar({label:t,children:e,delay:n=400,side:r="top"}){const[i,s]=x.useState(!1),[a,o]=x.useState({x:0,y:0}),[l,c]=x.useState(r),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),[m,y]=x.useState(0),p=x.useId(),v=x.useCallback(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{const O=f.current;if(!O)return;const E=(O.firstElementChild??O).getBoundingClientRect();if(E.width===0&&E.height===0)return;let M=r;r==="top"&&E.top-KZ-6<jP?M="bottom":r==="bottom"&&E.bottom+KZ+6>window.innerHeight-jP&&(M="top"),c(M),o({x:E.left+E.width/2,y:M==="top"?E.top-6:E.bottom+6}),s(!0)},n)},[n,r]),b=x.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),s(!1)},[]);x.useLayoutEffect(()=>{var O;y(i?((O=h.current)==null?void 0:O.offsetWidth)??0:0)},[i,t]),x.useEffect(()=>{if(!i)return;const O=C=>{C.key==="Escape"&&b()};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[i,b]);const w=S4e(a.x,m,window.innerWidth,jP);return d.jsxs(d.Fragment,{children:[d.jsx("span",{ref:f,onPointerEnter:v,onPointerLeave:b,onFocus:v,onBlur:b,"aria-describedby":i?p:void 0,className:"contents",children:e}),i&&Zl.createPortal(d.jsx("div",{className:"fixed z-[200] pointer-events-none",style:{left:w,top:a.y,transform:l==="top"?"translate(-50%, -100%)":"translate(-50%, 0)"},children:d.jsx("div",{ref:h,role:"tooltip",id:p,className:"px-2 py-1 rounded-md bg-neutral-800 border border-neutral-700/50 text-[10px] font-medium text-neutral-200 whitespace-nowrap shadow-lg",children:t})}),document.body)]})}const w4e=3,O4e=3;function HI(t){return typeof t=="object"&&t!==null}function k4e(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!HI(e))return null;const n=e.state;return HI(n)?n.loading===!0&&n.ready!==!0:null}const C4e=400,JZ="The composition preview did not become ready.";function E4e(t){return!(t instanceof CustomEvent)||!HI(t.detail)?JZ:typeof t.detail.message=="string"&&t.detail.message.trim()?t.detail.message:JZ}function T4e(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function P4e(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function eG(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const s of r.querySelectorAll("video, audio"))if(P4e(s)&&!s.error&&s.networkState!==O4e&&s.readyState<w4e)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const s of i)if(!m4e(s))return!0}return!1}catch{return e}}const QI=x.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:s,suppressLoadingOverlay:a},o)=>{const l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(null),h=x.useRef(null),m=x.useRef(0),[y,p]=x.useState(!1),[v,b]=x.useState(!1),[w,O]=x.useState(!1),[C,E]=x.useState(!1),[M,N]=x.useState(!1),[_,I]=x.useState(!0),[j,L]=x.useState(!0),[H,$]=x.useState(null);x.useEffect(()=>{if(!_){L(!0);return}const J=setTimeout(()=>L(!1),C4e);return()=>clearTimeout(J)},[_]),kr(()=>{const J=l.current;if(!J)return;let ie=!1,te;return Sy(()=>import("./hyperframes-player-0QzsrRGz.js"),[]).then(()=>{if(ie)return;const ne=document.createElement("hyperframes-player"),W=new URL(e||`/api/projects/${t}/preview`,window.location.origin);jie(W);const F=W.pathname+W.search,U=()=>{m.current+=1;const ae=new URL(F,window.location.origin);ae.searchParams.set("_hfStudioRetry",String(m.current)),$(null),I(!0),ne.setAttribute("src",ae.pathname+ae.search)};h.current=U;const Q=ne.iframeElement,K=ae=>ae.stopImmediatePropagation(),ee=ae=>{const he=k4e(ae);he!==null&&N(he)},se=()=>{$(null),I(!1)},z=ae=>{$(E4e(ae)),I(!1)},V=()=>{if(c.current++,$(null),N(!1),I(!0),c.current>1){J.classList.remove("preview-revealing"),J.offsetWidth,J.classList.add("preview-revealing");const ge=()=>J.classList.remove("preview-revealing");J.addEventListener("animationend",ge,{once:!0})}n(),u.current&&clearInterval(u.current);let he=c.current>1?!1:eG(Q,!1);if(he){p(!0);let ge=0;u.current=setInterval(()=>{ge+=1,he=eG(Q,he),(!he||ge>100)&&(he&&ge>100&&console.debug("[studio] asset readiness poll hit the 10s cap — continuing with unloaded assets"),u.current&&clearInterval(u.current),u.current=null,p(!1))},100)}else p(!1)};if(Q.addEventListener("load",V),ne.addEventListener("click",K,{capture:!0}),ne.addEventListener("shadertransitionstate",ee),ne.addEventListener("ready",se),ne.addEventListener("error",z),typeof o=="function"?o(Q):o&&(o.current=Q),ne.setAttribute("shader-capture-scale","1"),ne.setAttribute("shader-loading","player"),ne.setAttribute("width",String(i?1080:1920)),ne.setAttribute("height",String(i?1920:1080)),ne.style.width="100%",ne.style.height="100%",ne.style.display="block",ne.style.background="transparent",ne.setAttribute("src",F),J.appendChild(ne),ne.shadowRoot){const ae=document.createElement("style");ae.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",ne.shadowRoot.appendChild(ae)}T4e(ne),te=()=>{if(Q.removeEventListener("load",V),ne.removeEventListener("click",K,{capture:!0}),ne.removeEventListener("shadertransitionstate",ee),ne.removeEventListener("ready",se),ne.removeEventListener("error",z),u.current&&clearInterval(u.current),u.current=null,ne.remove(),h.current===U&&(h.current=null),typeof o!="function"){if(o){const ae=o;ae.current===Q&&(ae.current=null)}}}}),()=>{ie=!0,te==null||te()}}),x.useEffect(()=>{if(!y){E(!1);return}const J=setTimeout(()=>E(!0),3e3);return()=>clearTimeout(J)},[y]),x.useEffect(()=>{if(f.current&&(clearTimeout(f.current),f.current=null),y){b(!0),O(!1);return}return O(!0),f.current=setTimeout(()=>{b(!1),O(!1),f.current=null},240),()=>{f.current&&(clearTimeout(f.current),f.current=null)}},[y]);const G=()=>{u.current&&(clearInterval(u.current),u.current=null),p(!1)},q=!a&&!j&&_,Y=v&&!M&&!q&&!H;return x.useEffect(()=>{r==null||r(q||Y)},[r,q,Y]),d.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:s,children:[d.jsx("div",{ref:l,className:"w-full h-full"}),q&&d.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-30 select-none","data-hyperframes-ignore":"","data-testid":"composition-loading-overlay",draggable:!1,onDragStart:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),onPointerDown:J=>J.preventDefault(),children:d.jsx(YZ,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),Y&&d.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:w?0:1,pointerEvents:w?"none":"auto",transition:"opacity 180ms ease-in"},onDragStart:J=>J.preventDefault(),onMouseDown:J=>J.preventDefault(),children:d.jsxs("div",{className:"flex flex-col items-center gap-3",children:[d.jsx(YZ,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56}),C&&d.jsx("button",{type:"button",onClick:G,className:"px-3 py-1.5 text-[11px] rounded-md border border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800 transition-colors",children:"Continue anyway"})]})}),H&&d.jsx("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/90 px-6 text-center","data-hyperframes-ignore":"","data-testid":"composition-preview-error",children:d.jsxs("div",{className:"max-w-sm",children:[d.jsx("p",{className:"text-sm font-semibold text-white",children:"Preview failed to load"}),d.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:H}),d.jsx("button",{type:"button",className:"mt-4 rounded-md bg-white px-3 py-1.5 text-xs font-semibold text-black transition-colors hover:bg-neutral-200",onClick:()=>{var J;return(J=h.current)==null?void 0:J.call(h)},children:"Retry preview"})]})})]})});QI.displayName="Player";function ff(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $ie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
50
50
  * GSAP 3.15.0
51
51
  * https://gsap.com
52
52
  *
@@ -67,7 +67,7 @@ Error generating stack: `+D.message+`
67
67
  * Copyright 2008-2026, GreenSock. All rights reserved.
68
68
  * Subject to the terms at https://gsap.com/standard-license
69
69
  * @author: Jack Doyle, jack@greensock.com
70
- */var W6e=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,q6e=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,Y6e=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,K6e=/(^[#\.][a-z]|[a-y][a-z])/i,J6e=Math.PI/180,GO=Math.sin,UO=Math.cos,vc=Math.abs,yf=Math.sqrt,XO=Math.atan2,bG=1e8,vG=function(e){return typeof e=="string"},Rse=function(e){return typeof e=="number"},AG=1e5,rs=function(e){return Math.round(e*AG)/AG||0},SG=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001},eke=function(e,n,r){var i=e.length,s=~~(r*i);if(e[s]>n){for(;--s&&e[s]>n;);s<0&&(s=0)}else for(;e[++s]<n&&s<i;);return s<i?s:i-1};function tke(t){t=vG(t)&&K6e.test(t)&&document.querySelector(t)||t;var e=t.getAttribute?t:0,n;return e&&(t=t.getAttribute("d"))?(e._gsPath||(e._gsPath={}),n=e._gsPath[t],n&&!n._dirty?n:e._gsPath[t]=Of(t)):t?vG(t)?Of(t):Rse(t[0])?[t]:t:console.warn("Expecting a <path> element or an SVG path data string")}function Wb(t){var e=0,n;for(t.reverse();e<t.length;e+=2)n=t[e],t[e]=t[e+1],t[e+1]=n;t.reversed=!t.reversed}var nke=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=[].slice.call(e.attributes),s=i.length,a;for(n=","+n+",";--s>-1;)a=i[s].nodeName.toLowerCase(),n.indexOf(","+a+",")<0&&r.setAttributeNS(null,a,i[s].nodeValue);return r},rke={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"},ike=function(e,n){for(var r=n?n.split(","):[],i={},s=r.length;--s>-1;)i[r[s]]=+e.getAttribute(r[s])||0;return i};function jse(t,e){var n=t.tagName.toLowerCase(),r=.552284749831,i,s,a,o,l,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_,I;return n==="path"||!t.getBBox?t:(c=nke(t,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),I=ike(t,rke[n]),n==="rect"?(o=I.rx,l=I.ry||o,s=I.x,a=I.y,m=I.width-o*2,y=I.height-l*2,o||l?(p=s+o*(1-r),v=s+o,b=v+m,w=b+o*r,O=b+o,C=a+l*(1-r),E=a+l,M=E+y,N=M+l*r,_=M+l,i="M"+O+","+E+" V"+M+" C"+[O,N,w,_,b,_,b-(b-v)/3,_,v+(b-v)/3,_,v,_,p,_,s,N,s,M,s,M-(M-E)/3,s,E+(M-E)/3,s,E,s,C,p,a,v,a,v+(b-v)/3,a,b-(b-v)/3,a,b,a,w,a,O,C,O,E].join(",")+"z"):i="M"+(s+m)+","+a+" v"+y+" h"+-m+" v"+-y+" h"+m+"z"):n==="circle"||n==="ellipse"?(n==="circle"?(o=l=I.r,f=o*r):(o=I.rx,l=I.ry,f=l*r),s=I.cx,a=I.cy,u=o*r,i="M"+(s+o)+","+a+" C"+[s+o,a+f,s+u,a+l,s,a+l,s-u,a+l,s-o,a+f,s-o,a,s-o,a-f,s-u,a-l,s,a-l,s+u,a-l,s+o,a-f,s+o,a].join(",")+"z"):n==="line"?i="M"+I.x1+","+I.y1+" L"+I.x2+","+I.y2:(n==="polyline"||n==="polygon")&&(h=(t.getAttribute("points")+"").match(q6e)||[],s=h.shift(),a=h.shift(),i="M"+s+","+a+" L"+h.join(","),n==="polygon"&&(i+=","+s+","+a+"z")),c.setAttribute("d",Xp(c._gsRawPath=Of(i))),e&&t.parentNode&&(t.parentNode.insertBefore(c,t),t.parentNode.removeChild(t)),c)}function Lse(t,e,n){e=e||0,t.samples||(t.samples=[],t.lookup=[]);var r=~~t.resolution||12,i=1/r,s=t.length,a=t[e],o=t[e+1],l=e?e/6*r:0,c=t.samples,u=t.lookup,f=(e?t.minLength:bG)||bG,h=c[l+n*r-1],m=e?c[l-1]:0,y,p,v,b,w,O,C,E,M,N,_,I,j,L,H,$,G;for(c.length=u.length=0,p=e+2;p<s;p+=6){if(v=t[p+4]-a,b=t[p+2]-a,w=t[p]-a,E=t[p+5]-o,M=t[p+3]-o,N=t[p+1]-o,O=C=_=I=0,vc(v)<.01&&vc(E)<.01&&vc(w)+vc(N)<.01)t.length>8&&(t.splice(p,6),p-=6,s-=6);else for(y=1;y<=r;y++)L=i*y,j=1-L,O=C-(C=(L*L*v+3*j*(L*b+j*w))*L),_=I-(I=(L*L*E+3*j*(L*M+j*N))*L),$=yf(_*_+O*O),$<f&&(f=$),m+=$,c[l++]=m;a+=v,o+=E}if(h)for(h-=m;l<c.length;l++)c[l]+=h;if(c.length&&f){if(t.totalLength=G=c[c.length-1]||0,t.minLength=f,G/f<9999)for($=H=0,y=0;y<G;y+=f)u[$++]=c[H]<y?++H:H}else t.totalLength=c[0]=0;return e?m-c[e/2-1]:m}function Fse(t,e){var n,r,i;for(i=n=r=0;i<t.length;i++)t[i].resolution=12,n+=Lse(t[i]),r+=t[i].length;return t.totalPoints=r,t.totalLength=n,t}function ske(t,e,n,r,i,s,a,o,l){if(!(t===o&&e===l)){n=vc(n),r=vc(r);var c=i%360*J6e,u=UO(c),f=GO(c),h=Math.PI,m=h*2,y=(t-o)/2,p=(e-l)/2,v=u*y+f*p,b=-f*y+u*p,w=v*v,O=b*b,C=w/(n*n)+O/(r*r);C>1&&(n=yf(C)*n,r=yf(C)*r);var E=n*n,M=r*r,N=(E*M-E*O-M*w)/(E*O+M*w);N<0&&(N=0);var _=(s===a?-1:1)*yf(N),I=_*(n*b/r),j=_*-(r*v/n),L=(t+o)/2,H=(e+l)/2,$=L+(u*I-f*j),G=H+(f*I+u*j),q=(v-I)/n,Y=(b-j)/r,J=(-v-I)/n,ie=(-b-j)/r,te=q*q+Y*Y,ne=(Y<0?-1:1)*Math.acos(q/yf(te)),W=(q*ie-Y*J<0?-1:1)*Math.acos((q*J+Y*ie)/yf(te*(J*J+ie*ie)));isNaN(W)&&(W=h),!a&&W>0?W-=m:a&&W<0&&(W+=m),ne%=m,W%=m;var F=Math.ceil(vc(W)/(m/4)),U=[],Q=W/F,K=4/3*GO(Q/2)/(1+UO(Q/2)),ee=u*n,se=f*n,z=f*-r,V=u*r,ae;for(ae=0;ae<F;ae++)i=ne+ae*Q,v=UO(i),b=GO(i),q=UO(i+=Q),Y=GO(i),U.push(v-K*b,b+K*v,q+K*Y,Y-K*q,q,Y);for(ae=0;ae<U.length;ae+=2)v=U[ae],b=U[ae+1],U[ae]=v*ee+b*z+$,U[ae+1]=v*se+b*V+G;return U[ae-2]=o,U[ae-1]=l,U}}function Of(t){var e=(t+"").replace(Y6e,function(I){var j=+I;return j<1e-4&&j>-1e-4?0:j}).match(W6e)||[],n=[],r=0,i=0,s=2/3,a=e.length,o=0,l="ERROR: malformed path: "+t,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_=function(j,L,H,$){w=(H-j)/3,O=($-L)/3,p.push(j+w,L+O,H-w,$-O,H,$)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(l),n;for(c=0;c<a;c++)if(E=m,isNaN(e[c])?(m=e[c].toUpperCase(),y=m!==e[c]):c--,f=+e[c+1],h=+e[c+2],y&&(f+=r,h+=i),c||(v=f,b=h),m==="M")p&&(p.length<8?n.length-=1:o+=p.length,SG(p)),r=v=f,i=b=h,p=[f,h],n.push(p),c+=2,m="L";else if(m==="C")p||(p=[0,0]),y||(r=i=0),p.push(f,h,r+e[c+3]*1,i+e[c+4]*1,r+=e[c+5]*1,i+=e[c+6]*1),c+=6;else if(m==="S")w=r,O=i,(E==="C"||E==="S")&&(w+=r-p[p.length-4],O+=i-p[p.length-3]),y||(r=i=0),p.push(w,O,f,h,r+=e[c+3]*1,i+=e[c+4]*1),c+=4;else if(m==="Q")w=r+(f-r)*s,O=i+(h-i)*s,y||(r=i=0),r+=e[c+3]*1,i+=e[c+4]*1,p.push(w,O,r+(f-r)*s,i+(h-i)*s,r,i),c+=4;else if(m==="T")w=r-p[p.length-4],O=i-p[p.length-3],p.push(r+w,i+O,f+(r+w*1.5-f)*s,h+(i+O*1.5-h)*s,r=f,i=h),c+=2;else if(m==="H")_(r,i,r=f,i),c+=1;else if(m==="V")_(r,i,r,i=f+(y?i-r:0)),c+=1;else if(m==="L"||m==="Z")m==="Z"&&(f=v,h=b,p.closed=!0),(m==="L"||vc(r-f)>.5||vc(i-h)>.5)&&(_(r,i,f,h),m==="L"&&(c+=2)),r=f,i=h;else if(m==="A"){if(M=e[c+4],N=e[c+5],w=e[c+6],O=e[c+7],u=7,M.length>1&&(M.length<3?(O=w,w=N,u--):(O=N,w=M.substr(2),u-=2),N=M.charAt(1),M=M.charAt(0)),C=ske(r,i,+e[c+1],+e[c+2],+e[c+3],+M,+N,(y?r:0)+w*1,(y?i:0)+O*1),c+=u,C)for(u=0;u<C.length;u++)p.push(C[u]);r=p[p.length-2],i=p[p.length-1]}else console.log(l);return c=p.length,c<6?(n.pop(),c=0):SG(p),n.totalPoints=o+c,n}function ake(t,e){t.samples||Lse(t);for(var n=t.samples,r=t.lookup,i=t.resolution,s=t.totalLength,a=t.slice(0,2),o=[],l=t.length-4,c=6,u=.2,f=0,h=0,m,y,p,v,b,w,O,C,E,M,N,_,I,j;c<l;c+=6)Math.abs(XO(t[c+1]-t[c-1],t[c]-t[c-2])-XO(t[c+3]-t[c+1],t[c+2]-t[c]))>u&&o.push(c);if(o.push(t.length-2),l=o.length,a.nonSmooth=_=[1],e>l)for(e-=l,b=0;b<l;b++){for(I=o[b],j=Math.round(I/6*i),E=n[j-1]-f,y=Math.round(n[j-1]/s*e)-h,h+=y,w=1/(y+1),O=1;O<=y;O++)M=f+E*O*w,c=r.length?r[M<s?~~(M/t.minLength):r.length-1]||0:eke(n,M,M/s),p=c?n[c-1]:0,v=n[c],v<M&&(p=v,v=n[++c]),m=1/i*((M-p)/(v-p)+c%i)||0,C=1-m,c=~~(c/i)*6,N=t[c],a.push(rs((m*m*(t[c+6]-N)+3*C*(m*(t[c+4]-N)+C*(t[c+2]-N)))*m+N),rs((m*m*(t[c+7]-(N=t[c+1]))+3*C*(m*(t[c+5]-N)+C*(t[c+3]-N)))*m+N));_[a.length]=1,a.push(t[I],t[I+1]),f+=E}return c=t.length-2,t.closed&&Math.abs(XO(t[c+1]-t[c-1],t[c]-t[c-2])-XO(t[3]-t[1],t[2]-t[0]))<=u&&(_[0]=_[_.length-1]=0),a}function oke(t,e){vc(t[0]-t[2])<1e-4&&vc(t[1]-t[3])<1e-4&&(t=t.slice(2));var n=t.length-2,r=+t[0],i=+t[1],s=+t[2],a=+t[3],o=[r,i,r,i],l=s-r,c=a-i,u=t.nonSmooth||[],f=Math.abs(t[n]-r)<.001&&Math.abs(t[n+1]-i)<.001,h,m,y,p,v,b,w,O,C,E,M,N,_,I,j;if(!n)return[r,i,r,i,r,i,r,i];for(f&&(t.push(s,a),s=r,a=i,r=t[n-2],i=t[n-1],t.unshift(r,i),n+=4,u=[0,0].concat(u)),e=e||e===0?+e:1,y=2;y<n;y+=2)if(h=r,m=i,r=s,i=a,s=+t[y+2],a=+t[y+3],!(r===s&&i===a)){if(p=l,v=c,l=s-r,c=a-i,u[y]){o.push(r-(r-h)/4,i-(i-m)/4,r,i,r+(s-r)/4,i+(a-i)/4);continue}b=yf(p*p+v*v),w=yf(l*l+c*c),O=yf(Math.pow(l/w+p/b,2)+Math.pow(c/w+v/b,2)),C=(b+w)*e*.25/O,E=r-(r-h)*(b?C/b:0),M=r+(s-r)*(w?C/w:0),N=r-(E+((M-E)*(b*3/(b+w)+.5)/4||0)),_=i-(i-m)*(b?C/b:0),I=i+(a-i)*(w?C/w:0),j=i-(_+((I-_)*(b*3/(b+w)+.5)/4||0)),o.push(rs(E+N),rs(_+j),rs(r),rs(i),rs(M+N),rs(I+j))}return r!==s||i!==a||o.length<4?o.push(rs(s),rs(a),rs(s),rs(a)):o.length-=2,o.length===2?o.push(r,i,r,i,r,i):f&&(o.splice(0,6),o.length-=6),o.closed=f,o}function Xp(t){Rse(t[0])&&(t=[t]);var e="",n=t.length,r,i,s,a;for(i=0;i<n;i++){for(a=t[i],e+="M"+rs(a[0])+","+rs(a[1])+" C",r=a.length,s=2;s<r;s++)e+=rs(a[s++])+","+rs(a[s++])+" "+rs(a[s++])+","+rs(a[s++])+" "+rs(a[s++])+","+rs(a[s])+" ";a.closed&&(e+="z")}return e}function R6(){return R6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},R6.apply(this,arguments)}var Pl,Ij,qb,$se,Yb,Bse,Vse=function(){return Pl||typeof window<"u"&&(Pl=window.gsap)&&Pl.registerPlugin&&Pl},ZP=function(e){return typeof e=="function"},j6=Math.atan2,wG=Math.cos,OG=Math.sin,x0=Math.sqrt,kE=Math.PI,kG=kE*2,lke=kE*.3,cke=kE*.7,_j=1e20,eA=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,uke=/(^[#.][a-z]|[a-y][a-z])/i,fke=/[achlmqstvz]/i,od=function(e){return console&&console.warn(e)},Kc=function(e){return Math.round(e*1e5)/1e5||0},CG=function(e){var n=e.length,r=0,i=0,s;for(s=0;s<n;s++)r+=e[s++],i+=e[s];return[r/(n/2),i/(n/2)]},rg=function(e){var n=e.length,r=e[0],i=r,s=e[1],a=s,o,l,c;for(c=6;c<n;c+=6)o=e[c],l=e[c+1],o>r?r=o:o<i&&(i=o),l>s?s=l:l<a&&(a=l);return e.centerX=(r+i)/2,e.centerY=(s+a)/2,e.size=(r-i)*(s-a)},K2=function(e,n){n===void 0&&(n=3);for(var r=e.length,i=e[0][0],s=i,a=e[0][1],o=a,l=1/n,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_;--r>-1;)for(m=e[r],c=m.length,h=6;h<c;h+=6)for(b=m[h],w=m[h+1],O=m[h+2]-b,M=m[h+3]-w,C=m[h+4]-b,N=m[h+5]-w,E=m[h+6]-b,_=m[h+7]-w,y=n;--y>-1;)p=l*y,v=1-p,u=(p*p*E+3*v*(p*C+v*O))*p+b,f=(p*p*_+3*v*(p*N+v*M))*p+w,u>i?i=u:u<s&&(s=u),f>a?a=f:f<o&&(o=f);return e.centerX=(i+s)/2,e.centerY=(a+o)/2,e.left=s,e.width=i-s,e.top=o,e.height=a-o,e.size=(i-s)*(a-o)},Hse=function(e,n){return n.length-e.length},EG=function(e,n){var r=e.size||rg(e),i=n.size||rg(n);return Math.abs(i-r)<(r+i)/20?n.centerX-e.centerX||n.centerY-e.centerY:i-r},TG=function(e,n){var r=e.slice(0),i=e.length,s=i-2,a,o;for(n=n|0,a=0;a<i;a++)o=(a+n)%s,e[a++]=r[o],e[a]=r[o+1]},GP=function(e,n,r,i,s){var a=e.length,o=0,l=a-2,c,u,f,h;for(r*=6,u=0;u<a;u+=6)c=(u+r)%l,h=e[c]-(n[u]-i),f=e[c+1]-(n[u+1]-s),o+=x0(f*f+h*h);return o},hke=function(e,n,r){var i=e.length,s=CG(e),a=CG(n),o=a[0]-s[0],l=a[1]-s[1],c=GP(e,n,0,o,l),u=0,f,h,m;for(m=6;m<i;m+=6)h=GP(e,n,m/6,o,l),h<c&&(c=h,u=m);if(r)for(f=e.slice(0),Wb(f),m=6;m<i;m+=6)h=GP(f,n,m/6,o,l),h<c&&(c=h,u=-m);return u/6},dke=function(e,n,r){for(var i=e.length,s=_j,a=0,o=0,l,c,u,f,h,m;--i>-1;)for(l=e[i],m=l.length,h=0;h<m;h+=6)c=l[h]-n,u=l[h+1]-r,f=x0(c*c+u*u),f<s&&(s=f,a=l[h],o=l[h+1]);return[a,o]},pke=function(e,n,r,i,s,a){var o=n.length,l=0,c=Math.min(e.size||rg(e),n[r].size||rg(n[r]))*i,u=_j,f=e.centerX+s,h=e.centerY+a,m,y,p,v,b;for(y=r;y<o&&(m=n[y].size||rg(n[y]),!(m<c));y++)p=n[y].centerX-f,v=n[y].centerY-h,b=x0(p*p+v*v),b<u&&(l=y,u=b);return b=n[l],n.splice(l,1),b},mke=function(e,n,r){r===void 0&&(r=1);for(var i=e[n],s=e[n+1],a=e[n+2],o=e[n+3],l=e[n+4],c=e[n+5],u=e[n+6],f=e[n+7],h,m,y,p,v,b,w,O,C;r-- >0;)h=1-1/(r+2),m=i+(a-i)*h,y=a+(l-a)*h,p=s+(o-s)*h,v=o+(c-o)*h,b=m+(y-m)*h,w=p+(v-p)*h,O=l+(u-l)*h,C=c+(f-c)*h,y+=(O-y)*h,v+=(C-v)*h,e.splice(n+2,4,a=Kc(m),o=Kc(p),l=Kc(b),c=Kc(w),u=Kc(b+(y-b)*h),f=Kc(w+(v-w)*h),Kc(y),Kc(v),Kc(O),Kc(C))},gke=function(e){for(var n=e.length,r=-_j,i;n--;)e[n]>r&&(r=e[n],i=n);return i},F4=function(e,n){for(var r=[],i=[],s=e.length-2,a=0;a<s;a+=6)r.push(Math.pow(e[a]-e[a+6],2)+Math.pow(e[a+1]-e[a+7],2));for(;n--;)a=gke(r),i[a]=s=(i[a]||0)+1,r[a]*=s/(s+1);for(a=r.length;a--;)i[a]&&mke(e,a*6,i[a])},i_=function(e,n){return n||Fse(e),Math.max(4,Math.round(e.totalLength/4))},PG=function(e){return e.slice(0).sort(Hse)},Qse=function(e){for(var n=e[0],r=e[1],i=2;i<e.length;i+=2)if(Math.abs(e[i]-n)>.01||Math.abs(e[i+1]-r)>.01)return!1;return!0},UP=function(e,n){n=n||{};var r=n,i=r.redraw,s=r.points,a=r.maxSegments,o=a===void 0?999:a,l=0,c=e,u=Array.isArray(s)?s:0,f,h,m,y,p;if(i=i!==!1,i)Fse(e);else for(e.totalPoints=0,h=e.length;h--;)e.totalPoints+=e[h].length;for(u?(c=PG(e),u=PG(u),p=u[0].totalLength/Math.round(u[0].length/6)):((!s||s==="auto")&&(s=i_(e,i),i||(s-=Math.round(e.totalPoints/6))),s=Math.max(i?10:4,Math.min(999,s))),h=0;h<c.length;h++){if(m=c[h],f=Math.max(i?10:4,u?Math.round(u[h]?u[h].length/6:c[h].totalLength/p||0):Math.round((l/s+(i?m.totalLength/e.totalLength:m.length/e.totalPoints))*s)-l),!(h>=o||u&&(!u[h]||Qse(u[h]))))if(i){var v;y=oke(ake(m,f),n.curviness),m.length=0,(v=m).push.apply(v,y)}else F4(m,f);l+=f}return e},s_=function(e,n,r,i,s){var a=n.length-e.length,o=a>0?n:e,l=a>0?e:n,c=0,u=i==="complexity"?Hse:EG,f=i==="position"?0:typeof i=="number"?i:.8,h=l.length,m=typeof r=="object"&&r.push?r.slice(0):[r],y=m[0]==="reverse"||m[0]<0,p=r==="log",v,b,w,O,C,E,M;if(l[0]){if(o.length>1&&(e.sort(u),n.sort(u),o.size||K2(o),l.size||K2(l),E=o.centerX-l.centerX,M=o.centerY-l.centerY,u===EG))for(h=0;h<l.length;h++)o.splice(h,0,pke(l[h],o,h,f,E,M));if(a)for(a<0&&(a=-a),o[0].length>l[0].length&&F4(l[0],(o[0].length-l[0].length)/6|0),h=l.length;c<a;)O=o[h].size||rg(o[h]),w=dke(l,o[h].centerX,o[h].centerY),O=w[0],C=w[1],l[h++]=[O,C,O,C,O,C,O,C],l.totalPoints+=8,c++;for(h=0;h<e.length;h++)v=n[h],b=e[h],a=v.length-b.length,a<0?F4(v,-a/6|0):a>0&&F4(b,a/6|0),y&&s!==!1&&!b.reversed&&Wb(b),r=m[h]||m[h]===0?m[h]:"auto",r&&(b.closed||Math.abs(b[0]-b[b.length-2])<.5&&Math.abs(b[1]-b[b.length-1])<.5?r==="auto"||r==="log"?(m[h]=r=hke(b,v,!h||s===!1),r<0&&(y=!0,Wb(b),r=-r),TG(b,r*6)):r!=="reverse"&&(h&&r<0&&Wb(b),TG(b,(r<0?-r:r)*6)):!y&&(r==="auto"&&Math.abs(v[0]-b[0])+Math.abs(v[1]-b[1])+Math.abs(v[v.length-2]-b[b.length-2])+Math.abs(v[v.length-1]-b[b.length-1])>Math.abs(v[0]-b[b.length-2])+Math.abs(v[1]-b[b.length-1])+Math.abs(v[v.length-2]-b[0])+Math.abs(v[v.length-1]-b[1])||r%2)?(Wb(b),m[h]=-1,y=!0):r==="auto"?m[h]=0:r==="reverse"&&(m[h]=-1),b.closed!==v.closed&&(b.closed=v.closed=!1));return p&&od("shapeIndex:["+m.join(",")+"]"),e.shapeIndex=m,m}},MG=function(e,n,r,i,s){var a=Of(e[0]),o=Of(e[1]);s_(a,o,n||n===0?n:"auto",r,s)&&(e[0]=Xp(a),e[1]=Xp(o),(i==="log"||i===!0)&&od('precompile:["'+e[0]+'","'+e[1]+'"]'))},yke=function(e,n){if(!n)return e;var r=e.match(eA)||[],i=r.length,s="",a,o,l;for(n==="reverse"?(o=i-1,a=-2):(o=((parseInt(n,10)||0)*2+1+i*100)%i,a=2),l=0;l<i;l+=2)s+=r[o-1]+","+r[o]+" ",o=(o+a)%i;return s},NG=function(e,n){var r=0,i=parseFloat(e[0]),s=parseFloat(e[1]),a=i+","+s+" ",o=.999999,l,c,u,f,h,m,y;for(u=e.length,l=n*.5/(u*.5-1),c=0;c<u-2;c+=2){if(r+=l,m=parseFloat(e[c+2]),y=parseFloat(e[c+3]),r>o)for(h=1/(Math.floor(r)+1),f=1;r>o;)a+=(i+(m-i)*h*f).toFixed(2)+","+(s+(y-s)*h*f).toFixed(2)+" ",r--,f++;a+=m+","+y+" ",i=m,s=y}return a},a_=function(e){var n=e[0].match(eA)||[],r=e[1].match(eA)||[],i=r.length-n.length;i>0?e[0]=NG(n,i):e[1]=NG(r,-i)},xke=function(e){return isNaN(e)?a_:function(n){a_(n),n[1]=yke(n[1],parseInt(e,10))}},bke=function(e,n,r){var i=typeof e=="string",s,a;return(!i||uke.test(e)||(e.match(eA)||[]).length<3)&&(s=Ij(e)[0],s?(a=(s.nodeName+"").toUpperCase(),n&&a!=="PATH"&&(s=jse(s,!1),a="PATH"),e=s.getAttribute(a==="PATH"?"d":"points")||"",s===r&&(e=s.getAttributeNS(null,"data-original")||e)):(od("WARNING: invalid morph to: "+e),e=!1)),e},DG=function(e){for(var n=e.length,r,i,s,a,o,l,c,u;--n>-1;)for(r=e[n],u=r.cpData=r.cpData||[],u.length=0,c=r.length-2,l=0;l<c;l+=6)i=r[l]-r[l+2],s=r[l+1]-r[l+3],a=r[l+6]-r[l+4],o=r[l+7]-r[l+5],u[l+2]=j6(s,i),u[l+3]=x0(i*i+s*s),u[l+4]=j6(o,a),u[l+5]=x0(a*a+o*o);return e},IG=function(e){var n=e.trim().split(" "),r=~e.indexOf("left")?0:~e.indexOf("right")?100:isNaN(parseFloat(n[0]))?50:parseFloat(n[0]),i=~e.indexOf("top")?0:~e.indexOf("bottom")?100:isNaN(parseFloat(n[1]))?50:parseFloat(n[1]);return{x:r/100,y:i/100}},zse=function(e){return e!==e%kE?e+(e<0?kG:-kG):e},_G="Use MorphSVGPlugin.convertToPath() to convert to a path before morphing.",vke=function(e,n,r,i){var s=this._origin,a=this._eOrigin,o=e[r]-s.x,l=e[r+1]-s.y,c=x0(o*o+l*l),u=j6(l,o),f,h;return o=n[r]-a.x,l=n[r+1]-a.y,f=j6(l,o)-u,h=zse(f),!i&&qb&&Math.abs(h+qb.ca)<lke&&(i=qb),this._anchorPT=qb={_next:this._anchorPT,t:e,sa:u,ca:i&&h*i.ca<0&&Math.abs(h)>cke?f:h,sl:c,cl:x0(o*o+l*l)-c,i:r}},RG=function(e){Pl=Vse(),Yb=Yb||Pl&&Pl.plugins.morphSVG,Pl&&Yb?(Ij=Pl.utils.toArray,Bse=Pl.core.reverting||function(){},Yb.prototype._tweenRotation=vke,$se=1):e&&od("Please gsap.registerPlugin(MorphSVGPlugin)")},D1={version:"3.15.0",name:"morphSVG",rawVars:1,register:function(e,n){Pl=e,Yb=n,RG()},init:function(e,n,r,i,s){if($se||RG(1),!n)return od("invalid shape"),!1;ZP(n)&&(n=n.call(r,i,e,s));var a,o,l,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_,I;if(typeof n=="string"||n.getBBox||n[0])n={shape:n};else if(typeof n=="object"){a={};for(o in n)a[o]=ZP(n[o])&&o!=="render"?n[o].call(r,i,e,s):n[o];n=a}var j=e.nodeType?window.getComputedStyle(e):{},L=j.fill+"",H=!(L==="none"||(L.match(eA)||[])[3]==="0"||j.fillRule==="evenodd"),$=n.smooth,G=(n.origin||"50 50").split(",");if($===!0||$==="auto"?$={}:typeof $=="number"&&($={points:$}),a=(e.nodeName+"").toUpperCase(),u=a==="POLYLINE"||a==="POLYGON",a!=="PATH"&&!u&&!n.prop)return od("Cannot morph a <"+a+"> element. "+_G),!1;if(o=a==="PATH"?"d":"points",!n.prop&&!ZP(e.setAttribute))return!1;if(c=bke(n.shape||n.d||n.points||"",o==="d",e),u&&fke.test(c))return od("A <"+a+"> cannot accept path data. "+_G),!1;if(f=n.shapeIndex||n.shapeIndex===0?n.shapeIndex:"auto",h=n.map||D1.defaultMap,this._prop=n.prop,this._render=n.render||D1.defaultRender,this._apply="updateTarget"in n?n.updateTarget:D1.defaultUpdateTarget,this._rnd=Math.pow(10,isNaN(n.precision)?2:+n.precision),this._tween=r,c){if(this._target=e,M=typeof n.precompile=="object",p=this._original=this._prop?e[this._prop]:e.getAttribute(o),!this._prop&&!e.getAttributeNS(null,"data-original")&&e.setAttributeNS(null,"data-original",p),o==="d"||this._prop){if(p=Of(M?n.precompile[0]:p),v=Of(M?n.precompile[1]:c),$){for(w=p.length;--w;)Qse(p[w])&&p.splice(w,1);UP(p,R6({},$,{points:+$.points||Math.max(i_(p),i_(v)),maxSegments:v.length})),UP(v,$.redraw===!1?$:R6({},$,{points:p}))}if(!M&&!s_(p,v,f,h,H))return!1;for((n.precompile==="log"||n.precompile===!0)&&od('precompile:["'+Xp(p)+'","'+Xp(v)+'"]'),_=(n.type||D1.defaultType)!=="linear",I=n.curveMode||_,DG(p),DG(v),_&&(p.size||K2(p),v.size||K2(v),N=IG(G[0]),this._origin=p.origin={x:p.left+N.x*p.width,y:p.top+N.y*p.height},G[1]&&(N=IG(G[1])),this._eOrigin={x:v.left+N.x*v.width,y:v.top+N.y*v.height}),this._rawPath=e._gsRawPath=p,w=p.length;--w>-1;){for(C=p[w],E=v[w],m=C.cpData,y=E.cpData,O=C.length,qb=0,b=0;b<O;b+=6)(E[b]!==C[b]||E[b+1]!==C[b+1])&&(_?l=this._tweenRotation(C,E,b):(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1),l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l));for(b=0;b<O;b+=2)I&&(m[b]!==y[b]||m[b+1]!==y[b+1])&&m[b+1]&&y[b+1]?this._controlPT={_next:this._controlPT,i:b,j:w,ai:b%6>3?b+2:b-2,sa:m[b],ca:zse(y[b]-m[b]),sl:m[b+1],cl:y[b+1]-m[b+1]}:(E[b]!==C[b]&&(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1)),E[b+1]!==C[b+1]&&(l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l))}}else l=this.add(e,"setAttribute",e.getAttribute(o)+"",c+"",i,s,0,xke(f),o);_&&(this.add(this._origin,"x",this._origin.x,this._eOrigin.x,0,0,0,0,0,1),l=this.add(this._origin,"y",this._origin.y,this._eOrigin.y,0,0,0,0,0,1)),l&&(this._props.push("morphSVG"),l.end=$&&$.persist!==!1?Xp(v):c,l.endProp=o)}return 1},render:function(e,n){for(var r=n._rawPath,i=n._controlPT,s=n._anchorPT,a=n._rnd,o=n._target,l=n._pt,c,u,f,h,m,y,p,v,b;l;)l.r(e,l.d),l=l._next;if(e===1&&n._apply)for(l=n._pt;l;)l.end&&(n._prop?o[n._prop]=l.end:o.setAttribute(l.endProp,l.end)),l=l._next;else if(r){for(;s;)m=s.sa+e*s.ca,h=s.sl+e*s.cl,s.t[s.i]=n._origin.x+wG(m)*h,s.t[s.i+1]=n._origin.y+OG(m)*h,s=s._next;for(;i;)f=r[i.j],y=i.i,m=i.sa+e*i.ca,v=OG(m),b=wG(m),h=i.sl+e*i.cl,f[y]=f[i.ai]-b*h,f[y+1]=f[i.ai+1]-v*h,i=i._next;if(!e&&Bse()&&(r=Of(n._original)),o._gsRawPath=r,n._apply){for(c="",u=" ",p=0;p<r.length;p++){for(f=r[p],h=f.length,c+="M"+(f[0]*a|0)/a+u+(f[1]*a|0)/a+" C",y=2;y<h;y++)c+=(f[y]*a|0)/a+u;f.closed&&(c+="z")}n._prop?o[n._prop]=c:o.setAttribute("d",c)}}n._render&&r&&n._render.call(n._tween,r,o)},kill:function(e){this._pt=this._rawPath=0},getRawPath:tke,stringToRawPath:Of,rawPathToString:Xp,smoothRawPath:UP,normalizeStrings:function(e,n,r){var i=r.shapeIndex,s=r.map,a=[e,n];return MG(a,i,s),a},pathFilter:MG,pointsFilter:a_,getTotalSize:K2,equalizeSegmentQuantity:s_,convertToPath:function(e,n){return Ij(e).map(function(r){return jse(r,n!==!1)})},defaultType:"linear",defaultUpdateTarget:!0,defaultMap:"size"};Vse()&&Pl.registerPlugin(D1);const Wd=30;function os(t){if(!Number.isFinite(t)||t<0)return"00:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function tA(t,e=Wd){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function Rj(t,e=Wd){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function Ake(t,e,n=Wd){const r=tA(t,n),i=Math.max(0,r+e);return Rj(i,n)}function jG(t,e,n=Wd){const r=tA(t,n),i=tA(e,n);return`${r}f / ${i}f`}function Ske(){try{return!1}catch{return!1}}function wke(t){!Ske()||typeof window>"u"||(window.__playerStore=t)}function Zse(t){return Number.isFinite(t)&&t>0}function LG(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function $4(t){if(!t)return 0;try{const e=Number(t.getDuration());return Zse(e)?e:0}catch{return 0}}function Oke(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function kke(t,e,n,r=()=>1){var m;const i=Math.max(0,Number.isFinite(e)?e:0);let s=LG(Number(((m=t.getTime)==null?void 0:m.call(t))??0),i),a=!1,o=0,l=s,c=n.now();const u=y=>{var p;if(s=LG(y,i),typeof t.renderSeek=="function"){t.renderSeek(s);return}(p=t.seek)==null||p.call(t,s)},f=()=>{o&&(n.cancelAnimationFrame(o),o=0)},h=y=>{if(!a)return;const p=Math.max(.1,Number(r())||1),v=(y-c)/1e3*p;if(u(l+v),s>=i){a=!1,o=0;return}o=n.requestAnimationFrame(h)};return{play:()=>{a||i<=0||(s>=i&&u(0),a=!0,l=s,c=n.now(),f(),o=n.requestAnimationFrame(h))},pause:()=>{a=!1,f()},seek:(y,p)=>{if(u(y),p!=null&&p.keepPlaying){a&&(l=s,c=n.now());return}a=!1,f()},getTime:()=>s,getDuration:()=>i,isPlaying:()=>a}}function WO(t,e){var n;(n=t.current)==null||n.adapter.pause(),t.current=null,e.current=!1}function Cke(t){const{cache:e,warned:n,bestAdapter:r,effectiveDuration:i,docDuration:s}=t,a=e.current;if((a==null?void 0:a.player)===r&&a.duration===i)return a.adapter;a==null||a.adapter.pause(),n.current||(n.current=!0,console.warn(`[useTimelinePlayer] Selected adapter duration (${$4(r)}s) does not cover the document duration (${s}s); falling back to seek-driven playback, which never starts media elements or WebAudio. Audio will not play in preview — extend the GSAP timeline to cover the declared data-duration.`));const o=kke(r,i,t.clock,t.getPlaybackRate);return e.current={player:r,duration:i,adapter:o},o}function FG(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{const r=!(n!=null&&n.keepPlaying);r&&t.pause(),t.seek(e),r&&t.pause()},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function Gse(t,e,n,r,i){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const s=r??"index.html",o=Array.from(t.querySelectorAll(n)).filter(l=>(i(l)??"index.html")===s).indexOf(e);return o>=0?o:void 0}catch{return}}const qs="data-fx-chain",Use=qs.slice(5),b0=1,rb=(t="frequency",e="Frequency",n=1e3,r=20,i=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:r,max:i,step:1,default:n,scale:"log",automatable:!0}),XP=(t=.707,e="Bandwidth — higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),qO=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),$G={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},pS=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[qO(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[rb("frequency","Frequency",1e3),qO(-40,40,0),XP(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[rb("frequency","Frequency",200,20,2e3),qO(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[rb("frequency","Frequency",4e3,500,2e4),qO(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies — the usual fix for rumble on a voice.",params:[rb("frequency","Cutoff",300,20,2e4),XP(.707),$G],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies — darkens or muffles a track.",params:[rb("frequency","Cutoff",8e3,100,2e4),XP(.707),$G],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Hard ceiling — nothing gets past the limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times — a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],CE=new Map(pS.map(t=>[t.id,t]));function mS(t){return CE.get(t)}pS.map(t=>t.id);function Zf(t){const e=CE.get(t);if(!e)return{};const n={};for(const r of e.params)n[r.key]=r.default;return n}function qd(t,e){const n=CE.get(t);if(!n)return{};const r={};for(const i of n.params){const s=e==null?void 0:e[i.key];if(i.kind==="enum"){const o=i.options.some(l=>l.value===s);r[i.key]=o?s:i.default;continue}const a=typeof s=="number"?s:typeof s=="string"&&s.trim()!==""?Number(s):Number.NaN;r[i.key]=Number.isFinite(a)?Math.min(i.max,Math.max(i.min,a)):i.default}return r}class I1 extends Error{constructor(e){super(e),this.name="AudioFxChainError"}}function EE(t){let e;try{e=JSON.parse(t)}catch(i){throw new I1(`Chain file is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new I1("Chain file must be a JSON object.");const n=e;if(n.version!==b0)throw new I1(`Unsupported chain version: ${String(n.version)}`);if(!Array.isArray(n.nodes))throw new I1("Chain file is missing a `nodes` array.");const r=n.nodes.map(Tke);return{version:b0,nodes:r}}function Eke(t){return t.nodes.filter(e=>e.enabled!==!1)}function wu(t){return JSON.stringify({version:b0,nodes:t.nodes.map(Pke)})}function wy(t){const e=new Set(t.nodes.map(n=>n.id).filter(Boolean));for(let n=1;;n+=1){const r=`n${n}`;if(!e.has(r))return r}}function Tke(t,e){if(typeof t!="object"||t===null)throw new I1(`Node ${e} is not an object.`);const n=t;if(typeof n.type!="string"||!CE.has(n.type))throw new I1(`Node ${e} has unknown effect type: ${String(n.type)}`);return Wse({type:n.type,id:ld(n.id),fromCarve:L6(n.fromCarve),fromPreset:ld(n.fromPreset),label:ld(n.label),fromEq:ld(n.fromEq),fromLeveller:L6(n.fromLeveller),presetAmount:Xse(n.presetAmount),enabled:n.enabled!==!1,params:qd(n.type,n.params??void 0)})}function Pke(t){return Wse({type:t.type,id:ld(t.id),fromCarve:L6(t.fromCarve),fromPreset:ld(t.fromPreset),label:ld(t.label),fromEq:ld(t.fromEq),fromLeveller:L6(t.fromLeveller),presetAmount:t.presetAmount===1?void 0:Xse(t.presetAmount),enabled:t.enabled===!1?!1:void 0,params:qd(t.type,t.params)})}function ld(t){return typeof t=="string"&&t?t:void 0}function L6(t){return t===!0?!0:void 0}function Xse(t){if(!(typeof t!="number"||!Number.isFinite(t)))return Math.min(1,Math.max(0,t))}function Wse(t){for(const e of Object.keys(t))t[e]===void 0&&delete t[e];return t}const o_="data-hf-render-id",Mke="data-hf-group-render-id",jj=12,qse=10**(jj/20),vd=-100,_g=100,Yse=-60;function Lj(t){return Number.isFinite(t)?Math.max(0,Math.min(qse,t)):1}function Kse(t){return Lj(t).toFixed(6).replace(/\.?0+$/,"")}function l_(t){const e=Math.max(vd,Math.min(_g,t));return e===vd?0:10**((e<0?e/Math.abs(vd)*Math.abs(Yse):e/_g*jj)/20)}function Jse(t){const e=Lj(t);if(e===0)return vd;const n=20*Math.log10(e),r=n<0?n/Math.abs(Yse)*Math.abs(vd):n/jj*_g;return Math.max(vd,Math.min(_g,r))}function c_(t){const e=Lj(t);if(e===0)return"-∞ dB";const n=20*Math.log10(e),r=Math.abs(n)<.05?0:n;return(r>0?"+":"")+r.toFixed(1)+" dB"}const oo="data-automation",eae=oo.slice(5),TE=1,tae=512;class Cp extends Error{constructor(e){super(e),this.name="AudioAutomationError"}}const J2="volume";function Oy(t){if(t===J2)return{kind:"volume"};const e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===nae){const i=e[2];return i?{kind:"preset",presetId:i}:null}if(e.length!==3||e[0]!=="fx")return null;const[,n,r]=e;return!n||!r?null:{kind:"fx",nodeId:n,param:r}}function Dd(t,e){return`fx.${t}.${e}`}const nae="preset";function WP(t){return`fx.${nae}.${t}`}const Nke={min:0,max:1,step:.01,unit:"",label:"Amount",scale:"linear",default:1},rae={min:0,max:qse,step:.01,unit:"",label:"Volume",scale:"linear",default:1};function v0(t,e){const n=Oy(t);if(!n)return null;if(n.kind==="volume")return rae;if(n.kind==="preset")return(e==null?void 0:e.nodes.some(o=>o.fromPreset===n.presetId))?{...Nke,label:`${n.presetId} · Amount`}:null;const r=e==null?void 0:e.nodes.find(a=>a.id===n.nodeId);if(!r)return null;const i=mS(r.type),s=i==null?void 0:i.params.find(a=>a.key===n.param);return!s||s.kind!=="number"?null:{min:s.min,max:s.max,step:s.step,unit:s.unit,label:`${(i==null?void 0:i.label)??r.type} · ${s.label}`,scale:s.scale==="log"&&s.min>0?"log":"linear",default:s.default}}function nA(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){const e=Number(t);return Number.isFinite(e)?e:null}return null}function Dke(t){const e=nA(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function Fj(t,e){const n=nA(t),r=nA(e);if(n===null||r===null)return null;const i=o=>Math.min(.999,Math.max(.001,o)),s=i(n),a=i(r);return Math.abs(s-a)<1e-6?null:{x:s,y:a}}function Ike(t,e){const n=Fj(t,e);return n?{viaX:n.x,viaY:n.y}:null}function _ke(t){const e=Dke(t==null?void 0:t.curve),n=Fj(t==null?void 0:t.viaX,t==null?void 0:t.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function Rke(t,e){const n=nA(t==null?void 0:t.t),r=nA(t==null?void 0:t.v);if(n===null||r===null)return null;const i=e?Math.min(e.max,Math.max(e.min,r)):r;return{t:Math.max(0,n),v:i,..._ke(t)}}function iae(t,e){const n=t.map(i=>Rke(i,e)).filter(i=>i!==null).sort((i,s)=>i.t-s.t),r=[];for(const i of n)r.length>0&&r[r.length-1].t===i.t?r[r.length-1]=i:r.push(i);return r.slice(0,tae)}function jke(t){const e=[];for(const n of t.lanes){if(!Oy(n.target))continue;const r=n.target===J2?rae:null,i=iae(n.points??[],r);i.length>0&&e.push({target:n.target,points:i})}return{version:TE,lanes:e}}function sae(t,e){const n=[];for(const r of t.lanes){const i=v0(r.target,e);if(!i)continue;const s=iae(r.points,i);s.length>0&&n.push({target:r.target,points:s})}return{version:TE,lanes:n}}function aae(t){let e;try{e=JSON.parse(t)}catch(i){throw new Cp(`Automation is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new Cp("Automation must be a JSON object.");const n=e;if(n.version!==TE)throw new Cp(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new Cp("Automation is missing a `lanes` array.");const r=n.lanes.map((i,s)=>{if(typeof i!="object"||i===null)throw new Cp(`Lane ${s} is not an object.`);const a=i;if(typeof a.target!="string"||!Oy(a.target))throw new Cp(`Lane ${s} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new Cp(`Lane ${s} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return jke({lanes:r})}function oae(t){return JSON.stringify({version:TE,lanes:t.lanes.map(e=>({target:e.target,points:e.points.map(n=>({t:n.t,v:n.v,...n.curve?{curve:n.curve}:{},...n.viaX!==void 0&&n.viaY!==void 0?{viaX:n.viaX,viaY:n.viaY}:{}}))}))})}function Lke(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function Fke(t,e){const n=t-.5,r=e-.5,i=.999,s=1e6,a=n>0?n/(i-t):n<0?-n/(t-(1-i)):0,o=r>0?r/(i-e):r<0?-r/(e-(1-i)):0,l=Math.min(s,Math.max(1,a,o));return{cx:t+n/l,cy:e+r/l,w:l}}function $ke(t,e,n){const{cx:r,cy:i,w:s}=Fke(e,n),a=2-2*s,o=t*a-1+2*s*r,l=-t*a-2*s*r,c=Bke(o,l,t),u=1-c,f=u*u+2*s*c*u+c*c;return f>0?(2*s*i*c*u+c*c)/f:t}function Bke(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;const r=Math.sqrt(Math.max(0,e*e-4*t*n)),i=(-e+r)/(2*t),s=(-e-r)/(2*t),a=o=>o>=-1e-9&&o<=1+1e-9;return a(i)?Math.min(1,Math.max(0,i)):a(s)?Math.min(1,Math.max(0,s)):n}function Vke(t,e){const n=Fj(e.viaX,e.viaY);return n?$ke(Math.min(1,Math.max(0,t)),n.x,n.y):Lke(t,e.curve)}function Hke(t,e,n,r){return r==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function Gf(t,e,n="linear"){const r=t.points;if(r.length===0)return 0;const i=r[0];if(e<=i.t)return i.v;const s=r[r.length-1];if(e>=s.t)return s.v;let a=0,o=r.length-1;for(;o-a>1;){const f=a+o>>1;r[f].t<=e?a=f:o=f}const l=r[a],c=r[o],u=c.t-l.t;return u<=0?c.v:Hke(l.v,c.v,Vke((e-l.t)/u,l),n)}const xa="hf-audio-group",Wo="data-audio-group";function Qke(t){const e=t==null?void 0:t.getAttribute("data-volume"),n=e?parseFloat(e):1;return Number.isFinite(n)?n:1}function zke(t,e,n){const r=n==null?void 0:n.getAttribute(qs),i=n==null?void 0:n.getAttribute(oo);return{id:t,label:(n==null?void 0:n.getAttribute("data-label"))||t,memberIds:e,...r?{fxChain:r}:{},...i?{automation:i}:{},volume:Qke(n),hidden:(n==null?void 0:n.hasAttribute("data-hidden"))??!1}}function Zke(t,e){var i,s;const n=Array.from(((i=t==null?void 0:t.querySelectorAll)==null?void 0:i.call(t,`${xa}[${o_}]`))??[]).find(a=>a.getAttribute(o_)===e);if(n)return n;const r=(t==null?void 0:t.getElementById(e))??null;return r&&((s=r.tagName)==null?void 0:s.toLowerCase())===xa?r:null}function Yd(t){const e=new Map;for(const i of t.querySelectorAll(`audio[${Wo}]`)){const s=i.getAttribute(Mke)??i.getAttribute(Wo);if(!s||!i.id)continue;const a=e.get(s);a?a.push(i.id):e.set(s,[i.id])}const n=new Map;for(const i of t.querySelectorAll(xa)){const s=i.getAttribute(o_)??i.id;s&&n.set(s,i)}const r=[];for(const[i,s]of e)r.push(zke(i,s,n.get(i)));return r}function lae(t,e){const n=new Map(Yd(t).map(a=>[a.id,a])),r=new Set,i=[],s=a=>{r.has(a)||(r.add(a),i.push(a))};for(const a of e){const o=n.get(a);o?o.memberIds.forEach(s):t.getElementById(a)&&!Zke(t,a)&&s(a)}return i}const Uf="data-hf-reveal-prior-z",A0="data-hf-reveal-prior-pos";function $j(t){const e=t.getAttribute(Uf);if(e==null)return null;const n=Number.parseInt(e,10);return Number.isFinite(n)?n:null}function PE(t){var a,o;const e=$j(t);if(e!=null)return e;const n=t,r=l=>{if(l==null||l===""||l==="auto")return null;const c=Number.parseInt(l,10);return Number.isFinite(c)?c:null},i=r((a=n.style)==null?void 0:a.zIndex);if(i!=null)return i;const s=(o=t.ownerDocument)==null?void 0:o.defaultView;if(s!=null&&s.getComputedStyle){const l=r(s.getComputedStyle(n).zIndex);if(l!=null)return l}return 0}function cae(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return Zse(e)?e:0}function uae(t){return Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1}function ME(t){return t.tagName.toLowerCase()===xa?!0:!!t.closest(["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-hf-color-grading-canvas]"].join(","))}function Bj(t){if(!t)return 0;const e=t.querySelector("[data-composition-id]");let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){if(r===e||ME(r))continue;const i=Number.parseFloat(r.getAttribute("data-start")??""),s=cae(r);!Number.isFinite(i)||i<0||s<=0||(n=Math.max(n,i+s))}return n}function fae(t){if(!t)return 0;const e=cae(t.querySelector("[data-composition-id]"));return e>0?e:Bj(t)}function Vj(t){return t?Bj(new DOMParser().parseFromString(t,"text/html")):0}function u_(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function hae(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function Gke(t,e){const n=e.getAttribute("data-playback-start"),r=e.getAttribute("data-media-start"),i=n??r;if(i!=null){const a=parseFloat(i);Number.isFinite(a)&&(t.playbackStart=a)}n!=null?t.playbackStartAttr="playback-start":r!=null&&(t.playbackStartAttr="media-start");const s=Number.parseFloat(e.getAttribute("data-playback-rate")??"");Number.isFinite(s)&&s>0&&(t.playbackRate=uae(s))}function dae(t,e){Gke(t,e);const n=hae(e);if(!n)return;t.tag=n.tagName.toLowerCase();const r=n.getAttribute("src");r&&(t.src=r);const s=(n.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof s>"u"||!(n instanceof s))return;const a=e.getAttribute("data-source-duration")??n.getAttribute("data-source-duration"),o=a?parseFloat(a):n.duration;Number.isFinite(o)&&o>0&&(t.sourceDuration=o);const l=n.defaultPlaybackRate;t.playbackRate==null&&Number.isFinite(l)&&l>0&&(t.playbackRate=uae(l))}function gS(t){var i,s,a;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(s=t.id)==null?void 0:s.trim();if(n)return n;const r=(a=t.tag)==null?void 0:a.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const Uke=new Set(["base","link","meta","noscript","script","style","template"]);function BG(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function Xke(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return BG(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?BG(r):gS({tag:t.tagName})}function S0(t){if(u_(t)&&t.id)return`#${CSS.escape(t.id)}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${CSS.escape(e)}"]`;if(u_(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${CSS.escape(r)}`}}function w0(t){var n;const e=(n=t.parentElement)==null?void 0:n.closest("[data-composition-id]");return(e==null?void 0:e.getAttribute("data-composition-file"))??(e==null?void 0:e.getAttribute("data-composition-src"))??void 0}function rA(t,e,n){return Gse(t,e,n,w0(e),w0)}function iA(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function F6(t){const e=t.lastIndexOf("#");return e<0?{sourceFile:null,domId:t}:{sourceFile:t.slice(0,e),domId:t.slice(e+1)}}function sA(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||iA({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=iA({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function Zn(t){return t.key??t.id}function $6(t){return t.domId||null}function ig(t){if(!(!t.domId&&!t.selector))return iA({id:"",fallbackIndex:0,...t})}function Wke(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e&&!ME(n))}function qke(t,e){return Math.abs(t-e)<.001}const Yke=[["data-start",t=>t.start],["data-duration",t=>t.duration],["data-track-index",t=>t.track]];function Kke(t,e){var r;const n=(r=e.tagName)==null?void 0:r.toLowerCase();return n&&t.tagName.toLowerCase()!==n?!1:Yke.every(([i,s])=>{const a=Number.parseFloat(t.getAttribute(i)??"");return!Number.isFinite(a)||qke(a,s(e))})}function Jke(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${CSS.escape(e)}"]`)??t.querySelector(`.${CSS.escape(e)}`)??null}function eCe(t,e,n,r=new Set){const i=e.id?Jke(t,e.id):null;if(i&&!r.has(i))return i;const s=Wke(t).filter(o=>!r.has(o)),a=s.find(o=>Kke(o,e));return a||(s[n]??null)}function tCe(t,e){if(!u_(e)||ME(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return Uke.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!S0(e)}function nCe(t,e,n){return n?e&&t.has(e)?new Set(t):new Set:e?new Set([e]):new Set}function rCe(t,e){return!t||e===null?!1:t.elementKey===F6(e).domId}const pae="hf-studio-ui-preferences";function VG(t){return typeof t=="object"&&t!==null}function mae(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function gae(t){if(!t)return{};try{const e=t.getItem(pae);if(!e)return{};const n=JSON.parse(e);if(!VG(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.leftWidth=="number"&&Number.isFinite(n.leftWidth)&&(r.leftWidth=n.leftWidth),typeof n.rightWidth=="number"&&Number.isFinite(n.rightWidth)&&(r.rightWidth=n.rightWidth),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.timelineHeight=="number"&&Number.isFinite(n.timelineHeight)&&(r.timelineHeight=n.timelineHeight),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),typeof n.audioVolume=="number"&&Number.isFinite(n.audioVolume)&&n.audioVolume>=0&&n.audioVolume<=1&&(r.audioVolume=n.audioVolume),n.thumbnailMode==="adaptive"||n.thumbnailMode==="hidden"?r.thumbnailMode=n.thumbnailMode:typeof n.thumbnailsEnabled=="boolean"&&(r.thumbnailMode=n.thumbnailsEnabled?"adaptive":"hidden"),VG(n.previewZoom)){const{zoomPercent:i,panX:s,panY:a}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof s=="number"&&Number.isFinite(s)&&typeof a=="number"&&Number.isFinite(a)&&(r.previewZoom={zoomPercent:i,panX:s,panY:a})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),typeof n.snapEnabled=="boolean"&&(r.snapEnabled=n.snapEnabled),typeof n.gridVisible=="boolean"&&(r.gridVisible=n.gridVisible),typeof n.gridSpacing=="number"&&Number.isFinite(n.gridSpacing)&&(r.gridSpacing=n.gridSpacing),typeof n.snapToGrid=="boolean"&&(r.snapToGrid=n.snapToGrid),typeof n.timelineSnapEnabled=="boolean"&&(r.timelineSnapEnabled=n.timelineSnapEnabled),(n.timeDisplayMode==="time"||n.timeDisplayMode==="frame")&&(r.timeDisplayMode=n.timeDisplayMode),(n.timelineZoomMode==="fit"||n.timelineZoomMode==="manual")&&(r.timelineZoomMode=n.timelineZoomMode),typeof n.timelineManualZoomPercent=="number"&&Number.isFinite(n.timelineManualZoomPercent)&&(r.timelineManualZoomPercent=n.timelineManualZoomPercent),typeof n.agentToolsEnabled=="boolean"&&(r.agentToolsEnabled=n.agentToolsEnabled),r}catch{return{}}}function io(t=mae()){return gae(t)}function Ml(t,e=mae()){if(e)try{const n={...gae(e),...t};e.setItem(pae,JSON.stringify(n))}catch{}}const yae=10,iCe=48,sCe=.5,aCe=2,oCe=.014;function Hj(t){if(!Number.isFinite(t)||t<=0)return 100;const e=Wd*iCe;return Math.max(100,Math.round(e/t*100))}function U0(t,e){if(!Number.isFinite(t))return 100;const n=Hj(e);return Math.max(yae,Math.min(n,Math.round(t)))}function NE(t,e,n){return t==="fit"?100:U0(e,n)}function lCe(t,e){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?100:U0(t/e*100,e)}function cCe(t,e,n){if(!Number.isFinite(t)||t<=0)return 100;const r=NE(e,n,t);return e==="fit"?t:t*(r/100)}function HG(t,e,n,r){const i=NE(e,n,r),s=t==="in"?i*aCe:i*sCe;return U0(s,r)}function uCe(t,e,n,r){const i=NE(e,n,r);return!Number.isFinite(t)||t===0?i:U0(i*Math.exp(-t*oCe),r)}const B6=Math.log(yae);function fCe(t,e){const n=U0(t,e),r=Math.log(Hj(e));return(Math.log(n)-B6)/(r-B6)*100}function hCe(t,e){const n=Math.max(0,Math.min(100,t)),r=Math.log(Hj(e)),i=B6+n/100*(r-B6);return U0(Math.exp(i),e)}function f_(t,e){return t.projectId===e.timelineProjectId&&t.sessionEpoch===e.timelineSessionEpoch}function xae(t,e){return t.projectId===e.timelineProjectId&&t.sessionEpoch===e.timelineSessionEpoch&&t.elementId===e.selectedElementId}function dCe(t,e){return{selectedKeyframes:new Set,toggleSelectedKeyframe:n=>t(r=>{const i=new Set(r.selectedKeyframes);return i.has(n)?i.delete(n):i.add(n),{selectedKeyframes:i}}),clearSelectedKeyframes:()=>t({selectedKeyframes:new Set}),expandedClipIds:new Set,toggleClipExpanded:n=>t(r=>{const i=new Set(r.expandedClipIds);return i.has(n)?i.delete(n):i.add(n),{expandedClipIds:i}}),setClipExpanded:(n,r)=>t(i=>{if(i.expandedClipIds.has(n)===r)return i;const s=new Set(i.expandedClipIds);return r?s.add(n):s.delete(n),{expandedClipIds:s}}),expandClips:n=>t(r=>{if(n.every(s=>r.expandedClipIds.has(s)))return r;const i=new Set(r.expandedClipIds);for(const s of n)i.add(s);return{expandedClipIds:i}}),collapsedGroupIds:new Set,toggleGroupExpanded:n=>t(r=>{const i=new Set(r.collapsedGroupIds);return i.has(n)?i.delete(n):i.add(n),{collapsedGroupIds:i}}),expandedLaneOwnerIds:new Set,toggleLaneOwnerExpanded:n=>t(r=>{const i=new Set(r.expandedLaneOwnerIds);return i.has(n)?i.delete(n):i.add(n),{expandedLaneOwnerIds:i}}),focusedEaseSegment:null,focusedEaseRequestNonce:0,setFocusedEaseSegment:n=>t(r=>{const i=r.focusedEaseRequestNonce+1,{timelineProjectId:s,timelineSessionEpoch:a}=e();return{focusedEaseRequestNonce:i,focusedEaseSegment:{...n,projectId:s,sessionEpoch:a,nonce:i}}}),clearFocusedEaseSegment:n=>t(r=>{var i;return((i=r.focusedEaseSegment)==null?void 0:i.nonce)===n?{focusedEaseSegment:null}:r}),revealedAudioFxTarget:null,revealedAudioFxNonce:0,setRevealedAudioFxTarget:n=>t(r=>{const i=r.revealedAudioFxNonce+1,{timelineProjectId:s,timelineSessionEpoch:a}=e();return{revealedAudioFxNonce:i,revealedAudioFxTarget:{...n,projectId:s,sessionEpoch:a,nonce:i}}}),clearRevealedAudioFxTarget:n=>t(r=>{var i;return((i=r.revealedAudioFxTarget)==null?void 0:i.nonce)===n?{revealedAudioFxTarget:null}:r}),keyframeCache:new Map,setKeyframeCache:(n,r)=>t(i=>{if(r?i.keyframeCache.get(n)===r:!i.keyframeCache.has(n))return i;const s=new Map(i.keyframeCache);return r?s.set(n,r):s.delete(n),{keyframeCache:s}}),gsapAnimations:new Map,setGsapAnimations:(n,r)=>t(i=>{if(r?i.gsapAnimations.get(n)===r:!i.gsapAnimations.has(n))return i;const s=new Map(i.gsapAnimations);return r?s.set(n,r):s.delete(n),{gsapAnimations:s}})}}function pCe(t){return{automationSelection:null,setAutomationSelection:e=>t({automationSelection:{...e,t0:Math.min(e.t0,e.t1),t1:Math.max(e.t0,e.t1),v0:Math.min(e.v0,e.v1),v1:Math.max(e.v0,e.v1)}}),clearAutomationSelection:()=>t({automationSelection:null})}}function mCe(t){return{motionPathArmed:!1,setMotionPathArmed:e=>t({motionPathArmed:e}),motionPathCreateAvailable:!1,setMotionPathCreateAvailable:e=>t({motionPathCreateAvailable:e}),autoKeyframeEnabled:!0,setAutoKeyframeEnabled:e=>t({autoKeyframeEnabled:e})}}function gCe(t,e,n,r){return{id:t,projectId:e,sessionEpoch:n,nonce:r}}const bae="follow-preference";function yCe(t,e=bae){return t??(e==="legacy-default"?"hidden":"adaptive")}function xCe(t,e=bae){return e==="force-hidden"?"hidden":t}function bCe(t){return{thumbnailMode:yCe(io().thumbnailMode),thumbnailContentRevision:0,setThumbnailMode:e=>{Ml({thumbnailMode:e}),t({thumbnailMode:e})},bumpThumbnailContentRevision:()=>t(e=>({thumbnailContentRevision:e.thumbnailContentRevision+1}))}}const qP=new Set,ba={notify:t=>qP.forEach(e=>e(t)),subscribe:t=>(qP.add(t),()=>qP.delete(t))};function YP(t,e){const n=new Set(t);return n.size===0?{selectedElementIds:n,selectedElementId:null}:e&&n.has(e)?{selectedElementIds:n,selectedElementId:e}:{selectedElementIds:n,selectedElementId:n.values().next().value??null}}function h_(){return{isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,beatDragging:!1,elements:[],selectedElementId:null,zEditVersion:0,inPoint:null,outPoint:null,activeTool:"select",activeKeyframePct:null,motionPathArmed:!1,motionPathCreateAvailable:!1,selectedKeyframes:new Set,automationSelection:null,expandedClipIds:new Set,collapsedGroupIds:new Set,expandedLaneOwnerIds:new Set,focusedEaseSegment:null,revealedAudioFxTarget:null,selectedElementIds:new Set,requestedSeekTime:null,lintFindingsByElement:new Map,timelineFocus:null,keyframeCache:new Map,gsapAnimations:new Map,beatAnalysis:null,beatEdits:null,beatUndo:[],beatRedo:[],beatPersist:null,clipManifest:null,clipParentMap:new Map,domClipChildren:[],subCompositionHostState:new Map}}const ce=AE((t,e)=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,timelineSessionEpoch:0,timelineProjectId:null,beatDragging:!1,elements:[],selectedElementId:null,playbackRate:io().playbackRate??1,audioMuted:io().audioMuted??!1,audioVolume:io().audioVolume??1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,zEditVersion:0,timelinePps:100,timelineFitPps:100,inPoint:null,outPoint:null,activeTool:"select",setActiveTool:n=>t({activeTool:n}),...dCe(t,()=>({timelineProjectId:e().timelineProjectId,timelineSessionEpoch:e().timelineSessionEpoch})),...bCe(t),...pCe(t),...mCe(t),activeKeyframePct:null,setActiveKeyframePct:n=>t({activeKeyframePct:n}),selectedElementIds:new Set,setSelection:(n,r)=>t(YP(n,r)),addSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.add(n),YP(i,r.selectedElementId)}),toggleSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.has(n)?i.delete(n):i.add(n),YP(i,r.selectedElementId)}),clearSelection:()=>t({selectedElementId:null,selectedElementIds:new Set}),requestedSeekTime:null,requestSeek:n=>t({requestedSeekTime:n}),clearSeekRequest:()=>t({requestedSeekTime:null}),playbackRequest:null,requestPlayback:(n,r=null)=>t(i=>{var s;return{playbackRequest:{playing:n,returnTo:r,nonce:(((s=i.playbackRequest)==null?void 0:s.nonce)??0)+1}}}),clearPlaybackRequest:()=>t({playbackRequest:null}),clipRevealRequest:null,requestClipReveal:n=>t(r=>{var i;return{clipRevealRequest:{elementId:n,nonce:(((i=r.clipRevealRequest)==null?void 0:i.nonce)??0)+1}}}),clearClipRevealRequest:()=>t({clipRevealRequest:null}),timelineFocus:null,timelineFocusNonce:0,requestTimelineFocus:n=>t(r=>{const i=r.timelineFocusNonce+1;return{timelineFocusNonce:i,timelineFocus:gCe(n,r.timelineProjectId,r.timelineSessionEpoch,i)}}),clearTimelineFocus:n=>t(r=>{var i;return((i=r.timelineFocus)==null?void 0:i.nonce)===n?{timelineFocus:null}:r}),lintFindingsByElement:new Map,setLintFindingsByElement:n=>t({lintFindingsByElement:n}),beatAnalysis:null,setBeatAnalysis:n=>t({beatAnalysis:n}),beatEdits:null,setBeatEdits:n=>t({beatEdits:n}),beatUndo:[],beatRedo:[],beatPersist:null,setBeatPersist:n=>t({beatPersist:n}),commitBeatEdits:(n,r)=>{var i,s;t(a=>({beatEdits:n,beatUndo:[...a.beatUndo,{restore:a.beatEdits,at:Date.now(),label:r}],beatRedo:[]})),(s=(i=e()).beatPersist)==null||s.call(i)},undoBeatEdits:()=>{var i,s;const n=e(),r=n.beatUndo[n.beatUndo.length-1];return r?(t({beatEdits:r.restore,beatUndo:n.beatUndo.slice(0,-1),beatRedo:[...n.beatRedo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},resetBeatHistory:()=>t({beatUndo:[],beatRedo:[]}),redoBeatEdits:()=>{var i,s;const n=e(),r=n.beatRedo[n.beatRedo.length-1];return r?(t({beatEdits:r.restore,beatRedo:n.beatRedo.slice(0,-1),beatUndo:[...n.beatUndo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},clipManifest:null,setClipManifest:n=>t({clipManifest:n}),clipParentMap:new Map,setClipParentMap:n=>t({clipParentMap:n}),domClipChildren:[],setDomClipChildren:n=>t({domClipChildren:n}),subCompositionHostState:new Map,setSubCompositionHostState:n=>t({subCompositionHostState:n}),setIsPlaying:n=>{e().isPlaying!==n&&t({isPlaying:n})},setPlaybackRate:n=>{Ml({playbackRate:n}),t({playbackRate:n})},setAudioMuted:n=>{Ml({audioMuted:n}),t({audioMuted:n})},setAudioVolume:n=>{const r=Number.isFinite(n)?Math.max(0,Math.min(1,n)):1;Ml({audioVolume:r}),t({audioVolume:r})},setLoopEnabled:n=>t({loopEnabled:n}),setZoomMode:n=>t({zoomMode:n}),clearSelectedElementIds:()=>t({selectedElementIds:new Set}),setSelectedElementIds:n=>t({selectedElementIds:new Set(n)}),timelineSnapEnabled:io().timelineSnapEnabled??!0,setTimelineSnapEnabled:n=>{Ml({timelineSnapEnabled:n}),t({timelineSnapEnabled:n})},timeDisplayMode:io().timeDisplayMode??"time",setTimeDisplayMode:n=>{Ml({timeDisplayMode:n}),t({timeDisplayMode:n})},pinTimelineZoom:(n,r)=>t(i=>{if(i.zoomMode==="manual")return{};const s=lCe(n,r);return Ml({timelineZoomMode:"manual",timelineManualZoomPercent:s}),{zoomMode:"manual",manualZoomPercent:s}}),setTimelineScale:(n,r)=>{const i=e();i.timelinePps===n&&i.timelineFitPps===r||t({timelinePps:n,timelineFitPps:r})},setInPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{inPoint:i,outPoint:i!==null&&r.outPoint!==null&&i>=r.outPoint?null:r.outPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setOutPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{outPoint:i,inPoint:i!==null&&r.inPoint!==null&&i<=r.inPoint?null:r.inPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setManualZoomPercent:n=>t(r=>({manualZoomPercent:U0(n,r.timelineFitPps)})),bumpZEditVersion:()=>t(n=>({zEditVersion:n.zEditVersion+1})),setCurrentTime:n=>t({currentTime:Number.isFinite(n)?n:0}),setDuration:n=>t({duration:Number.isFinite(n)?n:0}),setTimelineReady:n=>t({timelineReady:n}),setBeatDragging:n=>t({beatDragging:n}),setElements:n=>t({elements:n}),setSelectedElementId:(n,r)=>t(i=>{const s=nCe(i.selectedElementIds,n,r==null?void 0:r.preserveSet),a=rCe(i.revealedAudioFxTarget,n);return n!==i.selectedElementId?{selectedElementId:n,selectedElementIds:s,activeKeyframePct:null,motionPathArmed:!1,focusedEaseSegment:null,...a?{}:{revealedAudioFxTarget:null}}:{selectedElementId:n,selectedElementIds:s}}),setSelectionAnchor:n=>t(r=>n!=null&&r.selectedElementIds.size>1&&r.selectedElementIds.has(n)?{selectedElementId:n,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}:{selectedElementId:n,selectedElementIds:n?new Set([n]):new Set,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}),updateElement:(n,r)=>t(i=>({elements:i.elements.map(s=>(s.key??s.id)===n?{...s,...r}:s)})),beginTimelineSession:n=>t(r=>r.timelineProjectId===n?r:{...h_(),timelineSessionEpoch:r.timelineSessionEpoch+1,timelineProjectId:n}),reset:()=>t(h_())}));wke(ce);const vae="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",Aae="https://us.i.posthog.com",vCe=3e4,ACe=5e3;let aA=[],ev=null;function SCe(){return hj()}function wCe(){return hS()}function OCe(){var t,e;return{studio_version:"0.8.30",agent_runtime:Tie(),screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"").split("?")[0]}}function Tt(t,e={}){wCe()&&(aA.push({event:`studio:${t}`,properties:{...OCe(),...Mie(),...e},timestamp:new Date().toISOString()}),ev||(ev=setInterval(kCe,vCe)))}function Sae(){const t=aA.map(e=>({event:e.event,properties:{...e.properties,$ip:null},distinct_id:SCe(),timestamp:e.timestamp}));return aA=[],t}async function kCe(){if(aA.length===0)return;const t=Sae(),e=new AbortController,n=setTimeout(()=>e.abort(),ACe);try{await fetch(`${Aae}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:vae,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}function wae(){if(ev&&(clearInterval(ev),ev=null),aA.length===0)return;const t=Sae(),e=JSON.stringify({api_key:vae,batch:t});try{navigator.sendBeacon(`${Aae}/batch/`,e)}catch{}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&wae()});function X0(t){const e=x.useRef(null),n=x.useCallback(r=>{var i;if(r instanceof KeyboardEvent){r.key==="Escape"&&t();return}(i=e.current)!=null&&i.contains(r.target)||t()},[t]);return x.useEffect(()=>(document.addEventListener("pointerdown",n,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("keydown",n),()=>{document.removeEventListener("pointerdown",n,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",n)}),[n]),e}const CCe=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Keyframes (when an element is selected)",hints:[{key:"K",label:"Add keyframe at playhead"},{key:"Del",label:"Delete selected keyframe"},{key:"H",label:"Toggle hold / bezier"},{key:"U",label:"Expand / collapse properties"},{key:"R",label:"Record gesture"}]},{title:"Editing",hints:[{key:"⌘Z",label:"Undo"},{key:"⌘⇧Z",label:"Redo"},{key:"⌘C",label:"Copy element"},{key:"⌘V",label:"Paste element"},{key:"⌘X",label:"Cut element"},{key:"S",label:"Split clip at playhead"},{key:"⇧Click",label:"Razor tool: split all tracks"},{key:"⌘G",label:"Group elements"},{key:"⌘⇧G",label:"Ungroup"},{key:"Del",label:"Delete selected element (no keyframe selected)"}]},{title:"Gesture recording modifiers",hints:[{key:"Drag",label:"Record x / y position"},{key:"Scroll",label:"Record z depth"},{key:"⇧ Drag",label:"Record rotationX / rotationY"},{key:"⌥ Drag",label:"Record rotation"},{key:"⌘ Drag↕",label:"Record opacity"},{key:"⌘ Scroll",label:"Record scale"}]},{title:"Canvas",hints:[{key:"Drag",label:"Move element / add keyframe"},{key:"⌥ Drag",label:"Move entire animation path"},{key:"⇧ Drag",label:"Uniform resize"}]},{title:"Crop",hints:[{key:"Drag edge",label:"Crop a side"},{key:"Drag center",label:"Reposition the crop"}]},{title:"Panels",hints:[{key:"⌘1",label:"Compositions tab"},{key:"⌘2",label:"Assets tab"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}],ECe=x.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,setInPoint:s,setOutPoint:a,onSeek:o}){const[l,c]=x.useState(!1),[u,f]=x.useState(""),h=x.useId(),m=x.useCallback(()=>c(!1),[]),y=X0(m),p=x.useRef(null),v=x.useRef(null);x.useEffect(()=>{var E;if(!l)return;const C=v.current;return(E=p.current)==null||E.focus(),()=>{C==null||C.focus()}},[l]);const b=x.useCallback(()=>{if(e)return;const C=Number.parseInt(u,10);!Number.isFinite(C)||n<=0||o(Math.min(n,Rj(Math.max(0,C))))},[e,n,u,o]),w=x.useCallback(C=>{C.preventDefault(),b()},[b]),O=x.useCallback(C=>{C.key==="Enter"&&(C.preventDefault(),b())},[b]);return d.jsxs("div",{ref:y,className:"relative flex-shrink-0",children:[d.jsx(Ar,{label:"Shortcuts and tools",children:d.jsx("button",{ref:v,type:"button",onClick:()=>c(C=>!C),className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors ${l?"text-neutral-200":"text-neutral-600 hover:text-neutral-300"}`,"aria-label":"Shortcuts and tools","aria-expanded":l,"aria-controls":h,children:d.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),d.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})})}),l&&d.jsxs("div",{id:h,ref:p,tabIndex:-1,role:"dialog","aria-label":"Keyboard shortcuts and tools",className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto outline-none",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[d.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[d.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),d.jsxs("form",{onSubmit:w,className:"flex items-center gap-1.5",children:[d.jsx("input",{value:u,onChange:C=>f(C.target.value),disabled:e,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:O,onBlur:b}),d.jsx(Ar,{label:"Jump to frame",children:d.jsx("button",{type:"submit",disabled:e,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})})]})]}),d.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),d.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[d.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),d.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),d.jsx("div",{className:"flex items-center gap-1.5",children:r!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:os(r)}),d.jsx(Ar,{label:"Clear in-point",children:d.jsx("button",{type:"button",onClick:()=>s(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:d.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:d.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):d.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),d.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),d.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),d.jsx("div",{className:"flex items-center gap-1.5",children:i!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:os(i)}),d.jsx(Ar,{label:"Clear out-point",children:d.jsx("button",{type:"button",onClick:()=>a(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:d.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:d.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):d.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),d.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),d.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:CCe.map(C=>d.jsxs("div",{children:[d.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:C.title}),d.jsx("div",{className:"flex flex-col gap-1",children:C.hints.map(E=>d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:E.key}),d.jsx("span",{className:"text-[10px] text-neutral-400",children:E.label})]},E.key))})]},C.title))})]})]})}),TCe=[.25,.5,1,1.5,2],PCe=x.memo(function({playbackRate:e,setPlaybackRate:n,disabled:r}){const[i,s]=x.useState(!1),a=x.useCallback(()=>s(!1),[]),o=X0(a);return d.jsxs("div",{ref:o,className:"relative flex-shrink-0",children:[d.jsx(Ar,{label:"Playback speed",children:d.jsx("button",{type:"button",onClick:()=>s(l=>!l),disabled:r,"aria-haspopup":"menu","aria-expanded":i,"aria-label":"Playback speed",className:"h-7 w-8 rounded-md font-mono text-[10px] tabular-nums text-neutral-500 transition-colors hover:text-neutral-200 disabled:opacity-30",children:e===1?"1x":`${e}x`})}),i&&d.jsx("div",{role:"menu","aria-label":"Playback speed options",className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:TCe.map(l=>{const c=l===e;return d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":c,onClick:()=>{Tt("playback",{action:"speed_change",rate:l}),n(l),s(!1)},className:`block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors outline-none focus-visible:bg-white/[0.04] ${c?"text-neutral-50 bg-white/[0.06]":"text-neutral-500 hover:bg-white/[0.04]"}`,children:[l,"x"]},l)})})]})});function MCe({muted:t,volume:e}){const n=t||e===0;return d.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),n?d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"m19 9-6 6"}),d.jsx("path",{d:"m13 9 6 6"})]}):d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),e>=.5?d.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"}):null]})]})}const NCe=x.memo(function({audioMuted:e,audioVolume:n,disabled:r,setAudioMuted:i,setAudioVolume:s}){const a=Math.round(n*100),o=e||n===0,l=o?"Unmute audio":"Mute audio";return d.jsxs("div",{className:"group flex flex-shrink-0 items-center",children:[d.jsx("div",{className:"w-0 overflow-hidden opacity-0 transition-[width,opacity] duration-150 ease-out group-hover:w-14 group-hover:opacity-100 group-focus-within:w-14 group-focus-within:opacity-100",children:d.jsxs("div",{className:"relative mx-1 flex h-6 w-12 items-center",children:[d.jsx("div",{className:"absolute inset-x-0 h-0.5 overflow-hidden rounded-full bg-neutral-700",children:d.jsx("div",{className:"h-full rounded-full bg-neutral-300",style:{width:`${a}%`}})}),d.jsx("input",{type:"range",min:"0",max:"100",step:"1",value:a,disabled:r,"aria-label":"Preview volume","aria-valuetext":`${a}%`,title:`Preview volume: ${a}%`,onChange:c=>{const u=Number(c.currentTarget.value)/100;s(u),e&&u>0&&i(!1)},className:"hf-preview-volume-range absolute inset-0 w-full disabled:pointer-events-none"})]})}),d.jsx(Ar,{label:l,children:d.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"mute_toggle",muted:!o}),o&&n===0&&s(1),i(!o)},disabled:r,"aria-label":l,"aria-pressed":o,className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors disabled:pointer-events-none disabled:opacity-30 ${o?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,children:d.jsx(MCe,{muted:e,volume:n})})})]})});Jv.registerPlugin(D1);const QG="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",zG="M56 28H67V71H56Z M73 28H84V71H73Z";function DCe({playing:t}){const e=x.useRef(null),n=x.useRef(!0);return x.useEffect(()=>{var o;const r=e.current;if(!r)return;const i=t?zG:QG,s=typeof window<"u"&&((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)").matches);if(n.current||s){n.current=!1,Jv.set(r,{morphSVG:i});return}const a=Jv.to(r,{duration:.28,ease:"power2.inOut",morphSVG:i});return()=>{a.kill()}},[t]),d.jsx("span",{className:"relative inline-flex h-3 w-3 items-center justify-center","aria-hidden":"true",children:d.jsx("svg",{width:"12",height:"12",viewBox:"46 21 54 56",fill:"#FAFAFA",children:d.jsx("path",{ref:e,d:t?zG:QG})})})}const ICe=x.memo(function({loopEnabled:e,disabled:n,setLoopEnabled:r}){return d.jsx(Ar,{label:"Loop playback",children:d.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"loop_toggle",enabled:!e}),r(!e)},disabled:n,className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors disabled:opacity-30 ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Disable loop playback":"Enable loop playback","aria-pressed":e,children:d.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M17 2l4 4-4 4"}),d.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),d.jsx("path",{d:"M7 22l-4-4 4-4"}),d.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})})})}),_Ce=x.memo(function({isFullscreen:e,onToggleFullscreen:n}){return d.jsx(Ar,{label:e?"Exit fullscreen (F)":"Enter fullscreen (F)",children:d.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"fullscreen_toggle",active:!e}),n()},className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Exit fullscreen":"Enter fullscreen",children:d.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),d.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),d.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),d.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),d.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),d.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),d.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})})})})}),RCe=x.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:s}){const a=ce(H=>H.isPlaying),o=ce(H=>H.duration),l=ce(H=>H.timelineReady),c=ce(H=>H.playbackRate),u=ce(H=>H.audioMuted),f=ce(H=>H.audioVolume),h=ce(H=>H.loopEnabled),m=ce.getState().setPlaybackRate,y=ce.getState().setAudioMuted,p=ce.getState().setAudioVolume,v=ce.getState().setLoopEnabled,b=ce(H=>H.inPoint),w=ce(H=>H.outPoint),O=ce.getState().setInPoint,C=ce.getState().setOutPoint,E=ce(H=>H.timeDisplayMode),M=ce.getState().setTimeDisplayMode,N=x.useRef(null),_=x.useRef(0),I=x.useRef(E);I.current=E;const j=x.useRef(o);j.current=o;const L=r||!l;return x.useEffect(()=>{if(!N.current)return;const H=_.current;N.current.textContent=E==="frame"?jG(H,o):os(H)},[o,E]),kr(()=>{const H=G=>{if(_.current=G,!N.current)return;const q=j.current;N.current.textContent=I.current==="frame"?jG(G,q):os(G)},$=ba.subscribe(H);return H(ce.getState().currentTime),$}),d.jsx("div",{children:d.jsxs("div",{className:"grid h-10 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center px-3","aria-disabled":r||void 0,style:{paddingBottom:"env(safe-area-inset-bottom)"},children:[d.jsx(Ar,{label:E==="time"?"Switch to frame display":"Switch to time display",children:d.jsxs("button",{type:"button",onClick:()=>M(E==="time"?"frame":"time"),disabled:r,className:"min-w-0 justify-self-start whitespace-nowrap font-mono text-[11px] tabular-nums text-neutral-400 transition-colors hover:text-neutral-200 disabled:pointer-events-none",children:[d.jsx("span",{ref:N,children:os(0)}),E==="time"?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-0.5 text-neutral-700",children:"/"}),d.jsx("span",{className:"text-neutral-600",children:os(o)})]}):null]})}),d.jsx(Ar,{label:a?"Pause":"Play",children:d.jsx("button",{type:"button","aria-label":a?"Pause":"Play",onClick:()=>{Tt("playback",{action:a?"pause":"play"}),e()},disabled:L,className:"flex h-8 w-8 items-center justify-center justify-self-center rounded-md text-neutral-100 transition-colors hover:text-white disabled:pointer-events-none disabled:opacity-30",children:d.jsx(DCe,{playing:a})})}),d.jsxs("div",{className:"flex min-w-0 items-center justify-self-end",children:[d.jsx(NCe,{audioMuted:u,audioVolume:f,disabled:L,setAudioMuted:y,setAudioVolume:p}),d.jsx(PCe,{playbackRate:c,setPlaybackRate:m,disabled:r}),d.jsx(ICe,{loopEnabled:h,disabled:r,setLoopEnabled:v}),s&&d.jsx(_Ce,{isFullscreen:i,onToggleFullscreen:s}),d.jsx(ECe,{disabled:r,duration:o,inPoint:b,outPoint:w,setInPoint:O,setOutPoint:C,onSeek:n})]})]})})}),jCe=new Set(["audio","music","sfx","sound","narration"]),LCe=/\.(aac|flac|m4a|mp3|ogg|opus|wav)(?:[?#].*)?$/i,FCe=/\b(music|bgm|soundtrack|background[-_]?music)\b/i;function oA(t){return t?t.tagName.toLowerCase()===xa?!0:nl({tag:t.tagName,src:t.getAttribute("src")??void 0}):!1}function nl(t){if(!t)return!1;const e=t.tag.trim().toLowerCase();return jCe.has(e)?!0:!!(t.src&&LCe.test(t.src))}function ky(t){if(!t||!nl(t))return!1;if(t.timelineRole==="music")return!0;if(t.timelineRole&&t.timelineRole!=="music")return!1;const e=t.domId??t.id??"";return FCe.test(e)}function $Ce(t){const e=t.find(ky);if(e)return{element:e,isFallback:!1};let n=null;for(const r of t)nl(r)&&(r.timelineRole&&r.timelineRole!=="music"||(!n||r.duration>n.duration)&&(n=r));return n?{element:n,isFallback:!0}:null}function Oae(t){return!t.some(e=>oA(e.element))}let YO=null;const ZG=()=>Sy(()=>import("./index-BLvqFdnB.js").then(t=>t.i),[]);function BCe(t=ZG){const e=t===ZG;if(e&&YO)return YO;const n=t().then(r=>(r.default??r)||null).catch(()=>(e&&(YO=null),null));return e&&(YO=n),n}const KP=1024,GG=512,VCe=.05;function kae(t,e,n){const r=Math.floor(e*VCe),i=Math.floor(n*e),s=Math.max(0,i-r),a=Math.min(t.length,i+r);let o=0;for(let l=s;l<a;l++){const c=t[l]??0;o+=c*c}return Math.sqrt(o/Math.max(a-s,1))}function Cae(t,e){return!t.channelData||t.peak<=0?.5:Math.min(1,kae(t.channelData,t.sampleRate,e)/t.peak)}async function HCe(t){const e=t.getChannelData(0),n=t.sampleRate,r=[];for(let a=0;a<e.length-KP;a+=GG){let o=0;for(let l=0;l<KP;l++){const c=e[a+l];o+=c*c}r.push(o/KP)}const i=[],s=20;for(let a=s;a<r.length-s;a++){let o=0;for(let u=a-s;u<a+s;u++)o+=r[u];o/=s*2;const l=o*1.5,c=r[a];if(c>l&&c>(r[a-1]??0)&&c>(r[a+1]??0)){const u=a*GG/n;(i.length===0||u-i[i.length-1]>.1)&&i.push(Math.round(u*1e3)/1e3)}}return i}function QCe(t){if(t.length<4)return null;const e=[];for(let s=1;s<t.length;s++)e.push(t[s]-t[s-1]);const n=[...e].sort((s,a)=>s-a),r=Math.floor(n.length/2),i=n.length%2===0?(n[r-1]+n[r])/2:n[r];return i<=0?null:Math.round(60/i*10)/10}function JP(t){let e=t;for(;e>120;)e/=2;for(;e<60;)e*=2;return e}function zCe(t,e){const n=[t/2,t,t*2];let r=t,i=Number.POSITIVE_INFINITY;for(const s of n){if(s<=0)continue;const a=Math.abs(s-e);a<i&&(i=a,r=s)}return r}function ZCe(t,e,n){if(t.length===0||e<=0||n<=0)return t;const r=60/e;if(r<.125)return t;const i=r*.25;let s=0,a=-1;for(const l of t.slice(0,10)){const c=(l%r+r)%r;let u=0;for(const f of t){const h=(f%r+r)%r;Math.min(Math.abs(h-c),r-Math.abs(h-c))<i&&u++}u>a&&(a=u,s=c)}const o=[];for(let l=s;l<=n+.001;l+=r)o.push(Math.round(l*1e3)/1e3);return o}function GCe(t,e,n){if(t.length===0)return{times:t,strengths:[],peak:1e-6};const r=t.map(l=>kae(e,n,l)),i=Math.max(...r,1e-6),s=i*.12,a=[],o=[];for(let l=0;l<t.length;l++)r[l]>=s&&(a.push(t[l]),o.push(Math.min(1,r[l]/i)));return{times:a,strengths:o,peak:i}}async function UCe(t){const e=t.getChannelData(0),n=t.sampleRate,r=t.duration,i=await HCe(t),s=QCe(i);let a=null;try{const h=await BCe();h&&(a=h(t))}catch{}let o=s,l="uncertain",c=null;if(s!==null&&a!==null){const h=Math.abs(JP(s)-JP(a))/JP(a);h<.05?(o=zCe(a,s),l="high",c=o):h<.1?(o=Math.round((s+a)/2),l="low",c=o):(o=s,l="uncertain")}else s!==null?(o=s,l="low",c=s):a!==null&&(o=a,l="low",c=a);const u=c!==null?ZCe(i,c,r):i,f=GCe(u,e,n);return{beatTimes:f.times,beatStrengths:f.strengths,bpm:o,bpmConfidence:l,channelData:e,sampleRate:n,peak:f.peak}}async function XCe(t){const e=new AudioContext;try{const r=await(await fetch(t)).arrayBuffer(),i=await e.decodeAudioData(r);return UCe(i)}finally{await e.close()}}function Eae(t){if(!t||/^(blob:|data:)/i.test(t))return null;let e=null;const n="/preview/",r=t.indexOf(n);if(r!==-1){let i=t.slice(r+n.length);const s=i.search(/[?#]/);s!==-1&&(i=i.slice(0,s)),i.startsWith("comp/")&&(i=i.slice(5)),e=i?decodeURIComponent(i):null}if(!e)try{e=decodeURIComponent(new URL(t,"http://_").pathname)}catch{e=t}return e?(e=e.replace(/^\/+/,""),e||null):null}function UG(t){const e=Eae(t);return e?`beats/${e}.json`:null}function WCe(t,e,n){const r=t.map((s,a)=>({time:Math.round(s*1e3)/1e3,strength:Math.round((e[a]??.5)*1e3)/1e3}));return`${JSON.stringify({version:1,audio:n,beats:r},null,2)}
70
+ */var W6e=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,q6e=/(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,Y6e=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,K6e=/(^[#\.][a-z]|[a-y][a-z])/i,J6e=Math.PI/180,GO=Math.sin,UO=Math.cos,vc=Math.abs,yf=Math.sqrt,XO=Math.atan2,bG=1e8,vG=function(e){return typeof e=="string"},Rse=function(e){return typeof e=="number"},AG=1e5,rs=function(e){return Math.round(e*AG)/AG||0},SG=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001},eke=function(e,n,r){var i=e.length,s=~~(r*i);if(e[s]>n){for(;--s&&e[s]>n;);s<0&&(s=0)}else for(;e[++s]<n&&s<i;);return s<i?s:i-1};function tke(t){t=vG(t)&&K6e.test(t)&&document.querySelector(t)||t;var e=t.getAttribute?t:0,n;return e&&(t=t.getAttribute("d"))?(e._gsPath||(e._gsPath={}),n=e._gsPath[t],n&&!n._dirty?n:e._gsPath[t]=Of(t)):t?vG(t)?Of(t):Rse(t[0])?[t]:t:console.warn("Expecting a <path> element or an SVG path data string")}function Wb(t){var e=0,n;for(t.reverse();e<t.length;e+=2)n=t[e],t[e]=t[e+1],t[e+1]=n;t.reversed=!t.reversed}var nke=function(e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=[].slice.call(e.attributes),s=i.length,a;for(n=","+n+",";--s>-1;)a=i[s].nodeName.toLowerCase(),n.indexOf(","+a+",")<0&&r.setAttributeNS(null,a,i[s].nodeValue);return r},rke={rect:"rx,ry,x,y,width,height",circle:"r,cx,cy",ellipse:"rx,ry,cx,cy",line:"x1,x2,y1,y2"},ike=function(e,n){for(var r=n?n.split(","):[],i={},s=r.length;--s>-1;)i[r[s]]=+e.getAttribute(r[s])||0;return i};function jse(t,e){var n=t.tagName.toLowerCase(),r=.552284749831,i,s,a,o,l,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_,I;return n==="path"||!t.getBBox?t:(c=nke(t,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),I=ike(t,rke[n]),n==="rect"?(o=I.rx,l=I.ry||o,s=I.x,a=I.y,m=I.width-o*2,y=I.height-l*2,o||l?(p=s+o*(1-r),v=s+o,b=v+m,w=b+o*r,O=b+o,C=a+l*(1-r),E=a+l,M=E+y,N=M+l*r,_=M+l,i="M"+O+","+E+" V"+M+" C"+[O,N,w,_,b,_,b-(b-v)/3,_,v+(b-v)/3,_,v,_,p,_,s,N,s,M,s,M-(M-E)/3,s,E+(M-E)/3,s,E,s,C,p,a,v,a,v+(b-v)/3,a,b-(b-v)/3,a,b,a,w,a,O,C,O,E].join(",")+"z"):i="M"+(s+m)+","+a+" v"+y+" h"+-m+" v"+-y+" h"+m+"z"):n==="circle"||n==="ellipse"?(n==="circle"?(o=l=I.r,f=o*r):(o=I.rx,l=I.ry,f=l*r),s=I.cx,a=I.cy,u=o*r,i="M"+(s+o)+","+a+" C"+[s+o,a+f,s+u,a+l,s,a+l,s-u,a+l,s-o,a+f,s-o,a,s-o,a-f,s-u,a-l,s,a-l,s+u,a-l,s+o,a-f,s+o,a].join(",")+"z"):n==="line"?i="M"+I.x1+","+I.y1+" L"+I.x2+","+I.y2:(n==="polyline"||n==="polygon")&&(h=(t.getAttribute("points")+"").match(q6e)||[],s=h.shift(),a=h.shift(),i="M"+s+","+a+" L"+h.join(","),n==="polygon"&&(i+=","+s+","+a+"z")),c.setAttribute("d",Xp(c._gsRawPath=Of(i))),e&&t.parentNode&&(t.parentNode.insertBefore(c,t),t.parentNode.removeChild(t)),c)}function Lse(t,e,n){e=e||0,t.samples||(t.samples=[],t.lookup=[]);var r=~~t.resolution||12,i=1/r,s=t.length,a=t[e],o=t[e+1],l=e?e/6*r:0,c=t.samples,u=t.lookup,f=(e?t.minLength:bG)||bG,h=c[l+n*r-1],m=e?c[l-1]:0,y,p,v,b,w,O,C,E,M,N,_,I,j,L,H,$,G;for(c.length=u.length=0,p=e+2;p<s;p+=6){if(v=t[p+4]-a,b=t[p+2]-a,w=t[p]-a,E=t[p+5]-o,M=t[p+3]-o,N=t[p+1]-o,O=C=_=I=0,vc(v)<.01&&vc(E)<.01&&vc(w)+vc(N)<.01)t.length>8&&(t.splice(p,6),p-=6,s-=6);else for(y=1;y<=r;y++)L=i*y,j=1-L,O=C-(C=(L*L*v+3*j*(L*b+j*w))*L),_=I-(I=(L*L*E+3*j*(L*M+j*N))*L),$=yf(_*_+O*O),$<f&&(f=$),m+=$,c[l++]=m;a+=v,o+=E}if(h)for(h-=m;l<c.length;l++)c[l]+=h;if(c.length&&f){if(t.totalLength=G=c[c.length-1]||0,t.minLength=f,G/f<9999)for($=H=0,y=0;y<G;y+=f)u[$++]=c[H]<y?++H:H}else t.totalLength=c[0]=0;return e?m-c[e/2-1]:m}function Fse(t,e){var n,r,i;for(i=n=r=0;i<t.length;i++)t[i].resolution=12,n+=Lse(t[i]),r+=t[i].length;return t.totalPoints=r,t.totalLength=n,t}function ske(t,e,n,r,i,s,a,o,l){if(!(t===o&&e===l)){n=vc(n),r=vc(r);var c=i%360*J6e,u=UO(c),f=GO(c),h=Math.PI,m=h*2,y=(t-o)/2,p=(e-l)/2,v=u*y+f*p,b=-f*y+u*p,w=v*v,O=b*b,C=w/(n*n)+O/(r*r);C>1&&(n=yf(C)*n,r=yf(C)*r);var E=n*n,M=r*r,N=(E*M-E*O-M*w)/(E*O+M*w);N<0&&(N=0);var _=(s===a?-1:1)*yf(N),I=_*(n*b/r),j=_*-(r*v/n),L=(t+o)/2,H=(e+l)/2,$=L+(u*I-f*j),G=H+(f*I+u*j),q=(v-I)/n,Y=(b-j)/r,J=(-v-I)/n,ie=(-b-j)/r,te=q*q+Y*Y,ne=(Y<0?-1:1)*Math.acos(q/yf(te)),W=(q*ie-Y*J<0?-1:1)*Math.acos((q*J+Y*ie)/yf(te*(J*J+ie*ie)));isNaN(W)&&(W=h),!a&&W>0?W-=m:a&&W<0&&(W+=m),ne%=m,W%=m;var F=Math.ceil(vc(W)/(m/4)),U=[],Q=W/F,K=4/3*GO(Q/2)/(1+UO(Q/2)),ee=u*n,se=f*n,z=f*-r,V=u*r,ae;for(ae=0;ae<F;ae++)i=ne+ae*Q,v=UO(i),b=GO(i),q=UO(i+=Q),Y=GO(i),U.push(v-K*b,b+K*v,q+K*Y,Y-K*q,q,Y);for(ae=0;ae<U.length;ae+=2)v=U[ae],b=U[ae+1],U[ae]=v*ee+b*z+$,U[ae+1]=v*se+b*V+G;return U[ae-2]=o,U[ae-1]=l,U}}function Of(t){var e=(t+"").replace(Y6e,function(I){var j=+I;return j<1e-4&&j>-1e-4?0:j}).match(W6e)||[],n=[],r=0,i=0,s=2/3,a=e.length,o=0,l="ERROR: malformed path: "+t,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_=function(j,L,H,$){w=(H-j)/3,O=($-L)/3,p.push(j+w,L+O,H-w,$-O,H,$)};if(!t||!isNaN(e[0])||isNaN(e[1]))return console.log(l),n;for(c=0;c<a;c++)if(E=m,isNaN(e[c])?(m=e[c].toUpperCase(),y=m!==e[c]):c--,f=+e[c+1],h=+e[c+2],y&&(f+=r,h+=i),c||(v=f,b=h),m==="M")p&&(p.length<8?n.length-=1:o+=p.length,SG(p)),r=v=f,i=b=h,p=[f,h],n.push(p),c+=2,m="L";else if(m==="C")p||(p=[0,0]),y||(r=i=0),p.push(f,h,r+e[c+3]*1,i+e[c+4]*1,r+=e[c+5]*1,i+=e[c+6]*1),c+=6;else if(m==="S")w=r,O=i,(E==="C"||E==="S")&&(w+=r-p[p.length-4],O+=i-p[p.length-3]),y||(r=i=0),p.push(w,O,f,h,r+=e[c+3]*1,i+=e[c+4]*1),c+=4;else if(m==="Q")w=r+(f-r)*s,O=i+(h-i)*s,y||(r=i=0),r+=e[c+3]*1,i+=e[c+4]*1,p.push(w,O,r+(f-r)*s,i+(h-i)*s,r,i),c+=4;else if(m==="T")w=r-p[p.length-4],O=i-p[p.length-3],p.push(r+w,i+O,f+(r+w*1.5-f)*s,h+(i+O*1.5-h)*s,r=f,i=h),c+=2;else if(m==="H")_(r,i,r=f,i),c+=1;else if(m==="V")_(r,i,r,i=f+(y?i-r:0)),c+=1;else if(m==="L"||m==="Z")m==="Z"&&(f=v,h=b,p.closed=!0),(m==="L"||vc(r-f)>.5||vc(i-h)>.5)&&(_(r,i,f,h),m==="L"&&(c+=2)),r=f,i=h;else if(m==="A"){if(M=e[c+4],N=e[c+5],w=e[c+6],O=e[c+7],u=7,M.length>1&&(M.length<3?(O=w,w=N,u--):(O=N,w=M.substr(2),u-=2),N=M.charAt(1),M=M.charAt(0)),C=ske(r,i,+e[c+1],+e[c+2],+e[c+3],+M,+N,(y?r:0)+w*1,(y?i:0)+O*1),c+=u,C)for(u=0;u<C.length;u++)p.push(C[u]);r=p[p.length-2],i=p[p.length-1]}else console.log(l);return c=p.length,c<6?(n.pop(),c=0):SG(p),n.totalPoints=o+c,n}function ake(t,e){t.samples||Lse(t);for(var n=t.samples,r=t.lookup,i=t.resolution,s=t.totalLength,a=t.slice(0,2),o=[],l=t.length-4,c=6,u=.2,f=0,h=0,m,y,p,v,b,w,O,C,E,M,N,_,I,j;c<l;c+=6)Math.abs(XO(t[c+1]-t[c-1],t[c]-t[c-2])-XO(t[c+3]-t[c+1],t[c+2]-t[c]))>u&&o.push(c);if(o.push(t.length-2),l=o.length,a.nonSmooth=_=[1],e>l)for(e-=l,b=0;b<l;b++){for(I=o[b],j=Math.round(I/6*i),E=n[j-1]-f,y=Math.round(n[j-1]/s*e)-h,h+=y,w=1/(y+1),O=1;O<=y;O++)M=f+E*O*w,c=r.length?r[M<s?~~(M/t.minLength):r.length-1]||0:eke(n,M,M/s),p=c?n[c-1]:0,v=n[c],v<M&&(p=v,v=n[++c]),m=1/i*((M-p)/(v-p)+c%i)||0,C=1-m,c=~~(c/i)*6,N=t[c],a.push(rs((m*m*(t[c+6]-N)+3*C*(m*(t[c+4]-N)+C*(t[c+2]-N)))*m+N),rs((m*m*(t[c+7]-(N=t[c+1]))+3*C*(m*(t[c+5]-N)+C*(t[c+3]-N)))*m+N));_[a.length]=1,a.push(t[I],t[I+1]),f+=E}return c=t.length-2,t.closed&&Math.abs(XO(t[c+1]-t[c-1],t[c]-t[c-2])-XO(t[3]-t[1],t[2]-t[0]))<=u&&(_[0]=_[_.length-1]=0),a}function oke(t,e){vc(t[0]-t[2])<1e-4&&vc(t[1]-t[3])<1e-4&&(t=t.slice(2));var n=t.length-2,r=+t[0],i=+t[1],s=+t[2],a=+t[3],o=[r,i,r,i],l=s-r,c=a-i,u=t.nonSmooth||[],f=Math.abs(t[n]-r)<.001&&Math.abs(t[n+1]-i)<.001,h,m,y,p,v,b,w,O,C,E,M,N,_,I,j;if(!n)return[r,i,r,i,r,i,r,i];for(f&&(t.push(s,a),s=r,a=i,r=t[n-2],i=t[n-1],t.unshift(r,i),n+=4,u=[0,0].concat(u)),e=e||e===0?+e:1,y=2;y<n;y+=2)if(h=r,m=i,r=s,i=a,s=+t[y+2],a=+t[y+3],!(r===s&&i===a)){if(p=l,v=c,l=s-r,c=a-i,u[y]){o.push(r-(r-h)/4,i-(i-m)/4,r,i,r+(s-r)/4,i+(a-i)/4);continue}b=yf(p*p+v*v),w=yf(l*l+c*c),O=yf(Math.pow(l/w+p/b,2)+Math.pow(c/w+v/b,2)),C=(b+w)*e*.25/O,E=r-(r-h)*(b?C/b:0),M=r+(s-r)*(w?C/w:0),N=r-(E+((M-E)*(b*3/(b+w)+.5)/4||0)),_=i-(i-m)*(b?C/b:0),I=i+(a-i)*(w?C/w:0),j=i-(_+((I-_)*(b*3/(b+w)+.5)/4||0)),o.push(rs(E+N),rs(_+j),rs(r),rs(i),rs(M+N),rs(I+j))}return r!==s||i!==a||o.length<4?o.push(rs(s),rs(a),rs(s),rs(a)):o.length-=2,o.length===2?o.push(r,i,r,i,r,i):f&&(o.splice(0,6),o.length-=6),o.closed=f,o}function Xp(t){Rse(t[0])&&(t=[t]);var e="",n=t.length,r,i,s,a;for(i=0;i<n;i++){for(a=t[i],e+="M"+rs(a[0])+","+rs(a[1])+" C",r=a.length,s=2;s<r;s++)e+=rs(a[s++])+","+rs(a[s++])+" "+rs(a[s++])+","+rs(a[s++])+" "+rs(a[s++])+","+rs(a[s])+" ";a.closed&&(e+="z")}return e}function R6(){return R6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},R6.apply(this,arguments)}var Pl,Ij,qb,$se,Yb,Bse,Vse=function(){return Pl||typeof window<"u"&&(Pl=window.gsap)&&Pl.registerPlugin&&Pl},ZP=function(e){return typeof e=="function"},j6=Math.atan2,wG=Math.cos,OG=Math.sin,x0=Math.sqrt,kE=Math.PI,kG=kE*2,lke=kE*.3,cke=kE*.7,_j=1e20,eA=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,uke=/(^[#.][a-z]|[a-y][a-z])/i,fke=/[achlmqstvz]/i,od=function(e){return console&&console.warn(e)},Kc=function(e){return Math.round(e*1e5)/1e5||0},CG=function(e){var n=e.length,r=0,i=0,s;for(s=0;s<n;s++)r+=e[s++],i+=e[s];return[r/(n/2),i/(n/2)]},rg=function(e){var n=e.length,r=e[0],i=r,s=e[1],a=s,o,l,c;for(c=6;c<n;c+=6)o=e[c],l=e[c+1],o>r?r=o:o<i&&(i=o),l>s?s=l:l<a&&(a=l);return e.centerX=(r+i)/2,e.centerY=(s+a)/2,e.size=(r-i)*(s-a)},K2=function(e,n){n===void 0&&(n=3);for(var r=e.length,i=e[0][0],s=i,a=e[0][1],o=a,l=1/n,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_;--r>-1;)for(m=e[r],c=m.length,h=6;h<c;h+=6)for(b=m[h],w=m[h+1],O=m[h+2]-b,M=m[h+3]-w,C=m[h+4]-b,N=m[h+5]-w,E=m[h+6]-b,_=m[h+7]-w,y=n;--y>-1;)p=l*y,v=1-p,u=(p*p*E+3*v*(p*C+v*O))*p+b,f=(p*p*_+3*v*(p*N+v*M))*p+w,u>i?i=u:u<s&&(s=u),f>a?a=f:f<o&&(o=f);return e.centerX=(i+s)/2,e.centerY=(a+o)/2,e.left=s,e.width=i-s,e.top=o,e.height=a-o,e.size=(i-s)*(a-o)},Hse=function(e,n){return n.length-e.length},EG=function(e,n){var r=e.size||rg(e),i=n.size||rg(n);return Math.abs(i-r)<(r+i)/20?n.centerX-e.centerX||n.centerY-e.centerY:i-r},TG=function(e,n){var r=e.slice(0),i=e.length,s=i-2,a,o;for(n=n|0,a=0;a<i;a++)o=(a+n)%s,e[a++]=r[o],e[a]=r[o+1]},GP=function(e,n,r,i,s){var a=e.length,o=0,l=a-2,c,u,f,h;for(r*=6,u=0;u<a;u+=6)c=(u+r)%l,h=e[c]-(n[u]-i),f=e[c+1]-(n[u+1]-s),o+=x0(f*f+h*h);return o},hke=function(e,n,r){var i=e.length,s=CG(e),a=CG(n),o=a[0]-s[0],l=a[1]-s[1],c=GP(e,n,0,o,l),u=0,f,h,m;for(m=6;m<i;m+=6)h=GP(e,n,m/6,o,l),h<c&&(c=h,u=m);if(r)for(f=e.slice(0),Wb(f),m=6;m<i;m+=6)h=GP(f,n,m/6,o,l),h<c&&(c=h,u=-m);return u/6},dke=function(e,n,r){for(var i=e.length,s=_j,a=0,o=0,l,c,u,f,h,m;--i>-1;)for(l=e[i],m=l.length,h=0;h<m;h+=6)c=l[h]-n,u=l[h+1]-r,f=x0(c*c+u*u),f<s&&(s=f,a=l[h],o=l[h+1]);return[a,o]},pke=function(e,n,r,i,s,a){var o=n.length,l=0,c=Math.min(e.size||rg(e),n[r].size||rg(n[r]))*i,u=_j,f=e.centerX+s,h=e.centerY+a,m,y,p,v,b;for(y=r;y<o&&(m=n[y].size||rg(n[y]),!(m<c));y++)p=n[y].centerX-f,v=n[y].centerY-h,b=x0(p*p+v*v),b<u&&(l=y,u=b);return b=n[l],n.splice(l,1),b},mke=function(e,n,r){r===void 0&&(r=1);for(var i=e[n],s=e[n+1],a=e[n+2],o=e[n+3],l=e[n+4],c=e[n+5],u=e[n+6],f=e[n+7],h,m,y,p,v,b,w,O,C;r-- >0;)h=1-1/(r+2),m=i+(a-i)*h,y=a+(l-a)*h,p=s+(o-s)*h,v=o+(c-o)*h,b=m+(y-m)*h,w=p+(v-p)*h,O=l+(u-l)*h,C=c+(f-c)*h,y+=(O-y)*h,v+=(C-v)*h,e.splice(n+2,4,a=Kc(m),o=Kc(p),l=Kc(b),c=Kc(w),u=Kc(b+(y-b)*h),f=Kc(w+(v-w)*h),Kc(y),Kc(v),Kc(O),Kc(C))},gke=function(e){for(var n=e.length,r=-_j,i;n--;)e[n]>r&&(r=e[n],i=n);return i},F4=function(e,n){for(var r=[],i=[],s=e.length-2,a=0;a<s;a+=6)r.push(Math.pow(e[a]-e[a+6],2)+Math.pow(e[a+1]-e[a+7],2));for(;n--;)a=gke(r),i[a]=s=(i[a]||0)+1,r[a]*=s/(s+1);for(a=r.length;a--;)i[a]&&mke(e,a*6,i[a])},i_=function(e,n){return n||Fse(e),Math.max(4,Math.round(e.totalLength/4))},PG=function(e){return e.slice(0).sort(Hse)},Qse=function(e){for(var n=e[0],r=e[1],i=2;i<e.length;i+=2)if(Math.abs(e[i]-n)>.01||Math.abs(e[i+1]-r)>.01)return!1;return!0},UP=function(e,n){n=n||{};var r=n,i=r.redraw,s=r.points,a=r.maxSegments,o=a===void 0?999:a,l=0,c=e,u=Array.isArray(s)?s:0,f,h,m,y,p;if(i=i!==!1,i)Fse(e);else for(e.totalPoints=0,h=e.length;h--;)e.totalPoints+=e[h].length;for(u?(c=PG(e),u=PG(u),p=u[0].totalLength/Math.round(u[0].length/6)):((!s||s==="auto")&&(s=i_(e,i),i||(s-=Math.round(e.totalPoints/6))),s=Math.max(i?10:4,Math.min(999,s))),h=0;h<c.length;h++){if(m=c[h],f=Math.max(i?10:4,u?Math.round(u[h]?u[h].length/6:c[h].totalLength/p||0):Math.round((l/s+(i?m.totalLength/e.totalLength:m.length/e.totalPoints))*s)-l),!(h>=o||u&&(!u[h]||Qse(u[h]))))if(i){var v;y=oke(ake(m,f),n.curviness),m.length=0,(v=m).push.apply(v,y)}else F4(m,f);l+=f}return e},s_=function(e,n,r,i,s){var a=n.length-e.length,o=a>0?n:e,l=a>0?e:n,c=0,u=i==="complexity"?Hse:EG,f=i==="position"?0:typeof i=="number"?i:.8,h=l.length,m=typeof r=="object"&&r.push?r.slice(0):[r],y=m[0]==="reverse"||m[0]<0,p=r==="log",v,b,w,O,C,E,M;if(l[0]){if(o.length>1&&(e.sort(u),n.sort(u),o.size||K2(o),l.size||K2(l),E=o.centerX-l.centerX,M=o.centerY-l.centerY,u===EG))for(h=0;h<l.length;h++)o.splice(h,0,pke(l[h],o,h,f,E,M));if(a)for(a<0&&(a=-a),o[0].length>l[0].length&&F4(l[0],(o[0].length-l[0].length)/6|0),h=l.length;c<a;)O=o[h].size||rg(o[h]),w=dke(l,o[h].centerX,o[h].centerY),O=w[0],C=w[1],l[h++]=[O,C,O,C,O,C,O,C],l.totalPoints+=8,c++;for(h=0;h<e.length;h++)v=n[h],b=e[h],a=v.length-b.length,a<0?F4(v,-a/6|0):a>0&&F4(b,a/6|0),y&&s!==!1&&!b.reversed&&Wb(b),r=m[h]||m[h]===0?m[h]:"auto",r&&(b.closed||Math.abs(b[0]-b[b.length-2])<.5&&Math.abs(b[1]-b[b.length-1])<.5?r==="auto"||r==="log"?(m[h]=r=hke(b,v,!h||s===!1),r<0&&(y=!0,Wb(b),r=-r),TG(b,r*6)):r!=="reverse"&&(h&&r<0&&Wb(b),TG(b,(r<0?-r:r)*6)):!y&&(r==="auto"&&Math.abs(v[0]-b[0])+Math.abs(v[1]-b[1])+Math.abs(v[v.length-2]-b[b.length-2])+Math.abs(v[v.length-1]-b[b.length-1])>Math.abs(v[0]-b[b.length-2])+Math.abs(v[1]-b[b.length-1])+Math.abs(v[v.length-2]-b[0])+Math.abs(v[v.length-1]-b[1])||r%2)?(Wb(b),m[h]=-1,y=!0):r==="auto"?m[h]=0:r==="reverse"&&(m[h]=-1),b.closed!==v.closed&&(b.closed=v.closed=!1));return p&&od("shapeIndex:["+m.join(",")+"]"),e.shapeIndex=m,m}},MG=function(e,n,r,i,s){var a=Of(e[0]),o=Of(e[1]);s_(a,o,n||n===0?n:"auto",r,s)&&(e[0]=Xp(a),e[1]=Xp(o),(i==="log"||i===!0)&&od('precompile:["'+e[0]+'","'+e[1]+'"]'))},yke=function(e,n){if(!n)return e;var r=e.match(eA)||[],i=r.length,s="",a,o,l;for(n==="reverse"?(o=i-1,a=-2):(o=((parseInt(n,10)||0)*2+1+i*100)%i,a=2),l=0;l<i;l+=2)s+=r[o-1]+","+r[o]+" ",o=(o+a)%i;return s},NG=function(e,n){var r=0,i=parseFloat(e[0]),s=parseFloat(e[1]),a=i+","+s+" ",o=.999999,l,c,u,f,h,m,y;for(u=e.length,l=n*.5/(u*.5-1),c=0;c<u-2;c+=2){if(r+=l,m=parseFloat(e[c+2]),y=parseFloat(e[c+3]),r>o)for(h=1/(Math.floor(r)+1),f=1;r>o;)a+=(i+(m-i)*h*f).toFixed(2)+","+(s+(y-s)*h*f).toFixed(2)+" ",r--,f++;a+=m+","+y+" ",i=m,s=y}return a},a_=function(e){var n=e[0].match(eA)||[],r=e[1].match(eA)||[],i=r.length-n.length;i>0?e[0]=NG(n,i):e[1]=NG(r,-i)},xke=function(e){return isNaN(e)?a_:function(n){a_(n),n[1]=yke(n[1],parseInt(e,10))}},bke=function(e,n,r){var i=typeof e=="string",s,a;return(!i||uke.test(e)||(e.match(eA)||[]).length<3)&&(s=Ij(e)[0],s?(a=(s.nodeName+"").toUpperCase(),n&&a!=="PATH"&&(s=jse(s,!1),a="PATH"),e=s.getAttribute(a==="PATH"?"d":"points")||"",s===r&&(e=s.getAttributeNS(null,"data-original")||e)):(od("WARNING: invalid morph to: "+e),e=!1)),e},DG=function(e){for(var n=e.length,r,i,s,a,o,l,c,u;--n>-1;)for(r=e[n],u=r.cpData=r.cpData||[],u.length=0,c=r.length-2,l=0;l<c;l+=6)i=r[l]-r[l+2],s=r[l+1]-r[l+3],a=r[l+6]-r[l+4],o=r[l+7]-r[l+5],u[l+2]=j6(s,i),u[l+3]=x0(i*i+s*s),u[l+4]=j6(o,a),u[l+5]=x0(a*a+o*o);return e},IG=function(e){var n=e.trim().split(" "),r=~e.indexOf("left")?0:~e.indexOf("right")?100:isNaN(parseFloat(n[0]))?50:parseFloat(n[0]),i=~e.indexOf("top")?0:~e.indexOf("bottom")?100:isNaN(parseFloat(n[1]))?50:parseFloat(n[1]);return{x:r/100,y:i/100}},zse=function(e){return e!==e%kE?e+(e<0?kG:-kG):e},_G="Use MorphSVGPlugin.convertToPath() to convert to a path before morphing.",vke=function(e,n,r,i){var s=this._origin,a=this._eOrigin,o=e[r]-s.x,l=e[r+1]-s.y,c=x0(o*o+l*l),u=j6(l,o),f,h;return o=n[r]-a.x,l=n[r+1]-a.y,f=j6(l,o)-u,h=zse(f),!i&&qb&&Math.abs(h+qb.ca)<lke&&(i=qb),this._anchorPT=qb={_next:this._anchorPT,t:e,sa:u,ca:i&&h*i.ca<0&&Math.abs(h)>cke?f:h,sl:c,cl:x0(o*o+l*l)-c,i:r}},RG=function(e){Pl=Vse(),Yb=Yb||Pl&&Pl.plugins.morphSVG,Pl&&Yb?(Ij=Pl.utils.toArray,Bse=Pl.core.reverting||function(){},Yb.prototype._tweenRotation=vke,$se=1):e&&od("Please gsap.registerPlugin(MorphSVGPlugin)")},D1={version:"3.15.0",name:"morphSVG",rawVars:1,register:function(e,n){Pl=e,Yb=n,RG()},init:function(e,n,r,i,s){if($se||RG(1),!n)return od("invalid shape"),!1;ZP(n)&&(n=n.call(r,i,e,s));var a,o,l,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_,I;if(typeof n=="string"||n.getBBox||n[0])n={shape:n};else if(typeof n=="object"){a={};for(o in n)a[o]=ZP(n[o])&&o!=="render"?n[o].call(r,i,e,s):n[o];n=a}var j=e.nodeType?window.getComputedStyle(e):{},L=j.fill+"",H=!(L==="none"||(L.match(eA)||[])[3]==="0"||j.fillRule==="evenodd"),$=n.smooth,G=(n.origin||"50 50").split(",");if($===!0||$==="auto"?$={}:typeof $=="number"&&($={points:$}),a=(e.nodeName+"").toUpperCase(),u=a==="POLYLINE"||a==="POLYGON",a!=="PATH"&&!u&&!n.prop)return od("Cannot morph a <"+a+"> element. "+_G),!1;if(o=a==="PATH"?"d":"points",!n.prop&&!ZP(e.setAttribute))return!1;if(c=bke(n.shape||n.d||n.points||"",o==="d",e),u&&fke.test(c))return od("A <"+a+"> cannot accept path data. "+_G),!1;if(f=n.shapeIndex||n.shapeIndex===0?n.shapeIndex:"auto",h=n.map||D1.defaultMap,this._prop=n.prop,this._render=n.render||D1.defaultRender,this._apply="updateTarget"in n?n.updateTarget:D1.defaultUpdateTarget,this._rnd=Math.pow(10,isNaN(n.precision)?2:+n.precision),this._tween=r,c){if(this._target=e,M=typeof n.precompile=="object",p=this._original=this._prop?e[this._prop]:e.getAttribute(o),!this._prop&&!e.getAttributeNS(null,"data-original")&&e.setAttributeNS(null,"data-original",p),o==="d"||this._prop){if(p=Of(M?n.precompile[0]:p),v=Of(M?n.precompile[1]:c),$){for(w=p.length;--w;)Qse(p[w])&&p.splice(w,1);UP(p,R6({},$,{points:+$.points||Math.max(i_(p),i_(v)),maxSegments:v.length})),UP(v,$.redraw===!1?$:R6({},$,{points:p}))}if(!M&&!s_(p,v,f,h,H))return!1;for((n.precompile==="log"||n.precompile===!0)&&od('precompile:["'+Xp(p)+'","'+Xp(v)+'"]'),_=(n.type||D1.defaultType)!=="linear",I=n.curveMode||_,DG(p),DG(v),_&&(p.size||K2(p),v.size||K2(v),N=IG(G[0]),this._origin=p.origin={x:p.left+N.x*p.width,y:p.top+N.y*p.height},G[1]&&(N=IG(G[1])),this._eOrigin={x:v.left+N.x*v.width,y:v.top+N.y*v.height}),this._rawPath=e._gsRawPath=p,w=p.length;--w>-1;){for(C=p[w],E=v[w],m=C.cpData,y=E.cpData,O=C.length,qb=0,b=0;b<O;b+=6)(E[b]!==C[b]||E[b+1]!==C[b+1])&&(_?l=this._tweenRotation(C,E,b):(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1),l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l));for(b=0;b<O;b+=2)I&&(m[b]!==y[b]||m[b+1]!==y[b+1])&&m[b+1]&&y[b+1]?this._controlPT={_next:this._controlPT,i:b,j:w,ai:b%6>3?b+2:b-2,sa:m[b],ca:zse(y[b]-m[b]),sl:m[b+1],cl:y[b+1]-m[b+1]}:(E[b]!==C[b]&&(l=this.add(C,b,C[b],E[b],0,0,0,0,0,1)),E[b+1]!==C[b+1]&&(l=this.add(C,b+1,C[b+1],E[b+1],0,0,0,0,0,1)||l))}}else l=this.add(e,"setAttribute",e.getAttribute(o)+"",c+"",i,s,0,xke(f),o);_&&(this.add(this._origin,"x",this._origin.x,this._eOrigin.x,0,0,0,0,0,1),l=this.add(this._origin,"y",this._origin.y,this._eOrigin.y,0,0,0,0,0,1)),l&&(this._props.push("morphSVG"),l.end=$&&$.persist!==!1?Xp(v):c,l.endProp=o)}return 1},render:function(e,n){for(var r=n._rawPath,i=n._controlPT,s=n._anchorPT,a=n._rnd,o=n._target,l=n._pt,c,u,f,h,m,y,p,v,b;l;)l.r(e,l.d),l=l._next;if(e===1&&n._apply)for(l=n._pt;l;)l.end&&(n._prop?o[n._prop]=l.end:o.setAttribute(l.endProp,l.end)),l=l._next;else if(r){for(;s;)m=s.sa+e*s.ca,h=s.sl+e*s.cl,s.t[s.i]=n._origin.x+wG(m)*h,s.t[s.i+1]=n._origin.y+OG(m)*h,s=s._next;for(;i;)f=r[i.j],y=i.i,m=i.sa+e*i.ca,v=OG(m),b=wG(m),h=i.sl+e*i.cl,f[y]=f[i.ai]-b*h,f[y+1]=f[i.ai+1]-v*h,i=i._next;if(!e&&Bse()&&(r=Of(n._original)),o._gsRawPath=r,n._apply){for(c="",u=" ",p=0;p<r.length;p++){for(f=r[p],h=f.length,c+="M"+(f[0]*a|0)/a+u+(f[1]*a|0)/a+" C",y=2;y<h;y++)c+=(f[y]*a|0)/a+u;f.closed&&(c+="z")}n._prop?o[n._prop]=c:o.setAttribute("d",c)}}n._render&&r&&n._render.call(n._tween,r,o)},kill:function(e){this._pt=this._rawPath=0},getRawPath:tke,stringToRawPath:Of,rawPathToString:Xp,smoothRawPath:UP,normalizeStrings:function(e,n,r){var i=r.shapeIndex,s=r.map,a=[e,n];return MG(a,i,s),a},pathFilter:MG,pointsFilter:a_,getTotalSize:K2,equalizeSegmentQuantity:s_,convertToPath:function(e,n){return Ij(e).map(function(r){return jse(r,n!==!1)})},defaultType:"linear",defaultUpdateTarget:!0,defaultMap:"size"};Vse()&&Pl.registerPlugin(D1);const Wd=30;function os(t){if(!Number.isFinite(t)||t<0)return"00:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function tA(t,e=Wd){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function Rj(t,e=Wd){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function Ake(t,e,n=Wd){const r=tA(t,n),i=Math.max(0,r+e);return Rj(i,n)}function jG(t,e,n=Wd){const r=tA(t,n),i=tA(e,n);return`${r}f / ${i}f`}function Ske(){try{return!1}catch{return!1}}function wke(t){!Ske()||typeof window>"u"||(window.__playerStore=t)}function Zse(t){return Number.isFinite(t)&&t>0}function LG(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function $4(t){if(!t)return 0;try{const e=Number(t.getDuration());return Zse(e)?e:0}catch{return 0}}function Oke(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function kke(t,e,n,r=()=>1){var m;const i=Math.max(0,Number.isFinite(e)?e:0);let s=LG(Number(((m=t.getTime)==null?void 0:m.call(t))??0),i),a=!1,o=0,l=s,c=n.now();const u=y=>{var p;if(s=LG(y,i),typeof t.renderSeek=="function"){t.renderSeek(s);return}(p=t.seek)==null||p.call(t,s)},f=()=>{o&&(n.cancelAnimationFrame(o),o=0)},h=y=>{if(!a)return;const p=Math.max(.1,Number(r())||1),v=(y-c)/1e3*p;if(u(l+v),s>=i){a=!1,o=0;return}o=n.requestAnimationFrame(h)};return{play:()=>{a||i<=0||(s>=i&&u(0),a=!0,l=s,c=n.now(),f(),o=n.requestAnimationFrame(h))},pause:()=>{a=!1,f()},seek:(y,p)=>{if(u(y),p!=null&&p.keepPlaying){a&&(l=s,c=n.now());return}a=!1,f()},getTime:()=>s,getDuration:()=>i,isPlaying:()=>a}}function WO(t,e){var n;(n=t.current)==null||n.adapter.pause(),t.current=null,e.current=!1}function Cke(t){const{cache:e,warned:n,bestAdapter:r,effectiveDuration:i,docDuration:s}=t,a=e.current;if((a==null?void 0:a.player)===r&&a.duration===i)return a.adapter;a==null||a.adapter.pause(),n.current||(n.current=!0,console.warn(`[useTimelinePlayer] Selected adapter duration (${$4(r)}s) does not cover the document duration (${s}s); falling back to seek-driven playback, which never starts media elements or WebAudio. Audio will not play in preview — extend the GSAP timeline to cover the declared data-duration.`));const o=kke(r,i,t.clock,t.getPlaybackRate);return e.current={player:r,duration:i,adapter:o},o}function FG(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{const r=!(n!=null&&n.keepPlaying);r&&t.pause(),t.seek(e),r&&t.pause()},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function Gse(t,e,n,r,i){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const s=r??"index.html",o=Array.from(t.querySelectorAll(n)).filter(l=>(i(l)??"index.html")===s).indexOf(e);return o>=0?o:void 0}catch{return}}const qs="data-fx-chain",Use=qs.slice(5),b0=1,rb=(t="frequency",e="Frequency",n=1e3,r=20,i=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:r,max:i,step:1,default:n,scale:"log",automatable:!0}),XP=(t=.707,e="Bandwidth — higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),qO=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),$G={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},pS=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[qO(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[rb("frequency","Frequency",1e3),qO(-40,40,0),XP(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[rb("frequency","Frequency",200,20,2e3),qO(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[rb("frequency","Frequency",4e3,500,2e4),qO(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies — the usual fix for rumble on a voice.",params:[rb("frequency","Cutoff",300,20,2e4),XP(.707),$G],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies — darkens or muffles a track.",params:[rb("frequency","Cutoff",8e3,100,2e4),XP(.707),$G],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Hard ceiling — nothing gets past the limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times — a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],CE=new Map(pS.map(t=>[t.id,t]));function mS(t){return CE.get(t)}pS.map(t=>t.id);function Zf(t){const e=CE.get(t);if(!e)return{};const n={};for(const r of e.params)n[r.key]=r.default;return n}function qd(t,e){const n=CE.get(t);if(!n)return{};const r={};for(const i of n.params){const s=e==null?void 0:e[i.key];if(i.kind==="enum"){const o=i.options.some(l=>l.value===s);r[i.key]=o?s:i.default;continue}const a=typeof s=="number"?s:typeof s=="string"&&s.trim()!==""?Number(s):Number.NaN;r[i.key]=Number.isFinite(a)?Math.min(i.max,Math.max(i.min,a)):i.default}return r}class I1 extends Error{constructor(e){super(e),this.name="AudioFxChainError"}}function EE(t){let e;try{e=JSON.parse(t)}catch(i){throw new I1(`Chain file is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new I1("Chain file must be a JSON object.");const n=e;if(n.version!==b0)throw new I1(`Unsupported chain version: ${String(n.version)}`);if(!Array.isArray(n.nodes))throw new I1("Chain file is missing a `nodes` array.");const r=n.nodes.map(Tke);return{version:b0,nodes:r}}function Eke(t){return t.nodes.filter(e=>e.enabled!==!1)}function wu(t){return JSON.stringify({version:b0,nodes:t.nodes.map(Pke)})}function wy(t){const e=new Set(t.nodes.map(n=>n.id).filter(Boolean));for(let n=1;;n+=1){const r=`n${n}`;if(!e.has(r))return r}}function Tke(t,e){if(typeof t!="object"||t===null)throw new I1(`Node ${e} is not an object.`);const n=t;if(typeof n.type!="string"||!CE.has(n.type))throw new I1(`Node ${e} has unknown effect type: ${String(n.type)}`);return Wse({type:n.type,id:ld(n.id),fromCarve:L6(n.fromCarve),fromPreset:ld(n.fromPreset),label:ld(n.label),fromEq:ld(n.fromEq),fromLeveller:L6(n.fromLeveller),presetAmount:Xse(n.presetAmount),enabled:n.enabled!==!1,params:qd(n.type,n.params??void 0)})}function Pke(t){return Wse({type:t.type,id:ld(t.id),fromCarve:L6(t.fromCarve),fromPreset:ld(t.fromPreset),label:ld(t.label),fromEq:ld(t.fromEq),fromLeveller:L6(t.fromLeveller),presetAmount:t.presetAmount===1?void 0:Xse(t.presetAmount),enabled:t.enabled===!1?!1:void 0,params:qd(t.type,t.params)})}function ld(t){return typeof t=="string"&&t?t:void 0}function L6(t){return t===!0?!0:void 0}function Xse(t){if(!(typeof t!="number"||!Number.isFinite(t)))return Math.min(1,Math.max(0,t))}function Wse(t){for(const e of Object.keys(t))t[e]===void 0&&delete t[e];return t}const o_="data-hf-render-id",Mke="data-hf-group-render-id",jj=12,qse=10**(jj/20),vd=-100,_g=100,Yse=-60;function Lj(t){return Number.isFinite(t)?Math.max(0,Math.min(qse,t)):1}function Kse(t){return Lj(t).toFixed(6).replace(/\.?0+$/,"")}function l_(t){const e=Math.max(vd,Math.min(_g,t));return e===vd?0:10**((e<0?e/Math.abs(vd)*Math.abs(Yse):e/_g*jj)/20)}function Jse(t){const e=Lj(t);if(e===0)return vd;const n=20*Math.log10(e),r=n<0?n/Math.abs(Yse)*Math.abs(vd):n/jj*_g;return Math.max(vd,Math.min(_g,r))}function c_(t){const e=Lj(t);if(e===0)return"-∞ dB";const n=20*Math.log10(e),r=Math.abs(n)<.05?0:n;return(r>0?"+":"")+r.toFixed(1)+" dB"}const oo="data-automation",eae=oo.slice(5),TE=1,tae=512;class Cp extends Error{constructor(e){super(e),this.name="AudioAutomationError"}}const J2="volume";function Oy(t){if(t===J2)return{kind:"volume"};const e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===nae){const i=e[2];return i?{kind:"preset",presetId:i}:null}if(e.length!==3||e[0]!=="fx")return null;const[,n,r]=e;return!n||!r?null:{kind:"fx",nodeId:n,param:r}}function Dd(t,e){return`fx.${t}.${e}`}const nae="preset";function WP(t){return`fx.${nae}.${t}`}const Nke={min:0,max:1,step:.01,unit:"",label:"Amount",scale:"linear",default:1},rae={min:0,max:qse,step:.01,unit:"",label:"Volume",scale:"linear",default:1};function v0(t,e){const n=Oy(t);if(!n)return null;if(n.kind==="volume")return rae;if(n.kind==="preset")return(e==null?void 0:e.nodes.some(o=>o.fromPreset===n.presetId))?{...Nke,label:`${n.presetId} · Amount`}:null;const r=e==null?void 0:e.nodes.find(a=>a.id===n.nodeId);if(!r)return null;const i=mS(r.type),s=i==null?void 0:i.params.find(a=>a.key===n.param);return!s||s.kind!=="number"?null:{min:s.min,max:s.max,step:s.step,unit:s.unit,label:`${(i==null?void 0:i.label)??r.type} · ${s.label}`,scale:s.scale==="log"&&s.min>0?"log":"linear",default:s.default}}function nA(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){const e=Number(t);return Number.isFinite(e)?e:null}return null}function Dke(t){const e=nA(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function Fj(t,e){const n=nA(t),r=nA(e);if(n===null||r===null)return null;const i=o=>Math.min(.999,Math.max(.001,o)),s=i(n),a=i(r);return Math.abs(s-a)<1e-6?null:{x:s,y:a}}function Ike(t,e){const n=Fj(t,e);return n?{viaX:n.x,viaY:n.y}:null}function _ke(t){const e=Dke(t==null?void 0:t.curve),n=Fj(t==null?void 0:t.viaX,t==null?void 0:t.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function Rke(t,e){const n=nA(t==null?void 0:t.t),r=nA(t==null?void 0:t.v);if(n===null||r===null)return null;const i=e?Math.min(e.max,Math.max(e.min,r)):r;return{t:Math.max(0,n),v:i,..._ke(t)}}function iae(t,e){const n=t.map(i=>Rke(i,e)).filter(i=>i!==null).sort((i,s)=>i.t-s.t),r=[];for(const i of n)r.length>0&&r[r.length-1].t===i.t?r[r.length-1]=i:r.push(i);return r.slice(0,tae)}function jke(t){const e=[];for(const n of t.lanes){if(!Oy(n.target))continue;const r=n.target===J2?rae:null,i=iae(n.points??[],r);i.length>0&&e.push({target:n.target,points:i})}return{version:TE,lanes:e}}function sae(t,e){const n=[];for(const r of t.lanes){const i=v0(r.target,e);if(!i)continue;const s=iae(r.points,i);s.length>0&&n.push({target:r.target,points:s})}return{version:TE,lanes:n}}function aae(t){let e;try{e=JSON.parse(t)}catch(i){throw new Cp(`Automation is not valid JSON: ${i.message}`)}if(typeof e!="object"||e===null)throw new Cp("Automation must be a JSON object.");const n=e;if(n.version!==TE)throw new Cp(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new Cp("Automation is missing a `lanes` array.");const r=n.lanes.map((i,s)=>{if(typeof i!="object"||i===null)throw new Cp(`Lane ${s} is not an object.`);const a=i;if(typeof a.target!="string"||!Oy(a.target))throw new Cp(`Lane ${s} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new Cp(`Lane ${s} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return jke({lanes:r})}function oae(t){return JSON.stringify({version:TE,lanes:t.lanes.map(e=>({target:e.target,points:e.points.map(n=>({t:n.t,v:n.v,...n.curve?{curve:n.curve}:{},...n.viaX!==void 0&&n.viaY!==void 0?{viaX:n.viaX,viaY:n.viaY}:{}}))}))})}function Lke(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function Fke(t,e){const n=t-.5,r=e-.5,i=.999,s=1e6,a=n>0?n/(i-t):n<0?-n/(t-(1-i)):0,o=r>0?r/(i-e):r<0?-r/(e-(1-i)):0,l=Math.min(s,Math.max(1,a,o));return{cx:t+n/l,cy:e+r/l,w:l}}function $ke(t,e,n){const{cx:r,cy:i,w:s}=Fke(e,n),a=2-2*s,o=t*a-1+2*s*r,l=-t*a-2*s*r,c=Bke(o,l,t),u=1-c,f=u*u+2*s*c*u+c*c;return f>0?(2*s*i*c*u+c*c)/f:t}function Bke(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;const r=Math.sqrt(Math.max(0,e*e-4*t*n)),i=(-e+r)/(2*t),s=(-e-r)/(2*t),a=o=>o>=-1e-9&&o<=1+1e-9;return a(i)?Math.min(1,Math.max(0,i)):a(s)?Math.min(1,Math.max(0,s)):n}function Vke(t,e){const n=Fj(e.viaX,e.viaY);return n?$ke(Math.min(1,Math.max(0,t)),n.x,n.y):Lke(t,e.curve)}function Hke(t,e,n,r){return r==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function Gf(t,e,n="linear"){const r=t.points;if(r.length===0)return 0;const i=r[0];if(e<=i.t)return i.v;const s=r[r.length-1];if(e>=s.t)return s.v;let a=0,o=r.length-1;for(;o-a>1;){const f=a+o>>1;r[f].t<=e?a=f:o=f}const l=r[a],c=r[o],u=c.t-l.t;return u<=0?c.v:Hke(l.v,c.v,Vke((e-l.t)/u,l),n)}const xa="hf-audio-group",Wo="data-audio-group";function Qke(t){const e=t==null?void 0:t.getAttribute("data-volume"),n=e?parseFloat(e):1;return Number.isFinite(n)?n:1}function zke(t,e,n){const r=n==null?void 0:n.getAttribute(qs),i=n==null?void 0:n.getAttribute(oo);return{id:t,label:(n==null?void 0:n.getAttribute("data-label"))||t,memberIds:e,...r?{fxChain:r}:{},...i?{automation:i}:{},volume:Qke(n),hidden:(n==null?void 0:n.hasAttribute("data-hidden"))??!1}}function Zke(t,e){var i,s;const n=Array.from(((i=t==null?void 0:t.querySelectorAll)==null?void 0:i.call(t,`${xa}[${o_}]`))??[]).find(a=>a.getAttribute(o_)===e);if(n)return n;const r=(t==null?void 0:t.getElementById(e))??null;return r&&((s=r.tagName)==null?void 0:s.toLowerCase())===xa?r:null}function Yd(t){const e=new Map;for(const i of t.querySelectorAll(`audio[${Wo}]`)){const s=i.getAttribute(Mke)??i.getAttribute(Wo);if(!s||!i.id)continue;const a=e.get(s);a?a.push(i.id):e.set(s,[i.id])}const n=new Map;for(const i of t.querySelectorAll(xa)){const s=i.getAttribute(o_)??i.id;s&&n.set(s,i)}const r=[];for(const[i,s]of e)r.push(zke(i,s,n.get(i)));return r}function lae(t,e){const n=new Map(Yd(t).map(a=>[a.id,a])),r=new Set,i=[],s=a=>{r.has(a)||(r.add(a),i.push(a))};for(const a of e){const o=n.get(a);o?o.memberIds.forEach(s):t.getElementById(a)&&!Zke(t,a)&&s(a)}return i}const Uf="data-hf-reveal-prior-z",A0="data-hf-reveal-prior-pos";function $j(t){const e=t.getAttribute(Uf);if(e==null)return null;const n=Number.parseInt(e,10);return Number.isFinite(n)?n:null}function PE(t){var a,o;const e=$j(t);if(e!=null)return e;const n=t,r=l=>{if(l==null||l===""||l==="auto")return null;const c=Number.parseInt(l,10);return Number.isFinite(c)?c:null},i=r((a=n.style)==null?void 0:a.zIndex);if(i!=null)return i;const s=(o=t.ownerDocument)==null?void 0:o.defaultView;if(s!=null&&s.getComputedStyle){const l=r(s.getComputedStyle(n).zIndex);if(l!=null)return l}return 0}function cae(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return Zse(e)?e:0}function uae(t){return Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1}function ME(t){return t.tagName.toLowerCase()===xa?!0:!!t.closest(["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-hf-color-grading-canvas]"].join(","))}function Bj(t){if(!t)return 0;const e=t.querySelector("[data-composition-id]");let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){if(r===e||ME(r))continue;const i=Number.parseFloat(r.getAttribute("data-start")??""),s=cae(r);!Number.isFinite(i)||i<0||s<=0||(n=Math.max(n,i+s))}return n}function fae(t){if(!t)return 0;const e=cae(t.querySelector("[data-composition-id]"));return e>0?e:Bj(t)}function Vj(t){return t?Bj(new DOMParser().parseFromString(t,"text/html")):0}function u_(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function hae(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function Gke(t,e){const n=e.getAttribute("data-playback-start"),r=e.getAttribute("data-media-start"),i=n??r;if(i!=null){const a=parseFloat(i);Number.isFinite(a)&&(t.playbackStart=a)}n!=null?t.playbackStartAttr="playback-start":r!=null&&(t.playbackStartAttr="media-start");const s=Number.parseFloat(e.getAttribute("data-playback-rate")??"");Number.isFinite(s)&&s>0&&(t.playbackRate=uae(s))}function dae(t,e){Gke(t,e);const n=hae(e);if(!n)return;t.tag=n.tagName.toLowerCase();const r=n.getAttribute("src");r&&(t.src=r);const s=(n.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof s>"u"||!(n instanceof s))return;const a=e.getAttribute("data-source-duration")??n.getAttribute("data-source-duration"),o=a?parseFloat(a):n.duration;Number.isFinite(o)&&o>0&&(t.sourceDuration=o);const l=n.defaultPlaybackRate;t.playbackRate==null&&Number.isFinite(l)&&l>0&&(t.playbackRate=uae(l))}function gS(t){var i,s,a;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(s=t.id)==null?void 0:s.trim();if(n)return n;const r=(a=t.tag)==null?void 0:a.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const Uke=new Set(["base","link","meta","noscript","script","style","template"]);function BG(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function Xke(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return BG(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?BG(r):gS({tag:t.tagName})}function S0(t){if(u_(t)&&t.id)return`#${CSS.escape(t.id)}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${CSS.escape(e)}"]`;if(u_(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${CSS.escape(r)}`}}function w0(t){var n;const e=(n=t.parentElement)==null?void 0:n.closest("[data-composition-id]");return(e==null?void 0:e.getAttribute("data-composition-file"))??(e==null?void 0:e.getAttribute("data-composition-src"))??void 0}function rA(t,e,n){return Gse(t,e,n,w0(e),w0)}function iA(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function F6(t){const e=t.lastIndexOf("#");return e<0?{sourceFile:null,domId:t}:{sourceFile:t.slice(0,e),domId:t.slice(e+1)}}function sA(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||iA({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=iA({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function Zn(t){return t.key??t.id}function $6(t){return t.domId||null}function ig(t){if(!(!t.domId&&!t.selector))return iA({id:"",fallbackIndex:0,...t})}function Wke(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e&&!ME(n))}function qke(t,e){return Math.abs(t-e)<.001}const Yke=[["data-start",t=>t.start],["data-duration",t=>t.duration],["data-track-index",t=>t.track]];function Kke(t,e){var r;const n=(r=e.tagName)==null?void 0:r.toLowerCase();return n&&t.tagName.toLowerCase()!==n?!1:Yke.every(([i,s])=>{const a=Number.parseFloat(t.getAttribute(i)??"");return!Number.isFinite(a)||qke(a,s(e))})}function Jke(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${CSS.escape(e)}"]`)??t.querySelector(`.${CSS.escape(e)}`)??null}function eCe(t,e,n,r=new Set){const i=e.id?Jke(t,e.id):null;if(i&&!r.has(i))return i;const s=Wke(t).filter(o=>!r.has(o)),a=s.find(o=>Kke(o,e));return a||(s[n]??null)}function tCe(t,e){if(!u_(e)||ME(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return Uke.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!S0(e)}function nCe(t,e,n){return n?e&&t.has(e)?new Set(t):new Set:e?new Set([e]):new Set}function rCe(t,e){return!t||e===null?!1:t.elementKey===F6(e).domId}const pae="hf-studio-ui-preferences";function VG(t){return typeof t=="object"&&t!==null}function mae(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function gae(t){if(!t)return{};try{const e=t.getItem(pae);if(!e)return{};const n=JSON.parse(e);if(!VG(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.leftWidth=="number"&&Number.isFinite(n.leftWidth)&&(r.leftWidth=n.leftWidth),typeof n.rightWidth=="number"&&Number.isFinite(n.rightWidth)&&(r.rightWidth=n.rightWidth),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.timelineHeight=="number"&&Number.isFinite(n.timelineHeight)&&(r.timelineHeight=n.timelineHeight),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),typeof n.audioVolume=="number"&&Number.isFinite(n.audioVolume)&&n.audioVolume>=0&&n.audioVolume<=1&&(r.audioVolume=n.audioVolume),n.thumbnailMode==="adaptive"||n.thumbnailMode==="hidden"?r.thumbnailMode=n.thumbnailMode:typeof n.thumbnailsEnabled=="boolean"&&(r.thumbnailMode=n.thumbnailsEnabled?"adaptive":"hidden"),VG(n.previewZoom)){const{zoomPercent:i,panX:s,panY:a}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof s=="number"&&Number.isFinite(s)&&typeof a=="number"&&Number.isFinite(a)&&(r.previewZoom={zoomPercent:i,panX:s,panY:a})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),typeof n.snapEnabled=="boolean"&&(r.snapEnabled=n.snapEnabled),typeof n.gridVisible=="boolean"&&(r.gridVisible=n.gridVisible),typeof n.gridSpacing=="number"&&Number.isFinite(n.gridSpacing)&&(r.gridSpacing=n.gridSpacing),typeof n.snapToGrid=="boolean"&&(r.snapToGrid=n.snapToGrid),typeof n.timelineSnapEnabled=="boolean"&&(r.timelineSnapEnabled=n.timelineSnapEnabled),(n.timeDisplayMode==="time"||n.timeDisplayMode==="frame")&&(r.timeDisplayMode=n.timeDisplayMode),(n.timelineZoomMode==="fit"||n.timelineZoomMode==="manual")&&(r.timelineZoomMode=n.timelineZoomMode),typeof n.timelineManualZoomPercent=="number"&&Number.isFinite(n.timelineManualZoomPercent)&&(r.timelineManualZoomPercent=n.timelineManualZoomPercent),typeof n.agentToolsEnabled=="boolean"&&(r.agentToolsEnabled=n.agentToolsEnabled),r}catch{return{}}}function io(t=mae()){return gae(t)}function Ml(t,e=mae()){if(e)try{const n={...gae(e),...t};e.setItem(pae,JSON.stringify(n))}catch{}}const yae=10,iCe=48,sCe=.5,aCe=2,oCe=.014;function Hj(t){if(!Number.isFinite(t)||t<=0)return 100;const e=Wd*iCe;return Math.max(100,Math.round(e/t*100))}function U0(t,e){if(!Number.isFinite(t))return 100;const n=Hj(e);return Math.max(yae,Math.min(n,Math.round(t)))}function NE(t,e,n){return t==="fit"?100:U0(e,n)}function lCe(t,e){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?100:U0(t/e*100,e)}function cCe(t,e,n){if(!Number.isFinite(t)||t<=0)return 100;const r=NE(e,n,t);return e==="fit"?t:t*(r/100)}function HG(t,e,n,r){const i=NE(e,n,r),s=t==="in"?i*aCe:i*sCe;return U0(s,r)}function uCe(t,e,n,r){const i=NE(e,n,r);return!Number.isFinite(t)||t===0?i:U0(i*Math.exp(-t*oCe),r)}const B6=Math.log(yae);function fCe(t,e){const n=U0(t,e),r=Math.log(Hj(e));return(Math.log(n)-B6)/(r-B6)*100}function hCe(t,e){const n=Math.max(0,Math.min(100,t)),r=Math.log(Hj(e)),i=B6+n/100*(r-B6);return U0(Math.exp(i),e)}function f_(t,e){return t.projectId===e.timelineProjectId&&t.sessionEpoch===e.timelineSessionEpoch}function xae(t,e){return t.projectId===e.timelineProjectId&&t.sessionEpoch===e.timelineSessionEpoch&&t.elementId===e.selectedElementId}function dCe(t,e){return{selectedKeyframes:new Set,toggleSelectedKeyframe:n=>t(r=>{const i=new Set(r.selectedKeyframes);return i.has(n)?i.delete(n):i.add(n),{selectedKeyframes:i}}),clearSelectedKeyframes:()=>t({selectedKeyframes:new Set}),expandedClipIds:new Set,toggleClipExpanded:n=>t(r=>{const i=new Set(r.expandedClipIds);return i.has(n)?i.delete(n):i.add(n),{expandedClipIds:i}}),setClipExpanded:(n,r)=>t(i=>{if(i.expandedClipIds.has(n)===r)return i;const s=new Set(i.expandedClipIds);return r?s.add(n):s.delete(n),{expandedClipIds:s}}),expandClips:n=>t(r=>{if(n.every(s=>r.expandedClipIds.has(s)))return r;const i=new Set(r.expandedClipIds);for(const s of n)i.add(s);return{expandedClipIds:i}}),collapsedGroupIds:new Set,toggleGroupExpanded:n=>t(r=>{const i=new Set(r.collapsedGroupIds);return i.has(n)?i.delete(n):i.add(n),{collapsedGroupIds:i}}),expandedLaneOwnerIds:new Set,toggleLaneOwnerExpanded:n=>t(r=>{const i=new Set(r.expandedLaneOwnerIds);return i.has(n)?i.delete(n):i.add(n),{expandedLaneOwnerIds:i}}),focusedEaseSegment:null,focusedEaseRequestNonce:0,setFocusedEaseSegment:n=>t(r=>{const i=r.focusedEaseRequestNonce+1,{timelineProjectId:s,timelineSessionEpoch:a}=e();return{focusedEaseRequestNonce:i,focusedEaseSegment:{...n,projectId:s,sessionEpoch:a,nonce:i}}}),clearFocusedEaseSegment:n=>t(r=>{var i;return((i=r.focusedEaseSegment)==null?void 0:i.nonce)===n?{focusedEaseSegment:null}:r}),revealedAudioFxTarget:null,revealedAudioFxNonce:0,setRevealedAudioFxTarget:n=>t(r=>{const i=r.revealedAudioFxNonce+1,{timelineProjectId:s,timelineSessionEpoch:a}=e();return{revealedAudioFxNonce:i,revealedAudioFxTarget:{...n,projectId:s,sessionEpoch:a,nonce:i}}}),clearRevealedAudioFxTarget:n=>t(r=>{var i;return((i=r.revealedAudioFxTarget)==null?void 0:i.nonce)===n?{revealedAudioFxTarget:null}:r}),keyframeCache:new Map,setKeyframeCache:(n,r)=>t(i=>{if(r?i.keyframeCache.get(n)===r:!i.keyframeCache.has(n))return i;const s=new Map(i.keyframeCache);return r?s.set(n,r):s.delete(n),{keyframeCache:s}}),gsapAnimations:new Map,setGsapAnimations:(n,r)=>t(i=>{if(r?i.gsapAnimations.get(n)===r:!i.gsapAnimations.has(n))return i;const s=new Map(i.gsapAnimations);return r?s.set(n,r):s.delete(n),{gsapAnimations:s}})}}function pCe(t){return{automationSelection:null,setAutomationSelection:e=>t({automationSelection:{...e,t0:Math.min(e.t0,e.t1),t1:Math.max(e.t0,e.t1),v0:Math.min(e.v0,e.v1),v1:Math.max(e.v0,e.v1)}}),clearAutomationSelection:()=>t({automationSelection:null})}}function mCe(t){return{motionPathArmed:!1,setMotionPathArmed:e=>t({motionPathArmed:e}),motionPathCreateAvailable:!1,setMotionPathCreateAvailable:e=>t({motionPathCreateAvailable:e}),autoKeyframeEnabled:!0,setAutoKeyframeEnabled:e=>t({autoKeyframeEnabled:e})}}function gCe(t,e,n,r){return{id:t,projectId:e,sessionEpoch:n,nonce:r}}const bae="follow-preference";function yCe(t,e=bae){return t??(e==="legacy-default"?"hidden":"adaptive")}function xCe(t,e=bae){return e==="force-hidden"?"hidden":t}function bCe(t){return{thumbnailMode:yCe(io().thumbnailMode),thumbnailContentRevision:0,setThumbnailMode:e=>{Ml({thumbnailMode:e}),t({thumbnailMode:e})},bumpThumbnailContentRevision:()=>t(e=>({thumbnailContentRevision:e.thumbnailContentRevision+1}))}}const qP=new Set,ba={notify:t=>qP.forEach(e=>e(t)),subscribe:t=>(qP.add(t),()=>qP.delete(t))};function YP(t,e){const n=new Set(t);return n.size===0?{selectedElementIds:n,selectedElementId:null}:e&&n.has(e)?{selectedElementIds:n,selectedElementId:e}:{selectedElementIds:n,selectedElementId:n.values().next().value??null}}function h_(){return{isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,beatDragging:!1,elements:[],selectedElementId:null,zEditVersion:0,inPoint:null,outPoint:null,activeTool:"select",activeKeyframePct:null,motionPathArmed:!1,motionPathCreateAvailable:!1,selectedKeyframes:new Set,automationSelection:null,expandedClipIds:new Set,collapsedGroupIds:new Set,expandedLaneOwnerIds:new Set,focusedEaseSegment:null,revealedAudioFxTarget:null,selectedElementIds:new Set,requestedSeekTime:null,lintFindingsByElement:new Map,timelineFocus:null,keyframeCache:new Map,gsapAnimations:new Map,beatAnalysis:null,beatEdits:null,beatUndo:[],beatRedo:[],beatPersist:null,clipManifest:null,clipParentMap:new Map,domClipChildren:[],subCompositionHostState:new Map}}const ce=AE((t,e)=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,timelineSessionEpoch:0,timelineProjectId:null,beatDragging:!1,elements:[],selectedElementId:null,playbackRate:io().playbackRate??1,audioMuted:io().audioMuted??!1,audioVolume:io().audioVolume??1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,zEditVersion:0,timelinePps:100,timelineFitPps:100,inPoint:null,outPoint:null,activeTool:"select",setActiveTool:n=>t({activeTool:n}),...dCe(t,()=>({timelineProjectId:e().timelineProjectId,timelineSessionEpoch:e().timelineSessionEpoch})),...bCe(t),...pCe(t),...mCe(t),activeKeyframePct:null,setActiveKeyframePct:n=>t({activeKeyframePct:n}),selectedElementIds:new Set,setSelection:(n,r)=>t(YP(n,r)),addSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.add(n),YP(i,r.selectedElementId)}),toggleSelectedElementId:n=>t(r=>{const i=new Set(r.selectedElementIds);return i.has(n)?i.delete(n):i.add(n),YP(i,r.selectedElementId)}),clearSelection:()=>t({selectedElementId:null,selectedElementIds:new Set}),requestedSeekTime:null,requestSeek:n=>t({requestedSeekTime:n}),clearSeekRequest:()=>t({requestedSeekTime:null}),playbackRequest:null,requestPlayback:(n,r=null)=>t(i=>{var s;return{playbackRequest:{playing:n,returnTo:r,nonce:(((s=i.playbackRequest)==null?void 0:s.nonce)??0)+1}}}),clearPlaybackRequest:()=>t({playbackRequest:null}),clipRevealRequest:null,requestClipReveal:n=>t(r=>{var i;return{clipRevealRequest:{elementId:n,nonce:(((i=r.clipRevealRequest)==null?void 0:i.nonce)??0)+1}}}),clearClipRevealRequest:()=>t({clipRevealRequest:null}),timelineFocus:null,timelineFocusNonce:0,requestTimelineFocus:n=>t(r=>{const i=r.timelineFocusNonce+1;return{timelineFocusNonce:i,timelineFocus:gCe(n,r.timelineProjectId,r.timelineSessionEpoch,i)}}),clearTimelineFocus:n=>t(r=>{var i;return((i=r.timelineFocus)==null?void 0:i.nonce)===n?{timelineFocus:null}:r}),lintFindingsByElement:new Map,setLintFindingsByElement:n=>t({lintFindingsByElement:n}),beatAnalysis:null,setBeatAnalysis:n=>t({beatAnalysis:n}),beatEdits:null,setBeatEdits:n=>t({beatEdits:n}),beatUndo:[],beatRedo:[],beatPersist:null,setBeatPersist:n=>t({beatPersist:n}),commitBeatEdits:(n,r)=>{var i,s;t(a=>({beatEdits:n,beatUndo:[...a.beatUndo,{restore:a.beatEdits,at:Date.now(),label:r}],beatRedo:[]})),(s=(i=e()).beatPersist)==null||s.call(i)},undoBeatEdits:()=>{var i,s;const n=e(),r=n.beatUndo[n.beatUndo.length-1];return r?(t({beatEdits:r.restore,beatUndo:n.beatUndo.slice(0,-1),beatRedo:[...n.beatRedo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},resetBeatHistory:()=>t({beatUndo:[],beatRedo:[]}),redoBeatEdits:()=>{var i,s;const n=e(),r=n.beatRedo[n.beatRedo.length-1];return r?(t({beatEdits:r.restore,beatRedo:n.beatRedo.slice(0,-1),beatUndo:[...n.beatUndo,{restore:n.beatEdits,at:r.at,label:r.label}]}),(s=(i=e()).beatPersist)==null||s.call(i),r.label):null},clipManifest:null,setClipManifest:n=>t({clipManifest:n}),clipParentMap:new Map,setClipParentMap:n=>t({clipParentMap:n}),domClipChildren:[],setDomClipChildren:n=>t({domClipChildren:n}),subCompositionHostState:new Map,setSubCompositionHostState:n=>t({subCompositionHostState:n}),setIsPlaying:n=>{e().isPlaying!==n&&t({isPlaying:n})},setPlaybackRate:n=>{Ml({playbackRate:n}),t({playbackRate:n})},setAudioMuted:n=>{Ml({audioMuted:n}),t({audioMuted:n})},setAudioVolume:n=>{const r=Number.isFinite(n)?Math.max(0,Math.min(1,n)):1;Ml({audioVolume:r}),t({audioVolume:r})},setLoopEnabled:n=>t({loopEnabled:n}),setZoomMode:n=>t({zoomMode:n}),clearSelectedElementIds:()=>t({selectedElementIds:new Set}),setSelectedElementIds:n=>t({selectedElementIds:new Set(n)}),timelineSnapEnabled:io().timelineSnapEnabled??!0,setTimelineSnapEnabled:n=>{Ml({timelineSnapEnabled:n}),t({timelineSnapEnabled:n})},timeDisplayMode:io().timeDisplayMode??"time",setTimeDisplayMode:n=>{Ml({timeDisplayMode:n}),t({timeDisplayMode:n})},pinTimelineZoom:(n,r)=>t(i=>{if(i.zoomMode==="manual")return{};const s=lCe(n,r);return Ml({timelineZoomMode:"manual",timelineManualZoomPercent:s}),{zoomMode:"manual",manualZoomPercent:s}}),setTimelineScale:(n,r)=>{const i=e();i.timelinePps===n&&i.timelineFitPps===r||t({timelinePps:n,timelineFitPps:r})},setInPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{inPoint:i,outPoint:i!==null&&r.outPoint!==null&&i>=r.outPoint?null:r.outPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setOutPoint:n=>t(r=>{const i=n!==null&&Number.isFinite(n)?n:null;return{outPoint:i,inPoint:i!==null&&r.inPoint!==null&&i<=r.inPoint?null:r.inPoint,loopEnabled:i!==null?!0:r.loopEnabled}}),setManualZoomPercent:n=>t(r=>({manualZoomPercent:U0(n,r.timelineFitPps)})),bumpZEditVersion:()=>t(n=>({zEditVersion:n.zEditVersion+1})),setCurrentTime:n=>t({currentTime:Number.isFinite(n)?n:0}),setDuration:n=>t({duration:Number.isFinite(n)?n:0}),setTimelineReady:n=>t({timelineReady:n}),setBeatDragging:n=>t({beatDragging:n}),setElements:n=>t({elements:n}),setSelectedElementId:(n,r)=>t(i=>{const s=nCe(i.selectedElementIds,n,r==null?void 0:r.preserveSet),a=rCe(i.revealedAudioFxTarget,n);return n!==i.selectedElementId?{selectedElementId:n,selectedElementIds:s,activeKeyframePct:null,motionPathArmed:!1,focusedEaseSegment:null,...a?{}:{revealedAudioFxTarget:null}}:{selectedElementId:n,selectedElementIds:s}}),setSelectionAnchor:n=>t(r=>n!=null&&r.selectedElementIds.size>1&&r.selectedElementIds.has(n)?{selectedElementId:n,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}:{selectedElementId:n,selectedElementIds:n?new Set([n]):new Set,focusedEaseSegment:n===r.selectedElementId?r.focusedEaseSegment:null}),updateElement:(n,r)=>t(i=>({elements:i.elements.map(s=>(s.key??s.id)===n?{...s,...r}:s)})),beginTimelineSession:n=>t(r=>r.timelineProjectId===n?r:{...h_(),timelineSessionEpoch:r.timelineSessionEpoch+1,timelineProjectId:n}),reset:()=>t(h_())}));wke(ce);const vae="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",Aae="https://us.i.posthog.com",vCe=3e4,ACe=5e3;let aA=[],ev=null;function SCe(){return hj()}function wCe(){return hS()}function OCe(){var t,e;return{studio_version:"0.8.31",agent_runtime:Tie(),screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"").split("?")[0]}}function Tt(t,e={}){wCe()&&(aA.push({event:`studio:${t}`,properties:{...OCe(),...Mie(),...e},timestamp:new Date().toISOString()}),ev||(ev=setInterval(kCe,vCe)))}function Sae(){const t=aA.map(e=>({event:e.event,properties:{...e.properties,$ip:null},distinct_id:SCe(),timestamp:e.timestamp}));return aA=[],t}async function kCe(){if(aA.length===0)return;const t=Sae(),e=new AbortController,n=setTimeout(()=>e.abort(),ACe);try{await fetch(`${Aae}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:vae,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}function wae(){if(ev&&(clearInterval(ev),ev=null),aA.length===0)return;const t=Sae(),e=JSON.stringify({api_key:vae,batch:t});try{navigator.sendBeacon(`${Aae}/batch/`,e)}catch{}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&wae()});function X0(t){const e=x.useRef(null),n=x.useCallback(r=>{var i;if(r instanceof KeyboardEvent){r.key==="Escape"&&t();return}(i=e.current)!=null&&i.contains(r.target)||t()},[t]);return x.useEffect(()=>(document.addEventListener("pointerdown",n,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("keydown",n),()=>{document.removeEventListener("pointerdown",n,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",n)}),[n]),e}const CCe=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Keyframes (when an element is selected)",hints:[{key:"K",label:"Add keyframe at playhead"},{key:"Del",label:"Delete selected keyframe"},{key:"H",label:"Toggle hold / bezier"},{key:"U",label:"Expand / collapse properties"},{key:"R",label:"Record gesture"}]},{title:"Editing",hints:[{key:"⌘Z",label:"Undo"},{key:"⌘⇧Z",label:"Redo"},{key:"⌘C",label:"Copy element"},{key:"⌘V",label:"Paste element"},{key:"⌘X",label:"Cut element"},{key:"S",label:"Split clip at playhead"},{key:"⇧Click",label:"Razor tool: split all tracks"},{key:"⌘G",label:"Group elements"},{key:"⌘⇧G",label:"Ungroup"},{key:"Del",label:"Delete selected element (no keyframe selected)"}]},{title:"Gesture recording modifiers",hints:[{key:"Drag",label:"Record x / y position"},{key:"Scroll",label:"Record z depth"},{key:"⇧ Drag",label:"Record rotationX / rotationY"},{key:"⌥ Drag",label:"Record rotation"},{key:"⌘ Drag↕",label:"Record opacity"},{key:"⌘ Scroll",label:"Record scale"}]},{title:"Canvas",hints:[{key:"Drag",label:"Move element / add keyframe"},{key:"⌥ Drag",label:"Move entire animation path"},{key:"⇧ Drag",label:"Uniform resize"}]},{title:"Crop",hints:[{key:"Drag edge",label:"Crop a side"},{key:"Drag center",label:"Reposition the crop"}]},{title:"Panels",hints:[{key:"⌘1",label:"Compositions tab"},{key:"⌘2",label:"Assets tab"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}],ECe=x.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,setInPoint:s,setOutPoint:a,onSeek:o}){const[l,c]=x.useState(!1),[u,f]=x.useState(""),h=x.useId(),m=x.useCallback(()=>c(!1),[]),y=X0(m),p=x.useRef(null),v=x.useRef(null);x.useEffect(()=>{var E;if(!l)return;const C=v.current;return(E=p.current)==null||E.focus(),()=>{C==null||C.focus()}},[l]);const b=x.useCallback(()=>{if(e)return;const C=Number.parseInt(u,10);!Number.isFinite(C)||n<=0||o(Math.min(n,Rj(Math.max(0,C))))},[e,n,u,o]),w=x.useCallback(C=>{C.preventDefault(),b()},[b]),O=x.useCallback(C=>{C.key==="Enter"&&(C.preventDefault(),b())},[b]);return d.jsxs("div",{ref:y,className:"relative flex-shrink-0",children:[d.jsx(Ar,{label:"Shortcuts and tools",children:d.jsx("button",{ref:v,type:"button",onClick:()=>c(C=>!C),className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors ${l?"text-neutral-200":"text-neutral-600 hover:text-neutral-300"}`,"aria-label":"Shortcuts and tools","aria-expanded":l,"aria-controls":h,children:d.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),d.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})})}),l&&d.jsxs("div",{id:h,ref:p,tabIndex:-1,role:"dialog","aria-label":"Keyboard shortcuts and tools",className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto outline-none",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[d.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[d.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),d.jsxs("form",{onSubmit:w,className:"flex items-center gap-1.5",children:[d.jsx("input",{value:u,onChange:C=>f(C.target.value),disabled:e,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:O,onBlur:b}),d.jsx(Ar,{label:"Jump to frame",children:d.jsx("button",{type:"submit",disabled:e,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})})]})]}),d.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),d.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[d.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),d.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),d.jsx("div",{className:"flex items-center gap-1.5",children:r!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:os(r)}),d.jsx(Ar,{label:"Clear in-point",children:d.jsx("button",{type:"button",onClick:()=>s(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:d.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:d.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):d.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),d.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),d.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),d.jsx("div",{className:"flex items-center gap-1.5",children:i!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:os(i)}),d.jsx(Ar,{label:"Clear out-point",children:d.jsx("button",{type:"button",onClick:()=>a(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:d.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:d.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):d.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),d.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),d.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:CCe.map(C=>d.jsxs("div",{children:[d.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:C.title}),d.jsx("div",{className:"flex flex-col gap-1",children:C.hints.map(E=>d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:E.key}),d.jsx("span",{className:"text-[10px] text-neutral-400",children:E.label})]},E.key))})]},C.title))})]})]})}),TCe=[.25,.5,1,1.5,2],PCe=x.memo(function({playbackRate:e,setPlaybackRate:n,disabled:r}){const[i,s]=x.useState(!1),a=x.useCallback(()=>s(!1),[]),o=X0(a);return d.jsxs("div",{ref:o,className:"relative flex-shrink-0",children:[d.jsx(Ar,{label:"Playback speed",children:d.jsx("button",{type:"button",onClick:()=>s(l=>!l),disabled:r,"aria-haspopup":"menu","aria-expanded":i,"aria-label":"Playback speed",className:"h-7 w-8 rounded-md font-mono text-[10px] tabular-nums text-neutral-500 transition-colors hover:text-neutral-200 disabled:opacity-30",children:e===1?"1x":`${e}x`})}),i&&d.jsx("div",{role:"menu","aria-label":"Playback speed options",className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:TCe.map(l=>{const c=l===e;return d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":c,onClick:()=>{Tt("playback",{action:"speed_change",rate:l}),n(l),s(!1)},className:`block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors outline-none focus-visible:bg-white/[0.04] ${c?"text-neutral-50 bg-white/[0.06]":"text-neutral-500 hover:bg-white/[0.04]"}`,children:[l,"x"]},l)})})]})});function MCe({muted:t,volume:e}){const n=t||e===0;return d.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),n?d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"m19 9-6 6"}),d.jsx("path",{d:"m13 9 6 6"})]}):d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),e>=.5?d.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"}):null]})]})}const NCe=x.memo(function({audioMuted:e,audioVolume:n,disabled:r,setAudioMuted:i,setAudioVolume:s}){const a=Math.round(n*100),o=e||n===0,l=o?"Unmute audio":"Mute audio";return d.jsxs("div",{className:"group flex flex-shrink-0 items-center",children:[d.jsx("div",{className:"w-0 overflow-hidden opacity-0 transition-[width,opacity] duration-150 ease-out group-hover:w-14 group-hover:opacity-100 group-focus-within:w-14 group-focus-within:opacity-100",children:d.jsxs("div",{className:"relative mx-1 flex h-6 w-12 items-center",children:[d.jsx("div",{className:"absolute inset-x-0 h-0.5 overflow-hidden rounded-full bg-neutral-700",children:d.jsx("div",{className:"h-full rounded-full bg-neutral-300",style:{width:`${a}%`}})}),d.jsx("input",{type:"range",min:"0",max:"100",step:"1",value:a,disabled:r,"aria-label":"Preview volume","aria-valuetext":`${a}%`,title:`Preview volume: ${a}%`,onChange:c=>{const u=Number(c.currentTarget.value)/100;s(u),e&&u>0&&i(!1)},className:"hf-preview-volume-range absolute inset-0 w-full disabled:pointer-events-none"})]})}),d.jsx(Ar,{label:l,children:d.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"mute_toggle",muted:!o}),o&&n===0&&s(1),i(!o)},disabled:r,"aria-label":l,"aria-pressed":o,className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors disabled:pointer-events-none disabled:opacity-30 ${o?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,children:d.jsx(MCe,{muted:e,volume:n})})})]})});Jv.registerPlugin(D1);const QG="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",zG="M56 28H67V71H56Z M73 28H84V71H73Z";function DCe({playing:t}){const e=x.useRef(null),n=x.useRef(!0);return x.useEffect(()=>{var o;const r=e.current;if(!r)return;const i=t?zG:QG,s=typeof window<"u"&&((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)").matches);if(n.current||s){n.current=!1,Jv.set(r,{morphSVG:i});return}const a=Jv.to(r,{duration:.28,ease:"power2.inOut",morphSVG:i});return()=>{a.kill()}},[t]),d.jsx("span",{className:"relative inline-flex h-3 w-3 items-center justify-center","aria-hidden":"true",children:d.jsx("svg",{width:"12",height:"12",viewBox:"46 21 54 56",fill:"#FAFAFA",children:d.jsx("path",{ref:e,d:t?zG:QG})})})}const ICe=x.memo(function({loopEnabled:e,disabled:n,setLoopEnabled:r}){return d.jsx(Ar,{label:"Loop playback",children:d.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"loop_toggle",enabled:!e}),r(!e)},disabled:n,className:`flex h-7 w-7 items-center justify-center rounded-md transition-colors disabled:opacity-30 ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Disable loop playback":"Enable loop playback","aria-pressed":e,children:d.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M17 2l4 4-4 4"}),d.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),d.jsx("path",{d:"M7 22l-4-4 4-4"}),d.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})})})}),_Ce=x.memo(function({isFullscreen:e,onToggleFullscreen:n}){return d.jsx(Ar,{label:e?"Exit fullscreen (F)":"Enter fullscreen (F)",children:d.jsx("button",{type:"button",onClick:()=>{Tt("playback",{action:"fullscreen_toggle",active:!e}),n()},className:`flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md transition-colors ${e?"text-studio-accent":"text-neutral-500 hover:text-neutral-200"}`,"aria-label":e?"Exit fullscreen":"Enter fullscreen",children:d.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),d.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),d.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),d.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),d.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),d.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),d.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})})})})}),RCe=x.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:s}){const a=ce(H=>H.isPlaying),o=ce(H=>H.duration),l=ce(H=>H.timelineReady),c=ce(H=>H.playbackRate),u=ce(H=>H.audioMuted),f=ce(H=>H.audioVolume),h=ce(H=>H.loopEnabled),m=ce.getState().setPlaybackRate,y=ce.getState().setAudioMuted,p=ce.getState().setAudioVolume,v=ce.getState().setLoopEnabled,b=ce(H=>H.inPoint),w=ce(H=>H.outPoint),O=ce.getState().setInPoint,C=ce.getState().setOutPoint,E=ce(H=>H.timeDisplayMode),M=ce.getState().setTimeDisplayMode,N=x.useRef(null),_=x.useRef(0),I=x.useRef(E);I.current=E;const j=x.useRef(o);j.current=o;const L=r||!l;return x.useEffect(()=>{if(!N.current)return;const H=_.current;N.current.textContent=E==="frame"?jG(H,o):os(H)},[o,E]),kr(()=>{const H=G=>{if(_.current=G,!N.current)return;const q=j.current;N.current.textContent=I.current==="frame"?jG(G,q):os(G)},$=ba.subscribe(H);return H(ce.getState().currentTime),$}),d.jsx("div",{children:d.jsxs("div",{className:"grid h-10 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center px-3","aria-disabled":r||void 0,style:{paddingBottom:"env(safe-area-inset-bottom)"},children:[d.jsx(Ar,{label:E==="time"?"Switch to frame display":"Switch to time display",children:d.jsxs("button",{type:"button",onClick:()=>M(E==="time"?"frame":"time"),disabled:r,className:"min-w-0 justify-self-start whitespace-nowrap font-mono text-[11px] tabular-nums text-neutral-400 transition-colors hover:text-neutral-200 disabled:pointer-events-none",children:[d.jsx("span",{ref:N,children:os(0)}),E==="time"?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-0.5 text-neutral-700",children:"/"}),d.jsx("span",{className:"text-neutral-600",children:os(o)})]}):null]})}),d.jsx(Ar,{label:a?"Pause":"Play",children:d.jsx("button",{type:"button","aria-label":a?"Pause":"Play",onClick:()=>{Tt("playback",{action:a?"pause":"play"}),e()},disabled:L,className:"flex h-8 w-8 items-center justify-center justify-self-center rounded-md text-neutral-100 transition-colors hover:text-white disabled:pointer-events-none disabled:opacity-30",children:d.jsx(DCe,{playing:a})})}),d.jsxs("div",{className:"flex min-w-0 items-center justify-self-end",children:[d.jsx(NCe,{audioMuted:u,audioVolume:f,disabled:L,setAudioMuted:y,setAudioVolume:p}),d.jsx(PCe,{playbackRate:c,setPlaybackRate:m,disabled:r}),d.jsx(ICe,{loopEnabled:h,disabled:r,setLoopEnabled:v}),s&&d.jsx(_Ce,{isFullscreen:i,onToggleFullscreen:s}),d.jsx(ECe,{disabled:r,duration:o,inPoint:b,outPoint:w,setInPoint:O,setOutPoint:C,onSeek:n})]})]})})}),jCe=new Set(["audio","music","sfx","sound","narration"]),LCe=/\.(aac|flac|m4a|mp3|ogg|opus|wav)(?:[?#].*)?$/i,FCe=/\b(music|bgm|soundtrack|background[-_]?music)\b/i;function oA(t){return t?t.tagName.toLowerCase()===xa?!0:nl({tag:t.tagName,src:t.getAttribute("src")??void 0}):!1}function nl(t){if(!t)return!1;const e=t.tag.trim().toLowerCase();return jCe.has(e)?!0:!!(t.src&&LCe.test(t.src))}function ky(t){if(!t||!nl(t))return!1;if(t.timelineRole==="music")return!0;if(t.timelineRole&&t.timelineRole!=="music")return!1;const e=t.domId??t.id??"";return FCe.test(e)}function $Ce(t){const e=t.find(ky);if(e)return{element:e,isFallback:!1};let n=null;for(const r of t)nl(r)&&(r.timelineRole&&r.timelineRole!=="music"||(!n||r.duration>n.duration)&&(n=r));return n?{element:n,isFallback:!0}:null}function Oae(t){return!t.some(e=>oA(e.element))}let YO=null;const ZG=()=>Sy(()=>import("./index-Dyhj0geW.js").then(t=>t.i),[]);function BCe(t=ZG){const e=t===ZG;if(e&&YO)return YO;const n=t().then(r=>(r.default??r)||null).catch(()=>(e&&(YO=null),null));return e&&(YO=n),n}const KP=1024,GG=512,VCe=.05;function kae(t,e,n){const r=Math.floor(e*VCe),i=Math.floor(n*e),s=Math.max(0,i-r),a=Math.min(t.length,i+r);let o=0;for(let l=s;l<a;l++){const c=t[l]??0;o+=c*c}return Math.sqrt(o/Math.max(a-s,1))}function Cae(t,e){return!t.channelData||t.peak<=0?.5:Math.min(1,kae(t.channelData,t.sampleRate,e)/t.peak)}async function HCe(t){const e=t.getChannelData(0),n=t.sampleRate,r=[];for(let a=0;a<e.length-KP;a+=GG){let o=0;for(let l=0;l<KP;l++){const c=e[a+l];o+=c*c}r.push(o/KP)}const i=[],s=20;for(let a=s;a<r.length-s;a++){let o=0;for(let u=a-s;u<a+s;u++)o+=r[u];o/=s*2;const l=o*1.5,c=r[a];if(c>l&&c>(r[a-1]??0)&&c>(r[a+1]??0)){const u=a*GG/n;(i.length===0||u-i[i.length-1]>.1)&&i.push(Math.round(u*1e3)/1e3)}}return i}function QCe(t){if(t.length<4)return null;const e=[];for(let s=1;s<t.length;s++)e.push(t[s]-t[s-1]);const n=[...e].sort((s,a)=>s-a),r=Math.floor(n.length/2),i=n.length%2===0?(n[r-1]+n[r])/2:n[r];return i<=0?null:Math.round(60/i*10)/10}function JP(t){let e=t;for(;e>120;)e/=2;for(;e<60;)e*=2;return e}function zCe(t,e){const n=[t/2,t,t*2];let r=t,i=Number.POSITIVE_INFINITY;for(const s of n){if(s<=0)continue;const a=Math.abs(s-e);a<i&&(i=a,r=s)}return r}function ZCe(t,e,n){if(t.length===0||e<=0||n<=0)return t;const r=60/e;if(r<.125)return t;const i=r*.25;let s=0,a=-1;for(const l of t.slice(0,10)){const c=(l%r+r)%r;let u=0;for(const f of t){const h=(f%r+r)%r;Math.min(Math.abs(h-c),r-Math.abs(h-c))<i&&u++}u>a&&(a=u,s=c)}const o=[];for(let l=s;l<=n+.001;l+=r)o.push(Math.round(l*1e3)/1e3);return o}function GCe(t,e,n){if(t.length===0)return{times:t,strengths:[],peak:1e-6};const r=t.map(l=>kae(e,n,l)),i=Math.max(...r,1e-6),s=i*.12,a=[],o=[];for(let l=0;l<t.length;l++)r[l]>=s&&(a.push(t[l]),o.push(Math.min(1,r[l]/i)));return{times:a,strengths:o,peak:i}}async function UCe(t){const e=t.getChannelData(0),n=t.sampleRate,r=t.duration,i=await HCe(t),s=QCe(i);let a=null;try{const h=await BCe();h&&(a=h(t))}catch{}let o=s,l="uncertain",c=null;if(s!==null&&a!==null){const h=Math.abs(JP(s)-JP(a))/JP(a);h<.05?(o=zCe(a,s),l="high",c=o):h<.1?(o=Math.round((s+a)/2),l="low",c=o):(o=s,l="uncertain")}else s!==null?(o=s,l="low",c=s):a!==null&&(o=a,l="low",c=a);const u=c!==null?ZCe(i,c,r):i,f=GCe(u,e,n);return{beatTimes:f.times,beatStrengths:f.strengths,bpm:o,bpmConfidence:l,channelData:e,sampleRate:n,peak:f.peak}}async function XCe(t){const e=new AudioContext;try{const r=await(await fetch(t)).arrayBuffer(),i=await e.decodeAudioData(r);return UCe(i)}finally{await e.close()}}function Eae(t){if(!t||/^(blob:|data:)/i.test(t))return null;let e=null;const n="/preview/",r=t.indexOf(n);if(r!==-1){let i=t.slice(r+n.length);const s=i.search(/[?#]/);s!==-1&&(i=i.slice(0,s)),i.startsWith("comp/")&&(i=i.slice(5)),e=i?decodeURIComponent(i):null}if(!e)try{e=decodeURIComponent(new URL(t,"http://_").pathname)}catch{e=t}return e?(e=e.replace(/^\/+/,""),e||null):null}function UG(t){const e=Eae(t);return e?`beats/${e}.json`:null}function WCe(t,e,n){const r=t.map((s,a)=>({time:Math.round(s*1e3)/1e3,strength:Math.round((e[a]??.5)*1e3)/1e3}));return`${JSON.stringify({version:1,audio:n,beats:r},null,2)}
71
71
  `}function Tae(t){try{const e=JSON.parse(t);if(!e||e.version!==1||!Array.isArray(e.beats))return null;const n=[],r=[];for(const i of e.beats)if(i&&typeof i.time=="number"&&Number.isFinite(i.time)){n.push(i.time);const s=typeof i.strength=="number"&&Number.isFinite(i.strength)?i.strength:.5;r.push(Math.max(0,Math.min(1,s)))}return{times:n,strengths:r}}catch{return null}}const XG="__hfStudioContexts",WG=new Map;function qCe(){const t=globalThis,e=t[XG];if(e)return e;const n=new Map;return t[XG]=n,n}function Bc(t,e){const n=qCe();n.has(t)&&WG.get(t)!==e&&console.warn(`[hmrStableContext] "${t}" was registered twice with different defaults — two contexts are sharing one identity. Use module path + export name.`),WG.set(t,e);const r=n.get(t);if(r)return r;const i=x.createContext(e);return n.set(t,i),i}const Qj=Bc("FileManagerContext",null);function W0(){const t=x.useContext(Qj);if(!t)throw new Error("useFileManagerContext must be used within FileManagerProvider");return t}function Pae(){return x.useContext(Qj)}function YCe({value:{editingFile:t,setEditingFile:e,projectDir:n,fileTree:r,fileTreeLoaded:i,setFileTree:s,editingPathRef:a,projectIdRef:o,saveRafRef:l,flushPendingSourceSave:c,discardPendingSourceSave:u,getPendingSourceCandidate:f,importedFontAssetsRef:h,readProjectFile:m,writeProjectFile:y,overwriteExternalConflict:p,readOptionalProjectFile:v,observeProjectFileVersion:b,updateEditingFileContent:w,revealSourceOffset:O,openSourceForSelection:C,handleFileSelect:E,handleContentChange:M,refreshFileTree:N,uploadProjectFiles:_,handleCreateFile:I,handleCreateFolder:j,handleDeleteFile:L,handleRenameFile:H,handleDuplicateFile:$,handleMoveFile:G,handleImportFiles:q,handleImportFonts:Y,compositions:J,assets:ie,fontAssets:te},children:ne}){const W=x.useMemo(()=>({editingFile:t,setEditingFile:e,projectDir:n,fileTree:r,fileTreeLoaded:i,setFileTree:s,editingPathRef:a,projectIdRef:o,saveRafRef:l,flushPendingSourceSave:c,discardPendingSourceSave:u,getPendingSourceCandidate:f,importedFontAssetsRef:h,readProjectFile:m,writeProjectFile:y,overwriteExternalConflict:p,readOptionalProjectFile:v,observeProjectFileVersion:b,updateEditingFileContent:w,revealSourceOffset:O,openSourceForSelection:C,handleFileSelect:E,handleContentChange:M,refreshFileTree:N,uploadProjectFiles:_,handleCreateFile:I,handleCreateFolder:j,handleDeleteFile:L,handleRenameFile:H,handleDuplicateFile:$,handleMoveFile:G,handleImportFiles:q,handleImportFonts:Y,compositions:J,assets:ie,fontAssets:te}),[t,e,n,r,i,s,a,o,l,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_,I,j,L,H,$,G,q,Y,J,ie,te]);return d.jsx(Qj,{value:W,children:ne})}const KCe=.015;function pc(t,e){return Math.abs(t-e)<KCe}function DE(t,e){return t&&e&&t.src===e?t:null}function zj(t,e,n,r){const i=DE(n,r),s=(i==null?void 0:i.removed)??[],a=[];for(let o=0;o<t.length;o++){const l=t[o];s.some(c=>pc(c,l))||a.push({time:l,strength:e[o]??.5})}if(i)for(const o of i.added)a.some(l=>pc(l.time,o.time))||a.push(o);return a.sort((o,l)=>o.time-l.time),{times:a.map(o=>o.time),strengths:a.map(o=>o.strength)}}function Mae(t,e){const n=DE(t,e);return n?{...n,added:[...n.added],removed:[...n.removed]}:{src:e,added:[],removed:[]}}function Nae(t,e,n,r=[]){const i=DE(t,e);if(r.some(l=>pc(l,n.time))&&!((i==null?void 0:i.removed)??[]).some(l=>pc(l,n.time))||((i==null?void 0:i.added)??[]).some(l=>pc(l.time,n.time)))return t;const a=Mae(t,e),o=a.removed.findIndex(l=>pc(l,n.time));return o>=0?(a.removed.splice(o,1),a):(a.added.push(n),a)}function Dae(t,e,n,r){const i=DE(t,e),s=((i==null?void 0:i.added)??[]).some(u=>pc(u.time,r)),a=n.find(u=>pc(u,r)),o=a!==void 0&&((i==null?void 0:i.removed)??[]).some(u=>pc(u,a));if(!s&&(a===void 0||o))return t;const l=Mae(t,e),c=l.added.findIndex(u=>pc(u.time,r));return c>=0?(l.added.splice(c,1),l):(a!==void 0&&!l.removed.some(u=>pc(u,a))&&l.removed.push(a),l)}function JCe(t,e,n,r,i){const s=Dae(t,e,n,r);return Nae(s,e,i,n)??s}const qG=new WeakMap;function O0(t){const e=qG.get(t);if(e)return e;const n=new Map,r=[],i=new Set;let s=null;for(const o of t)n.set(Zn(o),o),o.src&&r.push(o),nl(o)&&i.add(o.track),!s&&ky(o)&&(s=o);const a=Object.freeze({byKey:n,musicElement:s,mediaElements:Object.freeze(r),audioTracks:i});return qG.set(t,a),a}function Iae(t,e,n){if(!t||!e)return null;const r=zj(t.beatTimes,t.beatStrengths,n,e.src??null),i=e.playbackStart??0,s=i+e.duration,a=e.start-i,o=[],l=[];return r.times.forEach((c,u)=>{c>=i&&c<=s&&(o.push(Math.round((c+a)*1e3)/1e3),l.push(r.strengths[u]??1))}),{...t,beatTimes:o,beatStrengths:l}}function IE(){const t=ce.getState(),e=t.elements.find(ky),n=t.beatAnalysis;return!e||!n||!e.src?null:{s:t,music:e,analysis:n,src:e.src}}function V6(t,e,n){return e+(n-t)}function Zj(t){return t.duration>0?t.duration:t.sourceDuration&&t.sourceDuration>0?t.sourceDuration:Number.POSITIVE_INFINITY}function eEe(t){const e=IE();return e?t>=e.music.start&&t<=e.music.start+Zj(e.music):!1}function tEe(t){const e=IE();if(!e)return;const n=e.music.playbackStart??0,r=V6(e.music.start,n,t);if(r<n||r>n+Zj(e.music))return;const i=Cae(e.analysis,r),s=Nae(e.s.beatEdits,e.src,{time:r,strength:i},e.analysis.beatTimes);s!==e.s.beatEdits&&e.s.commitBeatEdits(s,"add beat")}function nEe(t){const e=IE();if(!e)return;const n=V6(e.music.start,e.music.playbackStart??0,t),r=Dae(e.s.beatEdits,e.src,e.analysis.beatTimes,n);r!==e.s.beatEdits&&e.s.commitBeatEdits(r,"delete beat")}function rEe(t,e){const n=IE();if(!n)return;const r=n.music.playbackStart??0,i=V6(n.music.start,r,t),s=V6(n.music.start,r,e),a=Math.max(r,Math.min(r+Zj(n.music),s)),o=Cae(n.analysis,a),l=JCe(n.s.beatEdits,n.src,n.analysis.beatTimes,i,{time:a,strength:o});l!==n.s.beatEdits&&n.s.commitBeatEdits(l,"move beat")}const _1=new Map,iEe=4,sEe=350;function aEe(t,e){for(_1.set(t,e);_1.size>iEe;){const n=_1.keys().next().value;if(n===void 0)break;_1.delete(n)}}async function oEe(t,e,n){if(!t)return{...e,hasFile:!1};try{const r=await n.readOptionalProjectFile(t),i=r?Tae(r):null;if(i&&i.times.length>0)return{times:i.times,strengths:i.strengths,hasFile:!0}}catch{}return{...e,hasFile:!1}}async function lEe(t,e){try{const n=await t.readOptionalProjectFile(e),r=n?Tae(n):null;return!!(r&&r.times.length>0)}catch{return!1}}async function cEe(t,e,n){let r=_1.get(t);r||(r=XCe(t),aEe(t,r));try{const i=await r,s={times:i.beatTimes,strengths:i.beatStrengths},{times:a,strengths:o}=await oEe(e,s,n);return{analysis:i,times:a,strengths:o}}catch{return null}}function uEe(){const t=ce(r=>r.beatAnalysis),e=ce(r=>O0(r.elements).musicElement),n=ce(r=>r.beatEdits);return x.useMemo(()=>Iae(t,e,n),[t,e,n])}function fEe(){const t=ce(f=>f.elements),e=ce(f=>f.setBeatAnalysis),n=ce(f=>f.setBeatEdits),r=ce(f=>f.setBeatPersist),i=ce(f=>f.resetBeatHistory),s=Pae(),a=s==null?void 0:s.readOptionalProjectFile,o=s==null?void 0:s.writeProjectFile,l=x.useRef(null);l.current=a&&o?{readOptionalProjectFile:a,writeProjectFile:o}:null;const{musicSrc:c,isFallbackTrack:u}=x.useMemo(()=>{const f=$Ce(t);return{musicSrc:(f==null?void 0:f.element.src)??null,isFallbackTrack:(f==null?void 0:f.isFallback)??!1}},[t]);x.useEffect(()=>{if(!c){e(null),n(null),i();return}if(!l.current){e(null),n(null),i();return}let f=!1;const h=UG(c),m=l.current;return(async()=>{if(!h||!m)return;if(!u){const p=await lEe(m,h);if(f)return;if(!p){e(null);return}}if(f)return;const y=await cEe(c,h,m);if(!f){if(!y){e(null),_1.delete(c);return}n(null),i(),e({...y.analysis,beatTimes:y.times,beatStrengths:y.strengths})}})(),()=>{f=!0}},[c,u,e,n,i]),x.useEffect(()=>{const f=UG(c);if(!c||!f||!l.current){r(null);return}const h=l.current,m=Eae(c)??"audio";let y=null,p=null;const v=()=>{if(p===null)return;const w=p;p=null,h.writeProjectFile(f,w).catch(()=>{})};return r(()=>{const w=ce.getState(),O=w.beatAnalysis;if(!O)return;const C=zj(O.beatTimes,O.beatStrengths,w.beatEdits,c);p=WCe(C.times,C.strengths,m),y&&clearTimeout(y),y=setTimeout(()=>{y=null,v()},sEe)}),()=>{y&&clearTimeout(y),v(),r(null)}},[c,r])}const eM="css:root",_ae=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],hEe=new Set([..._ae,"contain","isolation","mask-border","mix-blend-mode","opacity"]),dEe=new Set(["absolute","relative"]),pEe=new Set(["flex","inline-flex","grid","inline-grid"]),mEe=new Set(["layout","paint","strict","content"]),gEe=new Set(["size","inline-size"]);function yEe(t){return t.position==="fixed"||t.position==="sticky"}function xEe(t,e){var r;if(e.zIndex==="auto"||e.zIndex==="")return!1;if(dEe.has(e.position))return!0;const n=t.parentElement?(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t.parentElement).display:null;return n!=null&&pEe.has(n)}function bEe(t){const e=Number.parseFloat(t.opacity);if(Number.isFinite(e)&&e<1||t.getPropertyValue("isolation")==="isolate")return!0;const n=t.getPropertyValue("mix-blend-mode");return n&&n!=="normal"?!0:_ae.some(r=>{const i=t.getPropertyValue(r);return i!==""&&i!=="none"})}function vEe(t){return t.getPropertyValue("contain").split(/\s+/).some(n=>mEe.has(n))?!0:gEe.has(t.getPropertyValue("container-type"))}function AEe(t){return t.getPropertyValue("will-change").split(",").map(e=>e.trim()).some(e=>hEe.has(e))}function SEe(t,e){return yEe(e)||xEe(t,e)||bEe(e)||vEe(e)?!0:AEe(e)}function wEe(t){const e=[];let n=t;for(;n!=null&&n.parentElement;)e.push(Array.prototype.indexOf.call(n.parentElement.children,n)),n=n.parentElement;return`css:${e.reverse().join(".")}`}function Gj(t){const e=t.ownerDocument.defaultView;if(!e)return eM;let n=t.parentElement;for(;n&&n!==t.ownerDocument.documentElement;){try{if(SEe(n,e.getComputedStyle(n)))return wEe(n)}catch{return eM}n=n.parentElement}return eM}const Dn=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"});Object.freeze([Dn.start,Dn.duration,Dn.trackIndex]);Object.freeze([Dn.derivedEnd]);Object.freeze([Dn.derivedEnd,Dn.legacyTrack]);class yS extends Error{constructor(n,r){super(r);vt(this,"code");this.name="ClipTimingWriteError",this.code=n}}function Cy(t){if(t==null||t.trim()==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}const Rae=/^[A-Za-z0-9_.:-]+$/;function jae(t,e){const n=t.charCodeAt(e);return n>=48&&n<=57}function YG(t,e){let n=e;for(;n>=0&&jae(t,n);)n--;return n}function OEe(t,e){let n=e;for(;n>=0&&(t[n]??"").trim()==="";)n--;return n}function kEe(t){const e=t.length-1;if(!jae(t,e))return null;let n=YG(t,e);return t[n]==="."&&(n=YG(t,n-1)),n+1}function CEe(t){const e=kEe(t);if(e==null)return null;const n=OEe(t,e-1),r=t[n];if(r!=="+"&&r!=="-")return null;const i=t.slice(0,n).trim();if(!Rae.test(i))return null;const s=Number(t.slice(e));return Number.isFinite(s)?{refId:i,operator:r,magnitude:s}:null}function Lae(t){const e=(t??"").trim();if(!e)return null;const n=Cy(e);if(n!=null)return{kind:"absolute",value:n};if(Rae.test(e))return{kind:"reference",refId:e,offset:0};const r=CEe(e);return r?{kind:"reference",refId:r.refId,offset:r.operator==="-"?-r.magnitude:r.magnitude}:null}function Ra(t,e,n,r){t.push({code:e,attribute:n,value:r})}function EEe(t,e,n,r){var s;if(e==null||e.trim()==="")return n.defaultStart===void 0?0:n.defaultStart;if(!t)return Ra(r,"invalid-start",Dn.start,e),null;if(t.kind==="absolute")return Math.max(0,t.value);const i=(s=n.resolveReferenceEnd)==null?void 0:s.call(n,t.refId);return i==null||!Number.isFinite(i)?(Ra(r,"unresolved-start-reference",Dn.start,e),null):Math.max(0,i+t.offset)}const TEe=1e-9;function PEe(t,e){return Math.abs(t-e)<=TEe}function MEe(t,e,n){const r=Cy(t);if(r==null){Ra(n,"deprecated-end",Dn.derivedEnd,t),Ra(n,"invalid-end",Dn.derivedEnd,t);return}if(e==null){Ra(n,"deprecated-end",Dn.derivedEnd,t);return}PEe(r,e)||(Ra(n,"deprecated-end",Dn.derivedEnd,t),Ra(n,"conflicting-end",Dn.derivedEnd,t))}function NEe(t,e,n){const r=Cy(t);return r==null||r<0?(Ra(n,"invalid-duration",Dn.duration,t),{duration:null,end:null,durationSource:"invalid"}):{duration:r,end:e==null?null:e+r,durationSource:"duration"}}function DEe(t,e,n){Ra(n,"deprecated-end",Dn.derivedEnd,t);const r=Cy(t);return r==null?(Ra(n,"invalid-end",Dn.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:r,durationSource:"legacy-end"}:r<e?(Ra(n,"end-before-start",Dn.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):{duration:r-e,end:r,durationSource:"legacy-end"}}function IEe(t,e,n){const r=t.getAttribute(Dn.duration),i=t.getAttribute(Dn.derivedEnd);if(r==null)return i==null?{duration:null,end:null,durationSource:"missing"}:DEe(i,e,n);const s=NEe(r,e,n);return i!=null&&MEe(i,s.end,n),s}function KG(t,e,n,r){const i=Cy(t);return i==null||!Number.isInteger(i)?(Ra(r,"invalid-track-index",e,t),{trackIndex:0,trackSource:"invalid"}):{trackIndex:i,trackSource:n}}function _Ee(t,e){const n=t.getAttribute(Dn.trackIndex),r=t.getAttribute(Dn.legacyTrack);if(n==null&&r==null)return{trackIndex:0,trackSource:"default"};if(n==null&&r!=null)return Ra(e,"deprecated-layer",Dn.legacyTrack,r),KG(r,Dn.legacyTrack,"legacy-layer",e);const i=KG(n??"",Dn.trackIndex,"track-index",e);if(r==null)return i;Ra(e,"deprecated-layer",Dn.legacyTrack,r);const s=Cy(r);return s!=null&&s!==i.trackIndex&&Ra(e,"conflicting-layer",Dn.legacyTrack,r),i}function Id(t,e={}){const n=[],r=t.getAttribute(Dn.start),i=Lae(r),s=EEe(i,r,e,n),a=IEe(t,s,n),o=_Ee(t,n);return{startExpression:i,start:s,...a,...o,diagnostics:n}}function Fae(t){if(!Number.isFinite(t))throw new yS("invalid-start","start must be finite");return String(t)}function REe(t){if(t.kind==="absolute")return Fae(t.value);if(!t.refId||!Number.isFinite(t.offset))throw new yS("invalid-start","reference start must have an id and finite offset");return t.offset===0?t.refId:`${t.refId} ${t.offset<0?"-":"+"} ${Math.abs(t.offset)}`}function jEe(t){if(typeof t=="number")return Fae(t);if(typeof t=="object"&&t!=null)return REe(t);if(typeof t=="string"&&Lae(t))return t.trim();throw new yS("invalid-start",`invalid start expression: ${t??""}`)}function LEe(t,e,n){if(e===null){t.removeAttribute(Dn.duration);return}if(e===void 0){t.getAttribute(Dn.duration)==null&&n.duration!=null&&t.setAttribute(Dn.duration,String(n.duration));return}if(!Number.isFinite(e)||e<0)throw new yS("invalid-duration","duration must be a finite, non-negative number");t.setAttribute(Dn.duration,String(e))}function FEe(t,e,n){if(e===null){t.removeAttribute(Dn.trackIndex);return}if(e===void 0){t.getAttribute(Dn.trackIndex)==null&&n.trackSource==="legacy-layer"&&t.setAttribute(Dn.trackIndex,String(n.trackIndex));return}if(!Number.isFinite(e)||!Number.isInteger(e))throw new yS("invalid-track-index","trackIndex must be a finite integer");t.setAttribute(Dn.trackIndex,String(e))}function $Ee(t,e){const n=Id(t);return e.start!==void 0&&t.setAttribute(Dn.start,jEe(e.start)),LEe(t,e.duration,n),FEe(t,e.trackIndex,n),e.duration===void 0&&t.getAttribute(Dn.duration)==null&&t.getAttribute(Dn.derivedEnd)!=null&&n.duration==null||t.removeAttribute(Dn.derivedEnd),t.removeAttribute(Dn.legacyTrack),Id(t)}const d_=new WeakMap,p_=new WeakMap,JG=new WeakSet;function BEe(t){if(JG.has(t)||typeof MutationObserver>"u"||!t.body)return;JG.add(t),new MutationObserver(n=>{n.some(i=>i.type!=="childList"||[...i.addedNodes,...i.removedNodes].some(s=>{var a;return s instanceof Element&&(s.tagName.toLowerCase()===xa||s.hasAttribute(Wo)||((a=s.querySelector)==null?void 0:a.call(s,`${xa},[${Wo}]`))!=null)}))&&p_.set(t,(p_.get(t)??0)+1)}).observe(t.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[Wo,qs,oo,"data-label","data-volume","data-hidden","id"]})}function _E(t){t&&d_.delete(t)}function RE(t,e){if(!t)return{label:e,volume:1,hidden:!1};BEe(t);const n=p_.get(t)??0,r=d_.get(t);let i=r&&r.revision===n?r.entries:void 0;return i||(i=new Map(Yd(t).map(s=>[s.id,{label:s.label,volume:s.volume,hidden:s.hidden,...s.fxChain?{fxChain:s.fxChain}:{},...s.automation?{automation:s.automation}:{}}])),d_.set(t,{revision:n,entries:i})),i.get(e)??{label:e,volume:1,hidden:!1}}const $ae=1,VEe=["seconds-time","rational-fps","seek-keep-playing","composition-manifest-v1","runtime-data"];function HEe(t,e){let n=Math.abs(t),r=Math.abs(e);for(;r!==0;){const i=n%r;n=r,r=i}return n||1}function QEe(t){const e=Number.isFinite(t)&&t>0?t:30,n=Number.isInteger(e)?1:1e6,r=Math.round(e*n),i=HEe(r,n);return{numerator:r/i,denominator:n/i}}function zEe(t){if(typeof t!="object"||t===null)return null;const e=t;return!Number.isFinite(e.numerator)||!Number.isFinite(e.denominator)||(e.numerator??0)<=0||(e.denominator??0)<=0?null:Number(e.numerator)/Number(e.denominator)}function ZEe(t){return{protocolVersion:$ae,capabilities:VEe,fps:QEe(t)}}function GEe(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")}function UEe(t,e=30){if(typeof t!="object"||t===null)return{status:"legacy",fps:e};const n=t;if(n.protocolVersion===void 0)return{status:"legacy",fps:e};if(n.protocolVersion!==$ae)return{status:"unsupported",code:"unsupported_protocol_version",receivedVersion:n.protocolVersion};const r=zEe(n.fps);return r===null||!GEe(n.capabilities)?{status:"unsupported",code:"invalid_protocol_metadata",receivedVersion:n.protocolVersion}:{status:"supported",fps:r,metadata:n}}function XEe(t,e={},n=30){return{...e,source:"hf-parent",type:"control",action:t,...ZEe(n)}}function m_(t,e,n={},r=30){t==null||t.postMessage(XEe(e,n,r),"*")}function Uj(t){return UEe(t,30)}function WEe(t){t.status==="unsupported"&&window.dispatchEvent(new CustomEvent("runtimeprotocolerror",{detail:{code:t.code,receivedVersion:t.receivedVersion}}))}function jE(t){const e=Uj(t);return e.status!=="unsupported"?e:(WEe(e),null)}function qEe(t){const e=Uj(t);return e.status==="supported"?e.fps:30}function YEe(t,e){t.documentElement&&(t.documentElement.style.overflow="hidden",t.documentElement.style.margin="0"),t.body&&(t.body.style.overflow="hidden",t.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function KEe(t){const e=/data-composition-id=["']([^"']+)["']/gi,n=new Set,r=Array.from(t.querySelectorAll("style, script"));for(const a of r){const o=a.textContent||"";if(!o)continue;let l;for(;(l=e.exec(o))!==null;){const c=(l[1]||"").trim();c&&n.add(c)}}if(n.size===0)return;const i=new Set,s=Array.from(t.querySelectorAll("[data-composition-id]"));for(const a of s){const o=a.getAttribute("data-composition-id");o&&i.add(o)}for(const a of n){if(a==="root"||i.has(a))continue;const o=t.getElementById(`${a}-layer`)||t.getElementById(`${a}-comp`)||t.getElementById(a);o&&(o.getAttribute("data-composition-id")||o.setAttribute("data-composition-id",a))}}function Bae(t){return Number.isFinite(t)?Math.max(0,Math.min(1,t)):1}function JEe(t){return t instanceof HTMLElement}function Xj(t){const e=t.getRootNode();return typeof ShadowRoot<"u"&&e instanceof ShadowRoot&&JEe(e.host)?e.host:null}function Wj(t,e,n){m_(t.contentWindow,e,n)}function Vae(t,e){if(t)try{const n=Xj(t);if(n&&typeof n.muted=="boolean"){n.muted=e;return}Wj(t,"set-muted",{muted:e})}catch{}}function e3e(t,e){if(!t)return;const n=Bae(e);try{const r=Xj(t);if(r&&typeof r.volume=="number"){r.volume=n;return}Wj(t,"set-volume",{volume:n})}catch{}}function t3e(t,e,n){Vae(t,e),e3e(t,n)}function n3e(t,e){if(!t)return;const n=Number.isFinite(e)&&e>0?e:1;try{const r=Xj(t);if(r&&typeof r.playbackRate=="number"){r.playbackRate=n;return}Wj(t,"set-playback-rate",{playbackRate:n})}catch{}}const r3e=.25;let tv=null,sg=null,nv=null,rv=null;function i3e(t,e){if(e){const n=t.getElementById(e);if(n instanceof HTMLAudioElement)return n}return t.querySelector("audio[data-timeline-role='music']")??t.querySelector("audio")}function s3e(t,e,n){tv&&tv!==t&&lA(),nv===null&&(nv=t.muted),rv===null&&(rv=t.volume),tv=t;try{t.muted=!1,t.volume=r3e*Bae(n),Math.abs(t.currentTime-e)>.04&&(t.currentTime=e),t.paused&&t.play().catch(()=>{})}catch{}sg&&clearTimeout(sg),sg=setTimeout(lA,140)}function a3e(t,e,n,r=1){if(!t)return;if(e===null){lA();return}let i=null;try{i=t.contentDocument}catch{return}if(!i)return;const s=i3e(i,n);s&&s3e(s,e,r)}function lA(){sg&&(clearTimeout(sg),sg=null);const t=tv;if(tv=null,!!t){try{t.pause(),nv!==null&&(t.muted=nv),rv!==null&&(t.volume=rv)}catch{}nv=null,rv=null}}function Hae(t,e){var n,r,i;return((i=(r=(n=t.__timelines)==null?void 0:n[e])==null?void 0:r.duration)==null?void 0:i.call(r))??0}function o3e(t){const e=new Map;for(const n of t.querySelectorAll("[data-start]"))for(const r of[n.id,n.getAttribute("data-hf-id"),n.getAttribute("data-composition-id")])r&&e.set(r,n);return e}function l3e(t,e){const n=(r,i)=>{if(i.has(r))return null;const s=t.get(r);if(!s)return null;const a=new Set(i).add(r),o=Id(s,{resolveReferenceEnd:u=>n(u,a)});if(o.end!=null)return o.end;const l=s.getAttribute("data-composition-id"),c=l?Hae(e,l):0;return o.start==null||c<=0?null:o.start+c};return n}function c3e(t,e,n){if(!Number.isFinite(e)||e<=0)return null;const r=Number.isFinite(t)?t:0;if(!Number.isFinite(n)||n<=0)return{start:r,duration:e};if(r>=n)return null;const i=Math.min(e,Math.max(0,n-r));return i>0?{start:r,duration:i}:null}function u3e(t,e){return t||e}function B4(t){return t||void 0}function f3e(t,e,n){if(n)return{...t,compositionSrc:n};const r=e.querySelector("video[src]");return r?{...t,src:B4(r.getAttribute("src")),tag:"video"}:t}function h3e(t){const{doc:e,iframeWin:n,element:r,compositionId:i,rootDuration:s,fallbackIndex:a,resolveEnd:o}=t,l=Id(r,{resolveReferenceEnd:w=>o(w,new Set([i]))}),c=c3e(l.start??0,l.duration??Hae(n,i),s);if(!c)return null;const u=u3e(r.id,i),f=r.getAttribute("data-composition-src")??r.getAttribute("data-composition-file"),h=S0(r),m=w0(r),y=rA(e,r,h),p=gS({id:u,label:r.getAttribute("data-timeline-label")??r.getAttribute("data-label"),tag:r.tagName}),v=sA({preferredId:u,label:p,fallbackIndex:a,domId:B4(r.id),selector:h,selectorIndex:y,sourceFile:m}),b={id:v.id,label:p,key:v.key,tag:r.tagName.toLowerCase(),start:c.start,duration:c.duration,track:l.trackIndex,domId:B4(r.id),hfId:B4(r.getAttribute("data-hf-id")),selector:h,selectorIndex:y,sourceFile:m,zIndex:PE(r)};return f3e(b,r,f)}function d3e(t,e,n,r){const i=new Set(n.map(h=>h.id)),s=t.querySelector("[data-composition-id]"),a=s==null?void 0:s.getAttribute("data-composition-id"),o=t.querySelectorAll("[data-composition-id][data-start]"),l=[],c=l3e(o3e(t),e);for(const h of o){const m=h,y=m.getAttribute("data-composition-id");if(!y||y===a||i.has(m.id)||i.has(y))continue;const p=h3e({doc:t,iframeWin:e,element:m,compositionId:y,rootDuration:r,fallbackIndex:l.length,resolveEnd:c});p&&l.push(p)}let u=!1;const f=n.map(h=>{if(h.compositionSrc)return h;const m=t.getElementById(h.id)??t.querySelector(`[data-composition-id="${CSS.escape(h.id)}"]`);if(!m)return h;const y=m.getAttribute("data-composition-src")||m.getAttribute("data-composition-file");return y?(u=!0,{...h,compositionSrc:y}):h});return{missing:l,updatedEls:f,patched:u}}function eU(t){return t.tagName||t.kind||"div"}function Qae(t){const{clip:e,fallbackIndex:n,doc:r}=t;let i=t.hostEl??null;const s=gS({id:e.id,label:e.label,tag:eU(e)});let a,o,l,c,u;i&&(a=i.id||void 0,u=i.getAttribute("data-hf-id")||void 0,o=S0(i),l=r&&o?rA(r,i,o):void 0,c=w0(i));const f=sA({preferredId:e.id,label:s,fallbackIndex:n,domId:a,selector:o,selectorIndex:l,sourceFile:c}),h={id:f.id,label:s,key:f.key,kind:e.kind,tag:eU(e),start:e.start,duration:e.duration,track:e.track,authoredTrack:e.track,stackingContextId:e.stackingContextId??null,domId:a,hfId:u,selector:o,selectorIndex:l,sourceFile:c,playbackStart:e.playbackStart,playbackRate:e.playbackRate};if(i){dae(h,i),i.hasAttribute("data-hidden")&&(h.hidden=!0);const m=i.getAttribute("data-timeline-role");m&&(h.timelineRole=m);const y=i.getAttribute("data-audio-group");if(y){h.audioGroup=y;const b=RE(r??i.ownerDocument,y);h.audioGroupLabel=b.label,h.audioGroupVolume=b.volume,h.audioGroupHidden=b.hidden,b.fxChain&&(h.audioGroupFxChain=b.fxChain),b.automation&&(h.audioGroupAutomation=b.automation)}const p=i.getAttribute("data-fx-chain");p&&(h.fxChain=p);const v=i.getAttribute("data-automation");v&&(h.automation=v),h.zIndex=PE(i)}if(e.assetUrl&&(h.src=e.assetUrl),e.kind==="composition"&&e.compositionId){h.playbackStart??(h.playbackStart=0),h.playbackRate??(h.playbackRate=1);let m=e.compositionSrc;if(m||(i=(r==null?void 0:r.querySelector(`[data-composition-id="${CSS.escape(e.compositionId)}"]`))??i,m=(i==null?void 0:i.getAttribute("data-composition-src"))??(i==null?void 0:i.getAttribute("data-composition-file"))??null),m)h.compositionSrc=m;else if(i){const y=i.querySelector("video[src]");y&&(h.src=y.getAttribute("src")||void 0,h.tag="video")}if(i){h.domId=i.id||void 0,h.hfId=i.getAttribute("data-hf-id")||void 0,h.selector=S0(i),h.selectorIndex=r&&h.selector?rA(r,i,h.selector):void 0,h.sourceFile=w0(i);const y=sA({preferredId:e.id,label:s,fallbackIndex:n,domId:h.domId,selector:h.selector,selectorIndex:h.selectorIndex,sourceFile:h.sourceFile});h.id=y.id,h.key=y.key}}return h}function zae(t,e,n=[]){if(!Number.isFinite(e)||e<=0)return[];const r=t.querySelector("[data-composition-id]");if(!r)return[];const i=new Set(n.map(Zn)),s=n.reduce((o,l)=>Math.max(o,Number.isFinite(l.track)?l.track:0),-1),a=[];for(const o of Array.from(r.children)){if(!tCe(r,o))continue;const l=S0(o);if(!l)continue;const c=rA(t,o,l),u=w0(o),f=Xke(o),h=sA({preferredId:o.id||null,label:f,fallbackIndex:n.length+a.length,domId:o.id||void 0,selector:l,selectorIndex:c,sourceFile:u});i.has(h.key)||i.has(h.id)||a.push({domId:o.id||void 0,hfId:o.getAttribute("data-hf-id")||void 0,zIndex:PE(o),duration:e,id:h.id,key:h.key,label:f,selector:l,selectorIndex:c,sourceFile:u,stackingContextId:Gj(o),start:0,tag:o.tagName.toLowerCase(),timingSource:"implicit",track:s+1+a.length})}return a}function Zae(t,e){const n=t.querySelector("[data-composition-id]"),r=t.querySelectorAll("[data-start]"),i=[];let s=0;return r.forEach(a=>{if(a===n||ME(a))return;const o=a,l=Id(o),c=l.start;if(c==null||Number.isFinite(e)&&e>0&&c>=e)return;const u=o.tagName.toLowerCase();let f=l.duration??0;if(f<=0&&(f=Math.max(0,e-c)),Number.isFinite(e)&&e>0&&(f=Math.min(f,Math.max(0,e-c))),!Number.isFinite(f)||f<=0)return;const h=l.trackSource==="default"?s++:l.trackIndex,m=o.getAttribute("data-composition-id"),y=S0(o),p=w0(o),v=rA(t,o,y),b=gS({id:o.id||m||null,label:o.getAttribute("data-timeline-label")??o.getAttribute("data-label"),tag:u}),w=sA({preferredId:o.id||m||null,label:b,fallbackIndex:i.length,domId:o.id||void 0,selector:y,selectorIndex:v,sourceFile:p}),O={id:w.id,label:b,key:w.key,kind:m&&m!==(n==null?void 0:n.getAttribute("data-composition-id"))?"composition":u==="video"||u==="audio"?u:u==="img"?"image":"element",tag:u,start:c,duration:f,track:h,domId:o.id||void 0,hfId:o.getAttribute("data-hf-id")||void 0,selector:y,selectorIndex:v,sourceFile:p,stackingContextId:Gj(o),timingSource:"authored",zIndex:PE(o)},C=hae(o);if(dae(O,o),C){C.tagName==="IMG"&&(O.tag="img");const j=o.getAttribute("data-volume")??C.getAttribute("data-volume");j&&(O.volume=parseFloat(j));const L=C.src||void 0;L&&(O.src=L)}const E=o.getAttribute("data-fx-chain");E&&(O.fxChain=E);const M=o.getAttribute("data-automation");M&&(O.automation=M),o.hasAttribute("data-timeline-locked")&&(O.timelineLocked=!0),o.hasAttribute("data-hidden")&&(O.hidden=!0);const N=o.getAttribute("data-timeline-role");N&&(O.timelineRole=N);const _=o.getAttribute("data-audio-group");if(_){O.audioGroup=_;const j=RE(t,_);O.audioGroupLabel=j.label,O.audioGroupVolume=j.volume,O.audioGroupHidden=j.hidden,j.fxChain&&(O.audioGroupFxChain=j.fxChain),j.automation&&(O.audioGroupAutomation=j.automation)}const I=o.getAttribute("data-composition-src")||o.getAttribute("data-composition-file");if(I)O.compositionSrc=I;else if(m&&m!==(n==null?void 0:n.getAttribute("data-composition-id"))){const j=o.querySelector("video[src]");j&&(O.src=j.getAttribute("src")||void 0,O.tag="video")}O.kind==="composition"&&(O.playbackStart??(O.playbackStart=0),O.playbackRate??(O.playbackRate=1)),i.push(O)}),[...i,...zae(t,e,i)]}function p3e(t,e,n,r){const i=Number.isFinite(n)?n:0,s=Number.isFinite(r)?r:0;if(t.length===0||e.length>=t.length||s>i)return e;const a=new Set(e.map(Zn)),o=t.filter(l=>!a.has(Zn(l))&&l.compositionSrc!=null);return o.length===0?e:[...e,...o]}function m3e(t){const e=t.match(/\/preview\/comp\/(.+?)(?:\?|$)/);return e?decodeURIComponent(e[1]):void 0}function g3e(t){if(!Number.isFinite(t.rootDuration)||t.rootDuration<=0)return null;const e=m3e(t.iframeSrc);return{id:t.compositionId,label:gS({id:t.compositionId,tag:t.tagName}),key:iA({id:t.compositionId,fallbackIndex:0,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:e}),tag:t.tagName.toLowerCase()||"div",start:0,duration:t.rootDuration,track:0,compositionSrc:e,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:e}}function y3e(t,e){let n=e.get(t);if(!n)return null;const r=new Set;for(r.add(t);e.has(n);){if(r.has(n))return n;r.add(n);const i=e.get(n);if(!i)return n;n=i}return n}function Gae(t,e,n){if(!t)return null;const r=F6(t).domId;if(n.has(r))return r;if(n.has(t))return t;const i=e.find(s=>s.label===t||s.label===r);return i!=null&&i.id&&n.has(i.id)?i.id:null}function x3e(t,e){return Number.isFinite(e)&&e>=t.start&&e<t.start+t.duration}function b3e(t,e){return Number.isFinite(e)&&e>=t.start&&e<=t.start+t.duration}function v3e(t,e,n){let r=0,i=e.get(t);const s=new Set;for(s.add(t);i;){if(s.has(i))return r;s.add(i),n.has(i)&&(r+=1),i=e.get(i)}return r}function A3e(t,e,n){const r=new Set(n.values()),i=c=>{const u=new Set;for(const f of e)f.id&&r.has(f.id)&&c(f,t)&&u.add(f.id);return u},s=i(x3e),a=s.size>0?s:i(b3e);let o=null,l=-1;for(const c of a){const u=v3e(c,n,a);u<=l||(o=c,l=u)}return o}function S3e({selectedElementId:t,currentTime:e,manifest:n,parentMap:r}){const i=Gae(t,n,r);return i||A3e(e,n,r)}function iv(t,e){return e.size===0?t:t.filter(n=>!e.has(n.domId??n.id))}function w3e(t,e,n){const r=t.start+t.duration;if(t.start>=n||r<=e)return null;const i=Math.max(t.start,e),s=Math.min(r,n)-i;return s>0?{start:i,duration:s}:null}function O3e(t,e){const n=t!=null&&t.audioGroup?t:e!=null&&e.audioGroup?e:null;return n?{audioGroup:n.audioGroup,audioGroupLabel:n.audioGroupLabel,audioGroupVolume:n.audioGroupVolume,audioGroupHidden:n.audioGroupHidden,audioGroupFxChain:n.audioGroupFxChain,audioGroupAutomation:n.audioGroupAutomation}:{}}function k3e(t,e){if(!t)return{...e};const{hidden:n,timelineLocked:r,timelineRole:i,fxChain:s,automation:a}=t;return{hidden:n,timelineLocked:r,timelineRole:i,fxChain:s,automation:a,...e}}function C3e(t,e,n,r,i,s,a){const o=[];for(const l of t){const c=w3e(l,e.start,e.end);if(!c)continue;const u=Qae({clip:l,fallbackIndex:o.length}),f=l.id??void 0,h=l.id?`#${l.id}`:void 0,m=iA({id:u.id,fallbackIndex:o.length,domId:f,selector:h,selectorIndex:u.selectorIndex,sourceFile:n.sourceFile});o.push({...u,...k3e(i.find(y=>y.key===m),f?a.get(f):void 0),...O3e(i.find(y=>y.key===m),f?s.get(f):void 0),key:m,start:c.start,duration:c.duration,track:e.track+.5*(o.length+1)/(t.length+1),authoredTrack:u.authoredTrack,stackingContextId:u.stackingContextId,expandedParentStart:n.start,expandedHostKey:r,domId:f,selector:h,sourceFile:n.sourceFile,timingSource:"authored"})}return o}function E3e(t,e,n){return t.filter(r=>r.parentId===e).map(r=>({id:r.id,label:r.label,start:n.start,duration:n.duration,track:n.track,kind:"element",tagName:null,compositionId:null,parentCompositionId:n.id??null,compositionSrc:n.compositionSrc??null,assetUrl:null,stackingContextId:r.stackingContextId}))}function T3e(t,e,n,r,i,s=[],a=new Map){const o=t.find(v=>v.id===r||v.domId===r);if(!o)return iv(t,n);const l=e.find(v=>v.id===i),c=(()=>{const v=e.filter(b=>b.id!=null&&n.get(b.id)===i);return v.length>0?v:E3e(s,i,l??o)})();if(c.length===0)return iv(t,n);const u={start:(l==null?void 0:l.start)??o.start,sourceFile:(l==null?void 0:l.compositionSrc)??o.compositionSrc??void 0},f=o.key??o.id,h=new Map(s.map(v=>[v.id,v])),m=C3e(c,{start:o.start,end:o.start+o.duration,track:o.track},u,f,t,h,a);if(m.length===0)return iv(t,n);const y=new Set;for(let v=i;v&&!(y.has(v)||(y.add(v),v===r));)v=n.get(v);const p=v=>y.has(i)&&t.some(b=>(b.domId??b.id)===i)?(v.domId??v.id)===i:(v.key??v.id)===f;return t.filter(v=>(v.key??v.id)===f||y.has(v.domId??v.id)||!n.has(v.domId??v.id)).flatMap(v=>p(v)?[v,...m]:[v])}function xS(){const t=ce(c=>c.elements),e=ce(c=>c.clipManifest),n=ce(c=>c.clipParentMap),r=ce(c=>c.domClipChildren),i=ce(c=>c.subCompositionHostState),s=ce(c=>c.selectedElementId),a=ce(c=>c.currentTime),{rawId:o,selectedRawId:l}=x.useMemo(()=>!e||e.length===0||n.size===0?{rawId:null,selectedRawId:null}:{rawId:S3e({selectedElementId:s,currentTime:a,manifest:e,parentMap:n}),selectedRawId:Gae(s,e,n)},[e,n,s,a]);return x.useMemo(()=>{if(!e||e.length===0||n.size===0)return t;if(!o)return iv(t,n);const c=l?n.get(o):o;if(!c)return iv(t,n);const u=y3e(o,n)??c;return T3e(t,e,n,u,c,r,i)},[t,e,n,r,i,o,l])}const P3e={clip:"rgba(255,255,255,0.055)",clipActive:"rgba(60,230,172,0.16)",accent:"#3CE6AC",label:"rgba(255,255,255,0.5)"},qj={shellBackground:"#0A0A0B",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.16)",rowBackground:"#101014",rowBorder:"rgba(255,255,255,0.06)",gutterBackground:"#0E0F12",gutterBorder:"rgba(255,255,255,0.10)",textPrimary:"rgba(255,255,255,0.92)",textSecondary:"rgba(255,255,255,0.62)",tickText:"rgba(255,255,255,0.34)",tickMajor:"rgba(255,255,255,0.10)",tickMinor:"rgba(255,255,255,0.06)",clipBackground:"#141922",clipBackgroundActive:"#181e28",clipBorder:"rgba(255,255,255,0.10)",clipBorderHover:"rgba(255,255,255,0.18)",clipBorderActive:"rgba(255,255,255,0.24)",clipShadow:"none",clipShadowHover:"0 2px 8px rgba(0,0,0,0.2)",clipShadowActive:"0 2px 8px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.04)",clipShadowDragging:"0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06)",handleColor:"rgba(255,255,255,0.2)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"8px"};function M3e(t){return P3e}function N3e({isHovered:t,isSelected:e,isDragging:n}){return n?.95:e?.82:t?.76:0}function D3e({element:t,draggedElementId:e,previewStart:n,previewTrack:r}){return(t.key??t.id)!==e||n===null||r===null?t:{...t,start:n,track:r}}function qt(t){return Math.round(t*1e3)/1e3}function Aa(t){return Math.round(t*100)/100}function g_(t){var e,n;try{const r=$j(t);if(r!=null)return r;const i=(e=t.style)==null?void 0:e.zIndex;if(i&&i!=="auto"){const l=parseInt(i,10);if(Number.isFinite(l))return l}const s=(n=t.ownerDocument)==null?void 0:n.defaultView;if(!s)return 0;const a=s.getComputedStyle(t).zIndex;if(a==="auto"||a==="")return 0;const o=parseInt(a,10);return Number.isFinite(o)?o:0}catch{return 0}}function Uae(t){return t.stackingContextId??t.parentCompositionId??t.compositionAncestors[0]??""}function Xae(t){return{key:Zn(t),track:t.track,zIndex:t.zIndex??0,stackingContextId:t.stackingContextId??null,parentCompositionId:t.parentCompositionId??null,compositionAncestors:t.compositionAncestors??[]}}function I3e(t,e){return t.start<e.start+e.duration&&e.start<t.start+t.duration}const tM=.35;function Wae(t){var e;return((e=t.tag)==null?void 0:e.toLowerCase())==="audio"}function _3e(t,e){return t.elements.some(n=>Zn(n)===e)}function qae(t,e,n){return t.elements.some(r=>Zn(r)!==n&&I3e(r,e))}function Yae(t,e,n){(e.zIndex??0)!==n&&t.push({key:Zn(e),zIndex:n,domId:e.domId,selector:e.selector,selectorIndex:e.selectorIndex,sourceFile:e.sourceFile})}function Kae(t,e,n,r){let i=0;for(const s of e.elements){if(Zn(s)===r)continue;const o=t.length;Yae(t,s,n),t.length>o&&(i+=1)}return i}function R3e(t,e){return t.filter(n=>n.kind==="visual"&&n.contextKey===e)}function cA(t,e){return t.find(n=>n.id===e)??null}function bS(t){const e=[];return Yae(e,t.element,t.targetZIndex),e}function j3e(t){const e=Zn(t.element),n=t.bottomZIndex+1,r=bS({element:t.element,targetZIndex:n});let i=0,s=n+1;for(let a=t.beforeIndex;a>=0;a-=1){const o=t.layers[a];if(!o)continue;const l=o.zIndex>=s?o.zIndex:s;i+=Kae(r,o,l,e),s=l+1}return{changes:r,siblingChanges:i}}function L3e(t){const e=Zn(t.element),n=t.topZIndex-1,r=bS({element:t.element,targetZIndex:n});let i=0,s=n-1;for(let a=t.afterIndex;a<t.layers.length;a+=1){const o=t.layers[a];if(!o)continue;const l=o.zIndex<=s?o.zIndex:s;i+=Kae(r,o,l,e),s=l-1}return{changes:r,siblingChanges:i}}function F3e(t){const e=t.beforeLayer.zIndex,n=t.afterLayer.zIndex;if(e-n>1)return bS({element:t.element,targetZIndex:Math.floor((e+n)/2)});const r=t.layers.findIndex(o=>o.id===t.beforeLayer.id),i=t.layers.findIndex(o=>o.id===t.afterLayer.id),s=j3e({element:t.element,layers:t.layers,beforeIndex:r,bottomZIndex:n}),a=L3e({element:t.element,layers:t.layers,afterIndex:i,topZIndex:e});return s.siblingChanges<=a.siblingChanges?s.changes:a.changes}function $3e(t){const e=cA(t.layers,t.layerId);return!e||qae(e,t.element,Zn(t.element))?null:bS({element:t.element,targetZIndex:e.zIndex})}function tU(t){const e=cA(t.layers,t.layerId);return e?bS({element:t.element,targetZIndex:e.zIndex+t.offset}):null}function B3e(t){switch(t.placement.type){case"onto":return $3e({element:t.element,layers:t.layers,layerId:t.placement.layerId});case"above":return tU({element:t.element,layers:t.layers,layerId:t.placement.layerId,offset:1});case"below":return tU({element:t.element,layers:t.layers,layerId:t.placement.layerId,offset:-1});case"between":{const e=cA(t.layers,t.placement.beforeLayerId),n=cA(t.layers,t.placement.afterLayerId);return e&&n?F3e({element:t.element,layers:t.layers,beforeLayer:e,afterLayer:n}):null}}}function V3e(t){if(Wae(t.element))return null;const e=Uae(Xae(t.element)),n=R3e(t.layers,e),r=B3e({element:t.element,layers:n,placement:t.placement});return r&&r.length>0?{contextKey:e,placement:t.placement,zIndexChanges:r}:null}function H3e(t,e){const n=t[0],r=t[t.length-1];if(!n||!r)return null;if(e<-tM)return{type:"above",layerId:n.id};if(e>t.length-1+tM)return{type:"below",layerId:r.id};const i=Math.round(e),s=t[i];if(s&&Math.abs(e-i)<=tM)return{type:"onto",layerId:s.id};const a=Math.max(0,Math.min(t.length,Math.ceil(e)));if(a<=0)return{type:"above",layerId:n.id};if(a>=t.length)return{type:"below",layerId:r.id};const o=t[a-1],l=t[a];return o&&l?{type:"between",beforeLayerId:o.id,afterLayerId:l.id}:null}function Q3e(t){if(t.placement.type!=="onto")return t.placement;const e=cA(t.layers,t.placement.layerId);return e?qae(e,t.element,t.draggedKey)?t.targetPosition<t.currentIndex?{type:"above",layerId:e.id}:t.targetPosition>t.currentIndex?{type:"below",layerId:e.id}:t.placement:t.placement:null}function z3e(t,e){return e.type==="onto"?e.layerId:e.type==="between"?`preview:${t}:between:${e.beforeLayerId}:${e.afterLayerId}`:`preview:${t}:${e.type}:${e.layerId}`}function Z3e(t,e){if(e.type==="onto")return Math.max(0,t.indexOf(e.layerId));if(e.type==="between")return Math.max(0,t.indexOf(e.afterLayerId));const n=Math.max(0,t.indexOf(e.layerId));return e.type==="above"?n:n+1}function G3e(t){if(Wae(t.element))return null;const e=Uae(Xae(t.element)),n=new Map(t.layers.map(c=>[c.id,c])),r=t.layerOrder.map(c=>n.get(c)??null).filter(c=>c!=null&&c.kind==="visual"&&c.contextKey===e),i=Zn(t.element),s=r.findIndex(c=>_3e(c,i));if(s<0)return null;const a=s+t.trackDeltaRaw,o=H3e(r,a);if(!o)return null;const l=Q3e({layers:r,element:t.element,draggedKey:i,placement:o,targetPosition:a,currentIndex:s});return l?{previewLayerId:z3e(i,l),previewLayerIndex:Z3e(t.layerOrder,l),stackingReorder:V3e({element:t.element,layers:r,placement:l})}:null}const _d=72,sv=32,Vo=232,Xi=48,Rg=28,La=24,da=3,U3e=18;function X3e(t,e){let n=0,r=t.length;for(;n<r;){const i=Math.floor((n+r)/2);(t[i]??Number.POSITIVE_INFINITY)<e?n=i+1:r=i}return n}function Yj(t,e,n,r=new Set){if(!(t!=null&&t.length))return[];const i=(n==null?void 0:n.start)??Number.NEGATIVE_INFINITY,s=(n==null?void 0:n.end)??Number.POSITIVE_INFINITY,a=new Set;for(let o=X3e(t,i);o<t.length;o++){const l=t[o];if(l===void 0||l>=s)break;a.add(o)}for(const o of r)o>=0&&o<t.length&&a.add(o);return[...a].sort((o,l)=>o-l).map(o=>({index:o,time:t[o],strength:e==null?void 0:e[o]}))}function jg(t){return Xi+Math.max(0,Math.trunc(t))*Rg}const W3e=da/Xi,u0=50,Jae=Math.round(Xi*1.5),q3e=48;function Y3e(t,e){return t.map(n=>{let r=0,i=0;for(const s of n)e!=null&&e.has(s.clipId)&&(r=Math.max(r,s.laneCount),i=Math.max(i,s.automationLaneCount??0));return Xi+Math.max(0,Math.trunc(r))*Rg+i*_d})}function H6(t){return t===void 0||!Number.isFinite(t)||t<=0?Xi:t}const y_=new WeakMap,LE=Object.freeze([]);function Kj(t,e){const n=Object.freeze(e.map(H6)),r=Object.freeze(n.map((f,h)=>{const m=t[h];return m!==void 0&&Number.isFinite(m)?m:h})),i=[0];for(const f of n)i.push((i.at(-1)??0)+f);Object.freeze(i);const s=new Map(r.map((f,h)=>[f,h])),a=f=>H6(n[f]),o=f=>{if(n.length===0)return f*Xi;if(f<=0)return f*a(0);if(f>=n.length)return(i[n.length]??0)+(f-n.length)*Xi;const h=Math.floor(f);return(i[h]??0)+(f-h)*a(h)},l=f=>{const h=f-La-u0;if(n.length===0)return h/Xi;if(h<0)return h/a(0);const m=i[n.length]??0;if(h>=m)return n.length+(h-m)/Xi;let y=1,p=n.length;for(;y<p;){const b=Math.floor((y+p)/2);(i[b]??0)>h?p=b:y=b+1}const v=y-1;return v+(h-(i[v]??0))/a(v)},c={rowKeys:r,rowHeights:n,rowOffsets:i,rowsHeight:i.at(-1)??0,canvasHeight:La+u0+(i.at(-1)??0)+Jae,getRowIndex:f=>s.get(f)??-1,getRowHeight:a,getRowTop:f=>La+u0+o(f),getRowFromY:l,getRowPositionFromY:f=>{const h=l(f),m=Math.floor(h);return{rowFloat:h,row:m,fraction:h-m,rowHeight:a(m)}}},u=Object.freeze(c);return y_.set(n,u),u}function Jj(t){const e=y_.get(t);if(e)return e;const n=Kj(t.map((r,i)=>i),t);return y_.set(t,n),n}function eoe(t,e=LE){return H6(e[t])}function K3e(t,e){return Jj(e).getRowTop(t)-La-u0}function nM(t,e=LE){return La+u0+K3e(t,e)}function x_(t,e=LE){return Jj(e).getRowFromY(t)}function J3e(t,e=LE){return Jj(e).getRowPositionFromY(t)}function e5e(t){return da/H6(t)}const nU=160,toe=60,t5e=1.2;function n5e(t,e,n){const r=Number.isFinite(e)&&e>0?e:0,i=Math.max(r*t5e,toe);return!Number.isFinite(t)||t<=n?100:(t-n-2)/i}function r5e(t){const e=Number.isFinite(t.pps)?Math.max(t.pps,0):0;return Math.max(t.trackContentWidth,t.viewportWidth-t.contentOrigin-2,t.dragGhostEndPx??0,t.resizeGhostEndPx??0,toe*e)}function FE(t){return t.clientX-t.rectLeft+t.scrollLeft-t.contentOrigin}function i5e(t,e,n){return t==="fit"||!Number.isFinite(e)||!Number.isFinite(n)?!1:e-n>1}function s5e(t,e,n){return e==="fit"?0:n}function rU(t){const e=Math.max(0,t.currentPixelsPerSecond),n=Math.max(0,t.nextPixelsPerSecond);if(!Number.isFinite(t.pointerX)||!Number.isFinite(t.currentScrollLeft)||!Number.isFinite(t.duration)||t.duration<=0||e<=0||n<=0)return Math.max(0,t.currentScrollLeft);const r=Math.max(0,FE({clientX:t.pointerX,rectLeft:0,scrollLeft:t.currentScrollLeft,contentOrigin:t.contentOrigin})),i=Math.max(0,Math.min(t.duration,r/e));return Math.max(0,t.contentOrigin+i*n-t.pointerX)}const Q6=9;function b_(t,e,n){return!Number.isFinite(t)||!Number.isFinite(e)?n-Q6/2:n+Math.max(0,t)*Math.max(0,e)-Q6/2}function noe(t){const{clientX:e,viewportLeft:n,scrollLeft:r,contentOrigin:i,pixelsPerSecond:s,duration:a}=t;if(!(s>0)||!Number.isFinite(a))return 0;const o=FE({clientX:e,rectLeft:n,scrollLeft:r,contentOrigin:i});return Math.max(0,Math.min(a,o/s))}const iU=.75;function a5e(t){const e=Number.isFinite(t.currentScrollLeft)?Math.max(0,t.currentScrollLeft):0,n=Number.isFinite(t.maxScrollLeft)?Math.max(0,t.maxScrollLeft):0,r=t.viewportWidth-t.contentOrigin;if(!Number.isFinite(t.playheadX)||!Number.isFinite(t.contentOrigin)||!Number.isFinite(r)||r<=0||n<=0)return Math.min(n,e);const i=e+t.contentOrigin,s=i+r*iU;let a=e;return t.playheadX>s?a=t.playheadX-t.contentOrigin-r*iU:t.playheadX<i&&(a=t.playheadX-t.contentOrigin),Math.max(0,Math.min(n,a))}function o5e(t,e){return!Number.isFinite(t)||!Number.isFinite(e)?!0:t-e<=1}function l5e(t,e){return t.length===0?0:e==null||e<0?t[0]:e>=t.length?Math.max(...t)+1:t[e]??t[t.length-1]??0}function c5e(t,e,n){const r=FE({clientX:e,rectLeft:t.rectLeft,scrollLeft:t.scrollLeft,contentOrigin:t.contentOrigin}),i=n-t.rectTop+t.scrollTop,s=Math.round(r/Math.max(t.pixelsPerSecond,1)*100)/100,a=Math.max(0,t.clampStartToDuration===!1?s:Math.min(t.duration,s)),o=Math.floor(x_(i,t.rowHeights));return{start:a,track:l5e(t.trackOrder,o)}}function u5e(t){return t.kind==="composition"||t.compositionSrc||t.playbackStartAttr!=null||t.sourceDuration!=null&&Number.isFinite(t.sourceDuration)&&t.sourceDuration>0?!0:["video","audio","img"].includes(t.tag.toLowerCase())}function f5e(t){return!!(t.domId||t.selector)}function vS(t){if(t.timingSource==="implicit"||t.timelineLocked)return{canMove:!1,canTrimStart:!1,canTrimEnd:!1};const e=f5e(t),n=Number.isFinite(t.duration)&&t.duration>0,r=u5e(t);return{canMove:e&&(r||n),canTrimEnd:e&&n,canTrimStart:e&&n}}const h5e=.1,d5e=.05;function p5e(t,e,n){return Math.min(Math.max(t,e),n)}function R1(t){return Aa(t)}function $E(t){return Math.max(d5e,t??h5e)}function roe(t){return Math.max(.1,t??1)}function ioe(t,e,n){const r=roe(t.playbackRate),i=t.playbackStart!=null?t.playbackStart/r:Number.POSITIVE_INFINITY;return{minDelta:-Math.min(t.start-e,i),maxDelta:t.duration-n}}function soe(t,e){const n=roe(t.playbackRate);return{start:t.start+e,duration:t.duration-e,playbackStart:t.playbackStart!=null?Math.max(0,t.playbackStart+e*n):void 0}}function m5e(t,e,n,r=$E()){if(e.length===0)return 0;if(n==="end"){const o=Math.max(...e.map(l=>r-l.duration));return R1(Math.max(t,o))}const i=e.map(o=>ioe(o,0,r)),s=Math.max(...i.map(o=>o.minDelta)),a=Math.min(...i.map(o=>o.maxDelta));return R1(p5e(t,s,a))}function g5e(t,e,n,r=$E()){const i=m5e(n,t,e,r);return{delta:i,members:t.map(s=>{if(e==="end")return{start:s.start,duration:R1(s.duration+i),playbackStart:s.playbackStart};const a=soe(s,i);return{start:R1(a.start),duration:R1(a.duration),playbackStart:a.playbackStart!=null?R1(a.playbackStart):void 0}})}}function sU(t){return t.key??t.id}function y5e(t){const e=t.tag.toLowerCase();return t.kind==="composition"||e==="audio"||e==="video"}function x5e(t,e){const n=vS({tag:t.tag,kind:t.kind,duration:t.duration,domId:t.domId,selector:t.selector,compositionSrc:t.compositionSrc,playbackStart:t.playbackStart,playbackStartAttr:t.playbackStartAttr,sourceDuration:t.sourceDuration,timingSource:t.timingSource,timelineLocked:t.timelineLocked});return e==="start"?n.canTrimStart:n.canTrimEnd}function b5e(t,e,n,r){if(e.size<=1||!e.has(n))return null;const i=t.filter(s=>e.has(sU(s)));return i.length<=1||!i.every(s=>x5e(s,r))?null:i.map(s=>({element:s,key:sU(s),start:s.start,duration:s.duration,playbackStart:r==="start"&&y5e(s)?s.playbackStart??0:s.playbackStart,playbackRate:s.playbackRate}))}function v5e(t,e,n,r=$E()){return g5e(t,e,n,r).members.map((s,a)=>({element:t[a].element,key:t[a].key,start:s.start,duration:s.duration,playbackStart:s.playbackStart}))}function A5e(t,e){const n=t.members.find(s=>s.key===t.grabbedKey),r=t.edge==="start"?e.previewStart-((n==null?void 0:n.start)??e.previewStart):e.previewDuration-((n==null?void 0:n.duration)??e.previewDuration),i=v5e(t.members,t.edge,r);return t.changes=i,t.hasChanged=i.some((s,a)=>s.start!==t.members[a].start||s.duration!==t.members[a].duration||s.playbackStart!==t.members[a].playbackStart),i.find(s=>s.key===t.grabbedKey)}const j1=Aa;function uA(t,e,n){return Math.min(Math.max(t,e),n)}const aU=.55,KO=40,oU=12;function eL(t,e,n,r=0){const i=(a,o,l)=>{if(l<a+KO){const c=Math.min(1,Math.max(0,1-(l-a)/KO));return-Math.round(oU*c)}if(l>o-KO){const c=Math.min(1,Math.max(0,1-(o-l)/KO));return Math.round(oU*c)}return 0},s=Math.min(t.right,t.left+Math.max(0,r));return{x:i(s,t.right,e),y:i(t.top,t.bottom,n)}}function S5e(t,e,n){const r=(t.currentScrollLeft??0)-(t.originScrollLeft??0),i=(e-t.originClientX+r)/Math.max(t.pixelsPerSecond,1),s=n-t.originRow,a=Math.round(s),o=uA(j1(t.start+i),0,Math.max(0,t.maxStart));if(t.stackingElement){const v=t.timelineLayers&&t.layerOrder?G3e({element:{...t.stackingElement,duration:t.duration},layers:t.timelineLayers,layerOrder:t.layerOrder,trackDeltaRaw:s}):null;return{start:o,track:t.track,previewLayerId:v==null?void 0:v.previewLayerId,previewLayerIndex:v==null?void 0:v.previewLayerIndex,stackingReorder:(v==null?void 0:v.stackingReorder)??null}}const l=Math.max(0,t.trackOrder.indexOf(t.track)),c=l+a,u=uA(c,0,Math.max(0,t.trackOrder.length-1)),f=Math.min(...t.trackOrder),h=Math.max(...t.trackOrder);let m=t.trackOrder[u]??t.track;const y=l===0,p=l===t.trackOrder.length-1;return y&&c<0&&l+s<=-aU?m=f-1:p&&c>t.trackOrder.length-1&&l+s>=t.trackOrder.length-1+aU&&(m=h+1),{start:o,track:m}}function w5e(t,e,n){const r=$E(t.minDuration),i=(n-t.originClientX)/Math.max(t.pixelsPerSecond,1);if(e==="end"){const c=uA(j1(t.duration+i),r,Math.max(r,t.maxEnd-t.start));return{start:t.start,duration:c,playbackStart:t.playbackStart}}const{minDelta:s,maxDelta:a}=ioe(t,t.minStart,r),o=uA(i,s,a),l=soe(t,o);return{start:j1(l.start),duration:j1(l.duration),playbackStart:l.playbackStart!=null?j1(l.playbackStart):void 0}}function O5e(t){if(t.capabilities.canMove)return null;const e=Math.max(0,t.width),n=uA(t.offsetX,0,e),r=Math.max(0,t.handleWidth);return n<=r&&!t.capabilities.canTrimStart?"resize-start":n>=Math.max(0,e-r)&&!t.capabilities.canTrimEnd?"resize-end":"move"}function k5e(t,e){return{start:t.start,end:t.start+t.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function C5e({rangeStart:t,rangeEnd:e,elements:n,prompt:r}){const i=Math.min(t,e),s=Math.max(t,e),a=n.map(o=>`- #${o.id} (${o.tag}) - ${os(o.start)} to ${os(o.start+o.duration)}, track ${o.track}`).join(`
72
72
  `);return`Edit the following HyperFrames composition:
73
73
 
@@ -201,7 +201,7 @@ Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=1
201
201
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};Gn.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
202
202
  `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Xf(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,e=this.input.charCodeAt(this.pos),(r!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-r.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Ey(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}};Gn.readHexChar=function(t){var e=this.pos,n=this.readInt(16,t);return n===null&&this.invalidStringToken(e,"Bad character escape sequence"),n};Gn.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(jd(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,t+=this.input.slice(n,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(e?Ru:jd)(a,r)||this.invalidStringToken(s,"Invalid Unicode escape"),t+=Xf(a),n=this.pos}else break;e=!1}return t+this.input.slice(n,this.pos)};Gn.readWord=function(){var t=this.readWord1(),e=de.name;return this.keywords.test(t)&&(e=wL[t]),this.finishToken(e,t)};var xNe="8.17.0";bs.acorn={Parser:bs,version:xNe,defaultOptions:M_,Position:hA,SourceLocation:GE,getLineInfo:Ule,Node:qE,TokenType:cr,tokTypes:de,keywordTypes:wL,TokContext:oc,tokContexts:gi,isIdentifierChar:jd,isIdentifierStart:Ru,Token:PL,isNewLine:Ey,lineBreak:So,lineBreakG:BMe,nonASCIIwhitespace:Zle};function dA(t,e){return bs.parse(t,e)}function J0(t,e,n,r,i){n||(n=pt),(function s(a,o,l){var c=l||a.type;NL(n,c,a,o,s),e[c]&&e[c](a,o)})(t,r,i)}function If(t,e,n,r,i){var s=[];n||(n=pt),(function a(o,l,c){var u=c||o.type,f=o!==s[s.length-1];f&&s.push(o),NL(n,u,o,l,a),e[u]&&e[u](o,l||s,s),f&&s.pop()})(t,r,i)}function bNe(t,e,n,r,i){n||(n=pt);var s;(function a(o,l,c){var u=c||o.type;NL(n,u,o,l,a),s!==o&&(e(o,l,u),s=o)})(t,r,i)}function ML(t,e,n){n(t,e)}function em(t,e,n){}function NL(t,e,n,r,i){if(t[e]==null)throw new Error("No walker function defined for node type "+e);t[e](n,r,i)}var pt={};pt.Program=pt.BlockStatement=pt.StaticBlock=function(t,e,n){for(var r=0,i=t.body;r<i.length;r+=1){var s=i[r];n(s,e,"Statement")}};pt.Statement=ML;pt.EmptyStatement=em;pt.ExpressionStatement=pt.ParenthesizedExpression=pt.ChainExpression=function(t,e,n){return n(t.expression,e,"Expression")};pt.IfStatement=function(t,e,n){n(t.test,e,"Expression"),n(t.consequent,e,"Statement"),t.alternate&&n(t.alternate,e,"Statement")};pt.LabeledStatement=function(t,e,n){return n(t.body,e,"Statement")};pt.BreakStatement=pt.ContinueStatement=em;pt.WithStatement=function(t,e,n){n(t.object,e,"Expression"),n(t.body,e,"Statement")};pt.SwitchStatement=function(t,e,n){n(t.discriminant,e,"Expression");for(var r=0,i=t.cases;r<i.length;r+=1){var s=i[r];n(s,e)}};pt.SwitchCase=function(t,e,n){t.test&&n(t.test,e,"Expression");for(var r=0,i=t.consequent;r<i.length;r+=1){var s=i[r];n(s,e,"Statement")}};pt.ReturnStatement=pt.YieldExpression=pt.AwaitExpression=function(t,e,n){t.argument&&n(t.argument,e,"Expression")};pt.ThrowStatement=pt.SpreadElement=function(t,e,n){return n(t.argument,e,"Expression")};pt.TryStatement=function(t,e,n){n(t.block,e,"Statement"),t.handler&&n(t.handler,e),t.finalizer&&n(t.finalizer,e,"Statement")};pt.CatchClause=function(t,e,n){t.param&&n(t.param,e,"Pattern"),n(t.body,e,"Statement")};pt.WhileStatement=pt.DoWhileStatement=function(t,e,n){n(t.test,e,"Expression"),n(t.body,e,"Statement")};pt.ForStatement=function(t,e,n){t.init&&n(t.init,e,"ForInit"),t.test&&n(t.test,e,"Expression"),t.update&&n(t.update,e,"Expression"),n(t.body,e,"Statement")};pt.ForInStatement=pt.ForOfStatement=function(t,e,n){n(t.left,e,"ForInit"),n(t.right,e,"Expression"),n(t.body,e,"Statement")};pt.ForInit=function(t,e,n){t.type==="VariableDeclaration"?n(t,e):n(t,e,"Expression")};pt.DebuggerStatement=em;pt.FunctionDeclaration=function(t,e,n){return n(t,e,"Function")};pt.VariableDeclaration=function(t,e,n){for(var r=0,i=t.declarations;r<i.length;r+=1){var s=i[r];n(s,e)}};pt.VariableDeclarator=function(t,e,n){n(t.id,e,"Pattern"),t.init&&n(t.init,e,"Expression")};pt.Function=function(t,e,n){t.id&&n(t.id,e,"Pattern");for(var r=0,i=t.params;r<i.length;r+=1){var s=i[r];n(s,e,"Pattern")}n(t.body,e,t.expression?"Expression":"Statement")};pt.Pattern=function(t,e,n){t.type==="Identifier"?n(t,e,"VariablePattern"):t.type==="MemberExpression"?n(t,e,"MemberPattern"):n(t,e)};pt.VariablePattern=em;pt.MemberPattern=ML;pt.RestElement=function(t,e,n){return n(t.argument,e,"Pattern")};pt.ArrayPattern=function(t,e,n){for(var r=0,i=t.elements;r<i.length;r+=1){var s=i[r];s&&n(s,e,"Pattern")}};pt.ObjectPattern=function(t,e,n){for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];s.type==="Property"?(s.computed&&n(s.key,e,"Expression"),n(s.value,e,"Pattern")):s.type==="RestElement"&&n(s.argument,e,"Pattern")}};pt.Expression=ML;pt.ThisExpression=pt.Super=pt.MetaProperty=em;pt.ArrayExpression=function(t,e,n){for(var r=0,i=t.elements;r<i.length;r+=1){var s=i[r];s&&n(s,e,"Expression")}};pt.ObjectExpression=function(t,e,n){for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];n(s,e)}};pt.FunctionExpression=pt.ArrowFunctionExpression=pt.FunctionDeclaration;pt.SequenceExpression=function(t,e,n){for(var r=0,i=t.expressions;r<i.length;r+=1){var s=i[r];n(s,e,"Expression")}};pt.TemplateLiteral=function(t,e,n){for(var r=0,i=t.quasis;r<i.length;r+=1){var s=i[r];n(s,e)}for(var a=0,o=t.expressions;a<o.length;a+=1){var l=o[a];n(l,e,"Expression")}};pt.TemplateElement=em;pt.UnaryExpression=pt.UpdateExpression=function(t,e,n){n(t.argument,e,"Expression")};pt.BinaryExpression=pt.LogicalExpression=function(t,e,n){n(t.left,e,"Expression"),n(t.right,e,"Expression")};pt.AssignmentExpression=pt.AssignmentPattern=function(t,e,n){n(t.left,e,"Pattern"),n(t.right,e,"Expression")};pt.ConditionalExpression=function(t,e,n){n(t.test,e,"Expression"),n(t.consequent,e,"Expression"),n(t.alternate,e,"Expression")};pt.NewExpression=pt.CallExpression=function(t,e,n){if(n(t.callee,e,"Expression"),t.arguments)for(var r=0,i=t.arguments;r<i.length;r+=1){var s=i[r];n(s,e,"Expression")}};pt.MemberExpression=function(t,e,n){n(t.object,e,"Expression"),t.computed&&n(t.property,e,"Expression")};pt.ExportNamedDeclaration=pt.ExportDefaultDeclaration=function(t,e,n){if(t.declaration&&n(t.declaration,e,t.type==="ExportNamedDeclaration"||t.declaration.id?"Statement":"Expression"),t.source&&n(t.source,e,"Expression"),t.attributes)for(var r=0,i=t.attributes;r<i.length;r+=1){var s=i[r];n(s,e)}};pt.ExportAllDeclaration=function(t,e,n){if(t.exported&&n(t.exported,e),n(t.source,e,"Expression"),t.attributes)for(var r=0,i=t.attributes;r<i.length;r+=1){var s=i[r];n(s,e)}};pt.ImportAttribute=function(t,e,n){n(t.value,e,"Expression")};pt.ImportDeclaration=function(t,e,n){for(var r=0,i=t.specifiers;r<i.length;r+=1){var s=i[r];n(s,e)}if(n(t.source,e,"Expression"),t.attributes)for(var a=0,o=t.attributes;a<o.length;a+=1){var l=o[a];n(l,e)}};pt.ImportExpression=function(t,e,n){n(t.source,e,"Expression"),t.options&&n(t.options,e,"Expression")};pt.ImportSpecifier=pt.ImportDefaultSpecifier=pt.ImportNamespaceSpecifier=pt.Identifier=pt.PrivateIdentifier=pt.Literal=em;pt.TaggedTemplateExpression=function(t,e,n){n(t.tag,e,"Expression"),n(t.quasi,e,"Expression")};pt.ClassDeclaration=pt.ClassExpression=function(t,e,n){return n(t,e,"Class")};pt.Class=function(t,e,n){t.id&&n(t.id,e,"Pattern"),t.superClass&&n(t.superClass,e,"Expression"),n(t.body,e)};pt.ClassBody=function(t,e,n){for(var r=0,i=t.body;r<i.length;r+=1){var s=i[r];n(s,e)}};pt.MethodDefinition=pt.PropertyDefinition=pt.Property=function(t,e,n){t.computed&&n(t.key,e,"Expression"),t.value&&n(t.value,e,"Expression")};const DL=new Set(["type","start","end","loc","range","__hfProvenance","__hfOrder"]),vNe=new Set(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration"]),ANe=new Set(["set","to","from","fromTo"]),SNe=8,wNe=512;function IL(t){return!!t&&vNe.has(t.type)}function KE(t){return!!t&&typeof t=="object"&&typeof t.type=="string"}function Oce(t,e){for(const n of Object.keys(t)){if(DL.has(n)||kce(t,n))continue;const r=t[n];if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=e(r[i]);else t[n]=e(r)}}function _L(t){return structuredClone(t)}function I_(t,e){(t==null?void 0:t.type)==="Identifier"?e.add(t.name):(t==null?void 0:t.type)==="AssignmentPattern"?I_(t.left,e):(t==null?void 0:t.type)==="RestElement"&&I_(t.argument,e)}function ONe(t){var e;return IL(t)?t.params??[]:t.type==="VariableDeclarator"?[t.id]:t.type==="CatchClause"?[t.param]:t.type==="AssignmentExpression"&&((e=t.left)==null?void 0:e.type)==="Identifier"?[t.left]:[]}function kNe(t){const e=new Set,n=r=>{if(!KE(r))return r;for(const i of ONe(r))I_(i,e);return Oce(r,n),r};return n(t),e}function kce(t,e){return t.computed?!1:t.type==="MemberExpression"&&e==="property"||t.type==="Property"&&e==="key"}function Cce(t,e){const n=kNe(t);let r=e;if(n.size>0){r=new Map(e);for(const i of n)r.delete(i)}return r.size===0?t:Ece(t,r)}function Ece(t,e){return KE(t)?t.type==="Identifier"&&e.has(t.name)?_L(e.get(t.name)):(Oce(t,n=>Ece(n,e)),t):t}function Tce(t,e){return t&&typeof t=="object"&&(t.__hfProvenance=e),t}function H4(t){return t==null?void 0:t.__hfProvenance}function Pce(t){return{type:"Literal",value:t,raw:String(t)}}function Fg(t,e){if(KE(t)){e(t);for(const n of Object.keys(t)){if(DL.has(n))continue;const r=t[n];if(Array.isArray(r))for(const i of r)Fg(i,e);else Fg(r,e)}}}function CNe(t){var n,r;let e=(n=t.callee)==null?void 0:n.object;for(;(e==null?void 0:e.type)==="CallExpression";)e=(r=e.callee)==null?void 0:r.object;return(e==null?void 0:e.type)==="Identifier"?e.name:null}function Mce(t,e){var n,r;return CNe(t)!==e?!1:((r=(n=t.callee)==null?void 0:n.property)==null?void 0:r.type)==="Identifier"&&ANe.has(t.callee.property.name)}function ENe(t,e){let n=!1;return Fg(t,r=>{r.type==="CallExpression"&&Mce(r,e)&&(n=!0)}),n}function JE(t){return typeof t.start=="number"&&typeof t.end=="number"?[t.start,t.end]:void 0}const TNe=new Set(["ArrayExpression","BinaryExpression","ChainExpression","ConditionalExpression","Identifier","Literal","LogicalExpression","MemberExpression","ObjectExpression","Property","SpreadElement","TemplateElement","TemplateLiteral","UnaryExpression"]);function PNe(t,e){let n=!0;const r=(i,s,a)=>{if(!(!KE(i)||!n)){if(!TNe.has(i.type)){n=!1;return}if(i.type==="UnaryExpression"&&i.operator==="delete"){n=!1;return}if(i.type==="Identifier"){!(s&&a?kce(s,a):!1)&&i.name!=="undefined"&&!e.has(i.name)&&(n=!1);return}for(const o of Object.keys(i)){if(DL.has(o))continue;const l=i[o];if(Array.isArray(l))for(const c of l)r(c,i,o);else r(l,i,o)}}};return r(t),n}const a8=new WeakMap;function MNe(t,e){var n;return t.type==="Identifier"?{name:t.name}:t.type!=="AssignmentPattern"||((n=t.left)==null?void 0:n.type)!=="Identifier"||!PNe(t.right,e)?null:{name:t.left.name,defaultExpression:t.right}}function RL(t){if(a8.has(t))return a8.get(t)??null;const e=[],n=new Set;for(const r of t.params??[]){const i=MNe(r,n);if(!i)return a8.set(t,null),null;e.push(i),n.add(i.name)}return a8.set(t,e),e}function Nce(t){var e;return IL(t)&&((e=t.body)==null?void 0:e.type)==="BlockStatement"&&RL(t)!==null}function NNe(t,e){let n=!1;return Fg(t,r=>{var i;r.type==="CallExpression"&&((i=r.callee)==null?void 0:i.type)==="Identifier"&&e.has(r.callee.name)&&(n=!0)}),n}function DNe(t){var n,r;if(((n=t.declarations)==null?void 0:n.length)!==1)return null;const e=t.declarations[0];return((r=e.id)==null?void 0:r.type)==="Identifier"&&Nce(e.init)?[e.id.name,e.init]:null}function INe(t){return t.type==="FunctionDeclaration"?t.id&&Nce(t)?[t.id.name,t]:null:t.type==="VariableDeclaration"?DNe(t):null}function _Ne(t){const e=new Map;for(const n of t.body??[]){const r=INe(n);r&&e.set(r[0],r[1])}return e}function RNe(t,e){const n=new Set;for(const[r,i]of t)ENe(i.body,e)&&n.add(r);for(let r=!0;r;){r=!1;for(const[i,s]of t)!n.has(i)&&NNe(s.body,n)&&(n.add(i),r=!0)}return n}function MX(t,e){t.set(e,(t.get(e)??0)+1)}function jNe(){return{type:"Identifier",name:"undefined"}}function LNe(t){var e;return(t==null?void 0:t.type)==="Identifier"&&t.name==="undefined"||(t==null?void 0:t.type)==="UnaryExpression"&&t.operator==="void"&&((e=t.argument)==null?void 0:e.type)==="Literal"&&t.argument.value===0}function Dce(t,e){var r,i;if((r=t.arguments)!=null&&r.some(s=>(s==null?void 0:s.type)==="SpreadElement"))return null;const n=new Map;for(let s=0;s<e.length;s++){const a=e[s],o=(i=t.arguments)==null?void 0:i[s];o&&!LNe(o)?n.set(a.name,o):a.defaultExpression?n.set(a.name,Cce(_L(a.defaultExpression),n)):n.set(a.name,jNe())}return n}function FNe(t,e){var r;if(t.type!=="ExpressionStatement")return;const n=t.expression;if(!((n==null?void 0:n.type)!=="CallExpression"||((r=n.callee)==null?void 0:r.type)!=="Identifier"))return e.has(n.callee.name)?n:void 0}function $Ne(t,e){const n=new Set(e.keys()),r=new Map,i=new Map,s=new Set;Fg(t,o=>{o.type==="Identifier"&&n.has(o.name)&&MX(r,o.name);const l=FNe(o,n);if(!l)return;MX(i,l.callee.name);const c=e.get(l.callee.name),u=c&&RL(c);(!u||!Dce(l,u))&&s.add(l.callee.name)});const a=new Map;for(const[o,l]of e)!s.has(o)&&(r.get(o)??0)===1+(i.get(o)??0)&&a.set(o,l);return a}function BNe(t,e){const n=_Ne(t);if(n.size===0)return n;const r=RNe(n,e);for(const i of[...n.keys()])r.has(i)||n.delete(i);return n.size===0?n:$Ne(t,n)}function VNe(t,e){var n,r;if(t.type==="FunctionDeclaration")return!!t.id&&e.get(t.id.name)===t;if(t.type==="VariableDeclaration"&&((n=t.declarations)==null?void 0:n.length)===1){const i=t.declarations[0];return((r=i.id)==null?void 0:r.type)==="Identifier"&&e.get(i.id.name)===i.init}return!1}function jL(t){return(t==null?void 0:t.type)==="BlockStatement"?t.body??[]:t?[{type:"ExpressionStatement",expression:t}]:[]}function HNe(t,e,n){for(const r of t)Fg(r,i=>{i.type==="CallExpression"&&Mce(i,n.timelineVar)&&(Tce(i,{...e}),i.__hfOrder=n.order.n++)})}function LL(t,e,n,r){const i=Cce(_L({type:"BlockStatement",body:t}),e);return Tce(i,n),HNe(i.body,n,r),i.body=_ce(i.body,{...r,depth:r.depth+1}),[i]}function QNe(t,e){const n=e.helpers.get(t.callee.name);if(!n)return null;const r=RL(n);if(!r)return null;const i=Dce(t,r);if(!i)return null;const s={kind:"helper",fn:t.callee.name,callSite:++e.site.n,sourceRange:JE(t)};return LL(n.body.body,i,s,e)}function zNe(t,e){var n;if(t.operator==="+=")return uv(e(t.right));if(t.operator==="-="){const r=uv(e(t.right));return r===void 0?void 0:-r}if(t.operator==="="&&((n=t.right)==null?void 0:n.type)==="BinaryExpression")return uv(e(t.right.right))}function ZNe(t){var e,n;return(t==null?void 0:t.type)==="UpdateExpression"?((e=t.argument)==null?void 0:e.name)??null:(t==null?void 0:t.type)==="AssignmentExpression"?((n=t.left)==null?void 0:n.name)??null:null}function GNe(t,e,n){if(ZNe(t)===e)return t.type==="UpdateExpression"?t.operator==="++"?1:-1:zNe(t,n)}function uv(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function UNe(t,e,n){return t==="<"?e<n:t==="<="?e<=n:t===">"?e>n:t===">="?e>=n:!1}function XNe(t){var n,r;if((t==null?void 0:t.type)!=="VariableDeclaration"||((n=t.declarations)==null?void 0:n.length)!==1)return null;const e=t.declarations[0];return((r=e.id)==null?void 0:r.type)==="Identifier"?{name:e.id.name,initExpr:e.init}:null}function WNe(t,e){var o;const n=XNe(t.init),r=t.test;if(!n||(r==null?void 0:r.type)!=="BinaryExpression"||((o=r.left)==null?void 0:o.name)!==n.name)return null;const i=uv(e(n.initExpr)),s=uv(e(r.right)),a=GNe(t.update,n.name,e);return i===void 0||s===void 0||!a?null:{v:n.name,start:i,end:s,op:r.operator,step:a}}function qNe(t,e){const n=WNe(t,e.resolve);if(!n)return null;const r=jL(t.body),i=[],s=++e.site.n;let a=0;for(let o=n.start;UNe(n.op,o,n.end);o+=n.step){if(a>=wNe)return null;const l={kind:"loop",callSite:s,iteration:a,sourceRange:JE(t)};i.push(...LL(r,new Map([[n.v,Pce(o)]]),l,e)),a++}return i}function YNe(t){var e,n;if((t==null?void 0:t.type)==="VariableDeclaration"){const r=(n=(e=t.declarations)==null?void 0:e[0])==null?void 0:n.id;return(r==null?void 0:r.type)==="Identifier"?r.name:null}return(t==null?void 0:t.type)==="Identifier"?t.name:null}function Ice(t,e,n,r,i,s){const a=[],o=++s.site.n;return t.forEach((l,c)=>{if(!l)return;const u=new Map;n&&u.set(n,l),r&&u.set(r,Pce(c));const f={kind:"loop",callSite:o,iteration:c,sourceRange:i};a.push(...LL(e,u,f,s))}),a}function KNe(t,e){var r;if(((r=t.right)==null?void 0:r.type)!=="ArrayExpression")return null;const n=YNe(t.left);return n?Ice(t.right.elements??[],jL(t.body),n,null,JE(t),e):null}function JNe(t){var n,r;const e=[];for(const i of[(n=t.params)==null?void 0:n[0],(r=t.params)==null?void 0:r[1]])if(!i)e.push(null);else{if(i.type!=="Identifier")return null;e.push(i.name)}return{el:e[0],idx:e[1]}}function eDe(t){var e,n;return(t==null?void 0:t.type)==="MemberExpression"&&((e=t.property)==null?void 0:e.name)==="forEach"&&((n=t.object)==null?void 0:n.type)==="ArrayExpression"}function tDe(t){var n;if(!eDe(t.callee))return null;const e=(n=t.arguments)==null?void 0:n[0];return IL(e)?{elements:t.callee.object.elements??[],cb:e}:null}function nDe(t,e){const n=tDe(t);if(!n)return null;const r=JNe(n.cb);return r?Ice(n.elements,jL(n.cb.body),r.el,r.idx,JE(t),e):null}function rDe(t,e){var n;return((n=t.callee)==null?void 0:n.type)==="Identifier"&&e.helpers.has(t.callee.name)?QNe(t,e):nDe(t,e)}function iDe(t,e){var n;return e.depth>=SNe?null:t.type==="ForStatement"?qNe(t,e):t.type==="ForOfStatement"?KNe(t,e):t.type==="ExpressionStatement"&&((n=t.expression)==null?void 0:n.type)==="CallExpression"?rDe(t.expression,e):null}function _ce(t,e){const n=[];for(const r of t){const i=iDe(r,e);i?n.push(...i):n.push(r)}return n}function sDe(t,e,n){const r=BNe(t,e),i={helpers:r,timelineVar:e,resolve:n,depth:0,site:{n:0},order:{n:0}},s=(t.body??[]).filter(a=>!VNe(a,r));t.body=_ce(s,i)}const aDe=new Set(["set","to","from","fromTo"]),oDe=new Set(["querySelector","querySelectorAll"]),lDe=new Set(["forEach","map"]),Rce=new Set(["Program","BlockStatement","FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"]);function cDe(t){try{return dA(t,{ecmaVersion:"latest",sourceType:"script",locations:!0})}catch{return dA(t,{ecmaVersion:"latest",sourceType:"module",locations:!0})}}const jce=Symbol("hf.constNodes");function uDe(t){return t[jce]}const fDe=new Set(["min","max","round","floor","ceil","abs","sqrt","sign","trunc"]),hDe={PI:Math.PI,E:Math.E,SQRT2:Math.SQRT2};function dDe(t,e){var i,s,a,o,l;if(((i=t.object)==null?void 0:i.type)==="Identifier"&&t.object.name==="Math"){const c=(s=t.property)==null?void 0:s.name;return typeof c=="string"?hDe[c]:void 0}const n=FL(t.object,e);if(!n)return;let r;if(t.computed){const c=ls(t.property,e);n.type==="ArrayExpression"&&typeof c=="number"?r=(a=n.elements)==null?void 0:a[c]:n.type==="ObjectExpression"&&(typeof c=="string"||typeof c=="number")&&(r=Ld(n,String(c)))}else n.type==="ObjectExpression"&&(r=Ld(n,((o=t.property)==null?void 0:o.name)??((l=t.property)==null?void 0:l.value)));return r?ls(r,e):void 0}function pDe(t,e,n){var i,s,a;if(!e.computed)return t.type==="ObjectExpression"?Ld(t,((i=e.property)==null?void 0:i.name)??((s=e.property)==null?void 0:s.value)):void 0;const r=ls(e.property,n);if(t.type==="ArrayExpression"&&typeof r=="number")return(a=t.elements)==null?void 0:a[r];if(t.type==="ObjectExpression")return Ld(t,String(r))}function FL(t,e){var r;if(!t)return;if(t.type==="ArrayExpression"||t.type==="ObjectExpression")return t;if(t.type==="Identifier")return(r=uDe(e))==null?void 0:r.get(t.name);if(t.type!=="MemberExpression")return;const n=FL(t.object,e);return n?pDe(n,t,e):void 0}function ls(t,e){var n,r,i,s,a,o,l;if(t){if(t.type==="NumericLiteral"||t.type==="Literal"&&typeof t.value=="number"||t.type==="StringLiteral"||t.type==="Literal"&&typeof t.value=="string"||t.type==="BooleanLiteral"||t.type==="Literal"&&typeof t.value=="boolean")return t.value;if(t.type==="UnaryExpression"&&t.operator==="-"&&t.argument){const c=ls(t.argument,e);return typeof c=="number"?-c:void 0}if(t.type==="BinaryExpression"){const c=ls(t.left,e),u=ls(t.right,e);if(typeof c=="number"&&typeof u=="number")switch(t.operator){case"+":return c+u;case"-":return c-u;case"*":return c*u;case"/":return u!==0?c/u:void 0}if(typeof c=="string"&&t.operator==="+")return c+String(u??"");if(typeof u=="string"&&t.operator==="+")return String(c??"")+u}if(t.type==="Identifier"&&e.has(t.name))return e.get(t.name);if(t.type==="TemplateLiteral"&&((n=t.expressions)==null?void 0:n.length)===0)return((s=(i=(r=t.quasis)==null?void 0:r[0])==null?void 0:i.value)==null?void 0:s.cooked)??void 0;if(t.type==="MemberExpression")return dDe(t,e);if(t.type==="CallExpression"&&((a=t.callee)==null?void 0:a.type)==="MemberExpression"&&((o=t.callee.object)==null?void 0:o.type)==="Identifier"&&t.callee.object.name==="Math"&&fDe.has((l=t.callee.property)==null?void 0:l.name)){const c=(t.arguments??[]).map(u=>ls(u,e));if(c.every(u=>typeof u=="number"))return Math[t.callee.property.name](...c)}}}function mDe(t,e){return ls(t,e)}function ek(t,e){var s,a;if((t==null?void 0:t.type)!=="CallExpression")return null;const n=t.callee;if((n==null?void 0:n.type)!=="MemberExpression"||((s=n.property)==null?void 0:s.type)!=="Identifier")return null;const r=n.property.name,i=ls((a=t.arguments)==null?void 0:a[0],e);return typeof i!="string"||i.length===0?null:oDe.has(r)||r==="toArray"?i:r==="getElementById"?`#${i}`:null}function Q4(t,e=!0){for(let n=t.length-2;n>=0;n--){const r=t[n];if(r&&Rce.has(r.type)&&(e||r.type!=="BlockStatement"))return r}return null}function Lce(t){const e=[];for(let n=t.length-1;n>=0;n--){const r=t[n];r&&Rce.has(r.type)&&e.push(r)}return e}function $L(t){for(let e=t.length-2;e>=0;e--){const n=t[e];if((n==null?void 0:n.type)==="BlockStatement"&&H4(n))return n}}function BL(t,e,n,r=Number.POSITIVE_INFINITY){const i=n.declarationsByName.get(t)??[],s=$L(e);for(const a of Lce(e)){const o=i.filter(l=>l.scopeNode===a&&(!l.expandedScopeNode||l.expandedScopeNode===s)&&(l.kind==="var"||l.kind==="param"||l.node.start<r)).sort((l,c)=>c.node.start-l.node.start);if(o[0])return o[0]}}function Fce(t){const e=new Map,n=new Set;If(t,{VariableDeclarator(s,a,o){var p;const l=(p=s.id)==null?void 0:p.name;if(!l)return;const c=o.at(-2),u=c==null?void 0:c.kind;if(!u)return;const f=(c==null?void 0:c.type)!=="VariableDeclaration"||u!=="var",h=Q4(o,f),m=$L(o),y=e.get(l)??[];y.push({node:s,scopeNode:h,expandedScopeNode:m,name:l,kind:u}),e.set(l,y)},FunctionDeclaration:i,FunctionExpression:i,ArrowFunctionExpression:i});const r={declarationsByName:e,reassignedDeclarations:n};return If(t,{AssignmentExpression(s,a,o){var u;const l=((u=s.left)==null?void 0:u.type)==="Identifier"?s.left.name:void 0;if(!l)return;const c=BL(l,o,r,s.start);c&&n.add(c.node)}}),r;function i(s){for(const a of s.params??[]){if((a==null?void 0:a.type)!=="Identifier")continue;const o=e.get(a.name)??[];o.push({node:a,scopeNode:s,name:a.name,kind:"param"}),e.set(a.name,o)}}}function o8(t,e,n,r){let i=t.get(e);i||(i=new Map,t.set(e,i)),i.has(n)||i.set(n,r)}function tk(t,e,n){var r,i;for(const s of Lce(e)){const a=(r=n.get(s))==null?void 0:r.get(t);if(a!==void 0)return a}return((i=n.get(null))==null?void 0:i.get(t))??null}function gDe(t){return(t==null?void 0:t.type)==="ArrowFunctionExpression"||(t==null?void 0:t.type)==="FunctionExpression"||(t==null?void 0:t.type)==="FunctionDeclaration"}function yDe(t,e,n,r){return(t==null?void 0:t.type)==="Identifier"?tk(t.name,e,r):(t==null?void 0:t.type)==="CallExpression"?ek(t,n):null}function VL(t){const e=new Map,n=new Set,r=new Map;return Object.defineProperty(e,jce,{value:r,enumerable:!1}),J0(t,{VariableDeclarator(i){var c;const s=(c=i.id)==null?void 0:c.name,a=i.init;if(!s||!a)return;if(a.type==="ArrayExpression"||a.type==="ObjectExpression"){r.set(s,a);return}const o=ls(a,e);if(o===void 0||n.has(s))return;const l=e.get(s);l!==void 0&&l!==o?(e.delete(s),n.add(s)):l===void 0&&e.set(s,o)}}),e}function $ce(t,e,n){const r=new Map;If(t,{VariableDeclarator(s,a,o){var u;const l=(u=s.id)==null?void 0:u.name,c=ek(s.init,e);if(l&&c!==null){const f=o.at(-2),h=(f==null?void 0:f.type)!=="VariableDeclaration"||f.kind!=="var";o8(r,Q4(o,h),l,c)}},AssignmentExpression(s,a,o){const l=s.left,c=ek(s.right,e);if((l==null?void 0:l.type)==="Identifier"&&c!==null){const u=BL(l.name,o,n,s.start);o8(r,(u==null?void 0:u.scopeNode)??$L(o)??Q4(o),l.name,c)}}}),If(t,{CallExpression(s,a,o){var c,u,f;const l=s.callee;if((l==null?void 0:l.type)==="MemberExpression"&&((c=l.property)==null?void 0:c.type)==="Identifier"&&lDe.has(l.property.name)){const h=yDe(l.object,o,e,r),m=(u=s.arguments)==null?void 0:u[0],y=(f=m==null?void 0:m.params)==null?void 0:f[0];h&&(y==null?void 0:y.type)==="Identifier"&&gDe(m)&&o8(r,m,y.name,h)}}});const i=new Set(["slice","filter","concat","reverse"]);return If(t,{VariableDeclarator(s,a,o){var h,m,y,p,v;const l=(h=s.id)==null?void 0:h.name,c=s.init;if(!l||!c)return;let u;if(c.type==="MemberExpression"&&((m=c.object)==null?void 0:m.type)==="Identifier"?u=c.object.name:c.type==="CallExpression"&&((y=c.callee)==null?void 0:y.type)==="MemberExpression"&&((p=c.callee.object)==null?void 0:p.type)==="Identifier"&&((v=c.callee.property)==null?void 0:v.type)==="Identifier"&&i.has(c.callee.property.name)&&(u=c.callee.object.name),!u)return;const f=tk(u,o,r);f&&o8(r,Q4(o),l,f)}}),r}function HL(t,e,n,r){var i;if(!t)return null;if(t.type==="StringLiteral"||t.type==="Literal")return typeof t.value=="string"?t.value:null;if(t.type==="Identifier")return tk(t.name,e,r);if(t.type==="CallExpression")return ek(t,n);if(t.type==="ArrayExpression"){const s=t.elements.map(a=>HL(a,e,n,r)).filter(a=>typeof a=="string"&&a.length>0);return s.length>0?s.join(", "):null}return t.type==="MemberExpression"&&((i=t.object)==null?void 0:i.type)==="Identifier"?tk(t.object.name,e,r):null}function xDe(t,e,n){const r=(t==null?void 0:t.type)==="ObjectExpression"?t:(t==null?void 0:t.type)==="Identifier"?FL(t,n):void 0;if((r==null?void 0:r.type)!=="ObjectExpression")return null;const i=Ld(e,"onUpdate"),s=i?vDe(i):void 0;return s?`proxy → ${s}`:"dwell/hold"}function bDe(t){var e,n,r;return(t==null?void 0:t.type)==="MemberExpression"&&((e=t.object)==null?void 0:e.type)==="MemberExpression"&&((n=t.object.property)==null?void 0:n.name)==="style"&&!!((r=t.property)!=null&&r.name)}function vDe(t){let e;return J0(t,{CallExpression(n){var r,i,s,a;((r=n.callee)==null?void 0:r.type)==="MemberExpression"&&((i=n.callee.property)==null?void 0:i.name)==="setAttribute"&&typeof((a=(s=n.arguments)==null?void 0:s[0])==null?void 0:a.value)=="string"&&(e??(e=n.arguments[0].value))},AssignmentExpression(n){const r=n.left;bDe(r)&&(e??(e=`style.${r.property.name}`))}}),e}function pA(t){return(t==null?void 0:t.type)==="ObjectProperty"||(t==null?void 0:t.type)==="Property"}function nk(t){var e,n;return((e=t==null?void 0:t.key)==null?void 0:e.name)??((n=t==null?void 0:t.key)==null?void 0:n.value)}function Ld(t,e){if((t==null?void 0:t.type)==="ObjectExpression"){for(const n of t.properties??[])if(pA(n)&&nk(n)===e)return n.value}}function ADe(t,e,n){const r=Ld(t,e);return r?n.slice(r.start,r.end):void 0}function T0(t,e,n){var i,s;const r={};if((t==null?void 0:t.type)!=="ObjectExpression")return r;for(const a of t.properties??[]){if(!pA(a))continue;const o=((i=a.key)==null?void 0:i.name)??((s=a.key)==null?void 0:s.value);if(!o)continue;const l=ls(a.value,e);l!==void 0?r[o]=l:r[o]=`__raw:${n.slice(a.value.start,a.value.end)}`}return r}function NX(t){var e,n,r;return(t==null?void 0:t.type)==="CallExpression"&&((e=t.callee)==null?void 0:e.type)==="MemberExpression"&&((n=t.callee.object)==null?void 0:n.name)==="gsap"&&((r=t.callee.property)==null?void 0:r.name)==="timeline"}function z4(t){var e;if(!t||t.type!=="MemberExpression")return null;if(t.computed){const n=t.property;return(n==null?void 0:n.type)==="Literal"&&typeof n.value=="string"?n.value:null}return((e=t.property)==null?void 0:e.type)==="Identifier"?t.property.name:null}function SDe(t){return(t==null?void 0:t.type)==="MemberExpression"&&z4(t)!==null}function e3(t,e){if((t==null?void 0:t.type)!=="MemberExpression"||(e==null?void 0:e.type)!=="MemberExpression"||z4(t)!==z4(e)||z4(t)===null)return!1;const n=t.object,r=e.object;return(n==null?void 0:n.type)==="Identifier"&&(r==null?void 0:r.type)==="Identifier"?n.name===r.name:(n==null?void 0:n.type)==="MemberExpression"&&(r==null?void 0:r.type)==="MemberExpression"?e3(n,r):!1}function Bce(t,e){return t.kind==="identifier"?t.name:e.slice(t.node.start,t.node.end)}function wDe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function CM(t,e){var s,a;const n=(s=t.arguments)==null?void 0:s[0];if(!n||n.type!=="ObjectExpression")return;const r=(a=n.properties)==null?void 0:a.find(o=>pA(o)&&nk(o)==="defaults");if(!(r!=null&&r.value)||r.value.type!=="ObjectExpression")return;const i={};for(const o of r.value.properties??[]){if(!pA(o))continue;const l=nk(o),c=ls(o.value,e);l==="ease"&&typeof c=="string"&&(i.ease=c),l==="duration"&&typeof c=="number"&&(i.duration=c)}return Object.keys(i).length>0?i:void 0}function QL(t,e){let n=null,r=null,i=0,s;const a=e??new Map;return J0(t,{VariableDeclarator(o){var l;NX(o.init)&&(i+=1,!r&&((l=o.id)==null?void 0:l.type)==="Identifier"&&(n=o.id.name,r={kind:"identifier",name:o.id.name},s=CM(o.init,a)))},AssignmentExpression(o){if(NX(o.right)&&(i+=1,!r)){const l=o.left;(l==null?void 0:l.type)==="Identifier"?(n=l.name,r={kind:"identifier",name:l.name},s=CM(o.right,a)):SDe(l)&&(r={kind:"member",node:l},s=CM(o.right,a))}}}),{timelineVar:n,ref:r,timelineCount:i,defaults:s}}const ODe=new Set(["duration","ease","delay"]),kDe=new Set(["onComplete","onStart","onUpdate","onRepeat"]),CDe=new Set(["stagger","yoyo","repeat","repeatDelay","snap","overwrite","immediateRender"]);function EDe(t,e){var r,i;let n=(r=t.callee)==null?void 0:r.object;for(;(n==null?void 0:n.type)==="CallExpression";)n=(i=n.callee)==null?void 0:i.object;return e.kind==="identifier"?(n==null?void 0:n.type)==="Identifier"&&n.name===e.name:e3(n,e.node)}function Vce(t,e,n,r){const i=[];function s(a,o){var c,u,f,h;if(!a||typeof a!="object")return;const l=[...o,a];if(a.type==="CallExpression"){const m=a.callee,y=(c=a.arguments)==null?void 0:c[0],p=(m==null?void 0:m.type)==="MemberExpression"&&((u=m.object)==null?void 0:u.type)==="Identifier"&&m.object.name==="gsap"&&((f=m.property)==null?void 0:f.type)==="Identifier"&&m.property.name==="set"&&((y==null?void 0:y.type)==="StringLiteral"||(y==null?void 0:y.type)==="Literal"&&typeof y.value=="string");if((m==null?void 0:m.type)==="MemberExpression"&&((h=m.property)==null?void 0:h.type)==="Identifier"&&(EDe(a,e)||p)&&aDe.has(m.property.name)){const v=m.property.name,b=a.arguments,w=b.length>=1?HL(b[0],l,n,r)??"__unresolved__":"__unresolved__";v==="fromTo"&&b.length>=3?i.push({node:a,ancestors:l,method:"fromTo",selector:w,fromArg:b[1],varsArg:b[2],positionArg:b[3]}):v!=="fromTo"&&b.length>=2&&i.push({node:a,ancestors:l,method:v,selector:w,varsArg:b[1],positionArg:b[2],...p?{global:!0}:{}})}}for(const m of Object.keys(a)){if(m==="type"||m==="start"||m==="end"||m==="loc")continue;const y=a[m];if(Array.isArray(y))for(const p of y)p&&typeof p=="object"&&p.type&&s(p,l);else y&&typeof y=="object"&&y.type&&s(y,l)}}return s(t,[]),i}const Hce=/^(\d+(?:\.\d+)?)%$/;function rk(t,e){const n=ls(t,e);return typeof n=="string"?n:void 0}function TDe(t,e,n){var a,o;const r=[];let i,s;for(const l of t.properties??[]){if(l.type!=="ObjectProperty"&&l.type!=="Property")continue;const c=((a=l.key)==null?void 0:a.value)??((o=l.key)==null?void 0:o.name);if(typeof c!="string")continue;const u=Hce.exec(c);if(u){const f=Number.parseFloat(u[1]??"0"),h=T0(l.value,e,n),m={};let y;for(const[p,v]of Object.entries(h))if(p==="ease"&&typeof v=="string")y=v;else{if(p==="duration")continue;(typeof v=="number"||typeof v=="string")&&(m[p]=v)}r.push({percentage:f,properties:m,...y?{ease:y}:{}})}else c==="ease"?i=rk(l.value,e)??i:c==="easeEach"&&(s=rk(l.value,e)??s)}return r.sort((l,c)=>l.percentage-c.percentage),{format:"percentage",keyframes:r,...i?{ease:i}:{},...s?{easeEach:s}:{}}}function PDe(t,e,n){var s,a;const r=(s=(t.properties??[]).find(o=>{var l,c;return(((l=o.key)==null?void 0:l.name)??((c=o.key)==null?void 0:c.value))==="keyframes"}))==null?void 0:s.value;if(!r||r.type!=="ArrayExpression")return;const i=[];for(const o of r.elements??[]){if(!o||o.type!=="ObjectExpression")continue;const l=T0(o,e,n);i.push(l.duration)}return(a=ZE(i))==null?void 0:a.totalDuration}function MDe(t,e,n){const r=t.elements??[],i=[];for(const o of r){if(!o||o.type!=="ObjectExpression")continue;const l=T0(o,e,n),c={};let u,f;for(const[h,m]of Object.entries(l))h==="duration"?u=m:h==="ease"&&typeof m=="string"?f=m:(typeof m=="number"||typeof m=="string")&&(c[h]=m);i.push({properties:c,duration:u,ease:f})}const s=ZE(i.map(o=>o.duration));return s?{format:"object-array",keyframes:i.map((o,l)=>({percentage:s.percentages[l],properties:o.properties,...o.ease?{ease:o.ease}:{}}))}:void 0}function NDe(t,e){var o,l,c;const n=new Map;let r,i;for(const u of t.properties??[]){if(u.type!=="ObjectProperty"&&u.type!=="Property")continue;const f=((o=u.key)==null?void 0:o.name)??((l=u.key)==null?void 0:l.value);if(typeof f=="string")if(((c=u.value)==null?void 0:c.type)==="ArrayExpression"){const h=[];for(const m of u.value.elements??[]){const y=ls(m,e);(typeof y=="number"||typeof y=="string")&&h.push(y)}h.length>0&&n.set(f,h)}else f==="ease"?r=rk(u.value,e)??r:f==="easeEach"&&(i=rk(u.value,e)??i)}const s=Math.max(...[...n.values()].map(u=>u.length),0),a=[];for(let u=0;u<s;u++){const f=s>1?Math.round(u/(s-1)*100):0,h={};for(const[m,y]of n)u<y.length&&(h[m]=y[u]);a.push({percentage:f,properties:h})}return{format:"simple-array",keyframes:a,...r?{ease:r}:{},...i?{easeEach:i}:{}}}function DDe(t,e,n){var a,o,l;if(!t)return;if(t.type==="ArrayExpression")return MDe(t,e,n);if(t.type!=="ObjectExpression")return;const r=t.properties??[];let i=!1,s=!1;for(const c of r){if(c.type!=="ObjectProperty"&&c.type!=="Property")continue;const u=((a=c.key)==null?void 0:a.value)??((o=c.key)==null?void 0:o.name);if(typeof u=="string"&&Hce.test(u)){i=!0;break}((l=c.value)==null?void 0:l.type)==="ArrayExpression"&&(s=!0)}if(i)return TDe(t,e,n);if(s)return NDe(t,e)}function IDe(t,e,n){if(!t)return;let r,i=!1,s=1,a=!1;if(t.type==="ObjectExpression")for(const c of t.properties??[]){if(!pA(c))continue;const u=nk(c);if(u==="path")r=c.value;else if(u==="autoRotate"){const f=ls(c.value,e);i=typeof f=="number"?f:f===!0}else if(u==="curviness"){const f=ls(c.value,e);typeof f=="number"&&(s=f)}else u==="type"&&ls(c.value,e)==="cubic"&&(a=!0)}else t.type==="ArrayExpression"&&(r=t);if(!r||r.type!=="ArrayExpression")return;const o=r.elements??[],l=[];for(const c of o){if(!c||c.type!=="ObjectExpression")continue;const u=T0(c,e,n),f=typeof u.x=="number"?u.x:void 0,h=typeof u.y=="number"?u.y:void 0;f!==void 0&&h!==void 0&&l.push({x:f,y:h})}return qoe(l,s,i,a)}function Qce(t,e,n,r){var E,M;const i=H4(t.node),s=T0(t.varsArg,e,n),a={},o={};let l,c=!1,u;for(const[N,_]of Object.entries(s))if(!ODe.has(N)&&!kDe.has(N)){if(N==="keyframes"){const I=Ld(t.varsArg,"keyframes");l=DDe(I,e,n),!l&&I&&(c=!0);continue}if(N==="motionPath"){const I=Ld(t.varsArg,"motionPath");u=IDe(I,e,n);continue}if(N!=="easeEach"){if(CDe.has(N)){const I=ADe(t.varsArg,N,n);I!==void 0?o[N]=`__raw:${I}`:_!==void 0&&(o[N]=_);continue}(typeof _=="number"||typeof _=="string")&&(a[N]=_)}}if(l&&typeof s.easeEach=="string"&&(l.easeEach=s.easeEach),u){const{waypoints:N}=u;if(!l)l={format:"percentage",keyframes:N.map((I,j)=>({percentage:N.length>1?Math.round(j/(N.length-1)*100):0,properties:{x:I.x,y:I.y}}))};else{const _=l.keyframes;if(_.length===N.length)for(let I=0;I<_.length;I++){const j=_[I],L=N[I];j&&L&&(j.properties.x=L.x,j.properties.y=L.y)}}}let f;if(t.method==="fromTo"&&t.fromArg){f={};const N=T0(t.fromArg,e,n);for(const[_,I]of Object.entries(N))(typeof I=="number"||typeof I=="string")&&(f[_]=I)}const h=!!t.positionArg,m=h?mDe(t.positionArg,e):0,y=typeof m=="number"||typeof m=="string"?m:h?`__raw:${n.slice(t.positionArg.start,t.positionArg.end)}`:0;let p=typeof s.duration=="number"?s.duration:void 0;const v=typeof s.ease=="string"?s.ease:void 0;p===void 0&&l&&(p=PDe(t.varsArg,e,n));let b=t.selector,w;if(b==="__unresolved__"){const N=(E=t.node.arguments)==null?void 0:E[0],_=xDe(N,t.varsArg,e);if(_&&(b=_,(N==null?void 0:N.type)==="Identifier")){const I=BL(N.name,t.ancestors,r,t.node.start);if(((M=I==null?void 0:I.node.init)==null?void 0:M.type)==="ObjectExpression"&&!r.reassignedDeclarations.has(I.node)){const j=H4(I.scopeNode)??H4(I.expandedScopeNode),L=j&&(j.kind==="helper"||j.kind==="loop")?`:${j.kind}:${j.callSite??""}:${j.iteration??""}`:"";w=`proxy:${N.name}@${I.node.start}${L}`}}}const O={targetSelector:b,method:t.method,position:y,properties:a,fromProperties:f,duration:p,ease:v};w&&(O.targetIdentity=w),h||(O.implicitPosition=!0);let C=vU(a);if(!C&&l){const N={};for(const _ of l.keyframes)for(const I of Object.keys(_.properties))N[I]=!0;C=vU(N)}return C&&(O.propertyGroup=C),t.global&&(O.global=!0),Object.keys(o).length>0&&(O.extras=o),l&&(O.keyframes=l),u&&(O.arcPath=u.arcPath),c&&(O.hasUnresolvedKeyframes=!0),b==="__unresolved__"&&(O.hasUnresolvedSelector=!0),i&&(O.provenance=i),O}function _De(t){if(typeof t=="number")return t;if(typeof t!="string")return;const e=t.startsWith("__raw:")?t.slice(6):t,n=/(?:each\s*:\s*)?(-?\d+(?:\.\d+)?)/.exec(e);if(!n)return;const r=Number.parseFloat(n[1]);return Number.isFinite(r)?r:void 0}function DX(t){return t==="opacity"||t.startsWith("scale")?1:0}function RDe(t,e){const n={...t.properties};let r,i;if(t.method==="fromTo")r={...t.fromProperties??{}},i=n;else if(t.method==="from"){r=n,i={};for(const s of Object.keys(n))i[s]=DX(s)}else{r={...t.fromProperties??{}};for(const s of Object.keys(n))r[s]===void 0&&(r[s]=DX(s));i=n}return[{percentage:0,properties:{...r,stagger:e}},{percentage:100,properties:{...i,stagger:e}}]}function jDe(t){var e;for(const n of t){if(n.keyframes||n.arcPath)continue;const r=_De((e=n.extras)==null?void 0:e.stagger);r!==void 0&&(n.keyframes={format:"percentage",keyframes:RDe(n,r)})}}const LDe=.5;function FDe(t,e,n){const r=t.trim();if(r==="")return e;if(r.startsWith("+=")){const s=Number.parseFloat(r.slice(2));return Number.isFinite(s)?e+s:null}if(r.startsWith("-=")){const s=Number.parseFloat(r.slice(2));return Number.isFinite(s)?e-s:null}if(r==="<")return n;if(r===">")return e;if(r.startsWith("<")){const s=Number.parseFloat(r.slice(1));return Number.isFinite(s)?n+s:null}if(r.startsWith(">")){const s=Number.parseFloat(r.slice(1));return Number.isFinite(s)?e+s:null}const i=Number.parseFloat(r);return Number.isFinite(i)?i:null}function $De(t,e,n,r){const i=new Map;return If(t,{CallExpression(s,a,o){var h,m,y,p;const l=s.callee;if((l==null?void 0:l.type)!=="MemberExpression"||((h=l.object)==null?void 0:h.name)!=="gsap"||((m=l.property)==null?void 0:m.name)!=="set")return;const c=HL((y=s.arguments)==null?void 0:y[0],o,e,n);if(!c)return;const u=T0((p=s.arguments)==null?void 0:p[1],e,r),f=i.get(c)??{};for(const[v,b]of Object.entries(u))(typeof b=="number"||typeof b=="string")&&(f[v]=b);i.set(c,f)}}),i}function IX(t,e){for(const[n,r]of Object.entries(e))t[n]=r;return t}function BDe(t,e){const n={...t.fromProperties??{}};let r=!1;for(const i of Object.keys(t.properties))n[i]===void 0&&e[i]!==void 0&&(n[i]=e[i],r=!0);r&&(t.fromProperties=n)}function VDe(t,e){const n=new Map;for(const[r,i]of e)n.set(r,{...i});for(const r of t){const i=r.targetSelector;if(r.method==="set"){n.set(i,IX(n.get(i)??{},r.properties));continue}const s=n.get(i);r.method==="to"&&s&&BDe(r,s),n.set(i,IX(n.get(i)??{},r.properties))}}function zce(t,e){if(e)for(const n of t)n.method!=="set"&&(n.duration===void 0&&e.duration!==void 0&&(n.duration=e.duration),n.ease===void 0&&e.ease!==void 0&&(n.ease=e.ease))}function Zce(t,e,n){const r=/^([A-Za-z_$][\w$]*)\s*(?:([+-])=\s*([\d.]+))?$/.exec(t.trim());if(!r)return null;const i=r[1];let s=e.get(i);if(s===void 0&&(s=n,e.set(i,s)),r[2]&&r[3]){const a=Number.parseFloat(r[3]);if(Number.isFinite(a))return r[2]==="+"?s+a:s-a}return s}function HDe(t,e,n,r){return t.implicitPosition?e:typeof t.position=="number"?t.position:typeof t.position=="string"?Zce(t.position,r,e)??FDe(t.position,e,n):e}function Gce(t,e=[]){let n=0,r=0;const i=new Map;let s=0;const a=[...e].sort((l,c)=>l.order-c.order),o=l=>{let c;typeof l.position=="number"?c=l.position:typeof l.position=="string"?c=Zce(l.position,i,n)??n:c=n,i.set(l.name,Math.max(0,c))};for(t.forEach((l,c)=>{for(;s<a.length&&a[s].order<=c;)o(a[s]),s++;if(l.method==="set"&&l.global){l.resolvedStart=0;return}const u=l.method==="set"?0:l.duration??LDe,f=HDe(l,n,r,i);f!=null&&(l.resolvedStart=Math.max(0,f),r=l.resolvedStart,n=Math.max(n,l.resolvedStart+u))});s<a.length;)o(a[s++])}function QDe(t,e,n,r){const i=r.map(a=>{var o,l,c;return(c=(l=(o=a.node.callee)==null?void 0:o.property)==null?void 0:l.loc)==null?void 0:c.start}),s=[];return J0(t,{CallExpression(a){var p,v,b,w,O,C;const o=a.callee,l=e.kind==="identifier"?((p=o.object)==null?void 0:p.type)==="Identifier"&&o.object.name===e.name:e3(o.object,e.node);if((o==null?void 0:o.type)!=="MemberExpression"||!l||((v=o.property)==null?void 0:v.name)!=="addLabel")return;const c=(b=a.arguments)==null?void 0:b[0],u=typeof(c==null?void 0:c.value)=="string"?c.value:void 0;if(!u)return;const f=ls((w=a.arguments)==null?void 0:w[1],n),h=typeof f=="number"||typeof f=="string"?f:void 0,m=(C=(O=o.property)==null?void 0:O.loc)==null?void 0:C.start;let y=r.length;m&&(y=i.findIndex(E=>E&&(E.line>m.line||E.line===m.line&&E.column>m.column)),y===-1&&(y=r.length)),s.push({name:u,position:h,order:y})}}),s}function zDe(t,e){var i,s,a,o,l,c;const n=(a=(s=(i=t.node.callee)==null?void 0:i.property)==null?void 0:s.loc)==null?void 0:a.start,r=(c=(l=(o=e.node.callee)==null?void 0:o.property)==null?void 0:l.loc)==null?void 0:c.start;return!n||!r?0:n.line-r.line||n.column-r.column}function ZDe(t,e){const n=t.node.__hfOrder,r=e.node.__hfOrder;return n===void 0&&r===void 0?zDe(t,e):n===void 0?-1:r===void 0?1:n-r}function Uce(t){t.sort(ZDe)}function Xce(t){const e=new Map;return t.map(n=>{const r=typeof n.position=="number"?String(Math.round(n.position*1e3)):String(n.position),i=n.propertyGroup?`-${n.propertyGroup}`:"",s=`${n.targetSelector}-${n.method}-${r}${i}`,a=(e.get(s)??0)+1;e.set(s,a);const o=a===1?s:`${s}-${a}`;return{...n,id:o}})}function ar(t){try{const e=dA(t,{ecmaVersion:"latest",sourceType:"script",locations:!0}),n=VL(e),r=Fce(e),i=$ce(e,n,r),s=QL(e,n),a=s.ref??{kind:"identifier",name:"tl"},o=Bce(a,t),l=Vce(e,a,n,i);Uce(l);const c=l.map(h=>Qce(h,n,t,r));zce(c,s.defaults),Gce(c);const u=Xce(c),f=l.map((h,m)=>({id:u[m].id,call:h,animation:u[m]}));return{ast:e,timelineVar:o,hasTimeline:s.ref!==null,located:f}}catch{return null}}function GDe(t){try{const e=cDe(t),n=VL(e),r=QL(e,n),i=r.ref??{kind:"identifier",name:"tl"},s=Bce(i,t);if(i.kind==="identifier")try{sDe(e,s,O=>ls(O,n))}catch{}const a=Fce(e),o=$ce(e,n,a),l=Vce(e,i,n,o);Uce(l);const c=l.map(O=>Qce(O,n,t,a));zce(c,r.defaults),VDe(c,$De(e,n,o,t));const u=QDe(e,i,n,l);Gce(c,u),jDe(c);const f=Xce(c),h=i.kind==="identifier"?`(?:const|let|var)\\s+${s}\\s*=\\s*gsap\\.timeline\\s*\\([^)]*\\)\\s*;?`:`${wDe(s)}\\s*=\\s*gsap\\.timeline\\s*\\([^)]*\\)\\s*;?`,m=t.match(new RegExp(`^[\\s\\S]*?${h}`)),y=i.kind==="identifier"?`const ${s} = gsap.timeline({ paused: true });`:`${s} = gsap.timeline({ paused: true });`,p=(m==null?void 0:m[0])??y,v=t.lastIndexOf(`${s}.`);let b="";if(v!==-1){const C=t.slice(v).indexOf(";");C!==-1&&(b=t.slice(v+C+1).trim())}const w={animations:f,timelineVar:s,preamble:p,postamble:b};return r.timelineCount>1&&(w.multipleTimelines=!0),r.timelineCount>0&&r.ref===null&&(w.unsupportedTimelinePattern=!0),w}catch{return{animations:[],timelineVar:"tl",preamble:"",postamble:""}}}function UDe(t){try{const e=dA(t,{ecmaVersion:"latest",sourceType:"script",locations:!0}),n=VL(e),i=QL(e,n).ref??{kind:"identifier",name:"tl"},s=[];return J0(e,{ExpressionStatement(a){var y,p;const o=a.expression;if(!o||o.type!=="CallExpression")return;const l=o.callee,c=i.kind==="identifier"?((y=l.object)==null?void 0:y.type)==="Identifier"&&l.object.name===i.name:e3(l.object,i.node);if((l==null?void 0:l.type)!=="MemberExpression"||!c||((p=l.property)==null?void 0:p.name)!=="addLabel")return;const u=o.arguments??[],f=u[0],h=u[1];if((f==null?void 0:f.type)!=="Literal"||typeof f.value!="string"||!h)return;const m=ls(h,n);typeof m!="number"||!Number.isFinite(m)||s.push({name:f.value,position:m})}}),s}catch{return[]}}function mA(t,e,n){if(n<=0)return 0;const r=(t-e)/n*100;return Math.max(0,Math.min(100,Math.round(r*1e3)/1e3))}function MS(t,e,n){return t>=e&&t<=e+n}function ai(t){if(t.resolvedStart!=null)return t.resolvedStart;if(typeof t.position=="number")return t.position;const e=Number.parseFloat(t.position);return Number.isNaN(e)?null:e}function Yi(t,e=.5){return t.duration??e}function XDe(t,e,n){for(const r of e){if(!WDe(r.targetSelector,n))continue;const i=ai(r);if(i===null)continue;const s=Yi(r);if(MS(t,i,s))return r}return null}function Wce(t,e){const n=ai(e);if(n===null)return null;const r=Yi(e);return mA(t,n,r)}function WDe(t,e){return t.split(",").some(n=>n.trim()===e)}const $g={opacity:1,x:0,y:0,scale:1,scaleX:1,scaleY:1,rotation:0,width:100,height:100};function Yo(t){return t.method==="set"||(t.method==="to"||t.method==="fromTo")&&Yi(t)===0}const qDe=/^-?[A-Za-z_][\w-]*$/,P0=1;function Bg(t){return qDe.test(t)?`#${t}`:`[id="${t.replace(/(["\\])/g,"\\$1")}"]`}function qce(t){if(!t)return null;const e=t.match(/^#([\w-]+)/);if(e)return e[1]??null;const n=t.match(/^\[id="((?:\\.|[^"\\])*)"\]/);return n?(n[1]??"").replace(/\\(["\\])/g,"$1"):null}const YDe=/^(#[\w-]+|\[id="(?:\\.|[^"\\])*"\])$/;function _X(t){const e=t.trim();return YDe.test(e)?qce(e):null}function __(t,e){const n=_X(t);if(n)return[n];const r=new Set;for(const i of t.split(",")){const s=i.trim();if(s){if(!e){const a=_X(s);a&&r.add(a);continue}try{for(const a of Array.from(e.querySelectorAll(s)))a.id&&r.add(a.id)}catch{const a=qce(s);a&&r.add(a)}}}return Array.from(r)}function Yce(t){return t.start-(t.expandedParentStart??0)}function kc(t){return t.id?Bg(t.id):t.selector?t.selector:null}function Kce(t,e){return`[${t}="${e.replace(/(["\\])/g,"\\$1")}"]`}function t3(t,e,n){try{const r=t.querySelectorAll(e);return r.length===1&&r[0]===n}catch{return!1}}function KDe(t){const e=t.ownerDocument;if(!e)return null;const n=[];for(let i=t;i;i=i.parentElement){if(i!==t){const o=i instanceof HTMLElement?i.id:"",l=i.getAttribute("data-hf-id");if(o){n.unshift(Bg(o));break}if(l){n.unshift(Kce("data-hf-id",l));break}}const s=i.parentElement;if(!s)break;const a=[...s.children].indexOf(i)+1;if(a<1)return null;n.unshift(`${i.tagName.toLowerCase()}:nth-child(${a})`)}if(n.length===0)return null;const r=n.join(" > ");return t3(e,r,t)?r:null}function Dc(t){if(t.id)return Bg(t.id);if(t.hfId)return Kce("data-hf-id",t.hfId);const e=t.element,n=e==null?void 0:e.ownerDocument;return e&&n?t.selector&&t3(n,t.selector,e)?t.selector:KDe(e):t.selector??null}function zL(t,e){return t.targetSelector&&!t.hasUnresolvedSelector?t.targetSelector:kc(e)}function My(t,e,n){if(t===e)return!0;const r=n==null?void 0:n.ownerDocument;return!n||!r?!1:t3(r,t,n)}function kf(t,e){var r;const n=Number.parseFloat(((r=e.dataAttributes)==null?void 0:r.duration)??"");return Yi(t,Number.isFinite(n)&&n>0?n:.5)}function NS(t,e,n){var s,a;if(n){const o=ai(n),l=kf(n,e);if(l<=0)return 0;if(o!==null)return mA(t,o,l)}const r=Number.parseFloat(((s=e.dataAttributes)==null?void 0:s.start)??"0")||0,i=Number.parseFloat(((a=e.dataAttributes)==null?void 0:a.duration)??"1")||1;return mA(t,r,i)}function ZL(t){if(!(t!=null&&t.contentWindow))return null;try{const e=t.contentWindow.gsap;return e!=null&&e.getProperty?e:null}catch{return null}}function GL(t,e){var n;try{return((n=t==null?void 0:t.contentDocument)==null?void 0:n.querySelector(e))??null}catch{return null}}function RX(t){const e={};for(const[n,r]of Object.entries(t))n!=="ease"&&(typeof r=="number"?e[n]=Math.round(r*1e3)/1e3:typeof r=="string"&&(e[n]=r));return e}function JDe(t){const e=[];let n;if(Array.isArray(t)){const r=t;return r.forEach((i,s)=>{if(!i||typeof i!="object")return;const a=r.length>1?Math.round(s/(r.length-1)*1e3)/10:0,o=RX(i);Object.keys(o).length>0&&e.push({percentage:a,properties:o})}),e.length>0?{keyframes:e}:null}for(const[r,i]of Object.entries(t)){if(r==="easeEach"){typeof i=="string"&&(n=i);continue}const s=r.match(/^(\d+(?:\.\d+)?)%$/);if(!s||!i||typeof i!="object")continue;const a=parseFloat(s[1]),o=RX(i);Object.keys(o).length>0&&e.push({percentage:a,properties:o})}return e.length===0?null:(e.sort((r,i)=>r.percentage-i.percentage),{keyframes:e,easeEach:n})}function UL(t,e,n){return t+n/100*e}function n3(t,e,n,r){var o;const i=n.find(l=>l.domId===t||(l.key??l.id)===`${e}#${t}`);if(i){const l=i.parentCompositionId,c=l?n.find(f=>f.domId===l||f.id===l):void 0,u=i.expandedParentStart??(c==null?void 0:c.start);return u!==void 0?{elStart:i.start-u,elDuration:i.duration}:l?{elStart:0,elDuration:i.duration}:{elStart:i.start,elDuration:i.duration}}const s=(o=r.find(l=>l.id===t))==null?void 0:o.hostId,a=s?n.find(l=>l.domId===s||(l.key??l.id)===`index.html#${s}`):void 0;return{elStart:0,elDuration:(a==null?void 0:a.duration)??1}}function Jce(t,e,n,r){return n<=0?r:Math.round((t-e)/n*1e5)/1e3}function XL(t,e,n,r){const i=e.resolvedStart??(typeof e.position=="number"?e.position:0),s=e.duration??r;return t.map(a=>({...a,percentage:Jce(UL(i,s,a.percentage),n,r,a.percentage),tweenPercentage:a.percentage,propertyGroup:e.propertyGroup,animationId:e.id}))}function R_(t){if(t.keyframes||t.method!=="set"&&(t.duration??0)!==0)return!1;const e=Object.keys(t.properties).filter(n=>n!=="immediateRender");return e.length>0&&e.every(n=>n==="x"||n==="y")}function eIe(t,e){const n=t.animationId;if(n===e.animationId)return;const r=t.collidingAnimationTargets;r!=null&&r.some(i=>i.animationId===e.animationId)||(t.collidingAnimationTargets=[...r===void 0||r.length===0?[{animationId:n,tweenPercentage:t.tweenPercentage}]:r,{animationId:e.animationId,tweenPercentage:e.tweenPercentage}])}function WL(t){var n;const e=new Map;for(const r of t){const i=e.get(r.percentage);i?(i.properties={...i.properties,...r.properties},eIe(i,r),(((n=i.collidingAnimationTargets)==null?void 0:n.length)??0)>1?delete i.ease:r.ease&&(i.ease=r.ease)):e.set(r.percentage,{...r,properties:{...r.properties}})}return Array.from(e.values()).sort((r,i)=>r.percentage-i.percentage)}function Vg(t){var c;const e=((c=t.extras)==null?void 0:c.immediateRender)==="__raw:true";if(t.method==="set"||t.duration===0&&e)return null;const n=t.properties,r=t.fromProperties;if(!n||Object.keys(n).length===0)return null;const i={},s={};if(t.method==="from")for(const[u,f]of Object.entries(n))i[u]=f,s[u]=$g[u]??0;else if(t.method==="fromTo"&&r)Object.assign(i,r),Object.assign(s,n);else for(const[u,f]of Object.entries(n))i[u]=$g[u]??0,s[u]=f;const a=Object.keys(s).filter(u=>typeof i[u]=="number"&&typeof s[u]=="number");if(a.length===0)return null;const o=Object.fromEntries(a.map(u=>[u,i[u]])),l=Object.fromEntries(a.map(u=>[u,s[u]]));return{format:"percentage",keyframes:[{percentage:0,properties:o},{percentage:100,properties:l,...t.ease?{ease:t.ease}:{}}],...t.ease?{ease:t.ease}:{}}}const tIe=new Set(["transformOrigin","_auto","data"]);function eue(t){return!tIe.has(t)}function nIe(t,e){return Object.keys(t).some(n=>eue(n)&&al(n)===e)}function tue(t){var e,n;return((e=t.keyframes)==null?void 0:e.keyframes)??((n=Vg(t))==null?void 0:n.keyframes)??[]}function r3(t){const e=new Set;for(const n of tue(t))for(const r of Object.keys(n.properties))eue(r)&&e.add(al(r));return Array.from(e)}function rIe(t,e,n){const r=al(t),i=e==null?void 0:e.find(s=>r3(s).includes(r));return(i==null?void 0:i.id)??n??""}function nue(t){return r3(t).length>0}function iIe(t){const e=new Map;for(const n of t)for(const r of r3(n)){const i=e.get(r)??[];i.push(n),e.set(r,i)}return e}function sIe(t,e){var n;return t.ease??((n=e.keyframes)==null?void 0:n.easeEach)??e.ease}function aIe(t,e,n,r){const i=[];for(const s of t){const a=tue(s).filter(o=>nIe(o.properties,e));for(const o of XL(a,s,n,r))i.push({...o,propertyGroup:e,ease:sIe(o,s)})}return i}function qL(t,e,n){return n<=0?[]:Array.from(iIe(t),([r,i])=>({group:r,animations:i,keyframes:aIe(i,r,e,n)})).filter(r=>r.keyframes.length>0)}function oIe({id:t,animations:e,clipStart:n,clipDuration:r,clipLeftPx:i,clipWidthPx:s,accentColor:a,isSelected:o,currentPercentage:l,elementId:c,selectedKeyframes:u,rovingTargetId:f=null,onSelectSegment:h,onClickKeyframe:m,onShiftClickKeyframe:y,onContextMenuKeyframe:p,onMoveKeyframe:v,suppressClickRef:b}){const w=x.useMemo(()=>s<20||r<=0?[]:qL(e,n,r),[e,n,r,s]),O=x.useMemo(()=>w.map(C=>({...C,keyframesData:{format:"percentage",keyframes:C.keyframes}})),[w]);return d.jsx("div",{id:t,children:O.map(({group:C,keyframesData:E},M)=>d.jsx("div",{id:G6(t,lv(c,C),"content"),role:"group","aria-label":`${C} keyframes`,"data-property-group":C,"data-timeline-element-id":c,"data-timeline-property-lane":"","data-timeline-lane-top":jg(M),className:"absolute",style:{left:i,top:jg(M),width:s,height:Rg},children:d.jsx(Uoe,{keyframesData:E,clipWidthPx:s,clipHeightPx:Rg,accentColor:a,isSelected:o,currentPercentage:l,elementId:c,clipStart:n,clipDuration:r,selectedKeyframes:u,rovingTargetId:f,onSelectSegment:h,onClickKeyframe:m,onShiftClickKeyframe:y,onContextMenuKeyframe:p,onMoveKeyframe:v,suppressClickRef:b,groupAware:!0})},C))})}const j_=.02,L_=.001,rue=7,lIe=5,jX=64,El=rue+2;function Cc(t,e){const{min:n,max:r}=t;return r<=n?0:t.scale==="log"&&n>0&&e>0?(Math.log(e)-Math.log(n))/(Math.log(r)-Math.log(n)):(e-n)/(r-n)}function i3(t,e){const n=Math.min(1,Math.max(0,e)),{min:r,max:i}=t;return t.scale==="log"&&r>0?Math.exp(Math.log(r)+n*(Math.log(i)-Math.log(r))):r+n*(i-r)}function cIe(t,e){const n=t.step>=1?0:t.step>=.1?1:2,r=t.unit===""&&t.max===1?`${Math.round(e*100)}%`:e.toFixed(n);return t.unit?`${r} ${t.unit}`:r}function uIe(t){const{range:e,a:n,b:r,t:i,v:s}=t,a=r.t-n.t;if(a<=0)return null;const o=(i-n.t)/a;if(o<=.001||o>=.999)return null;const l=Cc(e,n.v),c=Cc(e,r.v);if(Math.abs(c-l)<.001)return null;const u=(Cc(e,s)-l)/(c-l);return u<=.001||u>=.999?null:Ike(o,u)}function iue(t){const{origin:e,raw:n,xOf:r,yOf:i}=t;return Math.abs(r(n.t)-r(e.t))>Math.abs(i(n.v)-i(e.v))?"time":"value"}function fIe(t){const{range:e,origin:n,raw:r}=t;if((t.axis??iue(t))==="time")return{t:r.t,v:n.v};const s=Cc(e,n.v);return{t:n.t,v:i3(e,s+(Cc(e,r.v)-s)*.25)}}function YL(t,e,n){let r=t,i=n;for(const s of e){const a=Math.abs(s-t);a<i&&(i=a,r=s)}return r}function sue(t){const{lane:e,range:n,index:r,xOf:i,yOf:s}=t,a=e.points[r],o=e.points[r+1];return!a||!o?[]:!a.curve&&a.viaX===void 0&&n.scale==="linear"?[`L ${i(o.t)} ${s(o.v)}`]:Array.from({length:jX},(l,c)=>{const u=a.t+(o.t-a.t)*(c+1)/jX;return`L ${i(u)} ${s(Gf(e,u,n.scale))}`})}function hIe(t){const{lane:e,range:n,widthPx:r,xOf:i,yOf:s}=t,a=e.points[0],o=e.points[e.points.length-1];if(!a||!o){const c=s(n.default??(n.min+n.max)/2);return`M ${El} ${c} L ${El+r} ${c}`}const l=[`M ${El} ${s(a.v)}`,`L ${i(a.t)} ${s(a.v)}`];for(let c=0;c+1<e.points.length;c+=1)l.push(...sue({lane:e,range:n,index:c,xOf:i,yOf:s}));return l.push(`L ${El+r} ${s(o.v)}`),l.join(" ")}function dIe(t){const{lane:e,range:n,index:r,xOf:i,yOf:s}=t,a=e.points[r],o=e.points[r+1];return!a||!o?null:[`M ${i(a.t)} ${s(a.v)}`,...sue({lane:e,range:n,index:r,xOf:i,yOf:s})].join(" ")}function KL(t,e){return t.lanes.find(n=>n.target===e)??{target:e,points:[]}}function JL(t,e){const n=e.points.length===0,r=t.lanes.some(s=>s.target===e.target),i=t.lanes.map(s=>s.target===e.target?e:s).filter(s=>s.points.length>0);return!r&&!n&&i.push(e),{version:1,lanes:i}}function ik(t,e,n){return t.points.filter(r=>r.t>=e&&r.t<=n)}function LX(t,e,n,r){return r.some(i=>Math.abs(i.t-n)<=j_)?[]:[{t:n,v:Gf(t,n,e.scale)}]}function pIe(t,e){if(e<=0)return[];if(t.length<=e)return[...t];if(e===1){const i=t[0];return i?[i]:[]}const n=[],r=(t.length-1)/(e-1);for(let i=0;i<e;i+=1){const s=t[Math.round(i*r)];s&&n.push(s)}return n}function sk(t){const{lane:e,range:n,t0:r,t1:i,inner:s}=t;if(e.points.length===0&&s.length===0)return[];const a=e.points.filter(u=>u.t<r||u.t>i),o=e.points.length===0?[]:[...LX(e,n,r,s),...LX(e,n,i,s)],l=Math.max(0,tae-a.length-o.length),c=s.length<=l?s:pIe(s,l);return[...a,...o,...c].sort((u,f)=>u.t-f.t)}function Hg(t,e){return t.t>=e.t0&&t.t<=e.t1&&t.v>=e.v0&&t.v<=e.v1}function mIe(t){const{lane:e,range:n,t0:r,t1:i,newT0:s,newT1:a}=t,o=i-r,l=a-s;if(o<=0||l<=0)return e.points;const c=ik(e,r,i).map(u=>({...u,t:s+(u.t-r)*l/o}));return sk({lane:e,range:n,t0:Math.min(r,s),t1:Math.max(i,a),inner:c})}function eF(t){var e,n;(n=(e=t.currentTarget).setPointerCapture)==null||n.call(e,t.pointerId)}const FX=8,gIe=3,$X=.02;function yIe(t,e,n,r){return t==="t0"?Math.max(0,Math.min(e,n.t1-$X)):Math.min(r,Math.max(e,n.t0+$X))}function xIe({getBox:t,lane:e,range:n,pointAt:r,xOf:i,commitPoints:s,duration:a,readOnly:o,rangeSelection:l,pointInSelectionAt:c,onRangeSelect:u,onRangeClear:f,onHint:h}){const[m,y]=x.useState(null),p=x.useRef(!1),[v,b]=x.useState(!1),w=x.useCallback(_=>{if(!l)return null;const I=t();if(!I)return null;const j=_-I.left,L=i(l.t0),H=i(l.t1),$=Math.abs(L-j)<=FX,G=Math.abs(H-j)<=FX;return $&&G?j<=(L+H)/2?"t0":"t1":$?"t0":G?"t1":null},[l,t,i]),O=x.useCallback(_=>{if(o||!l)return!1;const I=w(_.clientX);return!I||c!=null&&c(_.clientX,_.clientY)?!1:(_.preventDefault(),eF(_),b(!1),p.current=!1,y({edge:I,origin:l,current:I==="t0"?l.t0:l.t1,points:e.points}),!0)},[o,l,w,e,c]),C=x.useCallback(_=>{if(m===null)return;const{edge:I,origin:j,points:L}=m,H=yIe(I,r(_.clientX,_.clientY).t,j,a);if(y({edge:I,origin:j,current:H,points:L}),!p.current){const q=I==="t0"?j.t0:j.t1;if(Math.abs(i(H)-i(q))<=gIe)return;p.current=!0}const $=I==="t0"?H:j.t0,G=I==="t1"?H:j.t1;h(`${$.toFixed(2)}s → ${G.toFixed(2)}s`),u==null||u($,G,j.v0,j.v1),s(mIe({lane:{target:e.target,points:L},range:n,t0:j.t0,t1:j.t1,newT0:$,newT1:G}),!1)},[m,r,a,i,h,u,s,e.target,n]),E=x.useCallback(()=>{if(m===null)return;const{edge:_,origin:I,current:j}=m;if(y(null),h(null),!p.current){f==null||f();return}p.current=!1,s(e.points,!0),u==null||u(_==="t0"?j:I.t0,_==="t1"?j:I.t1,I.v0,I.v1)},[m,h,f,s,e,u]),M=x.useCallback(()=>{if(m===null)return;const{origin:_,points:I}=m;y(null),h(null),p.current&&(p.current=!1,s(I,!1),u==null||u(_.t0,_.t1,_.v0,_.v1))},[m,h,s,u]),N=x.useCallback(_=>{o||b(w(_.clientX)!==null)},[o,w]);return{edge:(m==null?void 0:m.edge)??null,hover:v,arm:O,move:C,finish:E,cancel:M,updateHover:N}}const tF=.04;function bIe(t,e,n){return!n||!e||!Hg(e,n)?[]:t.points.flatMap((r,i)=>Hg(r,n)?[i]:[])}function vIe(t,e,n){const r=bIe(t,e,n);return r.length<=1||!e?null:{points:t.points.map(i=>({...i})),indices:r,anchor:{t:e.t,v:e.v},selection:n?{...n}:{t0:0,t1:0,v0:0,v1:0}}}function AIe(t,e,n){const r=t.points[e],i=t.points[e+1];return!r||!i?null:{points:t.points.map(s=>({...s})),indices:[e,e+1],anchor:{...n},selection:{t0:r.t,t1:i.t,v0:Math.min(r.v,i.v),v1:Math.max(r.v,i.v)}}}function aue(t){const{group:e,raw:n,shiftKey:r,altKey:i,range:s,duration:a,snapTimes:o,xOf:l,yOf:c}=t,u=e.indices.map(b=>e.points[b]);let f=n.t-e.anchor.t,h=n.v-e.anchor.v;if(r){const b=Math.abs(f*(l(1)-l(0))),w=Math.abs(h*(c(s.min)-c(s.max))/(s.max-s.min));b>=w?h=0:f=0}else if(!i){const b=e.points.filter((w,O)=>!e.indices.includes(O)).map(w=>w.t);f=YL(e.anchor.t+f,[...o??[],...b],tF)-e.anchor.t}const m=u.map(b=>b.t),y=u.map(b=>b.v),p=b=>e.indices.flatMap(w=>{const O=e.points[w+b];return!O||e.indices.includes(w+b)?[]:[Math.max(0,Math.abs(O.t-e.points[w].t)-L_)]});return f=Math.min(Math.max(f,-Math.min(Math.min(...m),...p(-1))),Math.min(a-Math.max(...m),...p(1))),h=Math.min(Math.max(h,s.min-Math.min(...y)),s.max-Math.max(...y)),{points:e.points.map((b,w)=>e.indices.includes(w)?{...b,t:b.t+f,v:b.v+h}:b),selection:{t0:e.selection.t0+f,t1:e.selection.t1+f,v0:e.selection.v0+h,v1:e.selection.v1+h},hint:`${e.indices.length} points ${f>=0?"+":""}${f.toFixed(2)}s`}}function SIe(t){var w,O,C;const{raw:e,origin:n,shiftKey:r,altKey:i,range:s,duration:a,snapTimes:o,lane:l,dragIndex:c,xOf:u,yOf:f}=t;let h=r?t.shiftAxis:null,{t:m,v:y}=e;if(r&&n&&(h??(h=iue({origin:n,raw:e,xOf:u,yOf:f})),{t:m,v:y}=fIe({range:s,origin:n,raw:e,xOf:u,yOf:f,axis:h})),!i&&!r){const E=l.points.filter((M,N)=>N!==c).map(M=>M.t);m=YL(m,[...o??[],...E],tF)}const p=(((w=l.points[c-1])==null?void 0:w.t)??-1/0)+L_,v=(((O=l.points[c+1])==null?void 0:O.t)??1/0)-L_,b=((C=l.points[c])==null?void 0:C.t)??m;return m=v>=p?Math.min(v,Math.max(p,Math.min(a,Math.max(0,m)))):b,{t:m,v:y,shiftAxis:h}}function BX(t,e){const n=e.pointAt(t.clientX,t.clientY),r=Math.min(e.duration,Math.max(0,n.t));return{t:t.altKey?r:YL(r,e.snapTimes??[],tF),v:n.v}}function wIe({pointAt:t,xOf:e,yOf:n,duration:r,snapTimes:i,onRangeSelect:s,onRangeClear:a}){const[o,l]=x.useState(null),c=x.useRef(!1),u=x.useCallback(m=>{if(!s)return;m.preventDefault(),eF(m);const y=BX(m,{pointAt:t,duration:r,snapTimes:i});c.current=!1,l({from:y,to:y})},[s,t,r,i]),f=x.useCallback(m=>{if(o===null)return;const y=BX(m,{pointAt:t,duration:r,snapTimes:i}),{from:p}=o;l({from:p,to:y}),!(Math.max(Math.abs(e(y.t)-e(p.t)),Math.abs(n(y.v)-n(p.v)))<=3)&&(c.current=!0,s==null||s(Math.min(p.t,y.t),Math.max(p.t,y.t),Math.min(p.v,y.v),Math.max(p.v,y.v)))},[o,t,r,i,e,n,s]),h=x.useCallback(()=>{c.current||a==null||a(),c.current=!1,l(null)},[a]);return{dragging:o!==null,arm:u,move:f,finish:h}}function OIe({getBox:t,lane:e,range:n,pointAt:r,xOf:i,yOf:s,segmentIndex:a,commitPoints:o,duration:l,snapTimes:c,readOnly:u,onHint:f}){const[h,m]=x.useState(null),[y,p]=x.useState(null),v=x.useRef(null),b=x.useCallback((N,_)=>{const I=t();if(!I)return null;const j=a(N,_);if(j===null)return null;const{t:L}=r(N,_),H=Gf(e,L,n.scale);return Math.abs(s(H)-(_-I.top))<=lIe?j:null},[t,e,r,n.scale,a,s]),w=x.useCallback((N,_,I)=>{v.current=AIe(e,N,r(_,I)),p(null),m(N)},[e,r]),O=x.useCallback(N=>{const _=v.current;if(!_)return;const I=aue({group:_,raw:r(N.clientX,N.clientY),shiftKey:N.shiftKey,altKey:N.altKey,range:n,duration:l,snapTimes:c,xOf:i,yOf:s});f(I.hint),o(I.points,!1)},[o,l,f,r,n,c,i,s]),C=x.useCallback(()=>{v.current=null,m(null)},[]),E=x.useCallback((N,_)=>{p(u?null:b(N,_))},[b,u]),M=x.useCallback(()=>p(null),[]);return{dragIndex:h,hoverIndex:y,hitIndex:b,arm:w,move:O,finish:C,updateHover:E,clearHover:M}}const kIe=3;function CIe(t){return t?{t:t.t,v:t.v}:{t:0,v:0}}function EIe({getBox:t,lane:e,range:n,pointAt:r,xOf:i,yOf:s,commitPoints:a,snapTimes:o,readOnly:l,onSelect:c,onRangeSelect:u,onRangeClear:f,duration:h,rangeSelection:m}){const[y,p]=x.useState(null),[v,b]=x.useState(null),[w,O]=x.useState(null),C=xIe({getBox:t,lane:e,range:n,pointAt:r,xOf:i,commitPoints:a,duration:h,readOnly:l,rangeSelection:m,pointInSelectionAt:(V,ae)=>{if(!m)return!1;const he=Y(V,ae),ge=he===null?null:e.points[he];return ge?Hg(ge,m):!1},onRangeSelect:u,onRangeClear:f,onHint:O}),E=x.useRef(null),M=x.useRef(null),[N,_]=x.useState(null),I=wIe({pointAt:r,xOf:i,yOf:s,duration:h,snapTimes:o,onRangeSelect:u,onRangeClear:f}),j=x.useRef(null),L=x.useRef(!1),H=x.useRef(null),$=x.useCallback(V=>{_(ae=>ae?{index:ae.index,text:V}:null)},[]),G=x.useCallback(()=>_(null),[]),q=x.useCallback(()=>{const V=N;if(_(null),!V)return;const ae=Number(V.text);if(!Number.isFinite(ae))return;const he=Math.min(n.max,Math.max(n.min,ae));a(e.points.map((ge,ye)=>ye===V.index?{...ge,v:he}:ge),!0)},[N,e,n,a]),Y=x.useCallback((V,ae)=>{const he=t();if(!he)return null;const ge=V-he.left,ye=ae-he.top;for(let fe=0;fe<e.points.length;fe+=1){const me=e.points[fe];if(me&&Math.hypot(i(me.t)-ge,s(me.v)-ye)<=rue*1.6)return fe}return null},[t,e,i,s]),J=x.useCallback((V,ae)=>{const{t:he}=r(V,ae);for(let ge=0;ge+1<e.points.length;ge+=1){const ye=e.points[ge],fe=e.points[ge+1];if(ye&&fe&&he>ye.t&&he<fe.t)return ge}return null},[e,r]),ie=OIe({getBox:t,lane:e,range:n,pointAt:r,xOf:i,yOf:s,segmentIndex:J,commitPoints:a,duration:h,snapTimes:o,readOnly:l,onHint:O}),te=x.useCallback(V=>{const ae=Y(V.clientX,V.clientY);if(ae!==null)return{kind:"point",index:ae};const he=V.altKey?J(V.clientX,V.clientY):ie.hitIndex(V.clientX,V.clientY);return he===null?null:{kind:V.altKey?"curve":"segment",index:he}},[Y,ie,J]),ne=x.useCallback(V=>{if(V.button!==0)return;if(V.stopPropagation(),N&&q(),l){c==null||c(),I.arm(V);return}if(C.arm(V))return;const ae=te(V);if(!ae){I.arm(V);return}if(V.preventDefault(),eF(V),ie.clearHover(),ae.kind==="curve"){b(ae.index);return}if(ae.kind==="segment"){ie.arm(ae.index,V.clientX,V.clientY);return}E.current=CIe(e.points[ae.index]),M.current=vIe(e,e.points[ae.index],m),j.current={x:V.clientX,y:V.clientY},L.current=!1,p(ae.index)},[te,e,l,c,I,N,q,m,C,ie]),W=x.useCallback((V,ae)=>{if(v===null)return;const he=e.points[v],ge=e.points[v+1];if(!he||!ge)return;const{t:ye,v:fe}=r(V,ae),me=uIe({range:n,a:he,b:ge,t:ye,v:fe});me!==null&&(O(`bend ${Math.round(me.viaX*100)}%`),a(e.points.map((Te,ve)=>ve===v?{...Te,curve:void 0,viaX:me.viaX,viaY:me.viaY}:Te),!1))},[v,e,r,n,a]),F=x.useCallback((V,ae)=>{const{points:he,selection:ge,hint:ye}=aue({group:ae,raw:r(V.clientX,V.clientY),shiftKey:V.shiftKey,altKey:V.altKey,range:n,duration:h,snapTimes:o,xOf:i,yOf:s});u==null||u(ge.t0,ge.t1,ge.v0,ge.v1),O(ye),a(he,!1)},[a,h,u,r,n,o,i,s]),U=x.useCallback(V=>{if(y===null)return;const ae=M.current;if(ae){F(V,ae);return}V.shiftKey||(H.current=null);const{t:he,v:ge,shiftAxis:ye}=SIe({raw:r(V.clientX,V.clientY),origin:E.current,shiftKey:V.shiftKey,altKey:V.altKey,shiftAxis:H.current,range:n,duration:h,snapTimes:o,lane:e,dragIndex:y,xOf:i,yOf:s});H.current=ye;const fe=e.points.map((me,Te)=>Te===y?{...me,t:he,v:ge}:me);O(`${cIe(n,ge)} @ ${he.toFixed(2)}s`),a(fe,!1)},[y,h,e,r,n,a,o,i,s,F]),Q=x.useCallback(V=>{const ae=j.current;ae&&Math.hypot(V.clientX-ae.x,V.clientY-ae.y)>kIe&&(L.current=!0),v!==null?W(V.clientX,V.clientY):ie.dragIndex!==null?ie.move(V):U(V)},[W,v,U,ie]),K=x.useCallback(V=>{if(C.edge!==null){V.stopPropagation(),V.buttons===0?C.cancel():C.move(V);return}if(I.dragging){V.stopPropagation(),I.move(V);return}if(v===null&&y===null&&ie.dragIndex===null){C.updateHover(V),ie.updateHover(V.clientX,V.clientY);return}V.stopPropagation(),Q(V)},[I,v,y,ie,Q,C]),ee=x.useCallback(V=>{if(C.edge!==null){V.stopPropagation(),C.finish();return}if(I.dragging){V.stopPropagation(),I.finish();return}if(y===null&&v===null&&ie.dragIndex===null)return;V.stopPropagation();const ae=y,he=ae!==null&&V.shiftKey&&!L.current;if(p(null),b(null),ie.finish(),E.current=null,M.current=null,H.current=null,j.current=null,O(null),he){a(e.points.filter((ge,ye)=>ye!==ae),!0);return}a(e.points,!0)},[I,v,y,ie,e,a,C]),se=x.useCallback(V=>{if(C.edge!==null){V.stopPropagation(),C.cancel();return}ee(V)},[C,ee]),z=x.useCallback(V=>{if(l)return;V.stopPropagation(),V.preventDefault();const ae=Y(V.clientX,V.clientY);if(V.altKey){const me=ae??J(V.clientX,V.clientY);if(me===null)return;a(e.points.map((Te,ve)=>ve===me?{t:Te.t,v:Te.v}:Te),!0);return}if(ae!==null){const me=e.points[ae];me&&_({index:ae,text:String(Number(me.v.toFixed(3)))});return}const{t:he,v:ge}=r(V.clientX,V.clientY),ye=e.points.filter(me=>Math.abs(me.t-he)>j_),fe=e.points.length===0&&he>j_?[{t:0,v:ge}]:[];a([...fe,...ye,{t:he,v:ge}].sort((me,Te)=>me.t-Te.t),!0)},[e,r,a,l,Y,J]);return{dragIndex:y,curveIndex:v,segmentDragIndex:ie.dragIndex,segmentHoverIndex:ie.hoverIndex,edgeDrag:C.edge,edgeHover:C.hover,cancelDrag:se,hint:w,hitIndex:Y,segmentIndex:J,onPointerLeave:ie.clearHover,onPointerDown:ne,onPointerMove:K,endDrag:ee,onDoubleClick:z,editing:N,setEditingText:$,commitEdit:q,cancelEdit:G}}function TIe({text:t,leftPx:e,label:n,onChange:r,onCommit:i,onCancel:s}){return d.jsx("input",{className:"hf-automation-value pointer-events-auto absolute rounded-[3px] border border-panel-border-input bg-panel-bg-2 px-1 font-mono text-[9px] text-panel-text-1",style:{left:e,top:1,width:44,zIndex:4},onPointerDown:a=>a.stopPropagation(),onKeyDown:a=>{a.stopPropagation(),a.key==="Enter"&&i(),a.key==="Escape"&&s()},onChange:a=>r(a.target.value),onBlur:i,value:t,"aria-label":`${n} value`,autoFocus:!0})}const VX=[{id:"ramp-up",label:"Ramp up"},{id:"ramp-down",label:"Ramp down"},{id:"swell",label:"Swell"},{id:"dip",label:"Dip"}],l8=.4,PIe=.25;function HX(t,e,n){return t.points.length===0?e.default??(e.min+e.max)/2:Gf(t,n,e.scale)}function MIe(t){const{shape:e,lane:n,range:r,t0:i,t1:s}=t,a=HX(n,r,i),o=HX(n,r,s),l=(i+s)/2;switch(e){case"ramp-up":return[{t:i,v:r.min},{t:s,v:o}];case"ramp-down":return[{t:i,v:a},{t:s,v:r.min}];case"swell":return[{t:i,v:a,curve:l8},{t:l,v:r.max,curve:-l8},{t:s,v:o}];case"dip":return[{t:i,v:a,curve:-l8},{t:l,v:i3(r,Cc(r,a)*PIe),curve:l8},{t:s,v:o}]}}const NIe=x.memo(function({x:e,y:n,onClose:r,onInsertShape:i,onSimplify:s,canSimplify:a}){const o=X0(r),l="block w-full px-2 py-1 text-left text-[11px] text-panel-text-1 hover:bg-panel-bg-3 disabled:opacity-40",c=140,u=VX.length*24+32,f=n+u-window.innerHeight,h=e+c>window.innerWidth?e-c:e,m=f>0?n-f-8:n;return Zl.createPortal(d.jsxs("div",{ref:o,className:"hf-automation-menu fixed z-[200] min-w-[140px] rounded border border-panel-border-input bg-panel-bg-2 py-1 shadow-lg",style:{left:h,top:m},children:[VX.map(y=>d.jsx("button",{type:"button",className:l,onClick:()=>{i(y.id),r()},children:y.label},y.id)),d.jsx("div",{className:"my-1 border-t border-panel-border-input"}),d.jsx("button",{type:"button",className:l,disabled:!a,title:a?void 0:"Fewer than three points in the selection",onClick:()=>{s(),r()},children:"Simplify"})]}),document.body)});function DIe(t,e,n=.02){if(t.length<=2)return t;const r=new Array(t.length).fill(!1),i=r.length-1;r[0]=!0,r[i]=!0;const s=[[0,i]];for(;s.length>0;){const a=s.pop();if(!a)break;const[o,l]=a,c=t[o],u=t[l];if(!c||!u||l-o<2)continue;const f=Cc(e,c.v),h=Cc(e,u.v),m=u.t-c.t;let y=-1,p=n;for(let v=o+1;v<l;v+=1){const b=t[v];if(!b)continue;const w=m>0?(b.t-c.t)/m:0,O=Math.abs(Cc(e,b.v)-(f+w*(h-f)));O>p&&(p=O,y=v)}y>=0&&(r[y]=!0,s.push([o,y],[y,l]))}return t.filter((a,o)=>r[o])}function IIe({path:t,lane:e,range:n,accentColor:r,activeSegment:i,xOf:s,yOf:a}){const o=i===null?null:dIe({lane:e,range:n,index:i,xOf:s,yOf:a});return d.jsxs(d.Fragment,{children:[d.jsx("path",{"data-automation-envelope":"",d:t,fill:"none",stroke:r,strokeWidth:1.5,opacity:e.points.length===0?.35:.95}),o?d.jsx("path",{"data-automation-segment-active":i??void 0,d:o,fill:"none",stroke:r,strokeWidth:3,strokeLinecap:"round",opacity:1,pointerEvents:"none"}):null]})}const _Ie=4.9,RIe=qj.rowBorder;function jIe(t,e){return!!e&&Hg(t,e)}function LIe(t,e){return{radius:_Ie*(e?1.3:t?1.15:1),stroke:t?"#fff":"rgba(0,0,0,0.5)",strokeWidth:t?1.5:1}}function FIe(t){return t?"Drag a box to select points, which also selects this clip; then double-click to add a point":"Double-click to add a point, drag to shape, double-click a point to type a value, right-click or Shift+click to remove it. Drag a line segment to move both endpoints. Drag the background to draw a box around points, then Delete to remove them or drag one to move them all. Alt-drag the line to curve it. Shift locks an axis mid-drag; Alt ignores the grid."}function $Ie({readOnly:t,note:e,hovered:n,hasRange:r,leftPx:i,widthPx:s}){return!t||!e||!n||r?null:d.jsx("div",{"data-automation-readonly-note":"",className:"hf-automation-readonly-note pointer-events-none absolute rounded-[3px] bg-black/85 px-1.5 py-0.5 text-[9px] text-white/80",style:{left:i+6,top:2,zIndex:3,maxWidth:Math.max(120,s-12)},children:e})}function BIe(t){return t.dragging||t.hasRange||!t.readOnly&&t.hovered?1:0}function VIe(t,e,n,r){return n?"col-resize":t?"pointer":e?"grabbing":r?"grab":"crosshair"}function HIe({duration:t,widthPx:e,leftPx:n,topPx:r,automation:i,target:s,range:a,accentColor:o,playheadSec:l,onPreview:c,onCommit:u,snapTimes:f,readOnly:h,readOnlyNote:m,onSelect:y,rangeSelection:p,onRangeSelect:v,onRangeClear:b}){var fe;const w=KL(i,s),O=x.useRef(null),[C,E]=x.useState(null),M=x.useMemo(()=>C?{target:s,points:C.points}:w,[C,s,w]);x.useEffect(()=>{C&&C.basedOn!==i&&E(null)},[i,C]),x.useEffect(()=>{E(null)},[s]);const N=_d,_=6,I=N-_*2,j=x.useCallback(me=>El+(t>0?me/t*e:0),[t,e]),L=x.useCallback(me=>_+(1-Cc(a,me))*I,[a,I]),H=x.useCallback((me,Te)=>{var ke;const ve=(ke=O.current)==null?void 0:ke.getBoundingClientRect();if(!ve||ve.width<=0)return{t:0,v:a.default??a.min};const xe=Math.min(t,Math.max(0,(me-ve.left-El)/e*t)),we=1-(Te-ve.top-_)/I;return{t:xe,v:i3(a,we)}},[t,I,a,e]),$=x.useMemo(()=>hIe({lane:M,range:a,widthPx:e,xOf:j,yOf:L}),[M,a,e,j,L]),G=x.useCallback((me,Te)=>{E({points:me,basedOn:i});const ve=JL(i,{target:s,points:me});Te?u(ve):c(ve)},[i,s,u,c]),q=x.useCallback(()=>{var me;return((me=O.current)==null?void 0:me.getBoundingClientRect())??null},[]),Y=EIe({getBox:q,lane:M,range:a,pointAt:H,xOf:j,yOf:L,commitPoints:G,snapTimes:f,readOnly:h,onSelect:y,onRangeSelect:v,onRangeClear:b,duration:t,rangeSelection:p}),{dragIndex:J,curveIndex:ie,segmentDragIndex:te,segmentHoverIndex:ne,edgeDrag:W,edgeHover:F,hint:U,editing:Q}=Y,K=x.useCallback(me=>{h||G(M.points.filter((Te,ve)=>ve!==me),!0)},[M,G,h]),[ee,se]=x.useState(null),[z,V]=x.useState(!1),ae=x.useCallback(me=>{if(!p)return;const Te=MIe({shape:me,lane:M,range:a,t0:p.t0,t1:p.t1});G(sk({lane:M,range:a,t0:p.t0,t1:p.t1,inner:Te}),!0)},[p,M,a,G]),he=x.useCallback(()=>{if(!p)return;const me=DIe(ik(M,p.t0,p.t1),a);G(sk({lane:M,range:a,t0:p.t0,t1:p.t1,inner:me}),!0)},[p,M,a,G]),ge=x.useCallback(me=>{h||!p||Hg(H(me.clientX,me.clientY),p)&&(me.preventDefault(),se({x:me.clientX,y:me.clientY}))},[h,p,H]),ye=M.points.length>0&&l!==null?Gf(M,l,a.scale):null;return d.jsxs("div",{className:"hf-automation-lane pointer-events-none absolute",style:{top:r,left:0,right:0,height:N},"data-automation-lane":s,children:[d.jsx("div",{"data-automation-lane-border":"",className:"hf-automation-lane-border pointer-events-none absolute",style:{top:0,left:0,right:0,height:1,background:RIe,zIndex:1}}),d.jsxs("svg",{ref:O,className:"hf-automation-svg pointer-events-auto absolute",style:{left:n-El,top:0,width:e+El*2,height:N,cursor:VIe(h,J!==null||ie!==null||te!==null,W!==null||F,ne!==null),opacity:h?.55:1,touchAction:"none"},width:e+El*2,height:N,onPointerEnter:()=>V(!0),onPointerLeave:()=>{V(!1),Y.onPointerLeave()},onPointerDown:Y.onPointerDown,onPointerMove:Y.onPointerMove,onPointerUp:Y.endDrag,onPointerCancel:Y.cancelDrag,onDoubleClick:Y.onDoubleClick,onContextMenu:ge,role:"group","aria-label":`${a.label} automation`,children:[d.jsx("title",{children:FIe(h)}),d.jsx("line",{x1:El,x2:El+e,y1:_+I/2,y2:_+I/2,stroke:"rgba(255,255,255,0.08)",strokeDasharray:"3 4"}),p?d.jsx("rect",{"data-automation-selection":"",x:j(p.t0),y:L(p.v1),width:Math.max(0,j(p.t1)-j(p.t0)),height:Math.max(0,L(p.v0)-L(p.v1)),fill:o,opacity:.15,stroke:o,strokeOpacity:.6,pointerEvents:"none"}):null,d.jsx(IIe,{path:$,lane:M,range:a,accentColor:o,activeSegment:te??ne,xOf:j,yOf:L}),M.points.map((me,Te)=>{const ve=jIe(me,p),{radius:xe,stroke:we,strokeWidth:ke}=LIe(ve,Te===J);return d.jsx("circle",{"data-automation-point":Te,...ve?{"data-automation-point-in-range":""}:{},cx:j(me.t),cy:L(me.v),r:xe,fill:o,stroke:we,strokeWidth:ke,style:{cursor:h?"default":"grab",opacity:BIe({readOnly:h,hovered:z,dragging:J!==null,hasRange:!!p})},onContextMenu:Me=>{Me.preventDefault(),Me.stopPropagation(),K(Te)}},`${Te}-${me.t}`)}),l!==null&&ye!==null?d.jsx("circle",{"data-automation-playhead":"",cx:j(l),cy:L(ye),r:2.5,fill:"#fff",opacity:.8,pointerEvents:"none"}):null]}),Q?d.jsx(TIe,{text:Q.text,leftPx:n+j(((fe=M.points[Q.index])==null?void 0:fe.t)??0)-El-18,label:a.label,onChange:Y.setEditingText,onCommit:Y.commitEdit,onCancel:Y.cancelEdit}):null,U?d.jsx("div",{className:"hf-automation-hint pointer-events-none absolute rounded-[3px] bg-black/80 px-1 py-0.5 font-mono text-[9px] text-white",style:{left:n+6,top:2,zIndex:3},children:U}):null,d.jsx($Ie,{readOnly:h,note:m,hovered:z,hasRange:!!p,leftPx:n,widthPx:e}),ee&&p?d.jsx(NIe,{x:ee.x,y:ee.y,onClose:()=>se(null),onInsertShape:ae,onSimplify:he,canSimplify:ik(M,p.t0,p.t1).length>=3}):null]})}const QX={version:1,lanes:[]},QIe=new Map,zIe=new Map,ZIe=64;function oue(t,e,n){const r=t.get(e);if(r!==void 0)return t.delete(e),t.set(e,r),r;const i=n();if(t.size>=ZIe){const s=t.keys().next();s.done||t.delete(s.value)}return t.set(e,i),i}function s3(t){const e=t.fxChain;return e?oue(QIe,e,()=>{try{return EE(e)}catch{return null}}):null}function lue(t){const e=t.automation;if(!e)return QX;const n=s3(t);return oue(zIe,`${e}\0${t.fxChain??""}`,()=>{try{const r=sae(aae(e),n??void 0);return{...r,lanes:GIe(r.lanes,n)}}catch{return QX}})}function F_(t,e){return((e==null?void 0:e.nodes)??[]).some(n=>n.fromCarve&&n.id&&t.startsWith(`fx.${n.id}.`))}function cue(t){return lue(t).lanes}function uue(t,e){var s;const n=Oy(t);if(!n||n.kind!=="fx")return null;const r=e==null?void 0:e.nodes.find(a=>a.id===n.nodeId),i=(s=r==null?void 0:r.params)==null?void 0:s.frequency;return typeof i=="number"?i:null}function GIe(t,e){const n=[],r=[];for(const i of t){const s=uue(i.target,e);s===null?r.push(i):n.push({lane:i,freq:s})}return n.sort((i,s)=>s.freq-i.freq),[...n.map(i=>i.lane),...r]}function fue(t){if(t<1e3)return`${Math.round(t)} Hz`;const e=t/1e3;return`${e>=10?Math.round(e):Number(e.toFixed(1))} kHz`}function hue(t,e){const n=v0(t,e??void 0);if(!n)return null;const r=n.label.split(" · "),i=r.at(-1)??n.label,s=r.length>1?r.slice(0,-1).join(" · "):null,a=uue(t,e),o=[s,a===null?null:fue(a)].filter(Boolean).join(" ");return{name:o||i,param:o?i:""}}function UIe(t,e){return XIe(t,e)}function qf(t){const e=new Map;for(const n of t){if(!nl(n))continue;const r=s3(n);for(const i of cue(n)){const s=UIe(i.target,r),a=hue(i.target,r);if(!s||!a)continue;const o=e.get(s);o?o.entries.push({element:n,lane:i}):e.set(s,{key:s,name:a.name,param:a.param,entries:[{element:n,lane:i}]})}}return[...e.values()]}function XIe(t,e){const n=hue(t,e);return n?n.param?`${n.name} · ${n.param}`:n.name:null}function WIe({element:t,rows:e,isSelected:n,lanes:r,pps:i,top:s,accentColor:a,currentTime:o,beatTimes:l}){const c=x.useMemo(()=>(l??[]).filter(h=>h>=t.start&&h<=t.start+t.duration).map(h=>h-t.start),[l,t.start,t.duration]),u=r.bind(t,n);if(x.useEffect(()=>{var m;const h=(m=u.selection)==null?void 0:m.target;h!==void 0&&!u.lanes.some(y=>y.target===h)&&u.onRangeClear()},[u]),e.length===0)return null;const f=o>=t.start&&o<=t.start+t.duration;return d.jsx(d.Fragment,{children:e.map(({lane:h,rowIndex:m})=>{var p;const y=v0(h.target,u.chain??void 0);return y?d.jsx(HIe,{duration:t.duration,widthPx:Math.max(t.duration*i,4),leftPx:t.start*i,topPx:s+m*_d,automation:u.automation,target:h.target,range:y,accentColor:a,playheadSec:f?o-t.start:null,onPreview:u.onPreview,onCommit:u.onCommit,onSelect:u.onSelect,snapTimes:c,readOnly:u.readOnly||F_(h.target,u.chain),readOnlyNote:F_(h.target,u.chain)?"Owned by the voiceover carve — re-derived on every analysis. Change strength in the FX rack, or turn the carve off to edit these by hand.":u.readOnly?"Read-only here.":void 0,rangeSelection:((p=u.selection)==null?void 0:p.target)===h.target?{t0:u.selection.t0,t1:u.selection.t1,v0:u.selection.v0,v1:u.selection.v1}:null,onRangeSelect:(v,b,w,O)=>u.onRangeSelect(h.target,v,b,w,O),onRangeClear:u.onRangeClear},h.target):null})})}function due({elements:t,isSelected:e,lanes:n,pps:r,laneCount:i,topOffset:s,accentColor:a,currentTime:o,beatTimes:l}){const c=t.filter(nl),u=new Map;qf(c).forEach((h,m)=>{for(const y of h.entries){const p=Zn(y.element),v=u.get(p);v?v.push({lane:y.lane,rowIndex:m}):u.set(p,[{lane:y.lane,rowIndex:m}])}});const f=s??jg(i);return d.jsx(d.Fragment,{children:c.map(h=>d.jsx(WIe,{element:h,rows:u.get(Zn(h))??[],isSelected:e(h),lanes:n,pps:r,top:f,accentColor:a,currentTime:o,beatTimes:l},Zn(h)))})}const nF=Bc("DomEditActionsContext",null),rF=Bc("DomEditSelectionContext",null);function DS(){const t=x.useContext(nF);if(!t)throw new Error("useDomEditActionsContext must be used within DomEditProvider");return t}function IS(){return x.useContext(nF)}function Ny(){const t=x.useContext(rF);if(!t)throw new Error("useDomEditSelectionContext must be used within DomEditProvider");return t}function pue(){return x.useContext(rF)}function a3(){return{...DS(),...Ny()}}function qIe({value:{domEditSelection:t,domEditGroupSelections:e,domEditHoverSelection:n,agentModalOpen:r,agentModalAnchorPoint:i,copiedAgentPrompt:s,agentPromptSelectionContext:a,domEditSelectionRef:o,handleTimelineElementSelect:l,handlePreviewCanvasMouseDown:c,handlePreviewCanvasPointerMove:u,handlePreviewCanvasPointerLeave:f,applyDomSelection:h,clearDomSelection:m,handleDomStyleCommit:y,handleDomStyleCommitForSelection:p,handleDomAttributeCommit:v,handleDomAttributeLiveCommit:b,handleDomAttributeQuietCommit:w,handleDomHtmlAttributeCommit:O,handleDomAttributesCommit:C,handleDomPathOffsetCommit:E,handleDomGroupPathOffsetCommit:M,handleDomZIndexReorderCommit:N,handleDomBoxSizeCommit:_,handleDomRotationCommit:I,handleDomManualEditsReset:j,handleDomTextCommit:L,handleDomTextCommitForSelection:H,handleDomRichTextCommit:$,handleDomTextFieldStyleCommit:G,handleDomAddTextField:q,handleDomRemoveTextField:Y,getGsapAnimationsForSelection:J,handleAskAgent:ie,handleAgentModalSubmit:te,handleBlockedDomMove:ne,handleDomManualDragStart:W,handleDomEditElementDelete:F,handleGroupSelection:U,handleUngroupSelection:Q,setActiveGroupElement:K,activeGroupElement:ee,buildDomSelectionFromTarget:se,buildDomSelectionForTimelineElement:z,updateDomEditHoverSelection:V,resolveImportedFontAsset:ae,setAgentModalOpen:he,setAgentPromptSelectionContext:ge,setAgentModalAnchorPoint:ye,selectedGsapAnimations:fe,gsapMultipleTimelines:me,gsapUnsupportedTimelinePattern:Te,handleGsapUpdateProperty:ve,handleGsapUpdateMeta:xe,handleGsapDeleteAnimation:we,handleGsapDeleteAllForElement:ke,handleGsapAddAnimation:Me,handleGsapAddProperty:Qe,handleGsapRemoveProperty:qe,handleGsapUpdateFromProperty:Ge,handleGsapAddFromProperty:Ye,handleGsapRemoveFromProperty:st,handleGsapAddKeyframe:nt,handleGsapAddKeyframeBatch:yt,handleGsapRemoveKeyframe:dt,handleGsapMoveKeyframeToPlayhead:zt,handleGsapMoveKeyframe:Kt,handleGsapResizeKeyframedTween:dn,handleGsapConvertToKeyframes:en,handleGsapRemoveAllKeyframes:et,handleResetSelectedElementKeyframes:Ot,commitAnimatedProperty:St,commitAnimatedProperties:Je,handleSetArcPath:Be,handleUpdateArcSegment:We,handleUnroll:Ke,invalidateGsapCache:Xt,previewIframeRef:Pe,commitMutation:De,applyMarqueeSelection:ze,handleUpdateKeyframeEase:at,handleUpdateSegmentEase:Wt,handleSetAllKeyframeEases:cn},children:Jt}){const Pn=x.useRef(De);Pn.current=De;const Cr=x.useCallback((un,Cn)=>Pn.current(un,Cn),[]),mt=x.useMemo(()=>({handleTimelineElementSelect:l,handlePreviewCanvasMouseDown:c,handlePreviewCanvasPointerMove:u,handlePreviewCanvasPointerLeave:f,applyDomSelection:h,clearDomSelection:m,handleDomStyleCommit:y,handleDomStyleCommitForSelection:p,handleDomAttributeCommit:v,handleDomAttributeLiveCommit:b,handleDomAttributeQuietCommit:w,handleDomHtmlAttributeCommit:O,handleDomAttributesCommit:C,handleDomPathOffsetCommit:E,handleDomGroupPathOffsetCommit:M,handleDomZIndexReorderCommit:N,handleDomBoxSizeCommit:_,handleDomRotationCommit:I,handleDomManualEditsReset:j,handleDomTextCommit:L,handleDomTextCommitForSelection:H,handleDomRichTextCommit:$,handleDomTextFieldStyleCommit:G,handleDomAddTextField:q,handleDomRemoveTextField:Y,getGsapAnimationsForSelection:J,handleAskAgent:ie,handleAgentModalSubmit:te,handleBlockedDomMove:ne,handleDomManualDragStart:W,handleDomEditElementDelete:F,handleGroupSelection:U,handleUngroupSelection:Q,setActiveGroupElement:K,buildDomSelectionFromTarget:se,buildDomSelectionForTimelineElement:z,updateDomEditHoverSelection:V,resolveImportedFontAsset:ae,setAgentModalOpen:he,setAgentPromptSelectionContext:ge,setAgentModalAnchorPoint:ye,handleGsapUpdateProperty:ve,handleGsapUpdateMeta:xe,handleGsapDeleteAnimation:we,handleGsapDeleteAllForElement:ke,handleGsapAddAnimation:Me,handleGsapAddProperty:Qe,handleGsapRemoveProperty:qe,handleGsapUpdateFromProperty:Ge,handleGsapAddFromProperty:Ye,handleGsapRemoveFromProperty:st,handleGsapAddKeyframe:nt,handleGsapAddKeyframeBatch:yt,handleGsapRemoveKeyframe:dt,handleGsapMoveKeyframeToPlayhead:zt,handleGsapMoveKeyframe:Kt,handleGsapResizeKeyframedTween:dn,handleGsapConvertToKeyframes:en,handleGsapRemoveAllKeyframes:et,handleResetSelectedElementKeyframes:Ot,commitAnimatedProperty:St,commitAnimatedProperties:Je,handleSetArcPath:Be,handleUpdateArcSegment:We,handleUnroll:Ke,invalidateGsapCache:Xt,previewIframeRef:Pe,commitMutation:Cr,applyMarqueeSelection:ze,handleUpdateKeyframeEase:at,handleUpdateSegmentEase:Wt,handleSetAllKeyframeEases:cn}),[l,c,u,f,h,m,y,p,v,b,w,O,C,E,M,N,_,I,j,L,H,$,G,q,Y,J,ie,te,ne,W,F,U,Q,K,se,z,V,ae,he,ge,ye,ve,xe,we,ke,Me,Qe,qe,Ge,Ye,st,nt,yt,dt,zt,Kt,dn,en,et,Ot,St,Je,Be,We,Ke,Xt,Pe,Cr,ze,at,Wt,cn]),pn=x.useMemo(()=>({domEditSelection:t,domEditGroupSelections:e,domEditHoverSelection:n,activeGroupElement:ee,domEditSelectionRef:o,selectedGsapAnimations:fe,gsapMultipleTimelines:me,gsapUnsupportedTimelinePattern:Te,agentModalOpen:r,agentModalAnchorPoint:i,copiedAgentPrompt:s,agentPromptSelectionContext:a}),[t,e,n,ee,o,fe,me,Te,r,i,s,a]);return d.jsx(nF,{value:mt,children:d.jsx(rF,{value:pn,children:Jt})})}function Yf(t){const e=KIe(t);return e?e.isContentEditable?!0:e.closest(YIe)!==null:!1}const YIe=["input","textarea","select","[contenteditable]:not([contenteditable='false'])","[role='textbox']","[role='searchbox']","[role='combobox']",".cm-editor"].join(",");function KIe(t){return!t||typeof t!="object"?null:typeof t.closest=="function"?t:null}function mue(t){return t.label||t.id||t.tag}function zX(t){const e=t.trim(),n=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(n).replace(/\\/g,"/").replace(/^\.?\//,"")}function JIe(t,e){const n=zX(t).split("/").filter(Boolean),r=zX(e).split("/").filter(Boolean);for(n.pop();n.length>0&&r.length>0&&n[0]===r[0];)n.shift(),r.shift();return[...n.map(()=>".."),...r].join("/")||e}function e_e(t){return/^(?:\/|[A-Za-z]:[\\/]|\\\\)/.test(t)}function t_e(t,e){const n=e.trim();if(!n)return;const r=n.replace(/\\/g,"/");if(e_e(r))return r;const i=t==null?void 0:t.trim().replace(/\\/g,"/").replace(/\/+$/,"");if(i)return`${i}/${r.replace(/^\.?\//,"")}`}function $_(t,e){const n=e.trim();return n&&(["border-radius","border-width","font-size","letter-spacing"].includes(t)&&/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n)}function n_e(t){return/^url\(/i.test(t.trim())}function r_e(t){return t==="left"||t==="top"||t==="width"||t==="height"}function gue(t){if(!t||typeof t!="object")return null;const e=t;return e.nodeType===1?t:e.nodeType===3&&e.parentElement?e.parentElement:null}function yue(t){return Yf(t)}function c8(t){const n=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/i.test(navigator.platform)?"Cmd":"Ctrl";return t==="undo"?`${n}+Z`:`${n}+Shift+Z`}function i_e(t,e,n){return t.id?e.domId===t.id&&(e.sourceFile||"index.html")===n:!1}function s_e(t,e){return!t.isCompositionHost||!t.compositionSrc?!1:e.compositionSrc===t.compositionSrc}function a_e(t,e){return t.selector?e.selector===t.selector&&(e.selectorIndex??0)===(t.selectorIndex??0)&&(e.sourceFile??"index.html")===t.sourceFile:!1}function iF(t,e){const n=t.sourceFile||"index.html",r=t.id?e.find(a=>i_e(t,a,n)):void 0;if(r)return r.key??r.id;const i=t.selector?e.find(a=>a_e(t,a)):void 0;if(i)return i.key??i.id;const s=e.find(a=>s_e(t,a));return s?s.key??s.id:t.id&&n!=="index.html"?`${n}#${t.id}`:null}function xue(t,e,n){let r=(t==null?void 0:t.parentElement)??null;for(;r;){const i=r.id;if(i){const s=e.find(a=>a.domId===i&&(a.sourceFile??"index.html")===n);if(s)return s.key??s.id}r=r.parentElement}return null}function ak(t,e,n){return iF(t,e)??xue(t.element,e,t.sourceFile||n||"index.html")}function o_e(t,e,n){return t.map(r=>ak(r,e,n)).filter(r=>r!==null)}function l_e(t,e){if(!e||!Number.isFinite(e.start)||!Number.isFinite(e.duration))return null;const n=Math.max(0,e.start),r=Math.max(n,n+Math.max(0,e.duration)),i=Number.isFinite(t)?t:n;return Mr(i,n,r)}function Mr(t,e,n){return n<e?e:Math.min(Math.max(t,e),n)}function sF(t){return Array.from(t.matchAll(/\bid="([^"]+)"/g),e=>e[1]??"")}const u8={image:3,video:5,audio:5};async function ZX(t,e,n){if(n==="image")return u8.image;const r=document.createElement(n==="video"?"video":"audio");r.preload="metadata",r.src=`/api/projects/${t}/preview/${e}`;const i=await new Promise(s=>{const a=window.setTimeout(()=>s(u8[n]),3e3),o=l=>{window.clearTimeout(a),s(l)};r.addEventListener("loadedmetadata",()=>{const l=Number(r.duration);o(Number.isFinite(l)&&l>0?Aa(l):u8[n])},{once:!0}),r.addEventListener("error",()=>o(u8[n]),{once:!0})});return r.src="",r.load(),i}function c_e(t=()=>`automation-gesture:${++u_e}`){let e=null;const n=r=>({key:r,ms:Number.POSITIVE_INFINITY});return{live:()=>(e??(e=t()),n(e)),commit:()=>{const r=e??t();return e=null,n(r)}}}let u_e=0;function f_e(){var c;const t=x.useRef(c_e()),e=IS(),n=((c=pue())==null?void 0:c.domEditSelection)??null,r=ce(u=>u.elements),i=ce(u=>u.automationSelection),s=ce(u=>u.setAutomationSelection),a=ce(u=>u.clearAutomationSelection),o=x.useMemo(()=>n?ak(n,r,null):null,[n,r]),l=x.useCallback((u,f)=>{const h=s3(u),m=lue(u),y=Zn(u),p=(v,b)=>{if(!e||!f)return;const w=v.lanes.length>0?oae(v):"",O=b?t.current.commit():t.current.live();b?e.handleDomAttributeQuietCommit(oo,w,O):e.handleDomAttributeLiveCommit(oo,w||null,void 0,{coalesce:O,previewOnly:!0})};return{automation:m,lanes:m.lanes,chain:h,onPreview:v=>p(v,!1),onCommit:v=>p(v,!0),onSelect:()=>void(e==null?void 0:e.handleTimelineElementSelect(u)),readOnly:!e||!f,commitTargetKey:e?o:null,selection:(i==null?void 0:i.elementKey)===y?i:null,onRangeSelect:(v,b,w,O,C)=>{e&&s({elementKey:y,target:v,t0:b,t1:w,v0:O,v1:C})},onRangeClear:()=>a()}},[e,o,i,s,a]);return x.useMemo(()=>({bind:l}),[l])}let GX=null,aF=null,Qp=null;function bue(t){t!==GX&&(GX=t,aF=null,Qp=null)}function h_e(t,e,n,r,i){const s=ik(e,r,i).map(a=>({...a,t:a.t-r}));return s.length===0&&e.points.length===0?!1:(bue(t),aF={sourceRange:n,span:i-r,points:s.length>0?s:[{t:0,v:Gf(e,r,n.scale)},{t:i-r,v:Gf(e,i,n.scale)}]},!0)}function vue(t){return bue(t),aF}function d_e(t,e,n){return t.points.map(r=>({...r,t:n+r.t,v:i3(e,Cc(t.sourceRange,r.v))}))}function p_e(t){Qp={...t}}function m_e(t){return Qp?Qp.elementKey===t.elementKey&&Qp.target===t.target&&Qp.t0===t.t0&&Qp.t1===t.t1:!1}function Aue(t){if(!t)return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"?!0:t instanceof HTMLElement&&t.isContentEditable}function ok(t,e){return(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===e}function oF(t){return t.key??t.id}function lF(t,e){return e?t.find(n=>oF(n)===e)??null:null}function Sue(t,e,n){const r=lF(t.elements,n.elementKey);if(!r)return null;const i=e.bind(r,n.elementKey===t.selectedElementId);if(i.readOnly)return null;const s=v0(n.target,i.chain??void 0);return s?{binding:i,lane:KL(i.automation,n.target),range:s}:null}function g_e(t,e,n){const r=Sue(t,e,n);if(!r)return null;const i=r.lane.points.filter(s=>!Hg(s,n));return i.length===r.lane.points.length?null:{onCommit:r.binding.onCommit,next:JL(r.binding.automation,{target:n.target,points:i})}}function y_e(t,e,n){var r;return n&&n.elementKey===e?n.target:(r=t.lanes[0])==null?void 0:r.target}function x_e(t,e,n){const r=lF(t.elements,t.selectedElementId);if(!r)return null;const i=oF(r),s=e.bind(r,!0);if(s.readOnly||s.commitTargetKey!==i)return null;const a=y_e(s,i,n);if(!a)return null;const o=v0(a,s.chain??void 0);return o?{elementKey:i,element:r,target:a,binding:s,lane:KL(s.automation,a),range:o}:null}function b_e(t,e){return t.currentTime>=e.start&&t.currentTime<=e.start+e.duration}function wue(t,e,n,r){if(n>e.duration)return null;const s=r!==null&&r.elementKey===oF(e)?m_e(r)?r.t1:r.t0:b_e(t,e)?t.currentTime-e.start:null;return s===null?null:Mr(s,0,e.duration-n)}function v_e(t,e,n){if(!ok(t,"v"))return!1;const r=vue(e.timelineProjectId);if(!r)return!1;const i=e.automationSelection,s=x_e(e,n,i);if(!s)return!1;const a=wue(e,s.element,r.span,i);if(a===null)return!1;const o=a+r.span,l=d_e(r,s.range,a),c=sk({lane:s.lane,range:s.range,t0:a,t1:o,inner:l});t.preventDefault(),t.stopImmediatePropagation(),s.binding.onCommit(JL(s.binding.automation,{target:s.target,points:c}));const u={elementKey:s.elementKey,target:s.target,t0:a,t1:o,v0:s.range.min,v1:s.range.max};return e.setAutomationSelection(u),p_e(u),!0}function A_e(t,e,n,r){if(!ok(t,"c"))return!1;const i=Sue(e,n,r);return!i||!h_e(e.timelineProjectId,i.lane,i.range,r.t0,r.t1)?!1:(t.preventDefault(),t.stopImmediatePropagation(),!0)}function S_e(t){if(Aue(document.activeElement))return!1;const e=ce.getState();if(ok(t,"c"))return e.automationSelection!==null;if(!ok(t,"v"))return!1;const n=vue(e.timelineProjectId);if(!n)return!1;const r=lF(e.elements,e.selectedElementId);return r?wue(e,r,n.span,e.automationSelection)!==null:!1}function w_e(t,e,n,r){if(!(t.key==="Delete"||t.key==="Backspace")||t.metaKey||t.ctrlKey)return!1;const s=g_e(e,n,r);return s?(t.preventDefault(),t.stopImmediatePropagation(),s.onCommit(s.next),!0):!1}function O_e({lanes:t}){x.useEffect(()=>{const e=n=>{if(Aue(document.activeElement)||n.defaultPrevented)return;const r=ce.getState();if(v_e(n,r,t))return;const i=r.automationSelection;if(i){if(n.key==="Escape"){r.clearAutomationSelection();return}A_e(n,r,t,i)||w_e(n,r,t,i)}};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[t])}const o3="data-fx-carve",k_e=[160,250,400,630,1e3,1600,2500,4e3,6e3],ei=4096,C_e=2048,E_e=/sfx|foley|whoosh|impact|riser|stinger|swoosh|thud|boom|click|ding|beep|ambien|room[-_ ]?tone/i,T_e="(?<![a-z0-9])",P_e="(?![a-z0-9])",fv=t=>`${T_e}${t}${P_e}`,M_e=new RegExp(`music|bgm|${fv("bed")}|soundtrack|score|${fv("song")}|theme|instrumental|track\\d`,"i"),N_e=new RegExp(`voice|${fv("vo")}|${fv("vox")}|narrat|speech|dialog|monolog|announce|${fv("tts")}|talk|interview|podcast|recap|script`,"i");function M0(...t){const e=t.filter(Boolean).join(" ");return N_e.test(e)?"voice":E_e.test(e)?"sfx":M_e.test(e)?"music":"unknown"}function D_e(t,e){const n=r=>typeof r.duration=="number"&&Number.isFinite(r.duration)?r.start+Math.max(0,r.duration):Number.POSITIVE_INFINITY;return t.start<n(e)&&e.start<n(t)}function I_e(...t){return M0(...t)!=="voice"}function __e(...t){const e=M0(...t);return e==="music"||e==="sfx"}const Qg={enabled:!0,sources:[],strength:.25};function R_e(t){const e=Number.isFinite(t)?Math.min(1,Math.max(0,t)):.5;return{maxCutDb:Number((2+e*16).toFixed(2)),bands:Math.max(1,Math.min(6,Math.round(1+e*6))),q:Number((1.1+e*1.2).toFixed(2)),intelligibilityBias:Number(Math.min(1,.6+e*.4).toFixed(2)),duckDb:Number((e*24).toFixed(2)),headroomDb:Number((6+e*12).toFixed(2))}}function Oue(t){const e=t,n=o=>{const l=typeof o=="number"?o:Number(o);return Number.isFinite(l)?l:null};if(t==null)return{...Qg};const r=n(t==null?void 0:t.strength),i=n(t==null?void 0:t.maxCutDb),s=r!==null?r:i!==null?(i-2)/16:Qg.strength,a=Array.isArray(t==null?void 0:t.sources)?t.sources:typeof(e==null?void 0:e.source)=="string"?[e.source]:[];return{enabled:(t==null?void 0:t.enabled)!==!1,sources:a.filter(o=>typeof o=="string"&&o!==""),strength:Math.min(1,Math.max(0,s))}}function j_e(t,e){const n=t.map(s=>({samples:s.samples,at:Math.round(s.offsetSeconds*e)})),r=n.reduce((s,a)=>Math.max(s,a.at+a.samples.length),0);if(r<=0)return new Float32Array(0);const i=new Float32Array(r);for(const{samples:s,at:a}of n){const o=a<0?-a:0;for(let l=o;l<s.length;l+=1){const c=a+l;c<0||c>=r||(i[c]=(i[c]??0)+(s[l]??0))}}return i}function L_e(t,e){const n=Math.max(t.length,ei),r=t.length>=ei?t:(()=>{const h=new Float32Array(ei);return h.set(t),h})(),i=new Float32Array(ei);for(let h=0;h<ei;h++)i[h]=.5-.5*Math.cos(2*Math.PI*h/(ei-1));const s=ei/2+1,a=new Float64Array(s),o=new Float64Array(ei),l=new Float64Array(ei);let c=0;for(let h=0;h+ei<=n;h+=C_e){l.fill(0);for(let m=0;m<ei;m++)o[m]=(r[h+m]??0)*i[m];kue(o,l);for(let m=0;m<s;m++)a[m]+=o[m]*o[m]+l[m]*l[m];c++}c===0&&(c=1);const u=[],f=[];for(let h=0;h<s;h++)u.push(h*e/ei),f.push(a[h]/c);return{freqs:u,power:f}}function kue(t,e){const n=t.length;for(let r=1,i=0;r<n;r++){let s=n>>1;for(;i&s;s>>=1)i^=s;i^=s,r<i&&([t[r],t[i]]=[t[i],t[r]],[e[r],e[i]]=[e[i],e[r]])}for(let r=2;r<=n;r<<=1){const i=-2*Math.PI/r,s=Math.cos(i),a=Math.sin(i);for(let o=0;o<n;o+=r){let l=1,c=0;for(let u=0;u<r/2;u++){const f=t[o+u],h=e[o+u],m=t[o+u+r/2]*l-e[o+u+r/2]*c,y=t[o+u+r/2]*c+e[o+u+r/2]*l;t[o+u]=f+m,e[o+u]=h+y,t[o+u+r/2]=f-m,e[o+u+r/2]=h-y;const p=l*s-c*a;c=l*a+c*s,l=p}}}}function Cue(t,e,n){const r=n/Math.pow(2,.16666666666666666),i=n*Math.pow(2,1/6);let s=0,a=0;for(let o=0;o<t.length;o++)t[o]>=r&&t[o]<i&&(s+=e[o],a++);return a>0?s/a:0}const F_e=30;function $_e(t,e){const n=Math.log2(t/2e3),r=Math.exp(-(n*n)/2);return e*F_e*(1-r)}function B_e(t,e,n){if(t.length===0)return[];const{freqs:r,power:i}=L_e(t,e),a=k_e.map(l=>{const c=Cue(r,i,l);return{center:l,hasEnergy:c>0,scoreDb:c>0?10*Math.log10(c)-$_e(l,n.intelligibilityBias):Number.NEGATIVE_INFINITY}}).sort((l,c)=>c.scoreDb-l.scoreDb).slice(0,Math.max(1,n.bands)).filter(l=>l.hasEnergy);if(a.length===0)return[];const o=a[0].scoreDb;return a.map(({center:l,scoreDb:c})=>{const u=Math.pow(10,(c-o)/10),f=Math.min(n.maxCutDb,Math.max(n.maxCutDb/2,n.maxCutDb*u));return{freq:l,gainDb:-Number(f.toFixed(2)),q:n.q}}).sort((l,c)=>l.freq-c.freq)}const Eue=30,Tue=.05,V_e=.25,H_e=1.6,Pue=400,Z4=.2,Mue=.5;function Nue(t,e){const n=[{t:0,v:0}];let r=0,i=-1;return t.forEach((s,a)=>{a!==t.length-1&&Math.abs(s.v-r)<e||(a>0&&i!==a-1&&n.push(t[a-1]),n.push(s),r=s.v,i=a)}),n}function Q_e(t,e,n){if(t.length===0||n.length===0)return[];const r=new Float32Array(ei);for(let y=0;y<ei;y++)r[y]=.5-.5*Math.cos(2*Math.PI*y/(ei-1));const i=Math.max(ei,Math.ceil(t.length/Pue)),s=ei/2+1,a=[];for(let y=0;y<s;y++)a.push(y*e/ei);const o=[],l=n.map(()=>[]),c=new Float64Array(ei),u=new Float64Array(ei);for(let y=0;y<t.length;y+=i){u.fill(0);for(let v=0;v<ei;v++)c[v]=(t[y+v]??0)*r[v];kue(c,u);const p=[];for(let v=0;v<s;v++)p.push(c[v]*c[v]+u[v]*u[v]);o.push((y+ei/2)/e),n.forEach((v,b)=>l[b].push(Cue(a,p,v.freq)))}const f=t.length/e,h=1-Math.exp(-(i/e)/Tue),m=1-Math.exp(-(i/e)/V_e);return n.map((y,p)=>{const v=l[p],b=Math.max(...v);let w=0;const O=[];v.forEach((E,M)=>{const N=E>0&&b>0?Math.max(0,1+10*Math.log10(E/b)/Eue):0;w+=(N>w?h:m)*(N-w);const _=y.gainDb*w,I=Math.abs(_)<Z4?0:Number(_.toFixed(1));O.push({t:Number(o[M].toFixed(3)),v:I})});const C=Nue(O,Mue);return C.push({t:Number(Math.max(f,C.at(-1).t).toFixed(3)),v:0}),{freq:y.freq,points:C}})}function UX(t,e,n){let r=0,i=0;for(let a=e;a<e+n;a++){const o=t[a];if(o===void 0)break;r+=o*o,i+=1}if(i===0)return Number.NEGATIVE_INFINITY;const s=Math.sqrt(r/i);return s>0?20*Math.log10(s):Number.NEGATIVE_INFINITY}function z_e(t,e,n,r,i){if(t.length===0||r.duckDb<=0)return[];const s=Math.max(ei,Math.ceil(t.length/Pue)),a=Math.round(i*n),o=[],l=[],c=[];for(let M=0;M<t.length;M+=s)o.push(UX(t,M,ei)),l.push(UX(e,M+a,ei)),c.push((M+ei/2)/n);const f=Math.max(...o)-Eue,h=1-Math.exp(-(s/n)/Tue),m=1-Math.exp(-(s/n)/H_e);let y=0;const p=[];o.forEach((M,N)=>{const _=l[N]??Number.NEGATIVE_INFINITY,I=M>f&&Number.isFinite(_)?_-(M-r.headroomDb):0,j=Math.min(r.duckDb,Math.max(0,I));y+=(j>y?h:m)*(j-y);const L=y<Z4?0:-Number(y.toFixed(1));p.push({t:Number(c[N].toFixed(3)),v:L})});const v=s/n;let b=c.at(-1)??0;for(;y>=Z4;)y+=m*-y,b+=v,p.push({t:Number(b.toFixed(3)),v:y<Z4?0:-Number(y.toFixed(1))});const w=Nue(p,Mue),O=t.length/n,C=w.at(-1),E=Number(Math.max(O,C.t).toFixed(3));return C.v===0&&C.t>=E||w.push({t:E,v:0}),w}function Z_e(t){const e=t.map(n=>({type:"peaking",enabled:!0,params:{...Zf("peaking"),frequency:n.freq,gain:n.gainDb,q:n.q}}));return{version:b0,nodes:e}}const G_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),x.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),U_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),x.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),X_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),x.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),W_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M87.51,64.49a12,12,0,0,1,0-17l32-32a12,12,0,0,1,17,0l32,32a12,12,0,0,1-17,17L140,53V96a12,12,0,0,1-24,0V53L104.49,64.49A12,12,0,0,1,87.51,64.49Zm64,127L140,203V160a12,12,0,0,0-24,0v43l-11.51-11.52a12,12,0,0,0-17,17l32,32a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm89-72-32-32a12,12,0,0,0-17,17L203,116H160a12,12,0,0,0,0,24h43l-11.52,11.51a12,12,0,0,0,17,17l32-32A12,12,0,0,0,240.49,119.51ZM53,140H96a12,12,0,0,0,0-24H53l11.52-11.51a12,12,0,1,0-17-17l-32,32a12,12,0,0,0,0,17l32,32a12,12,0,1,0,17-17Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,128,128,232,24,128,128,24Z",opacity:"0.2"}),x.createElement("path",{d:"M90.34,61.66a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,0l32,32a8,8,0,0,1-11.32,11.32L136,43.31V96a8,8,0,0,1-16,0V43.31L101.66,61.66A8,8,0,0,1,90.34,61.66Zm64,132.68L136,212.69V160a8,8,0,0,0-16,0v52.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm83.32-72-32-32a8,8,0,0,0-11.32,11.32L212.69,120H160a8,8,0,0,0,0,16h52.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,237.66,122.34ZM43.31,136H96a8,8,0,0,0,0-16H43.31l18.35-18.34A8,8,0,0,0,50.34,90.34l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M96,136H64v24a8,8,0,0,1-13.66,5.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,64,96v24H96a8,8,0,0,1,0,16Zm0-72h24V96a8,8,0,0,0,16,0V64h24a8,8,0,0,0,5.66-13.66l-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,96,64Zm141.66,58.34-32-32A8,8,0,0,0,192,96v24H160a8,8,0,0,0,0,16h32v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,237.66,122.34ZM160,192H136V160a8,8,0,0,0-16,0v32H96a8,8,0,0,0-5.66,13.66l32,32a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,160,192Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M91.76,60.24a6,6,0,0,1,0-8.48l32-32a6,6,0,0,1,8.48,0l32,32a6,6,0,1,1-8.48,8.48L134,38.49V96a6,6,0,0,1-12,0V38.49L100.24,60.24A6,6,0,0,1,91.76,60.24Zm64,135.52L134,217.51V160a6,6,0,0,0-12,0v57.51l-21.76-21.75a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48Zm80.48-72-32-32a6,6,0,0,0-8.48,8.48L217.51,122H160a6,6,0,0,0,0,12h57.51l-21.75,21.76a6,6,0,1,0,8.48,8.48l32-32A6,6,0,0,0,236.24,123.76ZM38.49,134H96a6,6,0,0,0,0-12H38.49l21.75-21.76a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48l32,32a6,6,0,0,0,8.48-8.48Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M90.34,61.66a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,0l32,32a8,8,0,0,1-11.32,11.32L136,43.31V96a8,8,0,0,1-16,0V43.31L101.66,61.66A8,8,0,0,1,90.34,61.66Zm64,132.68L136,212.69V160a8,8,0,0,0-16,0v52.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm83.32-72-32-32a8,8,0,0,0-11.32,11.32L212.69,120H160a8,8,0,0,0,0,16h52.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,237.66,122.34ZM43.31,136H96a8,8,0,0,0,0-16H43.31l18.35-18.34A8,8,0,0,0,50.34,90.34l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M93.17,58.83a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,0l32,32a4,4,0,0,1-5.66,5.66L132,33.66V96a4,4,0,0,1-8,0V33.66L98.83,58.83A4,4,0,0,1,93.17,58.83Zm64,138.34L132,222.34V160a4,4,0,0,0-8,0v62.34L98.83,197.17a4,4,0,0,0-5.66,5.66l32,32a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0-5.66-5.66Zm77.66-72-32-32a4,4,0,0,0-5.66,5.66L222.34,124H160a4,4,0,0,0,0,8h62.34l-25.17,25.17a4,4,0,0,0,5.66,5.66l32-32A4,4,0,0,0,234.83,125.17ZM33.66,132H96a4,4,0,0,0,0-8H33.66L58.83,98.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66l32,32a4,4,0,1,0,5.66-5.66Z"}))]]),q_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),x.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),Y_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),x.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),K_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),x.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),J_e=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),x.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),eRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M172,164a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,164Zm-12-52H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm60-64V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V48A20,20,0,0,1,56,28H90.53a51.88,51.88,0,0,1,74.94,0H200A20,20,0,0,1,220,48ZM100.29,60h55.42a28,28,0,0,0-55.42,0ZM196,52H178.59A52.13,52.13,0,0,1,180,64v8a12,12,0,0,1-12,12H88A12,12,0,0,1,76,72V64a52.13,52.13,0,0,1,1.41-12H60V212H196Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,48V216a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H96a39.83,39.83,0,0,0-8,24v8h80V64a39.83,39.83,0,0,0-8-24h40A8,8,0,0,1,208,48Z",opacity:"0.2"}),x.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M166,152a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,152Zm-6-38H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm54-66V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V48A14,14,0,0,1,56,34H93.17a45.91,45.91,0,0,1,69.66,0H200A14,14,0,0,1,214,48ZM94,64v2h68V64a34,34,0,0,0-68,0ZM202,48a2,2,0,0,0-2-2H170.33A45.77,45.77,0,0,1,174,64v8a6,6,0,0,1-6,6H88a6,6,0,0,1-6-6V64a45.77,45.77,0,0,1,3.67-18H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200a2,2,0,0,0,2-2Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M164,152a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,152Zm-4-36H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm52-68V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V48A12,12,0,0,1,56,36H94.08a44,44,0,0,1,67.84,0H200A12,12,0,0,1,212,48ZM92,64v4h72V64a36,36,0,0,0-72,0ZM204,48a4,4,0,0,0-4-4H167.17A43.71,43.71,0,0,1,172,64v8a4,4,0,0,1-4,4H88a4,4,0,0,1-4-4V64a43.71,43.71,0,0,1,4.83-20H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200a4,4,0,0,0,4-4Z"}))]]),tRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),nRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),x.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),rRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),x.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),iRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),x.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),sRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,67.24a39.77,39.77,0,0,0-12.51-28.52C199.91,24,174.71,24.5,159.29,39.93L142.48,56.84a28,28,0,0,0-35.64,3.29l-9,9a20,20,0,0,0-.73,27.49L48.9,144.84A43.76,43.76,0,0,0,37,185.28l-7.5,17.19a17.66,17.66,0,0,0,3.71,19.65,19.9,19.9,0,0,0,22.15,4.19l16.31-7.13a43.88,43.88,0,0,0,39.45-12.09l48.24-48.26a20,20,0,0,0,27.47-.73l9-9a28.06,28.06,0,0,0,3.26-35.72l17.23-17.33A39.69,39.69,0,0,0,228,67.24ZM94.15,190.11a20,20,0,0,1-20,5,11.93,11.93,0,0,0-8.32.47L57,199.38,60.69,191a12,12,0,0,0,.37-8.64,19.92,19.92,0,0,1,4.81-20.55l48.2-48.22,28.28,28.3Zm105.14-111-25.37,25.52a12,12,0,0,0,0,16.95l4.88,4.89a4,4,0,0,1,0,5.66l-6.14,6.15-55-55.05,6.14-6.14a4,4,0,0,1,5.65,0L134.35,82a12,12,0,0,0,8.49,3.51h0A12,12,0,0,0,151.34,82l24.94-25.08c6.3-6.3,16.48-6.63,22.71-.74a16,16,0,0,1,.3,23Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207.8,87.6l-25.37,25.53,4.89,4.88a16,16,0,0,1,0,22.64l-9,9a8,8,0,0,1-11.32,0l-60.68-60.7a8,8,0,0,1,0-11.32l9-9a16,16,0,0,1,22.63,0l4.88,4.89,25-25.11c10.79-10.79,28.37-11.45,39.45-1A28,28,0,0,1,207.8,87.6Z",opacity:"0.2"}),x.createElement("path",{d:"M224,67.3a35.79,35.79,0,0,0-11.26-25.66c-14-13.28-36.72-12.78-50.62,1.13L142.8,62.2a24,24,0,0,0-33.14.77l-9,9a16,16,0,0,0,0,22.64l2,2.06-51,51a39.75,39.75,0,0,0-10.53,38l-8,18.41A13.68,13.68,0,0,0,36,219.3a15.92,15.92,0,0,0,17.71,3.35L71.23,215a39.89,39.89,0,0,0,37.06-10.75l51-51,2.06,2.06a16,16,0,0,0,22.62,0l9-9a24,24,0,0,0,.74-33.18l19.75-19.87A35.75,35.75,0,0,0,224,67.3ZM97,193a24,24,0,0,1-24,6,8,8,0,0,0-5.55.31l-18.1,7.91L57,189.41a8,8,0,0,0,.25-5.75A23.88,23.88,0,0,1,63,159l51-51,33.94,34ZM202.13,82l-25.37,25.52a8,8,0,0,0,0,11.3l4.89,4.89a8,8,0,0,1,0,11.32l-9,9L112,83.26l9-9a8,8,0,0,1,11.31,0l4.89,4.89a8,8,0,0,0,5.65,2.34h0a8,8,0,0,0,5.66-2.36l24.94-25.09c7.81-7.82,20.5-8.18,28.29-.81a20,20,0,0,1,.39,28.7Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,67.3a35.79,35.79,0,0,0-11.26-25.66c-14-13.28-36.72-12.78-50.62,1.13L138.8,66.2a24,24,0,0,0-33.14.77l-5,5a16,16,0,0,0,0,22.64l2,2.06-51,51a39.75,39.75,0,0,0-10.53,38l-8,18.41A13.68,13.68,0,0,0,36,219.3a15.92,15.92,0,0,0,17.71,3.35L71.23,215a39.89,39.89,0,0,0,37.06-10.75l51-51,2.06,2.06a16,16,0,0,0,22.62,0l5-5a24,24,0,0,0,.74-33.18l23.75-23.87A35.75,35.75,0,0,0,224,67.3ZM97,193a24,24,0,0,1-24,6,8,8,0,0,0-5.55.31l-18.1,7.91L57,189.41a8,8,0,0,0,.25-5.75A23.88,23.88,0,0,1,63,159l51-51,33.94,34Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,67.34a33.81,33.81,0,0,0-10.64-24.25C198.12,30.56,176.68,31,163.54,44.18L142.82,65l-.63-.63a22,22,0,0,0-31.11,0l-9,9a14,14,0,0,0,0,19.81l3.47,3.47L53.14,149.1a37.79,37.79,0,0,0-9.84,36.73l-8.31,19a11.68,11.68,0,0,0,2.46,13A13.91,13.91,0,0,0,47.32,222,14.15,14.15,0,0,0,53,220.82L71,212.92a37.92,37.92,0,0,0,35.84-10.07l52.44-52.46,3.47,3.48a14,14,0,0,0,19.8,0l9-9a22,22,0,0,0,0-31.12l-.66-.66L212,91.85A33.76,33.76,0,0,0,222,67.34Zm-123.61,127a26,26,0,0,1-26,6.47,6,6,0,0,0-4.16.24l-20,8.75a2,2,0,0,1-2.09-.31l9.12-20.9a5.94,5.94,0,0,0,.19-4.31,25.88,25.88,0,0,1,6.26-26.72l52.44-52.45,36.76,36.78Zm105.16-111L178.17,108.9a6,6,0,0,0,0,8.47l4.88,4.89a10,10,0,0,1,0,14.15l-9,9a2,2,0,0,1-2.82,0l-60.69-60.7a2,2,0,0,1,0-2.83l9-9a10,10,0,0,1,14.14,0l4.89,4.89a6,6,0,0,0,4.24,1.75h0a6,6,0,0,0,4.25-1.77L172,52.66c8.58-8.58,22.52-9,31.08-.85a22,22,0,0,1,.44,31.57Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,67.3a35.79,35.79,0,0,0-11.26-25.66c-14-13.28-36.72-12.78-50.62,1.13L142.8,62.2a24,24,0,0,0-33.14.77l-9,9a16,16,0,0,0,0,22.64l2,2.06-51,51a39.75,39.75,0,0,0-10.53,38l-8,18.41A13.68,13.68,0,0,0,36,219.3a15.92,15.92,0,0,0,17.71,3.35L71.23,215a39.89,39.89,0,0,0,37.06-10.75l51-51,2.06,2.06a16,16,0,0,0,22.62,0l9-9a24,24,0,0,0,.74-33.18l19.75-19.87A35.75,35.75,0,0,0,224,67.3ZM97,193a24,24,0,0,1-24,6,8,8,0,0,0-5.55.31l-18.1,7.91L57,189.41a8,8,0,0,0,.25-5.75A23.88,23.88,0,0,1,63,159l51-51,33.94,34ZM202.13,82l-25.37,25.52a8,8,0,0,0,0,11.3l4.89,4.89a8,8,0,0,1,0,11.32l-9,9L112,83.26l9-9a8,8,0,0,1,11.31,0l4.89,4.89a8,8,0,0,0,11.33,0l24.94-25.09c7.81-7.82,20.5-8.18,28.29-.81a20,20,0,0,1,.39,28.7Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,67.37a31.82,31.82,0,0,0-10-22.82c-12.46-11.8-32.66-11.33-45,1.05L142.82,67.86l-2-2a20,20,0,0,0-28.28,0l-9,9a12,12,0,0,0,0,17l4.89,4.89L54.55,150.52A35.81,35.81,0,0,0,45.42,186l-8.6,19.7a9.7,9.7,0,0,0,2,10.79A12,12,0,0,0,52.15,219l18.72-8.18a35.9,35.9,0,0,0,34.59-9.37l53.86-53.87,4.88,4.89a12,12,0,0,0,17,0l9-9a20,20,0,0,0,0-28.3l-2.06-2.06,22.55-22.69A31.75,31.75,0,0,0,220,67.37ZM99.81,195.78a28,28,0,0,1-28,7,4,4,0,0,0-2.78.15l-20,8.75a4,4,0,0,1-4.43-.84,1.73,1.73,0,0,1-.36-1.93l9.19-21.06a4,4,0,0,0,.12-2.88,27.87,27.87,0,0,1,6.74-28.77l53.85-53.87,39.6,39.61Zm79.78-85.47a4,4,0,0,0,0,5.65l4.89,4.89a12,12,0,0,1,0,17l-9,9a4,4,0,0,1-5.66,0L109.18,86.1a4,4,0,0,1,0-5.66l9-9a12,12,0,0,1,17,0L140,76.36a4,4,0,0,0,2.83,1.17h0a4,4,0,0,0,2.83-1.18l25-25.1c9.33-9.34,24.52-9.73,33.87-.89A24,24,0,0,1,205,84.79Z"}))]]),aRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),oRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),lRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,180c0,8.67,5.5,16,12,16a10.27,10.27,0,0,0,7.33-3.43,12,12,0,1,1,17.34,16.6A34,34,0,0,1,60,220C40.15,220,24,202,24,180s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,1,1-17.34,16.6A10.27,10.27,0,0,0,60,164C53.5,164,48,171.31,48,180Zm97.51-5.71c-5.12-3.45-11.32-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,143,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,125.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C157,187.53,153.33,179.53,145.51,174.27Zm68,0c-5.12-3.45-11.32-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,211,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,193.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C225,187.53,221.33,179.53,213.51,174.27ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.2,14.2,0,0,0,10.22-4.66A8,8,0,1,1,85.77,206.4,30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.77,9.6,8,8,0,1,1-11.55,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.35-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.18,14.18,0,0,0,10.06-4.5,8.2,8.2,0,0,1,10.9-.91,8,8,0,0,1,.81,11.81A30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.38,9.19,8.26,8.26,0,0,1,.74,11.09,8,8,0,0,1-11.9.38A14.2,14.2,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.35-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M46,180c0,12.13,8.07,22,18,22a16.21,16.21,0,0,0,11.66-5.28,6,6,0,0,1,8.67,8.3A28.09,28.09,0,0,1,64,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.09,28.09,0,0,1,20.33,9,6,6,0,0,1-8.67,8.3A16.21,16.21,0,0,0,64,158C54.07,158,46,167.86,46,180Zm81-6.77c-10.85-3.13-13.4-4.69-13-7.91a6.56,6.56,0,0,1,2.88-5.08c5.59-3.79,17.66-1.82,21.44-.84a6,6,0,1,0,3.06-11.6c-2-.53-20.09-5-31.2,2.48a18.62,18.62,0,0,0-8.09,13.54c-1.79,14.19,12.27,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.21,9.76a6.89,6.89,0,0,1-3,5.34c-5.6,3.73-17.48,1.64-21.18.62A6,6,0,1,0,110.48,212a59.29,59.29,0,0,0,14.67,2c5.49,0,11.55-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C151.83,180.39,136.92,176.08,127,173.22Zm64,0c-10.85-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.65-1.83,21.44-.84a6,6,0,0,0,3.07-11.6c-2-.54-20.1-5-31.21,2.48a18.64,18.64,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.77,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,174.47,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C215.83,180.39,200.91,176.08,191,173.22ZM202,94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,1,1-12,0ZM193.5,82,158,46.48V82Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,1,1,85.77,206.4,30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.77,9.6,8,8,0,1,1-11.55,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M44,180c0,13.23,9,24,20,24a18.15,18.15,0,0,0,13.11-5.9,4,4,0,0,1,5.78,5.54A26.13,26.13,0,0,1,64,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.13,26.13,0,0,1,18.89,8.36,4,4,0,0,1-5.78,5.54A18.15,18.15,0,0,0,64,156C53,156,44,166.77,44,180Zm82.49-4.85c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.11,61.11,0,0,0-10.47-1.61c-8.12-.54-14.54.75-19.1,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.25,3.25,16.47,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.79,57.79,0,0,0,125.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C149.64,181.84,136.26,178,126.49,175.15Zm64,0c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.11-.54-14.54.75-19.09,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.59,12.49,10.46,16,20.14,18.77,11.25,3.25,16.46,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.7,57.7,0,0,0,189.19,212c5.17,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C213.63,181.84,200.26,178,190.49,175.15ZM204,92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0Zm-5.65-8L156,41.65V84Z"}))]]),cRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,128a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v12a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v76A12,12,0,0,0,48,128ZM183,80H160V57ZM68,160v48a12,12,0,0,1-24,0V196H32v12a12,12,0,0,1-24,0V160a12,12,0,0,1,24,0v12H44V160a12,12,0,0,1,24,0Zm60,0a12,12,0,0,1-12,12h-4v36a12,12,0,0,1-24,0V172H84a12,12,0,0,1,0-24h32A12,12,0,0,1,128,160Zm72,0v48a12,12,0,0,1-24,0v-9.36l-.11.16a12,12,0,0,1-19.78,0l-.11-.16V208a12,12,0,0,1-24,0V160a12,12,0,0,1,21.89-6.8L166,170.82l12.11-17.62A12,12,0,0,1,200,160Zm56,48a12,12,0,0,1-12,12H220a12,12,0,0,1-12-12V160a12,12,0,0,1,24,0v36h12A12,12,0,0,1,256,208Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M216,120V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v24a8,8,0,0,0,16,0ZM160,51.31,188.69,80H160ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M44,128H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v84A4,4,0,0,0,44,128ZM152,44l44,44H152ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M214,120V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v80a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v26a6,6,0,0,0,12,0ZM158,46.48,193.52,82H158ZM66,160v48a6,6,0,0,1-12,0V190H30v18a6,6,0,0,1-12,0V160a6,6,0,0,1,12,0v18H54V160a6,6,0,0,1,12,0Zm56,0a6,6,0,0,1-6,6H106v42a6,6,0,0,1-12,0V166H84a6,6,0,0,1,0-12h32A6,6,0,0,1,122,160Zm72,0v48a6,6,0,0,1-12,0V178l-13.2,17.6a6,6,0,0,1-9.6,0L146,178v30a6,6,0,0,1-12,0V160a6,6,0,0,1,10.8-3.6L164,182l19.2-25.6A6,6,0,0,1,194,160Zm56,48a6,6,0,0,1-6,6H216a6,6,0,0,1-6-6V160a6,6,0,0,1,12,0v42h22A6,6,0,0,1,250,208Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,120V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v24a8,8,0,0,0,16,0ZM160,51.31,188.69,80H160ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212,88a4,4,0,0,0-1.17-2.83l-2-2h0l-54-54A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v80a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v28a4,4,0,0,0,8,0ZM156,41.65,198.34,84H156ZM64,160v48a4,4,0,0,1-8,0V188H28v20a4,4,0,0,1-8,0V160a4,4,0,0,1,8,0v20H56V160a4,4,0,0,1,8,0Zm56,0a4,4,0,0,1-4,4H104v44a4,4,0,0,1-8,0V164H84a4,4,0,0,1,0-8h32A4,4,0,0,1,120,160Zm72,0v48a4,4,0,0,1-8,0V172l-16.8,22.4a4,4,0,0,1-6.4,0L144,172v36a4,4,0,0,1-8,0V160a4,4,0,0,1,7.2-2.4L164,185.33l20.8-27.73A4,4,0,0,1,192,160Zm56,48a4,4,0,0,1-4,4H216a4,4,0,0,1-4-4V160a4,4,0,0,1,8,0v44h24A4,4,0,0,1,248,208Z"}))]]),uRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M120,140H104a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm104,20.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,196,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,196,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,208,176h4a12,12,0,0,1,12,12ZM80,152v38a30,30,0,0,1-60,0,12,12,0,0,1,24,0,6,6,0,0,0,12,0V152a12,12,0,0,1,24,0ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M120,144H104a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm96,0v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-9,13.26A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152ZM120,144H104a8,8,0,0,0-8,8v55.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8v-8h7.4c15.24,0,28.13-11.92,28.59-27.15A28,28,0,0,0,120,144Zm-.35,40H112V160h8a12,12,0,0,1,11.94,13.16A12.23,12.23,0,0,1,119.65,184ZM216,200.87a8,8,0,0,1-2.26,5.57A30,30,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.21,8.21,0,0,1,3,10.64,8,8,0,0,1-11.55,2.88A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1-8-8.53,8.17,8.17,0,0,1,8.25-7.47H208a8,8,0,0,1,8,8ZM80,152v37.41c0,14.22-11.18,26.26-25.41,26.58A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.75,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M120,146H104a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198h10a26,26,0,0,0,0-52Zm0,40H110V158h10a14,14,0,0,1,0,28Zm94-2v16.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,192,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,9.95A15.25,15.25,0,0,0,192,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a15.75,15.75,0,0,0,10-3.73V190h-2a6,6,0,0,1,0-12h8A6,6,0,0,1,214,184ZM78,152v38a24,24,0,0,1-48,0,6,6,0,0,1,12,0,12,12,0,0,0,24,0V152a6,6,0,0,1,12,0ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,82V46.48L193.52,82Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M120,144H104a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm96,0v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-9,13.26A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M120,148H104a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H108V156h12a16,16,0,0,1,0,32Zm92-4v16.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,192,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.45,17.45,0,0,0,192,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8A4,4,0,0,1,212,184ZM76,152v38a22,22,0,0,1-44,0,4,4,0,0,1,8,0,14,14,0,0,0,28,0V152a4,4,0,0,1,8,0ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z"}))]]),fRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-4.22,139.85a24.75,24.75,0,0,1-10.95,18.06c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,0,1,6.46-23.12c6.81,1.86,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.52-5.39-1.56-11-3.18-15.75-6.27-7.62-4.92-11.21-12.45-10.11-21.2a24.45,24.45,0,0,1,10.69-17.75c6.06-4.09,14.17-5.84,24.1-5.18A68.53,68.53,0,0,1,143,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.48,1.58,11.68,3.37,16.8,6.82C153.33,179.55,157,187.55,155.78,196.82ZM84,152v38a30,30,0,0,1-60,0,12,12,0,0,1,24,0,6,6,0,0,0,12,0V152a12,12,0,0,1,24,0Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H164a4,4,0,0,1,4,4V228a4,4,0,0,0,4,4h28a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.58,20.58,0,0,1,9-14.95c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.57,4.57,0,0,0-2,3.67c-.11.9-.13,1.09,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM80,152v37.41c0,14.22-11.18,26.26-25.41,26.58A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.75,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM145.83,196.06a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a58.89,58.89,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.78-1-15.85-3-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.09,147.84,180.4,145.83,196.06ZM78,152v38a24,24,0,0,1-48,0,6,6,0,0,1,12,0,12,12,0,0,0,24,0V152a6,6,0,0,1,12,0Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H176a4,4,0,0,0,0,8h24a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,0,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM76,152v38a22,22,0,0,1-44,0,4,4,0,0,1,8,0,14,14,0,0,0,28,0V152a4,4,0,0,1,8,0Z"}))]]),hRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M151.78,196.8a24.73,24.73,0,0,1-10.95,18c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,1,1,6.46-23.11c6.81,1.85,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.53-5.39-1.56-11-3.17-15.75-6.26-7.63-4.92-11.21-12.45-10.11-21.19a24.45,24.45,0,0,1,10.69-17.76c6.06-4.09,14.17-5.83,24.1-5.17A69,69,0,0,1,139,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.47,1.58,11.68,3.37,16.8,6.82C149.33,179.53,153,187.53,151.78,196.8ZM68,140a12,12,0,0,0-12,12v38a6,6,0,0,1-12,0,12,12,0,0,0-24,0,30,30,0,0,0,60,0V152A12,12,0,0,0,68,140Zm138.75,40,15-21a12,12,0,0,0-19.53-14L192,159.34,181.76,145a12,12,0,0,0-19.53,14l15,21-15,21A12,12,0,1,0,181.76,215L192,200.62,202.23,215A12,12,0,0,0,221.76,201ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A60.43,60.43,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM72,144a8,8,0,0,0-8,8v38a10,10,0,0,1-20,0,8,8,0,0,0-16,0,26,26,0,0,0,52,0V152A8,8,0,0,0,72,144Zm140.65,1.49a8,8,0,0,0-11.16,1.86L188,166.24l-13.49-18.89a8,8,0,0,0-13,9.3L178.17,180l-16.68,23.35a8,8,0,0,0,13,9.3L188,193.76l13.49,18.89a8,8,0,0,0,13-9.3L197.83,180l16.68-23.35A8,8,0,0,0,212.65,145.49ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.57,4.57,0,0,0-2,3.67c-.11.9-.13,1.08,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM80,152v37.4c0,14.23-11.18,26.27-25.41,26.59A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.76,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Zm134.51,4.65L197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M145.83,196.05a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a59.41,59.41,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.79-1-15.85-2.95-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.08,147.84,180.39,145.83,196.05ZM72,146a6,6,0,0,0-6,6v38a12,12,0,0,1-24,0,6,6,0,0,0-12,0,24,24,0,0,0,48,0V152A6,6,0,0,0,72,146Zm139.49,1.12a6,6,0,0,0-8.37,1.39L188,169.67,172.88,148.5a6,6,0,0,0-9.76,7L180.63,180,163.12,204.5a6,6,0,1,0,9.76,7L188,190.31l15.12,21.16a6,6,0,1,0,9.76-7L195.37,180l17.51-24.51A6,6,0,0,0,211.49,147.11ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.58,20.58,0,0,1,9-14.95c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM72,144a8,8,0,0,0-8,8v38a10,10,0,0,1-20,0,8,8,0,0,0-16,0,26,26,0,0,0,52,0V152A8,8,0,0,0,72,144Zm140.65,1.49a8,8,0,0,0-11.16,1.86L188,166.24l-13.49-18.89a8,8,0,0,0-13,9.3L178.17,180l-16.68,23.35a8,8,0,0,0,13,9.3L188,193.76l13.49,18.89a8,8,0,0,0,13-9.3L197.83,180l16.68-23.35A8,8,0,0,0,212.65,145.49ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,1,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM72,148a4,4,0,0,0-4,4v38a14,14,0,0,1-28,0,4,4,0,0,0-8,0,22,22,0,0,0,44,0V152A4,4,0,0,0,72,148Zm138.32.75a4,4,0,0,0-5.58.92L188,173.12l-16.75-23.45a4,4,0,0,0-6.51,4.66L183.08,180l-18.34,25.67a4,4,0,0,0,.93,5.58,4,4,0,0,0,5.58-.92L188,186.88l16.74,23.45A4,4,0,0,0,208,212a3.91,3.91,0,0,0,2.32-.75,4,4,0,0,0,.93-5.58L192.92,180l18.33-25.67A4,4,0,0,0,210.32,148.75ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),dRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M100,152v56a12,12,0,0,1-24,0V190.07l-6.17,8.81a12,12,0,0,1-19.66,0L44,190.07V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.83-6.88L60,171.07l18.17-25.95A12,12,0,0,1,100,152Zm84,28a40,40,0,0,1-40,40H128a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,184,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,160,180Zm60-92V224a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H196a4,4,0,0,1,4,4V224a8,8,0,0,0,9.19,7.91,8.15,8.15,0,0,0,6.81-8.16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-8,56H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,144,144Zm-.49,56H136V160h8a20,20,0,0,1,20,20.77C163.58,191.59,154.34,200,143.51,200ZM104,152v55.73A8.17,8.17,0,0,1,96.53,216,8,8,0,0,1,88,208V177.38l-13.32,19a8.3,8.3,0,0,1-4.2,3.2,8,8,0,0,1-9-3L48,177.38v30.35A8.17,8.17,0,0,1,40.53,216,8,8,0,0,1,32,208V152.31a8.27,8.27,0,0,1,4.56-7.53,8,8,0,0,1,10,2.63L68,178.05l21.27-30.39a8.28,8.28,0,0,1,8.06-3.55A8,8,0,0,1,104,152Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V224a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM144,146H128a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6h16a34,34,0,0,0,0-68Zm0,56H134V158h10a22,22,0,0,1,0,44Zm-42-50v56a6,6,0,0,1-12,0V171L72.92,195.44a6,6,0,0,1-9.84,0L46,171v37a6,6,0,0,1-12,0V152a6,6,0,0,1,10.92-3.44l23.08,33,23.08-33A6,6,0,0,1,102,152Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V224a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM144,148H128a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4h16a32,32,0,0,0,0-64Zm0,56H132V156h12a24,24,0,0,1,0,48Zm-44-52v56a4,4,0,0,1-8,0V164.69l-20.72,29.6a4,4,0,0,1-6.56,0L44,164.69V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.28-2.29L68,185l24.72-35.31A4,4,0,0,1,100,152Z"}))]]),pRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm104-60a12,12,0,0,1-12,12H140v12a12,12,0,0,1-24,0V164H104a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,164,152Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,160H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Zm0-72V43.31L196.69,88Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-42-66a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V158H104a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,152Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-44-68a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V156H104a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,152Z"}))]]),mRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M56,140H40a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40H52V164h4a8,8,0,0,1,0,16Zm176,20.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,204,220c-19.85,0-36-17.95-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,204,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,216,176h4a12,12,0,0,1,12,12ZM160,152v56a12,12,0,0,1-8.34,11.43A12.15,12.15,0,0,1,148,220a12,12,0,0,1-9.76-5L120,189.44V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.76-7L136,170.55V152a12,12,0,0,1,24,0ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M60,144H44a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40H52V160h8a12,12,0,0,1,0,24Zm164,16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,200,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.45,29.45,0,0,1,16.48,5.11,8,8,0,0,1-9,13.27A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1,0-16h8a8,8,0,0,1,8,8ZM156,152v56a8,8,0,0,1-5.56,7.62A7.91,7.91,0,0,1,148,216a8,8,0,0,1-6.51-3.35L116,177v31a8,8,0,0,1-16,0V152a8,8,0,0,1,14.51-4.65L140,183V152a8,8,0,0,1,16,0ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152ZM60,144H44a8,8,0,0,0-8,8v55.72A8.17,8.17,0,0,0,43.47,216,8,8,0,0,0,52,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,60,144Zm-.35,40H52V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,59.65,184ZM224,200.87a8,8,0,0,1-2.26,5.57A30.07,30.07,0,0,1,200,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.21,8.21,0,0,1,3,10.64,8,8,0,0,1-11.55,2.88A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1-8-8.53,8.17,8.17,0,0,1,8.25-7.47H216a8,8,0,0,1,8,8ZM156,152v55.76a8.22,8.22,0,0,1-4.12,7.24,8,8,0,0,1-10.39-2.35L116,177v30.76a8.17,8.17,0,0,1-7.47,8.26,8,8,0,0,1-8.53-8V152.31a8.27,8.27,0,0,1,4.53-7.52,8,8,0,0,1,10,2.56L140,183V152.27a8.17,8.17,0,0,1,7.47-8.25A8,8,0,0,1,156,152Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M60,146H44a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198H60a26,26,0,0,0,0-52Zm0,40H50V158H60a14,14,0,0,1,0,28Zm162,14.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,9.95A15.25,15.25,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a15.75,15.75,0,0,0,10-3.73V190h-2a6,6,0,0,1,0-12h8a6,6,0,0,1,6,6ZM154,152v56a6,6,0,0,1-4.17,5.71A5.78,5.78,0,0,1,148,214a6,6,0,0,1-4.88-2.51L114,170.72V208a6,6,0,0,1-12,0V152a6,6,0,0,1,10.88-3.49L142,189.28V152a6,6,0,0,1,12,0ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M60,144H44a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40H52V160h8a12,12,0,0,1,0,24Zm164,16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a29.45,29.45,0,0,1,16.48,5.11,8,8,0,0,1-9,13.27A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1,0-16h8a8,8,0,0,1,8,8ZM156,152v56a8,8,0,0,1-5.56,7.62A7.91,7.91,0,0,1,148,216a8,8,0,0,1-6.51-3.35L116,177v31a8,8,0,0,1-16,0V152a8,8,0,0,1,14.51-4.65L140,183V152a8,8,0,0,1,16,0ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M60,148H44a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196H60a24,24,0,0,0,0-48Zm0,40H48V156H60a16,16,0,0,1,0,32Zm160,12.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,200,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.45,17.45,0,0,0,200,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8a4,4,0,0,1,4,4ZM152,152v56a4,4,0,0,1-2.78,3.81A3.93,3.93,0,0,1,148,212a4,4,0,0,1-3.25-1.67L112,164.48V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.25-2.33L144,195.52V152a4,4,0,0,1,8,0Zm52-40a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52ZM156,84V41.65L198.34,84Z"}))]]),gRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,1,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM183,80H160V57ZM87.78,196.8a24.72,24.72,0,0,1-10.94,18c-6,4-13.27,5.15-19.74,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,1,1,6.46-23.11c6.82,1.85,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.82-2.64-9.88-3.53-5.39-1.56-11-3.17-15.75-6.26-7.62-4.92-11.21-12.45-10.1-21.19a24.44,24.44,0,0,1,10.68-17.76c6.07-4.09,14.17-5.82,24.1-5.17A69,69,0,0,1,75,142a12,12,0,0,1-6.1,23.21c-6.35-1.63-13.61-1.51-16.07-.33a79.69,79.69,0,0,0,7.92,2.59c5.47,1.58,11.67,3.37,16.8,6.82C85.33,179.53,89,187.53,87.78,196.8ZM155.3,156l-20,56a12,12,0,0,1-22.6,0l-20-56A12,12,0,1,1,115.3,148L124,172.3,132.7,148A12,12,0,1,1,155.3,156ZM224,188v12.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,196,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,196,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,208,176h4A12,12,0,0,1,224,188Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,1,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-72.18,145a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31Zm63.72-41.62-20,56a8,8,0,0,1-15.07,0l-20-56a8,8,0,1,1,15.06-5.38L124,184.21l12.46-34.9a8,8,0,0,1,15.07,5.38ZM216,184v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-8.95,13.26A13.27,13.27,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.38,13.38,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44ZM87.82,196.31a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31Zm63.72-41.62-19.9,55.72a8.25,8.25,0,0,1-6.5,5.51,8,8,0,0,1-8.67-5.23L96.59,155a8.21,8.21,0,0,1,4.5-10.45,8,8,0,0,1,10.45,4.76L124,184.21l12.46-34.9a8,8,0,0,1,15.07,5.38ZM216,184v16.87a8,8,0,0,1-2.26,5.57A30,30,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.22,8.22,0,0,1,3,10.64,8,8,0,0,1-11.54,2.88A13.27,13.27,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.38,13.38,0,0,0,8-2.71V192a8,8,0,0,1-8-8.53,8.18,8.18,0,0,1,8.26-7.47H208A8,8,0,0,1,216,184Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.75l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,1,0,12,0V88A6,6,0,0,0,212.24,83.75ZM158,46.48,193.52,82H158ZM85.83,196.05a18.85,18.85,0,0,1-8.3,13.81C72.71,213.05,66.66,214,61.16,214a59.38,59.38,0,0,1-14.67-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.57-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.2-2.48a6,6,0,0,1-3,11.6c-3.79-1-15.85-2.95-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C72.93,176.08,87.85,180.39,85.83,196.05Zm63.82-42-20,56a6,6,0,0,1-11.3,0l-20-56a6,6,0,1,1,11.3-4L124,190.15,138.35,150a6,6,0,0,1,11.3,4ZM214,184v16.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,192,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,10A15.25,15.25,0,0,0,192,158c-9.92,0-18,9.87-18,22s8.08,22,18,22a15.7,15.7,0,0,0,10-3.74V190h-2a6,6,0,0,1,0-12h8A6,6,0,0,1,214,184Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M87.82,196.31a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,1,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.65,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm-13.3,64.47a8,8,0,0,0-10.23,4.84L124,184.21l-12.47-34.9a8,8,0,1,0-15.06,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,146.7,144.47ZM208,176h-8a8,8,0,0,0,0,16v5.29a13.38,13.38,0,0,1-8,2.71c-8.82,0-16-9-16-20s7.18-20,16-20a13.27,13.27,0,0,1,7.53,2.38,8,8,0,0,0,8.95-13.26A29.38,29.38,0,0,0,192,144c-17.64,0-32,16.15-32,36s14.36,36,32,36a30.06,30.06,0,0,0,21.78-9.6,8,8,0,0,0,2.22-5.53V184A8,8,0,0,0,208,176Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,1,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM83.85,195.8a17,17,0,0,1-7.43,12.41C72,211.12,66.38,212,61.2,212A57.89,57.89,0,0,1,47,210.11a4,4,0,1,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.11,61.11,0,0,1,10.47,1.61,4,4,0,0,1-2,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C72.27,178,85.65,181.84,83.85,195.8Zm63.92-42.45-20,56a4,4,0,0,1-7.53,0l-20-56a4,4,0,1,1,7.53-2.7L124,196.11l16.23-45.46a4,4,0,1,1,7.53,2.7ZM212,184v16.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,192,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.43,17.43,0,0,0,192,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8A4,4,0,0,1,212,184Z"}))]]),yRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-4.22,139.85a24.75,24.75,0,0,1-10.95,18.06c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,0,1,6.46-23.12c6.81,1.86,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.52-5.39-1.56-11-3.18-15.75-6.27-7.62-4.92-11.21-12.45-10.11-21.2a24.45,24.45,0,0,1,10.69-17.75c6.06-4.09,14.17-5.83,24.1-5.18A68.53,68.53,0,0,1,143,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.48,1.58,11.68,3.37,16.8,6.82C153.33,179.55,157,187.55,155.78,196.82ZM92,152a12,12,0,0,1-12,12H72v44a12,12,0,0,1-24,0V164H40a12,12,0,0,1,0-24H80A12,12,0,0,1,92,152Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM88,152a8,8,0,0,1-8,8H68v48a8,8,0,0,1-16,0V160H40a8,8,0,0,1,0-16H80A8,8,0,0,1,88,152Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H164a4,4,0,0,1,4,4V228a4,4,0,0,0,4,4h28a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM88,152.53A8.17,8.17,0,0,1,79.73,160H68v47.73A8.17,8.17,0,0,1,60.53,216,8,8,0,0,1,52,208V160H40.27A8.17,8.17,0,0,1,32,152.53,8,8,0,0,1,40,144H80A8,8,0,0,1,88,152.53Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM145.83,196.06a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a58.89,58.89,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.78-1-15.85-3-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.09,147.84,180.4,145.83,196.06ZM86,152a6,6,0,0,1-6,6H66v50a6,6,0,0,1-12,0V158H40a6,6,0,0,1,0-12H80A6,6,0,0,1,86,152Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM216,88V216a16,16,0,0,1-16,16H176a8,8,0,0,1,0-16h24V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H176a4,4,0,0,0,0,8h24a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,0,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM84,152a4,4,0,0,1-4,4H64v52a4,4,0,0,1-8,0V156H40a4,4,0,0,1,0-8H80A4,4,0,0,1,84,152Z"}))]]),xRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M221.76,201A12,12,0,1,1,202.23,215L192,200.62,181.76,215A12,12,0,1,1,162.23,201l15-21-15-21a12,12,0,0,1,19.53-14L192,159.34,202.23,145a12,12,0,0,1,19.53,14l-15,21Zm-80.25-26.73c-5.12-3.45-11.33-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,139,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.48,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,121.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C153,187.53,149.33,179.53,141.51,174.27ZM76,140H36a12,12,0,0,0,0,24h8v44a12,12,0,0,0,24,0V164h8a12,12,0,0,0,0-24ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M214.51,156.65,197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM123.6,171.31c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.11-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,138,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.94c-2,15.89,13.65,20.42,23,23.12,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.14,3.93-4.6,3.06-15.17,1.56-19.55.35A8,8,0,1,0,106,214a60.43,60.43,0,0,0,15.18,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C150,179,133.49,174.17,123.6,171.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm62.51,68.65L197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,2.3-11.46,8.19,8.19,0,0,1,10.88,2.38L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3Zm-66.7,39.66a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A60.43,60.43,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM88,152.53A8.18,8.18,0,0,1,79.73,160H68v47.72A8.18,8.18,0,0,1,60.53,216,8,8,0,0,1,52,208V160H40.27A8.18,8.18,0,0,1,32,152.53,8,8,0,0,1,40,144H80A8,8,0,0,1,88,152.53Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.88,155.48,195.37,180l17.51,24.51a6,6,0,1,1-9.76,7L188,190.31l-15.12,21.16a6,6,0,1,1-9.76-7L180.63,180l-17.51-24.51a6,6,0,0,1,9.76-7L188,169.67l15.12-21.17a6,6,0,1,1,9.76,7Zm-89.83,17.74c-10.86-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.66-1.83,21.45-.84a6,6,0,0,0,3.06-11.6c-2-.53-20.1-5-31.21,2.48a18.61,18.61,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,106.48,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C147.84,180.39,132.92,176.08,123.05,173.22ZM80,146H40a6,6,0,0,0,0,12H54v50a6,6,0,0,0,12,0V158H80a6,6,0,0,0,0-12ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M214.51,156.65,197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM123.6,171.31c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.11-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,138,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.14,3.93-4.6,3.06-15.17,1.56-19.55.35A8,8,0,0,0,105.94,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C150,179,133.49,174.17,123.6,171.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M211.25,154.33,192.92,180l18.33,25.67a4,4,0,0,1-.93,5.58A3.91,3.91,0,0,1,208,212a4,4,0,0,1-3.26-1.67L188,186.88l-16.75,23.45a4,4,0,0,1-6.51-4.66L183.08,180l-18.34-25.67a4,4,0,0,1,6.51-4.66L188,173.12l16.74-23.45a4,4,0,0,1,6.51,4.66Zm-88.76,20.82c-10.53-3-15.08-4.91-14.42-10.08a8.51,8.51,0,0,1,3.75-6.49c6.25-4.23,18.77-2.24,23.06-1.11a4,4,0,0,0,2.05-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.12-.54-14.54.75-19.1,3.82a16.66,16.66,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.26,3.25,16.47,5.49,15.64,11.94a8.94,8.94,0,0,1-3.91,6.75c-6.27,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.89,57.89,0,0,0,121.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C145.64,181.84,132.26,178,122.49,175.15ZM80,148H40a4,4,0,0,0,0,8H56v52a4,4,0,0,0,8,0V156H80a4,4,0,0,0,0-8ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),bRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM183,80H160V57Zm-25.27,79-15,21,15,21A12,12,0,1,1,138.24,215L128,200.65,117.76,215A12,12,0,1,1,98.24,201l15-21-15-21A12,12,0,1,1,117.76,145L128,159.35,138.24,145A12,12,0,1,1,157.76,159ZM92,152a12,12,0,0,1-12,12H72v44a12,12,0,0,1-24,0V164H40a12,12,0,0,1,0-24H80A12,12,0,0,1,92,152Zm136,0a12,12,0,0,1-12,12h-8v44a12,12,0,0,1-24,0V164h-8a12,12,0,0,1,0-24h40A12,12,0,0,1,228,152Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),x.createElement("path",{d:"M48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Zm-5.49,105.34L137.83,180l16.68,23.35a8,8,0,0,1-13,9.3L128,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L118.17,180l-16.68-23.35a8,8,0,1,1,13-9.3L128,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM92,152a8,8,0,0,1-8,8H72v48a8,8,0,0,1-16,0V160H44a8,8,0,0,1,0-16H84A8,8,0,0,1,92,152Zm128,0a8,8,0,0,1-8,8H200v48a8,8,0,0,1-16,0V160H172a8,8,0,0,1,0-16h40A8,8,0,0,1,220,152Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M154.31,156.92,137.83,180l16.53,23.14a8.18,8.18,0,0,1-1.22,11,8,8,0,0,1-11.65-1.48L128,193.76l-13.49,18.89a8,8,0,0,1-11.64,1.49,8.17,8.17,0,0,1-1.23-11L118.17,180l-16.48-23.08a8.22,8.22,0,0,1,1.46-11.28,8,8,0,0,1,11.36,1.71L128,166.24l13.49-18.89a8,8,0,0,1,11.36-1.71A8.22,8.22,0,0,1,154.31,156.92ZM84,144H44.27A8.18,8.18,0,0,0,36,151.47,8,8,0,0,0,44,160H56v47.73A8.17,8.17,0,0,0,63.47,216,8,8,0,0,0,72,208V160H83.73A8.18,8.18,0,0,0,92,152.53,8,8,0,0,0,84,144Zm128,0H172.27a8.18,8.18,0,0,0-8.25,7.47,8,8,0,0,0,8,8.53h12v47.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V160h11.73a8.18,8.18,0,0,0,8.25-7.47A8,8,0,0,0,212,144ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Zm-5.12,109L135.37,180l17.51,24.51a6,6,0,1,1-9.76,7L128,190.32l-15.12,21.17a6,6,0,0,1-9.76-7L120.63,180l-17.51-24.51a6,6,0,1,1,9.76-7L128,169.68l15.12-21.17a6,6,0,0,1,9.76,7ZM90,152a6,6,0,0,1-6,6H70v50a6,6,0,0,1-12,0V158H44a6,6,0,0,1,0-12H84A6,6,0,0,1,90,152Zm128,0a6,6,0,0,1-6,6H198v50a6,6,0,0,1-12,0V158H172a6,6,0,0,1,0-12h40A6,6,0,0,1,218,152Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Zm-5.49,105.34L137.83,180l16.68,23.35a8,8,0,0,1-13,9.3L128,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L118.17,180l-16.68-23.35a8,8,0,1,1,13-9.3L128,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM92,152a8,8,0,0,1-8,8H72v48a8,8,0,0,1-16,0V160H44a8,8,0,0,1,0-16H84A8,8,0,0,1,92,152Zm128,0a8,8,0,0,1-8,8H200v48a8,8,0,0,1-16,0V160H172a8,8,0,0,1,0-16h40A8,8,0,0,1,220,152Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M204,112a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52ZM156,41.65,198.34,84H156Zm-4.75,112.67L132.92,180l18.33,25.67a4,4,0,1,1-6.5,4.65L128,186.88l-16.75,23.44a4,4,0,1,1-6.5-4.65L123.08,180l-18.33-25.68a4,4,0,1,1,6.5-4.65L128,173.12l16.75-23.45a4,4,0,1,1,6.5,4.65ZM88,152a4,4,0,0,1-4,4H68v52a4,4,0,0,1-8,0V156H44a4,4,0,0,1,0-8H84A4,4,0,0,1,88,152Zm128,0a4,4,0,0,1-4,4H196v52a4,4,0,0,1-8,0V156H172a4,4,0,0,1,0-8h40A4,4,0,0,1,216,152Z"}))]]),vRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-1.91,84.69a12,12,0,0,0-11.92-.15L126.5,152.44A20,20,0,0,0,108,140H48a20,20,0,0,0-20,20v48a20,20,0,0,0,20,20h60a20,20,0,0,0,18.5-12.44l19.67,10.93A12,12,0,0,0,164,216V152A12,12,0,0,0,158.09,141.66ZM104,204H52V164h52Zm36-8.39-12-6.67v-9.88l12-6.67Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,88H152V32Zm-88,72a8,8,0,0,0-8-8H48a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V196l32,20V152l-32,20Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM144,201.57l-16-10V176.43l16-10Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Zm-3.09,100.27a6,6,0,0,0-6.09.16L126,161.17V160a14,14,0,0,0-14-14H48a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h64a14,14,0,0,0,14-14v-1.17l22.82,14.26A6,6,0,0,0,158,216V152A6,6,0,0,0,154.91,146.75ZM114,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V160a2,2,0,0,1,2-2h64a2,2,0,0,1,2,2Zm32-2.83-20-12.5V175.33l20-12.5Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM153.94,148.5a4,4,0,0,0-4.06.11L124,164.78V160a12,12,0,0,0-12-12H48a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12v-4.78l25.88,16.17A4,4,0,0,0,152,220a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,156,216V152A4,4,0,0,0,153.94,148.5ZM116,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V160a4,4,0,0,1,4-4h64a4,4,0,0,1,4,4Zm32,.78-24-15V174.22l24-15Z"}))]]),ARe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,100h72v56H44Zm96-24V60h24V76Zm-24,0H92V60h24Zm0,104v16H92V180Zm24,0h24v16H140Zm0-24V100h72v56Zm72-80H188V60h24ZM68,60V76H44V60ZM44,180H68v16H44Zm144,16V180h24v16Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M32,176H224v24a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8ZM216,48H40a8,8,0,0,0-8,8V80H224V56A8,8,0,0,0,216,48Z",opacity:"0.2"}),x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,88h80v80H40Zm96-16V56h32V72Zm-16,0H88V56h32Zm0,112v16H88V184Zm16,0h32v16H136Zm0-16V88h80v80Zm80-96H184V56h32ZM72,56V72H40V56ZM40,184H72v16H40Zm176,16H184V184h32v16Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM184,56h32V72H184ZM72,200H40V184H72ZM72,72H40V56H72Zm48,128H88V184h32Zm0-128H88V56h32Zm48,128H136V184h32Zm0-128H136V56h32Zm48,128H184V184h32v16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,86h84v84H38Zm96-12V54h36V74Zm-12,0H86V54h36Zm0,108v20H86V182Zm12,0h36v20H134Zm0-12V86h84v84ZM218,56V74H182V54h34A2,2,0,0,1,218,56ZM40,54H74V74H38V56A2,2,0,0,1,40,54ZM38,200V182H74v20H40A2,2,0,0,1,38,200Zm178,2H182V182h36v18A2,2,0,0,1,216,202Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,88h80v80H40Zm96-16V56h32V72Zm-16,0H88V56h32Zm0,112v16H88V184Zm16,0h32v16H136Zm0-16V88h80v80Zm80-96H184V56h32ZM72,56V72H40V56ZM40,184H72v16H40Zm176,16H184V184h32v16Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,84h88v88H36Zm96-8V52h40V76Zm-8,0H84V52h40Zm0,104v24H84V180Zm8,0h40v24H132Zm0-8V84h88v88ZM220,56V76H180V52h36A4,4,0,0,1,220,56ZM40,52H76V76H36V56A4,4,0,0,1,40,52ZM36,200V180H76v24H40A4,4,0,0,1,36,200Zm180,4H180V180h40v20A4,4,0,0,1,216,204Z"}))]]),SRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),x.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),wRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Zm-84-88a12,12,0,0,1,12,12v12h12a12,12,0,0,1,0,24H140v12a12,12,0,0,1-24,0V156H104a12,12,0,0,1,0-24h12V120A12,12,0,0,1,128,108Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),x.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Zm-56-56a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,144Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm-64,80H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2ZM158,144a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V150H104a6,6,0,0,1,0-12h18V120a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,144Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Zm-56-56a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,144Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4ZM156,144a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V148H104a4,4,0,0,1,0-8h20V120a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,144Z"}))]]),ORe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),x.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),kRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),CRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),ERe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),x.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),TRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M209.84,47.44A91.42,91.42,0,0,0,144.62,20h-.35A91.44,91.44,0,0,0,79.15,47L17.76,109.17a20,20,0,0,0,.08,28.21L46.5,166a19.89,19.89,0,0,0,14.15,5.86h.11a19.86,19.86,0,0,0,14.2-6l60.87-62.39a12.07,12.07,0,0,1,16.77-.12,11.63,11.63,0,0,1,3.5,8.35,12.85,12.85,0,0,1-3.66,9.11L90.19,181a20,20,0,0,0-.21,28.5l28.66,28.66a20.08,20.08,0,0,0,28.15.14l61.76-60.44.09-.09C244.65,141.78,245.18,83.31,209.84,47.44ZM60.62,146.21l-23-23L55.81,104.8l22.88,22.88Zm72.2,72.18-23-23,18.61-18,22.88,22.87Zm58.89-57.62L168.48,183.5,145.7,160.73,169.21,138l.15-.14a37,37,0,0,0,10.74-26.37,35.44,35.44,0,0,0-10.85-25.41,36.2,36.2,0,0,0-50.44.48l-.1.11L95.46,110.49,72.68,87.72l23.5-23.8A67.55,67.55,0,0,1,144.27,44h.26a67.62,67.62,0,0,1,48.21,20.29C218.85,90.78,218.38,134.05,191.71,160.77Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168.36,200.36l-30,29.35a8,8,0,0,1-11.26-.05L98.46,201a8,8,0,0,1,.08-11.4l30-29Zm-142-82.76a8,8,0,0,0,0,11.28L55,157.54a8,8,0,0,0,11.38-.06l29.18-29.92L55.77,87.77Z",opacity:"0.2"}),x.createElement("path",{d:"M207,50.25A87.46,87.46,0,0,0,144.6,24h-.33A87.48,87.48,0,0,0,82,49.81L50.11,82.11h0L20.61,112a16,16,0,0,0,.06,22.56l28.66,28.66a15.92,15.92,0,0,0,11.32,4.69h.09a16,16,0,0,0,11.36-4.82L133,100.69a16.08,16.08,0,0,1,22.41-.21,15.6,15.6,0,0,1,4.73,11.19,16.89,16.89,0,0,1-4.85,12L93,183.88a16,16,0,0,0-.17,22.79l28.66,28.66a16.06,16.06,0,0,0,22.52.12L205.81,175C240.26,140.5,240.79,84.56,207,50.25ZM60.65,151.89,32,123.24,55.8,99.12l28.52,28.52ZM132.79,224l-28.68-28.65,24.38-23.57L157,200.32Zm61.76-60.44-26.11,25.54L140,160.68l26.44-25.57.1-.09a33,33,0,0,0,9.57-23.5A31.44,31.44,0,0,0,166.47,89a32.2,32.2,0,0,0-44.9.5L95.49,116.18,67,87.74,93.35,61.09A71.51,71.51,0,0,1,144.27,40h.27a71.55,71.55,0,0,1,51.05,21.48C223.25,89.55,222.75,135.38,194.55,163.58Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207,50.25A87.46,87.46,0,0,0,144.6,24h-.33A87.48,87.48,0,0,0,82,49.81L20.61,112a16,16,0,0,0,.06,22.56l28.66,28.66a15.92,15.92,0,0,0,11.32,4.69h.09a16,16,0,0,0,11.36-4.82L133,100.69a16.08,16.08,0,0,1,22.41-.21,15.6,15.6,0,0,1,4.73,11.19,16.89,16.89,0,0,1-4.85,12L93,183.88a16,16,0,0,0-.17,22.79l28.66,28.66a16.06,16.06,0,0,0,22.52.12L205.81,175C240.26,140.5,240.79,84.56,207,50.25ZM60.65,151.89,32,123.24,61.42,93.43,89.9,121.91ZM132.79,224l-28.68-28.65,30.13-29.13,28.49,28.48Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M205.56,51.65A85.5,85.5,0,0,0,144.6,26h-.33A85.45,85.45,0,0,0,83.42,51.22L22,113.39a14,14,0,0,0,.06,19.74l28.66,28.66a13.89,13.89,0,0,0,9.9,4.1h.08a13.9,13.9,0,0,0,9.94-4.21l60.87-62.4A18.1,18.1,0,0,1,156.76,99a17.63,17.63,0,0,1,5.34,12.62,19,19,0,0,1-5.44,13.44L94.37,185.31a14,14,0,0,0-.15,19.95l28.67,28.66a14.05,14.05,0,0,0,19.7.1l61.8-60.49C238.07,139.86,238.6,85.18,205.56,51.65ZM62.08,153.29a2,2,0,0,1-1.42.6,2.15,2.15,0,0,1-1.42-.58L30.57,124.65a2,2,0,0,1,0-2.82L55.79,96.28l31.34,31.34Zm72.11,72.15a2,2,0,0,1-2.82,0l-28.66-28.66a2,2,0,0,1-.59-1.43,2,2,0,0,1,.6-1.41L128.51,169l31.34,31.33ZM196,165l-27.52,26.94-31.29-31.29,27.9-27,.07-.08a30.93,30.93,0,0,0,9-22.06,29.47,29.47,0,0,0-9-21.15,30.17,30.17,0,0,0-42.08.46L95.51,119,64.22,87.74,91.94,59.68A73.47,73.47,0,0,1,144.27,38h.28A73.52,73.52,0,0,1,197,60.08C225.44,88.92,224.94,136,196,165Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M207,50.25A87.46,87.46,0,0,0,144.6,24h-.33A87.48,87.48,0,0,0,82,49.81L20.61,112a16,16,0,0,0,.06,22.56l28.66,28.66a15.92,15.92,0,0,0,11.32,4.69h.09a16,16,0,0,0,11.36-4.82L133,100.69a16.08,16.08,0,0,1,22.41-.21,15.6,15.6,0,0,1,4.73,11.19,16.89,16.89,0,0,1-4.85,12L93,183.88a16,16,0,0,0-.17,22.79l28.66,28.66a16.06,16.06,0,0,0,22.52.12L205.81,175C240.26,140.5,240.79,84.56,207,50.25ZM60.65,151.89,32,123.24,55.8,99.12l28.52,28.52ZM132.79,224l-28.68-28.65,24.38-23.57L157,200.32Zm61.76-60.44-26.11,25.54L140,160.68l26.44-25.57.1-.09a33,33,0,0,0,9.57-23.5A31.44,31.44,0,0,0,166.47,89a32.2,32.2,0,0,0-44.9.5L95.49,116.18,67,87.74,93.35,61.09A71.51,71.51,0,0,1,144.27,40h.27a71.55,71.55,0,0,1,51.05,21.48C223.25,89.55,222.75,135.38,194.55,163.58Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M204.13,53.06A83.41,83.41,0,0,0,144.59,28h-.32A83.46,83.46,0,0,0,84.85,52.62L23.46,114.8a12,12,0,0,0,0,16.92l28.67,28.66a11.89,11.89,0,0,0,8.48,3.51h.07a12,12,0,0,0,8.52-3.61l60.89-62.42a20.1,20.1,0,0,1,28-.27,19.54,19.54,0,0,1,6,14,20.87,20.87,0,0,1-6,14.86L95.76,186.75a12,12,0,0,0-.12,17.09L124.3,232.5a12,12,0,0,0,16.89.08L203,172.12C235.88,139.21,236.4,85.8,204.13,53.06ZM63.51,154.69a3.93,3.93,0,0,1-2.83,1.2h0a4,4,0,0,1-2.83-1.17L29.16,126.06a4,4,0,0,1,0-5.64l26.63-27L89.94,127.6Zm72.08,72.18a4,4,0,0,1-5.63,0l-28.67-28.66a4,4,0,0,1,0-5.69l27.2-26.3,34.16,34.15Zm61.76-60.44-28.94,28.32-34.12-34.12,29.41-28.44a29,29,0,0,0,8.4-20.64,27.51,27.51,0,0,0-8.41-19.72,28.14,28.14,0,0,0-39.25.41L95.53,121.87,61.4,87.75,90.52,58.26A75.51,75.51,0,0,1,144.27,36h.29a75.53,75.53,0,0,1,53.87,22.67C227.63,88.3,227.13,136.65,197.35,166.43Z"}))]]),PRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,36H160a20,20,0,0,0-20,20v88a12,12,0,0,1-24,0V56A20,20,0,0,0,96,36H56A20,20,0,0,0,36,56v88a92,92,0,0,0,92,92h.71c50.34-.38,91.3-42.1,91.3-93V56A20,20,0,0,0,200,36Zm-4,24V84H164V60ZM92,60V84H60V60Zm36.52,152H128a68,68,0,0,1-68-68V108H92v36a36,36,0,0,0,72,0V108h32v35C196,180.77,165.73,211.72,128.52,212Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M104,56V96H48V56a8,8,0,0,1,8-8H96A8,8,0,0,1,104,56Zm96-8H160a8,8,0,0,0-8,8V96h56V56A8,8,0,0,0,200,48Z",opacity:"0.2"}),x.createElement("path",{d:"M200,40H160a16,16,0,0,0-16,16v88a16,16,0,0,1-32,0V56A16,16,0,0,0,96,40H56A16,16,0,0,0,40,56v88a88,88,0,0,0,88,88h.67c48.15-.36,87.33-40.29,87.33-89V56A16,16,0,0,0,200,40Zm0,16V88H160V56ZM96,56V88H56V56Zm32.55,160A72,72,0,0,1,56,144V104H96v40a32,32,0,0,0,64,0V104h40v39C200,183,168,215.71,128.55,216Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H160a16,16,0,0,0-16,16v88a16,16,0,0,1-32,0V56A16,16,0,0,0,96,40H56A16,16,0,0,0,40,56v88a88,88,0,0,0,88,88h.67c48.15-.36,87.33-40.29,87.33-89V56A16,16,0,0,0,200,40Zm0,16V96H160V56ZM96,56V96H56V56Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,42H160a14,14,0,0,0-14,14v88a18,18,0,0,1-36,0V56A14,14,0,0,0,96,42H56A14,14,0,0,0,42,56v88a86,86,0,0,0,86,86h.65c47.06-.35,85.35-39.38,85.35-87V56A14,14,0,0,0,200,42ZM160,54h40a2,2,0,0,1,2,2V90H158V56A2,2,0,0,1,160,54ZM56,54H96a2,2,0,0,1,2,2V90H54V56A2,2,0,0,1,56,54Zm72.56,164H128a74,74,0,0,1-74-74V102H98v42a30,30,0,0,0,60,0V102h44v41C202,184.05,169.06,217.7,128.56,218Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H160a16,16,0,0,0-16,16v88a16,16,0,0,1-32,0V56A16,16,0,0,0,96,40H56A16,16,0,0,0,40,56v88a88,88,0,0,0,88,88h.67c48.15-.36,87.33-40.29,87.33-89V56A16,16,0,0,0,200,40Zm0,16V88H160V56ZM96,56V88H56V56Zm32.55,160A72,72,0,0,1,56,144V104H96v40a32,32,0,0,0,64,0V104h40v39C200,183,168,215.71,128.55,216Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,44H160a12,12,0,0,0-12,12v88a20,20,0,0,1-40,0V56A12,12,0,0,0,96,44H56A12,12,0,0,0,44,56v88a84,84,0,0,0,84,84h.64c46-.34,83.36-38.47,83.36-85V56A12,12,0,0,0,200,44Zm-40,8h40a4,4,0,0,1,4,4V92H156V56A4,4,0,0,1,160,52ZM56,52H96a4,4,0,0,1,4,4V92H52V56A4,4,0,0,1,56,52Zm72.58,168H128a76,76,0,0,1-76-76V100h48v44a28,28,0,0,0,56,0V100h48v43C204,185.15,170.17,219.69,128.58,220Z"}))]]),MRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M156,112a12,12,0,0,1-12,12H80a12,12,0,0,1,0-24h64A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H80a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M150,112a6,6,0,0,1-6,6H80a6,6,0,0,1,0-12h64A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M148,112a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h64A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"}))]]),NRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M156,112a12,12,0,0,1-12,12H124v20a12,12,0,0,1-24,0V124H80a12,12,0,0,1,0-24h20V80a12,12,0,0,1,24,0v20h20A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M150,112a6,6,0,0,1-6,6H118v26a6,6,0,0,1-12,0V118H80a6,6,0,0,1,0-12h26V80a6,6,0,0,1,12,0v26h26A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M152,112a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M148,112a4,4,0,0,1-4,4H116v28a4,4,0,0,1-8,0V116H80a4,4,0,0,1,0-8h28V80a4,4,0,0,1,8,0v28h28A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z"}))]]),DRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z"}))]]),IRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M211.45,52.51l-80-24A12,12,0,0,0,116,40V140.22A52,52,0,1,0,140,184V104.13l64.55,19.36A12,12,0,0,0,220,112V64A12,12,0,0,0,211.45,52.51ZM88,212a28,28,0,1,1,28-28A28,28,0,0,1,88,212ZM196,95.87l-56-16.8V56.13l56,16.8Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,184a40,40,0,1,1-40-40A40,40,0,0,1,128,184Z",opacity:"0.2"}),x.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34ZM88,216a32,32,0,1,1,32-32A32,32,0,0,1,88,216ZM200,101.25l-64-19.2V50.75L200,70Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M209.72,58.25l-80-24A6,6,0,0,0,122,40V153.05A46,46,0,1,0,134,184V96.06l72.28,21.69A6,6,0,0,0,214,112V64A6,6,0,0,0,209.72,58.25ZM88,218a34,34,0,1,1,34-34A34,34,0,0,1,88,218ZM202,103.94l-68-20.4V48.06l68,20.4Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34ZM88,216a32,32,0,1,1,32-32A32,32,0,0,1,88,216ZM200,101.25l-64-19.2V50.75L200,70Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M209.15,60.17l-80-24A4,4,0,0,0,124,40V158.75A44,44,0,1,0,132,184V93.38l74.85,22.45A4,4,0,0,0,212,112V64A4,4,0,0,0,209.15,60.17ZM88,220a36,36,0,1,1,36-36A36,36,0,0,1,88,220ZM204,106.62,132,85V45.38L204,67Z"}))]]),_Re=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),x.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),RRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,164a36.07,36.07,0,0,0-33.94,24H72a28,28,0,0,1,0-56h96a44,44,0,0,0,0-88H72a12,12,0,0,0,0,24h96a20,20,0,0,1,0,40H72a52,52,0,0,0,0,104h94.06A36,36,0,1,0,200,164Zm0,48a12,12,0,1,1,12-12A12,12,0,0,1,200,212Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,200a24,24,0,1,1-24-24A24,24,0,0,1,224,200Z",opacity:"0.2"}),x.createElement("path",{d:"M200,168a32.06,32.06,0,0,0-31,24H72a32,32,0,0,1,0-64h96a40,40,0,0,0,0-80H72a8,8,0,0,0,0,16h96a24,24,0,0,1,0,48H72a48,48,0,0,0,0,96h97a32,32,0,1,0,31-40Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,200,216Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,200a28,28,0,0,1-54.83,8H72a48,48,0,0,1,0-96h96a24,24,0,0,0,0-48H72a8,8,0,0,1,0-16h96a40,40,0,0,1,0,80H72a32,32,0,0,0,0,64H173.17A28,28,0,0,1,228,200Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,170a30.05,30.05,0,0,0-29.4,24H72a34,34,0,0,1,0-68h96a38,38,0,0,0,0-76H72a6,6,0,0,0,0,12h96a26,26,0,0,1,0,52H72a46,46,0,0,0,0,92h98.6A30,30,0,1,0,200,170Zm0,48a18,18,0,1,1,18-18A18,18,0,0,1,200,218Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,168a32.06,32.06,0,0,0-31,24H72a32,32,0,0,1,0-64h96a40,40,0,0,0,0-80H72a8,8,0,0,0,0,16h96a24,24,0,0,1,0,48H72a48,48,0,0,0,0,96h97a32,32,0,1,0,31-40Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,200,216Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,172a28,28,0,0,0-27.71,24H72a36,36,0,0,1,0-72h96a36,36,0,0,0,0-72H72a4,4,0,0,0,0,8h96a28,28,0,0,1,0,56H72a44,44,0,0,0,0,88H172.29A28,28,0,1,0,200,172Zm0,48a20,20,0,1,1,20-20A20,20,0,0,1,200,220Z"}))]]),jRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),x.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),LRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),FRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M238.78,183.79,98.28,87.65A40.18,40.18,0,0,0,100,76a40,40,0,1,0-15.29,31.45l30,20.56-30,20.56a40,40,0,1,0,3.57,59.74h0A39.73,39.73,0,0,0,100,180a40.18,40.18,0,0,0-1.72-11.66L136,142.54l89.22,61.06a12,12,0,0,0,13.56-19.81ZM71.31,191.33h0A16,16,0,1,1,76,180,16,16,0,0,1,71.31,191.33ZM48.69,87.3a16,16,0,1,1,22.62,0h0A16,16,0,0,1,48.69,87.3Zm112.82,23.24a12,12,0,0,1,3.13-16.68L225.22,52.4a12,12,0,0,1,13.56,19.81l-60.59,41.46a12,12,0,0,1-16.68-3.13Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M40.2,95.8a28,28,0,1,1,39.6,0A28,28,0,0,1,40.2,95.8Zm0,64.4a28,28,0,1,0,39.6,0A28,28,0,0,0,40.2,160.2Z",opacity:"0.2"}),x.createElement("path",{d:"M157.73,113.13A8,8,0,0,1,159.82,102L227.48,55.7a8,8,0,0,1,9,13.21l-67.67,46.3a7.92,7.92,0,0,1-4.51,1.4A8,8,0,0,1,157.73,113.13Zm80.87,85.09a8,8,0,0,1-11.12,2.08L136,137.7,93.49,166.78a36,36,0,1,1-9-13.19L121.83,128,84.44,102.41a35.86,35.86,0,1,1,9-13.19l143,97.87A8,8,0,0,1,238.6,198.22ZM80,180a20,20,0,1,0-5.86,14.14A19.85,19.85,0,0,0,80,180ZM74.14,90.13a20,20,0,1,0-28.28,0A19.85,19.85,0,0,0,74.14,90.13Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M236.52,187.09l-143-97.87a36,36,0,1,0-14.38,17.27l21.39,21.69L79.15,149.54l0,0a35.91,35.91,0,1,0,14.38,17.27l26.91-18.41L170,198.64a32.26,32.26,0,0,0,22.7,9.37,31.52,31.52,0,0,0,4.11-.27l.28,0,36.27-6.11a8,8,0,0,0,3.19-14.5Zm-162.38-97A20,20,0,1,1,80,76,20,20,0,0,1,74.14,90.13Zm0,104A20,20,0,1,1,80,180,20,20,0,0,1,74.14,194.15Zm61-101.5L169.94,57.4a32.19,32.19,0,0,1,26.84-9.14l.28,0,36,6.07a8.21,8.21,0,0,1,6.09,4.42,8,8,0,0,1-2.67,10.12l-69.93,47.85a4,4,0,0,1-4.51,0l-26.31-18A4,4,0,0,1,135.18,92.65Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M159.38,112a6,6,0,0,1,1.57-8.34l67.66-46.31a6,6,0,0,1,6.78,9.91l-67.67,46.3a6,6,0,0,1-8.34-1.56ZM237,197.09a6,6,0,0,1-8.34,1.56L136,135.27,91,166.06A34,34,0,1,1,84,156a1.8,1.8,0,0,0,.19.2L125.37,128,84.23,99.84,84,100a34,34,0,1,1,7-10.1l144.38,98.8A6,6,0,0,1,237,197.09ZM75.56,91.55a22,22,0,1,0-31.12,0,21.88,21.88,0,0,0,31.12,0ZM82,180a22,22,0,1,0-6.44,15.56h0A21.88,21.88,0,0,0,82,180Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M157.73,113.13A8,8,0,0,1,159.82,102L227.48,55.7a8,8,0,0,1,9,13.21l-67.67,46.3a7.92,7.92,0,0,1-4.51,1.4A8,8,0,0,1,157.73,113.13Zm80.87,85.09a8,8,0,0,1-11.12,2.08L136,137.7,93.49,166.78a36,36,0,1,1-9-13.19L121.83,128,84.44,102.41a35.86,35.86,0,1,1,9-13.19l143,97.87A8,8,0,0,1,238.6,198.22ZM80,180a20,20,0,1,0-5.86,14.14A19.85,19.85,0,0,0,80,180ZM74.14,90.13a20,20,0,1,0-28.28,0A19.85,19.85,0,0,0,74.14,90.13Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M161,110.87a4,4,0,0,1,1.05-5.56L229.74,59a4,4,0,0,1,4.52,6.61l-67.67,46.3a4,4,0,0,1-5.56-1ZM235.3,196a4,4,0,0,1-5.56,1L136,132.85,88.47,165.38a32,32,0,1,1-5.84-8c.45.45.89.92,1.31,1.4l45-30.78-45-30.78c-.42.48-.86,1-1.31,1.4a31.86,31.86,0,1,1,5.84-8l49.69,34h0l96.09,65.76A4,4,0,0,1,235.3,196ZM77,93a24.42,24.42,0,0,0,2.82-3.38s0,0,0,0l0,0A24,24,0,1,0,77,93ZM84,180a23.75,23.75,0,0,0-4.15-13.49l0-.06,0,0A24.5,24.5,0,0,0,77,163,24,24,0,1,0,77,197h0A23.85,23.85,0,0,0,84,180Z"}))]]),$Re=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,176H52V52H204Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,48V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),x.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34Zm2,174a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36Zm4,172a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),BRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,24v56H60V60ZM60,196V140H196v56Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,16v64H56V56Zm0,144H56V136H200v64Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H44a4,4,0,0,1-4-4V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Zm-4,80H44a4,4,0,0,0-4,4v60a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42ZM56,54H200a2,2,0,0,1,2,2v66H54V56A2,2,0,0,1,56,54ZM200,202H56a2,2,0,0,1-2-2V134H202v66A2,2,0,0,1,200,202Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,16v64H56V56Zm0,144H56V136H200v64Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44ZM56,52H200a4,4,0,0,1,4,4v68H52V56A4,4,0,0,1,56,52ZM200,204H56a4,4,0,0,1-4-4V132H204v68A4,4,0,0,1,200,204Z"}))]]),VRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),x.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z"}),x.createElement("path",{d:"M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z"}),x.createElement("path",{d:"M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z"}))]]),HRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M90.86,50.89a12,12,0,0,0-21.72,0l-64,136a12,12,0,0,0,21.71,10.22L42.44,164h75.12l15.58,33.11a12,12,0,0,0,21.72-10.22ZM53.74,140,80,84.18,106.27,140ZM200,84c-13.85,0-24.77,3.86-32.45,11.48a12,12,0,1,0,16.9,17c3-3,8.26-4.52,15.55-4.52,11,0,20,7.18,20,16v4.39A47.28,47.28,0,0,0,200,124c-24.26,0-44,17.94-44,40s19.74,40,44,40a47.18,47.18,0,0,0,22-5.38A12,12,0,0,0,244,192V124C244,101.94,224.26,84,200,84Zm0,96c-11,0-20-7.18-20-16s9-16,20-16,20,7.18,20,16S211,180,200,180Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,164c0,15.46-14.33,28-32,28s-32-12.54-32-28,14.33-28,32-28S232,148.54,232,164ZM34.82,152h90.36L80,56Z",opacity:"0.2"}),x.createElement("path",{d:"M87.24,52.59a8,8,0,0,0-14.48,0l-64,136a8,8,0,1,0,14.48,6.81L39.9,160h80.2l16.66,35.4a8,8,0,1,0,14.48-6.81ZM47.43,144,80,74.79,112.57,144ZM200,96c-12.76,0-22.73,3.47-29.63,10.32a8,8,0,0,0,11.26,11.36c3.8-3.77,10-5.68,18.37-5.68,13.23,0,24,9,24,20v3.22A42.76,42.76,0,0,0,200,128c-22.06,0-40,16.15-40,36s17.94,36,40,36a42.73,42.73,0,0,0,24-7.25,8,8,0,0,0,16-.75V132C240,112.15,222.06,96,200,96Zm0,88c-13.23,0-24-9-24-20s10.77-20,24-20,24,9,24,20S213.23,184,200,184Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,156c0,6.5-7.33,12-16,12s-16-5.5-16-12,7.33-12,16-12S200,149.5,200,156ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM143.37,172.88l-44-104a8,8,0,0,0-14.74,0l-44,104a8,8,0,0,0,14.74,6.24L66.84,152h50.32l11.47,27.12a8,8,0,0,0,14.74-6.24ZM216,124c0-15.44-14.36-28-32-28a34.86,34.86,0,0,0-20.78,6.68,8,8,0,0,0,9.56,12.83A18.84,18.84,0,0,1,184,112c8.56,0,15.8,5.36,16,11.76v8A35.24,35.24,0,0,0,184,128c-17.64,0-32,12.56-32,28s14.36,28,32,28a35.13,35.13,0,0,0,16.93-4.26A8,8,0,0,0,216,176ZM73.61,136h36.78L92,92.53Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M85.43,53.45a6,6,0,0,0-10.86,0l-64,136a6,6,0,1,0,10.86,5.11L38.63,158h82.74l17.2,36.55a6,6,0,1,0,10.86-5.11ZM44.28,146,80,70.09,115.72,146ZM200,98c-12.21,0-21.71,3.28-28.23,9.74a6,6,0,0,0,8.46,8.52c4.18-4.15,10.84-6.26,19.77-6.26,14.34,0,26,9.87,26,22v7.24A40.36,40.36,0,0,0,200,130c-20.95,0-38,15.25-38,34s17.05,34,38,34a40.36,40.36,0,0,0,26-9.24V192a6,6,0,0,0,12,0V132C238,113.25,221,98,200,98Zm0,88c-14.34,0-26-9.87-26-22s11.66-22,26-22,26,9.87,26,22S214.34,186,200,186Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M87.24,52.59a8,8,0,0,0-14.48,0l-64,136a8,8,0,1,0,14.48,6.81L39.9,160h80.2l16.66,35.4a8,8,0,1,0,14.48-6.81ZM47.43,144,80,74.79,112.57,144ZM200,96c-12.76,0-22.73,3.47-29.63,10.32a8,8,0,0,0,11.26,11.36c3.8-3.77,10-5.68,18.37-5.68,13.23,0,24,9,24,20v3.22A42.76,42.76,0,0,0,200,128c-22.06,0-40,16.15-40,36s17.94,36,40,36a42.73,42.73,0,0,0,24-7.25,8,8,0,0,0,16-.75V132C240,112.15,222.06,96,200,96Zm0,88c-13.23,0-24-9-24-20s10.77-20,24-20,24,9,24,20S213.23,184,200,184Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M83.62,54.3a4,4,0,0,0-7.24,0l-64,136a4,4,0,0,0,7.24,3.4L37.36,156h85.28l17.74,37.7a4,4,0,1,0,7.24-3.4ZM41.13,148,80,65.39,118.87,148ZM200,100c-11.67,0-20.69,3.08-26.82,9.16a4,4,0,1,0,5.64,5.68c4.57-4.54,11.7-6.84,21.18-6.84,15.44,0,28,10.77,28,24v11.92A37.78,37.78,0,0,0,200,132c-19.85,0-36,14.35-36,32s16.15,32,36,32a37.78,37.78,0,0,0,28-11.92V192a4,4,0,0,0,8,0V132C236,114.36,219.85,100,200,100Zm0,88c-15.44,0-28-10.77-28-24s12.56-24,28-24,28,10.77,28,24S215.44,188,200,188Z"}))]]),QRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212,56V88a12,12,0,0,1-24,0V68H140V188h20a12,12,0,0,1,0,24H96a12,12,0,0,1,0-24h20V68H68V88a12,12,0,0,1-24,0V56A12,12,0,0,1,56,44H200A12,12,0,0,1,212,56Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,56V184a16,16,0,0,1-16,16H72a16,16,0,0,1-16-16V56Z",opacity:"0.2"}),x.createElement("path",{d:"M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,96a8,8,0,0,1-16,0V88H136v88h12a8,8,0,0,1,0,16H108a8,8,0,0,1,0-16h12V88H88v8a8,8,0,0,1-16,0V80a8,8,0,0,1,8-8h96a8,8,0,0,1,8,8Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M206,56V88a6,6,0,0,1-12,0V62H134V194h26a6,6,0,0,1,0,12H96a6,6,0,0,1,0-12h26V62H62V88a6,6,0,0,1-12,0V56a6,6,0,0,1,6-6H200A6,6,0,0,1,206,56Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M204,56V88a4,4,0,0,1-8,0V60H132V196h28a4,4,0,0,1,0,8H96a4,4,0,0,1,0-8h28V60H60V88a4,4,0,0,1-8,0V56a4,4,0,0,1,4-4H200A4,4,0,0,1,204,56Z"}))]]),zRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),x.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),ZRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),x.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),GRe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M60,96v64a12,12,0,0,1-24,0V96a12,12,0,0,1,24,0ZM88,20A12,12,0,0,0,76,32V224a12,12,0,0,0,24,0V32A12,12,0,0,0,88,20Zm40,32a12,12,0,0,0-12,12V192a12,12,0,0,0,24,0V64A12,12,0,0,0,128,52Zm40,32a12,12,0,0,0-12,12v64a12,12,0,0,0,24,0V96A12,12,0,0,0,168,84Zm40-16a12,12,0,0,0-12,12v96a12,12,0,0,0,24,0V80A12,12,0,0,0,208,68Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,96v64H48V96Z",opacity:"0.2"}),x.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM72,152a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,32a8,8,0,0,1-16,0V72a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V88a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,8a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M54,96v64a6,6,0,0,1-12,0V96a6,6,0,0,1,12,0ZM88,26a6,6,0,0,0-6,6V224a6,6,0,0,0,12,0V32A6,6,0,0,0,88,26Zm40,32a6,6,0,0,0-6,6V192a6,6,0,0,0,12,0V64A6,6,0,0,0,128,58Zm40,32a6,6,0,0,0-6,6v64a6,6,0,0,0,12,0V96A6,6,0,0,0,168,90Zm40-16a6,6,0,0,0-6,6v96a6,6,0,0,0,12,0V80A6,6,0,0,0,208,74Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M52,96v64a4,4,0,0,1-8,0V96a4,4,0,0,1,8,0ZM88,28a4,4,0,0,0-4,4V224a4,4,0,0,0,8,0V32A4,4,0,0,0,88,28Zm40,32a4,4,0,0,0-4,4V192a4,4,0,0,0,8,0V64A4,4,0,0,0,128,60Zm40,32a4,4,0,0,0-4,4v64a4,4,0,0,0,8,0V96A4,4,0,0,0,168,92Zm40-16a4,4,0,0,0-4,4v96a4,4,0,0,0,8,0V80A4,4,0,0,0,208,76Z"}))]]),URe=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),x.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),XRe=x.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Ut=x.forwardRef((t,e)=>{const{alt:n,color:r,size:i,weight:s,mirrored:a,children:o,weights:l,...c}=t,{color:u="currentColor",size:f,weight:h="regular",mirrored:m=!1,...y}=x.useContext(XRe);return x.createElement("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:i??f,height:i??f,fill:r??u,viewBox:"0 0 256 256",transform:a||m?"scale(-1, 1)":void 0,...y,...c},!!n&&x.createElement("title",null,n),o,l.get(s??h))});Ut.displayName="IconBase";const Due=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:G_e}));Due.displayName="ArrowClockwiseIcon";const WRe=Due,Iue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:U_e}));Iue.displayName="ArrowCounterClockwiseIcon";const qRe=Iue,_ue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:X_e}));_ue.displayName="ArrowLeftIcon";const YRe=_ue,Rue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:W_e}));Rue.displayName="ArrowsOutCardinalIcon";const KRe=Rue,jue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:q_e}));jue.displayName="CameraIcon";const JRe=jue,lk=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:Y_e}));lk.displayName="CaretRightIcon";const cF=lk,Lue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:K_e}));Lue.displayName="CheckIcon";const Fue=Lue,$ue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:J_e}));$ue.displayName="CheckCircleIcon";const Bue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:eRe}));Bue.displayName="ClipboardTextIcon";const e9e=Bue,Vue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:tRe}));Vue.displayName="ClockIcon";const t9e=Vue,Hue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:nRe}));Hue.displayName="CopyIcon";const Que=Hue,zue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:rRe}));zue.displayName="EyeIcon";const l3=zue,Zue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:iRe}));Zue.displayName="EyeSlashIcon";const uF=Zue,Gue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:sRe}));Gue.displayName="EyedropperIcon";const n9e=Gue,Uue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:aRe}));Uue.displayName="FileIcon";const r9e=Uue,Xue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:oRe}));Xue.displayName="FileCodeIcon";const i9e=Xue,Wue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:lRe}));Wue.displayName="FileCssIcon";const s9e=Wue,que=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:cRe}));que.displayName="FileHtmlIcon";const a9e=que,Yue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:uRe}));Yue.displayName="FileJpgIcon";const o9e=Yue,Kue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:fRe}));Kue.displayName="FileJsIcon";const l9e=Kue,Jue=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:hRe}));Jue.displayName="FileJsxIcon";const c9e=Jue,efe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:dRe}));efe.displayName="FileMdIcon";const u9e=efe,tfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:pRe}));tfe.displayName="FilePlusIcon";const XX=tfe,nfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:mRe}));nfe.displayName="FilePngIcon";const f9e=nfe,rfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:gRe}));rfe.displayName="FileSvgIcon";const h9e=rfe,ife=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:yRe}));ife.displayName="FileTsIcon";const d9e=ife,sfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:xRe}));sfe.displayName="FileTsxIcon";const p9e=sfe,afe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:bRe}));afe.displayName="FileTxtIcon";const m9e=afe,ofe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:vRe}));ofe.displayName="FileVideoIcon";const g9e=ofe,lfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:ARe}));lfe.displayName="FilmStripIcon";const y9e=lfe,cfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:SRe}));cfe.displayName="FolderSimpleIcon";const x9e=cfe,ufe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:wRe}));ufe.displayName="FolderSimplePlusIcon";const ffe=ufe,hfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:ORe}));hfe.displayName="GearIcon";const b9e=hfe,dfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:kRe}));dfe.displayName="GridFourIcon";const v9e=dfe,pfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:CRe}));pfe.displayName="ImageIcon";const mfe=pfe,gfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:ERe}));gfe.displayName="LightningIcon";const A9e=gfe,yfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:TRe}));yfe.displayName="MagnetIcon";const S9e=yfe,xfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:PRe}));xfe.displayName="MagnetStraightIcon";const w9e=xfe,bfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:MRe}));bfe.displayName="MagnifyingGlassMinusIcon";const O9e=bfe,vfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:NRe}));vfe.displayName="MagnifyingGlassPlusIcon";const k9e=vfe,Afe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:DRe}));Afe.displayName="MinusIcon";const C9e=Afe,Sfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:IRe}));Sfe.displayName="MusicNoteIcon";const E9e=Sfe,wfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:_Re}));wfe.displayName="PaletteIcon";const T9e=wfe,Ofe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:RRe}));Ofe.displayName="PathIcon";const P9e=Ofe,kfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:jRe}));kfe.displayName="PencilSimpleIcon";const M9e=kfe,Cfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:LRe}));Cfe.displayName="PlusIcon";const Efe=Cfe,Tfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:FRe}));Tfe.displayName="ScissorsIcon";const N9e=Tfe,Pfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:$Re}));Pfe.displayName="SquareIcon";const D9e=Pfe,Mfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:BRe}));Mfe.displayName="SquareSplitVerticalIcon";const I9e=Mfe,Nfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:VRe}));Nfe.displayName="StackIcon";const _9e=Nfe,Dfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:HRe}));Dfe.displayName="TextAaIcon";const R9e=Dfe,Ife=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:QRe}));Ife.displayName="TextTIcon";const j9e=Ife,_fe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:zRe}));_fe.displayName="TrashIcon";const Rfe=_fe,G4=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:ZRe}));G4.displayName="WarningIcon";const jfe=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:GRe}));jfe.displayName="WaveformIcon";const L9e=jfe,fF=x.forwardRef((t,e)=>x.createElement(Ut,{ref:e,...t,weights:URe}));fF.displayName="XIcon";const F9e=fF,yi=t=>({title:n,...r})=>d.jsx(t,{alt:n,"aria-label":n,"aria-hidden":n?void 0:!0,...r}),Lfe=yi(Fue),$9e=yi(t9e),hF=yi(l3),c3=yi(y9e),zg=yi(_9e),B9e=yi(KRe),Ffe=yi(E9e),$fe=yi(T9e),V9e=yi(C9e),Ko=yi(Efe),Bfe=yi(D9e),Vfe=yi(I9e),B_=yi(j9e),Fd=yi(F9e),H9e=yi(A9e),Hfe=({title:t,style:e,...n})=>{const r=e!=null&&e.transform?`${e.transform} rotate(90deg)`:"rotate(90deg)";return d.jsx(cF,{alt:t,"aria-label":t,"aria-hidden":t?void 0:!0,style:{...e,transform:r},...n})},Qfe=yi(cF),dF=yi(e9e),rl=yi(qRe),Q9e=yi(JRe),zfe=yi(WRe),ck=yi(b9e),Zfe=yi(N9e),z9e=yi(n9e),Z9e=yi(Rfe);function Gfe({clipCount:t}){return t<2?null:d.jsx("span",{"aria-label":`${t} clips`,title:`${t} clips`,className:"shrink-0 rounded-full bg-white/10 px-1 text-[9px] leading-[14px] tabular-nums text-white/55",children:t})}function G9e(t){return[...new Set(t.map(e=>e.track))].sort((e,n)=>e-n)}function Ufe(t,e){const n=t.indexOf(e);return n<0?null:n+1}function u3(t){return t===null?"":` ${t}`}function U9e(t,e){return t?`Show track${e}`:`Hide track${e}`}function X9e(t){const e=t?uF:l3;return d.jsx(e,{size:14,weight:"bold","aria-hidden":"true"})}function Xfe({hidden:t,trackNumber:e,trackDisplayNumber:n,visible:r,onToggle:i}){if(!r)return d.jsx("span",{"aria-hidden":"true",className:"h-6 w-6 shrink-0"});const s=u3(n),a=U9e(t,s);return d.jsx("button",{type:"button","aria-label":a,title:a,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-[-1px] focus-visible:outline-[#3CE6AC] ${t?"text-[#3CE6AC] hover:text-white":"text-white/35 hover:text-white/75"}`,onPointerDown:o=>o.stopPropagation(),onClick:o=>{o.stopPropagation(),i==null||i(e,!t,n)},children:X9e(t)})}function W9e({trackNumber:t,trackDisplayNumber:e,trackLabel:n,clipCount:r,showTrackLabel:i,isTrackHidden:s,isAudioTrack:a,onToggleTrackHidden:o,trailing:l}){return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[a&&d.jsx(Ffe,{size:12,weight:"fill","aria-hidden":"true",className:"text-white/35"}),i&&d.jsx("span",{className:"min-w-0 break-words text-[11px] leading-tight",children:n}),i&&d.jsx(Gfe,{clipCount:r}),d.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[d.jsx(Xfe,{hidden:s,trackNumber:t,trackDisplayNumber:e,visible:!a||s,onToggle:o}),l]})]})})}function Wfe(t){const e=new Set([...Yd(t).map(r=>r.id),...Array.from(t.querySelectorAll("[id]")).map(r=>r.id)]);if(!e.has("voiceover"))return"voiceover";let n=2;for(;e.has(`voiceover-${n}`);)n+=1;return`voiceover-${n}`}function qfe(t){return typeof(t==null?void 0:t.then)=="function"}const Yfe=Symbol("carve-aborted");function q9e(t,e,n){if(!n||e.sources.length<2)return e;const r=new Set(Yd(t).map(s=>s.id));if(e.sources.some(s=>r.has(s)))return e;const i=Wfe(t);return n(e.sources,i).then(()=>({...e,sources:[i]}))}function Y9e(t,e,n){const r=t&&e?q9e(e,t,n):t;return qfe(r)?r.catch(()=>Yfe):r}function K9e(t,e){var r;const n=e?(r=t.get(e))==null?void 0:r.id:void 0;return new Set([e,n].filter(i=>!!i))}function J9e(t,e,n,r){const i=new Map(Yd(t).flatMap(l=>l.memberIds.map(c=>[c,l]))),s=K9e(i,r),a=new Set,o=[];for(const l of e){const c=i.get(l.id);if(s.has(l.id)||c&&s.has(c.id))continue;if(!c){n(l)&&o.push({id:l.id,label:l.id,kind:M0(l.id,l.getAttribute("src"))});continue}if(a.has(c.id))continue;const u=c.memberIds.map(f=>t.getElementById(f)).filter(f=>(f==null?void 0:f.tagName)==="AUDIO");u.some(n)&&(a.add(c.id),o.push({id:c.id,label:`${c.label} (${u.length})`,kind:M0(c.label,...u.flatMap(f=>[f.id,f.getAttribute("src")]))}))}return o}function e7e(t,e){var r;if(((r=e==null?void 0:e.tagName)==null?void 0:r.toLowerCase())===xa)return{couldBeBed:!1,autoBed:!1};const n=[t,e==null?void 0:e.getAttribute("src"),e==null?void 0:e.getAttribute("data-label")];return{couldBeBed:I_e(...n),autoBed:__e(...n)}}function t7e(t,e,n){try{const r=e.getAttribute(o3);if(!r)return!1;const i=Oue(JSON.parse(r)).sources;return lae(t,i).includes(n)}catch{return!1}}function n7e(t,e){if(!t||!e)return null;const r=Array.from(t.querySelectorAll(`[${o3}]`)).find(i=>i.id!==e&&t7e(t,i,e));return r?r.id||"another track":null}const Ni=(t,e,n,r,i)=>({id:t,label:n,family:e,description:r,nodes:i}),WX=(t,e,n)=>[{type:t,label:n,params:{frequency:e,q:.707,poles:"2"}},{type:t,label:n,params:{frequency:e,q:.707,poles:"2"}}],pF=[Ni("voice-clean","voice","Clean Voice","Cuts rumble and mud, evens out the level, adds a little clarity.",[{type:"highpass",label:"Remove Rumble",params:{frequency:80,q:.707,poles:"2"}},{type:"peaking",label:"Reduce Mud",params:{frequency:250,gain:-3,q:1.2}},{type:"compressor",label:"Even Out Loudness",params:{threshold:-20,ratio:3,attack:12,release:180,makeup:3}},{type:"peaking",label:"Add Clarity",params:{frequency:3e3,gain:2.5,q:1}},{type:"limiter",label:"Peak Ceiling",params:{limit:-1,attack:5,release:50}}]),Ni("voice-broadcast","voice","Broadcast","Denser and more forward — a radio-presenter sound.",[{type:"highpass",label:"Remove Rumble",params:{frequency:90,q:.707,poles:"2"}},{type:"peaking",label:"Reduce Boxiness",params:{frequency:400,gain:-3,q:1.4}},{type:"compressor",label:"Even Out Loudness",params:{threshold:-24,ratio:4,attack:8,release:150,makeup:5}},{type:"peaking",label:"Add Clarity",params:{frequency:2500,gain:3,q:.9}},{type:"highshelf",label:"Add Air",params:{frequency:8e3,gain:2}},{type:"saturate",label:"Warmth",params:{type:"tanh",threshold:-12,output:0}},{type:"limiter",label:"Peak Ceiling",params:{limit:-1,attack:5,release:60}}]),Ni("voice-warm","voice","Close & Warm","Intimate and lightly handled, for a voice close to the mic.",[{type:"highpass",label:"Remove Rumble",params:{frequency:70,q:.707,poles:"2"}},{type:"lowshelf",label:"Add Weight",params:{frequency:180,gain:2}},{type:"compressor",label:"Even Out Loudness",params:{threshold:-18,ratio:2.5,attack:20,release:250,makeup:2}},{type:"peaking",label:"Add Clarity",params:{frequency:3e3,gain:1.5,q:.8}},{type:"limiter",label:"Peak Ceiling",params:{limit:-1.5}}]),Ni("rumble-cut","repair","Cut Rumble","Removes traffic, handling and air-conditioning from under a voice.",[{type:"highpass",label:"Cut Rumble",params:{frequency:100,q:.707,poles:"2"}}]),Ni("room-gate","repair","Quiet Between Phrases","Silences the gaps between words. Room tone under speech stays — this closes the pauses, it does not remove noise.",[{type:"gate",label:"Silence the Gaps",params:{threshold:-45,range:-18,ratio:10,attack:2,release:180}}]),Ni("boom-tame","repair","Tame Boominess","Takes out the chestiness of a voice too close to the mic.",[{type:"peaking",label:"Tame Boominess",params:{frequency:200,gain:-4,q:1.4}}]),Ni("harsh-tame","repair","Soften Harshness","Rounds off a brittle upper-mid. Broad and always-on; sibilance proper wants the measuring version.",[{type:"peaking",label:"Soften Harshness",params:{frequency:3200,gain:-3,q:1.6}}]),Ni("telephone","character","Telephone","Down the line — the narrow band of a phone call.",[...WX("highpass",300,"Strip the Bass"),...WX("lowpass",3400,"Strip the Treble"),{type:"peaking",label:"Phone Honk",params:{frequency:1200,gain:6,q:1.2}},{type:"peaking",label:"De-mud",params:{frequency:550,gain:-4,q:1}},{type:"saturate",label:"Circuit Grit",params:{type:"tanh",threshold:-9,output:-2}}]),Ni("radio-am","character","AM Radio","Narrow, gritty and a little crushed.",[{type:"highpass",label:"Strip the Bass",params:{frequency:220,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:2200,q:.707,poles:"2"}},{type:"peaking",label:"IF Droop",params:{frequency:1200,gain:-5,q:.9}},{type:"lowshelf",label:"Boxy",params:{frequency:500,gain:4}},{type:"saturate",label:"Radio Grit",params:{type:"tanh",threshold:-8,output:-1}},{type:"bitcrush",label:"Carrier Hiss",params:{bits:8,samples:1,mix:.45}}]),Ni("megaphone","character","Megaphone","Shouted through a horn, with the slap that comes with it.",[{type:"highpass",label:"Strip the Bass",params:{frequency:700,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:4e3,q:.707,poles:"2"}},{type:"peaking",label:"Horn Honk",params:{frequency:1900,gain:14,q:3}},{type:"peaking",label:"Horn Ring",params:{frequency:3200,gain:6,q:3}},{type:"saturate",label:"Overdrive",params:{type:"hard",threshold:-5,output:-3}},{type:"delay",label:"Horn Slap",params:{time:65,feedback:.2,mix:.28}}]),Ni("lofi-tape","character","Tape","Worn, warm and slightly unsteady, like a played-out cassette.",[{type:"lowpass",label:"Tape Rolloff",params:{frequency:6500,q:.707,poles:"2"}},{type:"lowshelf",label:"Add Weight",params:{frequency:120,gain:2}},{type:"saturate",label:"Tape Warmth",params:{type:"tanh",threshold:-14,output:0}},{type:"bitcrush",label:"Tape Noise",params:{bits:12,samples:2,mix:.35}},{type:"chorus",label:"Wow & Flutter",params:{delay:6,depth:.6,speed:.4,mix:.15}}]),Ni("pa-system","character","Tannoy","Announced across a concourse.",[{type:"highpass",label:"Strip the Bass",params:{frequency:250,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:5e3,q:.707,poles:"2"}},{type:"peaking",label:"Tannoy Honk",params:{frequency:2400,gain:9,q:2}},{type:"saturate",label:"Driver Grit",params:{type:"tanh",threshold:-10,output:-1}},{type:"reverb",label:"Concourse",params:{size:.54,damping:.48,wet:.25,dry:.8}}]),Ni("intercom","character","Intercom","Buzzed through a door panel, squelch and all.",[{type:"gate",label:"Squelch",params:{threshold:-40,range:-30,ratio:10,attack:1,release:120}},{type:"highpass",label:"Strip the Bass",params:{frequency:500,q:.707,poles:"2"}},{type:"lowpass",label:"Strip the Treble",params:{frequency:3e3,q:.707,poles:"2"}},{type:"peaking",label:"Panel Honk",params:{frequency:2e3,gain:6,q:2}},{type:"bitcrush",label:"Crunch",params:{bits:11,samples:1,mix:.3}}]),Ni("doofus-worble","character","Doofus Worble","Seasick and wobbling — no straight signal left.",[{type:"chorus",label:"Worble",params:{delay:14.6,depth:2.57,speed:10,mix:1}}]),Ni("chipmunk","character","Chipmunk","Small, fast and squeaky.",[{type:"pitchshift",label:"Up High",params:{semitones:7,mix:1}},{type:"highshelf",label:"Extra Sparkle",params:{frequency:4e3,gain:3}}]),Ni("giant","character","Giant","Huge, slow and deep.",[{type:"pitchshift",label:"Down Low",params:{semitones:-5,mix:1}},{type:"lowshelf",label:"Add Weight",params:{frequency:150,gain:4}},{type:"compressor",label:"Hold It Together",params:{threshold:-18,ratio:3,attack:10,release:120,knee:6,makeup:2,mix:1}}]),Ni("monster","character","Monster","Deep, rough and too close.",[{type:"pitchshift",label:"Down Low",params:{semitones:-8,mix:1}},{type:"saturate",label:"Growl",params:{type:"tanh",threshold:-12,output:-1}},{type:"reverb",label:"Right Behind You",params:{size:.3,damping:.5,wet:.22,dry:.85}}]),Ni("room-tight","space","Tight Room","A small hard room — presence without wash.",[{type:"reverb",label:"Tight Room",params:{size:.25,damping:.6,wet:.18,dry:.9}}]),Ni("room-natural","space","Natural Room","Sounds recorded somewhere rather than nowhere.",[{type:"reverb",label:"Natural Room",params:{size:.5,damping:.5,wet:.25,dry:.85}}]),Ni("hall","space","Hall","Long and open, for something that should sit far back.",[{type:"reverb",label:"Hall",params:{size:.9,damping:.3,wet:.4,dry:.75}}]),Ni("slap-echo","space","Slap Echo","One quick repeat — rockabilly vocal, not a wash.",[{type:"delay",label:"Slap Echo",params:{time:110,feedback:.12,mix:.22}}]),Ni("dub-throw","space","Dub Throw","Repeats that trail off well behind the beat.",[{type:"delay",label:"Dub Throw",params:{time:375,feedback:.55,mix:.3}}])];pF.map(t=>t.id);const r7e=new Map(pF.map(t=>[t.id,t]));function f3(t){return r7e.get(t)}const qX=["voice","repair","character","space"];function i7e(t){return pF.filter(e=>e.family===t)}function EM(t,e){const n=[];let r={...e,nodes:[...e.nodes]};for(const i of t.nodes){const s={type:i.type,id:wy(r),fromPreset:t.id,...i.label?{label:i.label}:{},enabled:!0,params:qd(i.type,i.params)};n.push(s),r={...r,nodes:[...r.nodes,s]}}return n}function mF(t,e,n={}){if(n.replaceChain)return{version:b0,nodes:EM(e,{version:b0,nodes:[]})};const r=t.nodes.findIndex(l=>l.fromPreset===e.id);if(r===-1)return{...t,nodes:[...t.nodes,...EM(e,t)]};const i=t.nodes.filter(l=>l.fromPreset!==e.id),s=i.slice(0,r),a=i.slice(r),o=EM(e,{...t,nodes:i});return{...t,nodes:[...s,...o,...a]}}const f0={gain:{title:"Volume",does:"Turns this track up or down.",reachFor:"It's too loud, or too quiet, against everything else.",primary:"gain",primaryEnds:{low:"Silent",high:"Louder"},params:{gain:{label:"Level",ends:{low:"Silent",high:"Louder"}}}},highpass:{title:"Remove Rumble",does:"Cuts the very bottom — traffic, footsteps, air conditioning, hands on the mic.",reachFor:"There's a low hum or thump under everything.",primary:"frequency",primaryEnds:{low:"Only the deepest",high:"Thins it out"},band:[20,300],params:{frequency:{label:"Cut below",hint:"Everything under this is removed.",ends:{low:"Only the deepest",high:"Thins it out"}},q:{label:"Sharpness",hint:"How abruptly the cut starts."},poles:{label:"Steepness",hint:"How fast it falls away below the point."}}},lowpass:{title:"Muffle",does:"Takes the top off, like the sound is coming through a door.",reachFor:"You want something to sound distant, or behind something else.",primary:"frequency",primaryEnds:{low:"Very muffled",high:"Barely changed"},band:[1e3,2e4],params:{frequency:{label:"Cut above",ends:{low:"Very muffled",high:"Barely changed"}},q:{label:"Sharpness"},poles:{label:"Steepness"}}},peaking:{title:"Shape One Range",does:"Lifts or lowers one part of the sound and leaves the rest alone.",reachFor:"One quality is wrong — boomy, boxy, harsh — but the rest is fine.",primary:"gain",primaryEnds:{low:"Take it out",high:"Bring it forward"},band:[20,2e4],params:{frequency:{label:"Where",hint:"Which part of the sound to change."},gain:{label:"How much",ends:{low:"Take it out",high:"Bring it forward"}},q:{label:"How wide",hint:"A narrow setting fixes one note; a wide one changes the whole character."}}},lowshelf:{title:"Bass",does:"More or less weight underneath everything.",reachFor:"It sounds thin, or too heavy.",primary:"gain",primaryEnds:{low:"Thinner",high:"Heavier"},band:[20,300],params:{frequency:{label:"Up to",hint:"Everything below this is lifted or dropped."},gain:{label:"How much",ends:{low:"Thinner",high:"Heavier"}}}},highshelf:{title:"Brightness",does:"More or less sparkle at the top.",reachFor:"It sounds dull, or too fizzy.",primary:"gain",primaryEnds:{low:"Duller",high:"Brighter"},band:[2e3,2e4],params:{frequency:{label:"From",hint:"Everything above this is lifted or dropped."},gain:{label:"How much",ends:{low:"Duller",high:"Brighter"}}}},compressor:{title:"Even Out Loudness",does:"Brings the quiet parts up and holds the loud parts down, so nothing jumps out at the listener.",reachFor:"Some parts are much louder than others.",primary:"strength",primaryEnds:{low:"Barely touched",high:"Very even, quite squashed"},params:{threshold:{label:"Starts working at",hint:"Anything louder than this gets held down."},ratio:{label:"How hard",hint:"How much of the excess is removed."},attack:{label:"How fast it grabs",ends:{low:"Instant",high:"Lets peaks through"}},release:{label:"How fast it lets go",ends:{low:"Snappy",high:"Smooth"}},knee:{label:"How gradual"},makeup:{label:"Volume back up",hint:"Compression makes things quieter; this puts the level back."},mix:{label:"Blend with the original"}}},limiter:{title:"Peak Ceiling",does:"Nothing gets louder than this, ever. A safety net at the end of the chain.",reachFor:"You want to be sure it never clips or spikes.",primary:"limit",primaryEnds:{low:"A lot of headroom",high:"Right up to the edge"},params:{limit:{label:"Never exceed",ends:{low:"A lot of headroom",high:"Right up to the edge"}},attack:{label:"How fast it catches"},release:{label:"How fast it recovers"},level_out:{label:"Level after"}}},gate:{title:"Silence the Gaps",does:"Mutes the pauses. Whatever sits underneath stays — this closes the gaps, it does not remove noise.",reachFor:"You can hear the room in the gaps.",primary:"strength",primaryEnds:{low:"Only true silence",high:"Cuts quiet parts too"},params:{threshold:{label:"Quieter than this is a gap"},range:{label:"How far to duck the gaps",hint:"Not all the way down, usually — total silence sounds broken."},ratio:{label:"How hard"},attack:{label:"How fast it opens"},release:{label:"How fast it closes",ends:{low:"Clips tails short",high:"Leaves tails intact"}},knee:{label:"How gradual"}}},saturate:{title:"Warmth",does:"Adds a little grit and density, the way analogue gear does.",reachFor:"It sounds clean but lifeless.",primary:"strength",primaryEnds:{low:"Just a sheen",high:"Openly distorted"},params:{type:{label:"Character",hint:"Different flavours of the same idea. Tanh is the gentle one."},threshold:{label:"How much drive",ends:{low:"Just a sheen",high:"Openly distorted"}},output:{label:"Level after",hint:"Drive makes things louder; this puts it back."},oversample:{label:"Quality",hint:"Higher costs more but sounds cleaner."}}},bitcrush:{title:"Lo-Fi",does:"Crushes the sound down to fewer steps, like an old sampler or a bad phone line.",reachFor:"You want it to sound cheap or digital on purpose.",primary:"strength",primaryEnds:{low:"Slightly gritty",high:"Destroyed"},params:{bits:{label:"How many steps",ends:{low:"Destroyed",high:"Clean"}},samples:{label:"How rough",hint:"Holds each value for longer, which dulls and grits it."},mix:{label:"Blend with the original"}}},pitchshift:{title:"Higher or Lower",does:"Shifts everything up or down without changing its speed.",reachFor:"It should sound squeakier, or deeper.",primary:"semitones",primaryEnds:{low:"Much deeper",high:"Much higher"},params:{semitones:{label:"How far",ends:{low:"Much deeper",high:"Much higher"}},mix:{label:"Blend with the original"}}},delay:{title:"Echo",does:"Repeats the sound after a gap.",reachFor:"You want space, or a rhythmic effect.",primary:"mix",primaryEnds:{low:"A hint",high:"Washed out"},params:{time:{label:"Gap between repeats"},feedback:{label:"How many repeats",ends:{low:"One",high:"Trails away for ages"}},mix:{label:"How loud",ends:{low:"A hint",high:"Washed out"}}}},reverb:{title:"Room",does:"Puts the sound somewhere, instead of nowhere.",reachFor:"It sounds dry and stuck to the speaker.",primary:"strength",primaryEnds:{low:"A small tight room",high:"A big open hall"},params:{size:{label:"How big the space is"},damping:{label:"How soft the walls are",ends:{low:"Hard and bright",high:"Soft and dark"}},wet:{label:"How much room"},dry:{label:"How much original"}}},chorus:{title:"Thicken",does:"Doubles the sound slightly out of tune, which makes it wider and less exact.",reachFor:"It sounds thin or too plain on its own.",primary:"mix",primaryEnds:{low:"Just wider",high:"Obviously wobbling"},params:{delay:{label:"Spread"},depth:{label:"How much wobble"},speed:{label:"How fast it wobbles"},mix:{label:"How much",ends:{low:"Just wider",high:"Obviously wobbling"}}}},phaser:{title:"Swirl",does:"A filter that sweeps up and down, giving a moving, hollow shimmer.",reachFor:"You want movement, or a 1970s flavour.",primary:"out_gain",primaryEnds:{low:"Subtle",high:"Strong"},params:{in_gain:{label:"Depth in"},out_gain:{label:"How strong",ends:{low:"Subtle",high:"Strong"}},delay:{label:"Where it sweeps"},decay:{label:"How resonant"},speed:{label:"How fast it sweeps"},type:{label:"Shape of the sweep"}}}},og=[{from:20,to:80,name:"Rumble",says:"traffic, footsteps, handling"},{from:80,to:250,name:"Weight",says:"body, warmth, low end"},{from:250,to:600,name:"Mud",says:"boxy, muffled, cardboard"},{from:600,to:2e3,name:"Middle",says:"the body of the sound"},{from:2e3,to:5e3,name:"Presence",says:"definition, consonants"},{from:5e3,to:1e4,name:"Edge",says:"harshness, sibilance"},{from:1e4,to:2e4,name:"Air",says:"sparkle, openness"}];function s7e(t){if(!Number.isFinite(t))return;const e=og[0],n=og.at(-1);return e&&t<e.from?e:n&&t>=n.to?n:og.find(r=>t>=r.from&&t<r.to)}const a7e={"voice-clean":"My voice sounds amateur","voice-broadcast":"I want it to sound like radio","voice-warm":"I want it intimate and close","rumble-cut":"There's a hum or thump underneath","room-gate":"I can hear the room in the gaps","boom-tame":"It sounds boomy","harsh-tame":"It's harsh and tiring to listen to",telephone:"Make it sound like a phone call","radio-am":"Make it sound like an old radio",megaphone:"Make it sound shouted through a horn","lofi-tape":"Make it sound like an old tape","pa-system":"Make it sound like a station announcement",intercom:"Make it sound like a door intercom","doofus-worble":"Make it wobble like it is seasick",chipmunk:"Make it small and squeaky",giant:"Make it huge and deep",monster:"Make it a monster","room-tight":"It sounds dry and stuck to the speaker","room-natural":"It should sound like a real place",hall:"It should sound far away and big","slap-echo":"I want one quick echo","dub-throw":"I want long trailing echoes"},ui=(t,e=0)=>typeof t=="number"?t:e,n1=t=>{const e=ui(t);return e>=1e3?`${(e/1e3).toFixed(e%1e3===0?0:1)} kHz`:`${Math.round(e)} Hz`},f8=(t,e)=>t<.34?e[0]:t<.67?e[1]:e[2],TM={gain:t=>ui(t.gain)===0?"No change":ui(t.gain)>0?`Up ${ui(t.gain)} dB`:`Down ${Math.abs(ui(t.gain))} dB`,highpass:t=>`Cutting everything below ${n1(t.frequency)}`,lowpass:t=>`Muffled above ${n1(t.frequency)}`,peaking:t=>ui(t.gain)===0?`Sitting on ${n1(t.frequency)}, doing nothing yet`:`${ui(t.gain)>0?"Lifting":"Cutting"} ${n1(t.frequency)} by ${Math.abs(ui(t.gain))} dB`,lowshelf:t=>ui(t.gain)===0?"Doing nothing yet":`${ui(t.gain)>0?"More":"Less"} weight below ${n1(t.frequency)}`,highshelf:t=>ui(t.gain)===0?"Doing nothing yet":`${ui(t.gain)>0?"More":"Less"} sparkle above ${n1(t.frequency)}`,compressor:t=>`Evening out — ${f8(Math.min(1,(ui(t.ratio,3)-1)/7),["gentle","moderate","firm"])}`,limiter:t=>`Nothing louder than ${ui(t.limit,-1)} dB`,gate:t=>`Closing gaps quieter than ${ui(t.threshold,-45)} dB`,saturate:t=>`${f8(Math.min(1,Math.abs(ui(t.threshold,-6))/30),["A little","Some","Heavy"])} warmth`,bitcrush:t=>`Crushed to ${ui(t.bits,8)} bits`,pitchshift:t=>ui(t.semitones,0)===0?"Unchanged pitch":`${ui(t.semitones,0)>0?"Up":"Down"} ${Math.abs(ui(t.semitones,0))} semitones`,delay:t=>`Echo every ${ui(t.time,250)} ms`,reverb:t=>`${f8(ui(t.size,.7),["A small","A medium","A large"])} room, ${f8(ui(t.wet,.35),["lightly","moderately","heavily"])}`,chorus:t=>`Thickened${ui(t.mix,.5)>.6?", wobbling":""}`,phaser:()=>"Swirling"},o7e={voice:"Voice",repair:"Fix",character:"Character",space:"Space"};function Kfe({trackKind:t,onPick:e,onAudition:n,onAuditionTracked:r}){const i=x.useRef(new Set),s=o=>{i.current.has(o)||(i.current.add(o),r==null||r(o))},a=t==="music"||t==="sfx"?qX.filter(o=>o!=="voice"):qX;return d.jsx("div",{className:"hf-fx-preset-menu space-y-1.5 rounded-[4px] border border-panel-border-input p-1.5",onMouseLeave:n?()=>n(null):void 0,onBlur:n?()=>n(null):void 0,children:a.map(o=>d.jsxs("div",{className:"hf-fx-preset-group space-y-0.5",children:[d.jsx("span",{className:"hf-fx-preset-group-label block font-mono text-[9px] uppercase tracking-wide text-panel-text-2",children:o7e[o]}),i7e(o).map(l=>d.jsxs("button",{type:"button",className:"hf-fx-preset-item block w-full rounded-[3px] bg-panel-surface py-1 pl-1.5 pr-8 text-left text-panel-text-1 hover:text-panel-text-0",title:`${l.description} (${l.nodes.length} effect${l.nodes.length===1?"":"s"})`,onClick:()=>e(l.id),onMouseEnter:()=>{s(l.id),n==null||n(l.id)},onFocus:()=>{s(l.id),n==null||n(l.id)},children:[d.jsx("span",{className:"hf-fx-preset-problem block truncate text-[10px]",children:a7e[l.id]??l.description}),d.jsxs("span",{className:"block truncate font-mono text-[9px] text-panel-text-2",children:[d.jsx("span",{className:"hf-fx-preset-name",children:l.label}),d.jsxs("span",{className:"hf-fx-preset-count",children:[" · ",l.nodes.length," effect",l.nodes.length===1?"":"s"]})]}),n?d.jsxs("span",{className:"hf-fx-preset-wave","aria-hidden":"true",children:[d.jsx("span",{}),d.jsx("span",{}),d.jsx("span",{}),d.jsx("span",{})]}):null]},l.id))]},o))})}function Ha(t,e={}){Tt(`audio_fx_${t}`,e)}function Jfe(t){return t.fromPreset?"preset":t.fromCarve?"carve":t.fromEq?"eq":t.fromLeveller?"leveller":"hand"}function l7e(t){const e=(t==null?void 0:t.nodes)??[],n=new Map;for(const r of e){const i=Jfe(r);n.set(i,(n.get(i)??0)+1)}return{node_count:e.length,nodes_from_preset:n.get("preset")??0,nodes_from_carve:n.get("carve")??0,nodes_from_eq:n.get("eq")??0,nodes_from_leveller:n.get("leveller")??0,nodes_by_hand:n.get("hand")??0,preset_count:new Set(e.map(r=>r.fromPreset).filter(Boolean)).size,bypassed_count:e.filter(r=>r.enabled===!1).length}}const Wl=t=>({track_kind:t.trackKind??"unknown"});function c7e(t,e,n,r,i){Ha("preset_applied",{preset:t,family:e,node_count:n,mode:r,...Wl(i)})}function u7e(t,e){Ha("preset_removed",{preset:t,...Wl(e)})}function f7e(t,e,n){Ha("preset_amount",{preset:t,amount:e,...Wl(n)})}function h7e(t,e,n){Ha("preset_automated",{preset:t,enabled:e,...Wl(n)})}function ehe(t,e){Ha("preset_auditioned",{preset:t,...Wl(e)})}function PM(t,e,n,r){Ha("node_added",{effect:t,via:e,job:n??"none",...Wl(r)})}function d7e(t,e,n){Ha("node_removed",{effect:t,origin:e,...Wl(n)})}function p7e(t,e,n){Ha("node_bypassed",{effect:t,bypassed:e,...Wl(n)})}function m7e(t,e,n){Ha("node_moved",{effect:t,direction:e,...Wl(n)})}function g7e(t,e,n,r,i){Ha("param_committed",{effect:t,param:e,value:n,surface:r,...Wl(i)})}function y7e(t,e,n){Ha("profile_committed",{effect:t,strength:e,...Wl(n)})}function x7e(t,e){Ha("carve_changed",{action:t,strength:e.strength,source_count:e.sourceCount})}function YX(t){Ha("leveller",{action:t})}function b7e(t,e){Ha("eq_changed",{band:t,value:e})}function v7e(t,e,n){Ha("chain_observed",{...l7e(t),first_sight:e.firstSight,panel_edits:e.panelEdits,authored_outside:e.panelEdits===0,has_carve:e.hasCarve,has_automation:e.hasAutomation,...Wl(n)})}function the(t,e,n){const r=f3(e);if(!r)return null;const i=mF(t,r),s=t.nodes.some(a=>a.fromPreset===r.id);return c7e(r.id,r.family,r.nodes.length,s?"reapply":"append",{trackKind:n}),i}function nhe(t,e,n){const r=x.useRef(null),i=x.useCallback(c=>{e&&(c?(r.current??(r.current=t),e(c(r.current)),n==null||n(!0)):r.current&&(n==null||n(!1),e(r.current),r.current=null))},[t,e,n]),s=x.useCallback(()=>r.current??t,[t]),a=x.useCallback(()=>{r.current=null,n==null||n(!1)},[n]),o=x.useRef(e);o.current=e;const l=x.useRef(n);return l.current=n,x.useEffect(()=>()=>{var c,u;r.current&&((c=l.current)==null||c.call(l,!1),(u=o.current)==null||u.call(o,r.current))},[]),{audition:i,clearAudition:a,storedChain:s}}const KX=260,Uh=8,A7e=160;function S7e(t){const e=Math.min(Math.max(t.left,Uh),Math.max(Uh,window.innerWidth-KX-Uh)),n=window.innerHeight-t.bottom,r=t.top,i=n<260&&r>n,s=(i?r:n)-Uh-4,a=Math.min(Math.max(A7e,s),window.innerHeight-Uh*2),o=l=>Math.max(Uh,Math.min(l,Math.max(Uh,window.innerHeight-a-Uh)));return{position:"fixed",left:e,width:KX,maxHeight:a,...i?{bottom:o(window.innerHeight-t.top+4)}:{top:o(t.bottom+4)}}}function w7e(t,e){const n=f3(e);return n?mF(t,n):t}function O7e({anchorRect:t,chain:e,trackKind:n,onClose:r,onChainChange:i,onChainPreview:s,onAuditionTransport:a,onOpenRack:o}){const l=x.useRef(null),{audition:c,clearAudition:u,storedChain:f}=nhe(e,s,a);x.useEffect(()=>{const y=p=>{l.current&&!l.current.contains(p.target)&&r()};return document.addEventListener("pointerdown",y,!0),()=>document.removeEventListener("pointerdown",y,!0)},[r]);const h=y=>{const p=the(f(),y,n);p&&(u(),i(p),r())},m=y=>{y.key==="Escape"&&(y.stopPropagation(),c(null),r())};return d.jsxs("div",{ref:l,role:"dialog","aria-label":"Effects",className:"z-[200] flex flex-col overflow-hidden rounded-md border border-white/10 bg-[#1b1b1f] p-2 shadow-xl",style:S7e(t),onKeyDown:m,onPointerDown:y=>y.stopPropagation(),children:[d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:d.jsx(Kfe,{trackKind:n,onPick:h,onAudition:s?y=>c(y?p=>w7e(p,y):null):void 0,onAuditionTracked:y=>ehe(y,{trackKind:n})})}),d.jsxs("div",{className:"mt-2 flex shrink-0 items-center justify-between border-t border-white/10 pt-2 text-[10px] text-white/55",children:[d.jsx("button",{type:"button",className:"hover:text-white",onClick:()=>{r(),o()},children:"+ effect"}),d.jsx("button",{type:"button",className:"hover:text-white",onClick:()=>{r(),o()},children:"Open rack ›"})]})]})}function k7e(t,e){if(!t||t.length===0||t.some(r=>e>=r.start&&e<r.start+r.duration))return null;const n=t.map(r=>r.start).sort((r,i)=>r-i);return n.find(r=>r>e)??n[0]??null}function rhe(){const t=x.useRef(null);return(e,n)=>{const r=ce.getState();if(e){if(r.isPlaying||t.current!==null)return;t.current=r.currentTime;const s=k7e(n,r.currentTime);s!==null&&r.requestSeek(s),r.requestPlayback(!0);return}const i=t.current;i!==null&&(t.current=null,r.requestPlayback(!1,i))}}const C7e={width:256,height:160};function JX(t){const{left:e,top:n}=pj(t,{width:window.innerWidth,height:window.innerHeight},C7e,{offset:4});return{left:e,top:n}}function E7e({anchorRect:t,clipCount:e,defaultLabel:n,refusal:r,onCancel:i,onConfirm:s}){const[a,o]=x.useState(n??"Voiceover"),l=x.useRef(null);if(x.useEffect(()=>{var u;return(u=l.current)==null?void 0:u.select()},[]),r)return d.jsx("div",{role:"dialog","aria-label":"This track cannot be grouped",className:"z-[200] w-64 rounded-md border border-white/10 bg-[#1b1b1f] p-3 text-[11px] leading-snug text-white/75 shadow-xl",style:{position:"fixed",...JX(t)},onPointerDown:u=>u.stopPropagation(),onKeyDown:u=>{u.key==="Escape"&&(u.stopPropagation(),i())},children:d.jsx("p",{children:r})});const c=()=>s(a.trim()||n||"Voiceover");return d.jsxs("div",{role:"dialog","aria-label":"Name this group",className:"z-[200] w-64 rounded-md border border-white/10 bg-[#1b1b1f] p-3 text-[11px] text-white/75 shadow-xl",style:{position:"fixed",...JX(t)},onPointerDown:u=>u.stopPropagation(),onKeyDown:u=>{u.key==="Escape"&&(u.stopPropagation(),i()),u.key==="Enter"&&c()},children:[d.jsx("p",{className:"mb-1.5 font-medium text-white",children:"Name this group"}),d.jsx("input",{ref:l,type:"text","aria-label":"Group name",value:a,onChange:u=>o(u.currentTarget.value),className:"w-full rounded border border-white/20 bg-black/30 px-1.5 py-1 text-[11px] text-white outline-none focus:border-[#3CE6AC]"}),d.jsxs("p",{className:"mt-2 leading-snug",children:["Effects you add to the group apply to ",e===2?"both":`all ${e}`," clips at once, and they share one volume."]}),d.jsxs("div",{className:"mt-2.5 flex justify-end gap-1.5",children:[d.jsx("button",{type:"button",className:"rounded border border-white/20 px-2 py-1 text-[10px] text-white/75 hover:bg-white/10",onClick:i,children:"Cancel"}),d.jsx("button",{type:"button",className:"rounded border border-[#3CE6AC] bg-[#3CE6AC]/15 px-2 py-1 text-[10px] font-semibold text-[#3CE6AC] hover:bg-[#3CE6AC]/25",onClick:c,children:"Group"})]})]})}function T7e(t){if(!t)return{version:1,nodes:[]};try{return EE(t)}catch{return{version:1,nodes:[]}}}function V_(t){const[e,n]=x.useState(!1),r=x.useRef(null),[i,s]=x.useState(null),a=rhe(),o=x.useRef(!1),l=()=>{var f;s(((f=r.current)==null?void 0:f.getBoundingClientRect())??null),n(!0)};if(t.variant==="group-pointer")return d.jsxs("div",{className:"relative shrink-0",children:[d.jsx("button",{type:"button",tabIndex:-1,ref:r,"aria-label":"Effects — group these clips first",title:"Group these clips to add effects to all of them",className:"flex h-6 items-center justify-center rounded border-0 bg-transparent px-1 text-[10px] font-semibold text-white/35 hover:text-white/75",onPointerDown:f=>f.stopPropagation(),onClick:f=>{f.stopPropagation(),l()},children:"FX"}),e&&i&&Zl.createPortal(d.jsx(E7e,{refusal:t.refusal,anchorRect:i,clipCount:t.clipCount,defaultLabel:t.defaultLabel,onCancel:()=>n(!1),onConfirm:f=>{n(!1),t.onGroupClips(f)}}),document.body)]});const c=T7e(t.fxChainRaw),u=Eke(c).length;return d.jsxs("div",{className:"relative shrink-0",children:[d.jsxs("button",{type:"button",tabIndex:-1,ref:r,"aria-label":u>0?`Effects — ${u} applied`:"Effects",title:"Effects",className:`flex h-6 items-center justify-center gap-0.5 rounded border-0 bg-transparent px-1 text-[10px] font-semibold transition-colors ${e||u>0?"text-[#3CE6AC]":"text-white/35 hover:text-white/75"}`,onPointerDown:f=>f.stopPropagation(),onClick:f=>{f.stopPropagation(),l()},children:["FX",u>0?` ${u}`:""]}),e&&i&&Zl.createPortal(d.jsx(O7e,{anchorRect:i,chain:c,trackKind:t.trackKind,onClose:()=>n(!1),onChainChange:t.onChainChange,onChainPreview:t.onChainPreview,onAuditionTransport:f=>{var h;f&&(o.current=t.isMuted===!0),o.current&&((h=t.onSetMutedLive)==null||h.call(t,!f)),f||(o.current=!1),a(f,t.auditionSpans)},onOpenRack:t.onOpenRack}),document.body)]})}function ihe({name:t,isExpanded:e,lanesId:n,onToggle:r}){return d.jsx("button",{type:"button",tabIndex:-1,"aria-expanded":e,"aria-controls":n,"aria-label":`${e?"Hide":"Show"} ${t} lanes`,title:`${e?"Hide":"Show"} lanes`,className:`ml-auto flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-[11px] leading-none focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${e?"text-[#3CE6AC]":"text-white/55 hover:text-white"}`,onPointerDown:i=>i.stopPropagation(),onClick:i=>{i.stopPropagation(),r()},children:d.jsx("span",{"aria-hidden":"true",children:"∿"})})}function P7e({name:t,clipCount:e,isExpanded:n,gutterBackground:r,columnWidth:i,lanesId:s,onToggleClipExpanded:a,children:o}){return d.jsxs("div",{className:"absolute left-0 top-0 flex items-center gap-1.5 overflow-hidden px-1.5 text-[11px]",style:{width:i,height:Xi,color:"#ffffff",background:r},children:[d.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-[13px] leading-none text-white/40",children:"◇"}),d.jsx("span",{className:"min-w-0 flex-1 break-words font-medium leading-tight",children:t}),d.jsx(Gfe,{clipCount:e}),o,d.jsx(ihe,{name:t,isExpanded:n,lanesId:s,onToggle:a})]})}function gA(t){return String(Math.round(t*100)/100)}function M7e(t,e,n){var i,s;const r=n??((i=e.keyframes)==null?void 0:i.easeEach)??e.ease;return!r||r==="none"?t:((s=Jv.parseEase(r))==null?void 0:s(t))??t}function N7e(t,e){var n;return(((n=t.keyframes)==null?void 0:n.keyframes)??[]).filter(r=>e in r.properties).map(r=>({percentage:r.percentage,value:r.properties[e],ease:r.ease}))}function D7e(t,e){return typeof t.value!="number"||typeof e.value!="number"||t.percentage===e.percentage?null:{from:t.value,to:e.value}}function I7e(t,e,n){const r=N7e(t,e),i=r.filter(l=>l.percentage<=n).at(-1),s=r.find(l=>l.percentage>=n);if(!i)return s==null?void 0:s.value;if(!s)return i.value;const a=D7e(i,s);if(!a)return i.value;const o=(n-i.percentage)/(s.percentage-i.percentage);return a.from+(a.to-a.from)*M7e(o,t,s.ease)}function _7e(t,e,n){var s;const r=new Set;for(const a of((s=t.keyframes)==null?void 0:s.keyframes)??[])for(const o of Object.keys(a.properties))al(o)===e&&r.add(o);const i={};for(const a of r){const o=I7e(t,a,n);o!==void 0&&(i[a]=o)}return i}function R7e(t,e){var r,i;if(t==="visual"&&("opacity"in e||"autoAlpha"in e))return"Opacity";if(t!=="other")return`${((r=t[0])==null?void 0:r.toUpperCase())??""}${t.slice(1)}`;const n=Object.keys(e)[0];return n?`${((i=n[0])==null?void 0:i.toUpperCase())??""}${n.slice(1)}`:"Other"}function j7e(t){return Object.values(t).map(e=>typeof e=="number"?gA(e):e).join(", ")}function L7e(t){const e=t.x,n=t.y;return typeof e=="number"&&typeof n=="number"?`${gA(e)}, ${gA(n)}`:null}function F7e(t){return typeof t.rotation=="number"?`${gA(t.rotation)}°`:null}function $7e(t){const e=t.opacity??t.autoAlpha;return typeof e=="number"?`${gA(Math.abs(e)<=1?e*100:e)}%`:null}const MM={position:L7e,rotation:F7e,visual:$7e};function eW(t,e){var n;return((n=MM[t])==null?void 0:n.call(MM,e))??j7e(e)}function B7e(t,e){return t.keyframes.reduce((n,r)=>!n||Math.abs(r.percentage-e)<Math.abs(n.percentage-e)?r:n,null)}function V7e(t,e){return t.find(n=>{const r=ai(n);return r!==null&&MS(e,r,Yi(n))})}function H7e(t,e,n,r){var s;const i=((s=e.currentKeyframe)==null?void 0:s.animationId)??(n==null?void 0:n.animationId);return r??t.animations.find(a=>a.id===i)}function Q7e(t,e,n,r,i){var s;return((s=t.currentKeyframe)==null?void 0:s.tweenPercentage)??(e?Wce(r,e):null)??xL(n,i)}function z7e(t,e,n,r,i){return t?{animationId:t.id,propertyGroup:e.group,tweenPercentage:n,properties:r,remove:i.currentKeyframe!==null}:null}function Z7e(t,e,n){const r=Zoe(t.keyframes,n),i=B7e(t,n),s=V7e(t.animations,e),a=H7e(t,r,i,s),o=t.keyframes.filter(u=>u.animationId===(a==null?void 0:a.id)),l=Q7e(r,a,o,e,n),c=a?_7e(a,t.group,l):{};return{navigation:r,values:c,label:R7e(t.group,c),toggleTarget:z7e(a,t,l,c,r)}}function G7e({navigation:t,label:e,expandedElement:n,onSeek:r,children:i}){const s="relative h-5 w-3 border-0 bg-transparent p-0 text-white/55 hover:text-white disabled:text-white/15 focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-['']",a=o=>{o&&(r==null||r(n.start+o.percentage/100*n.duration))};return d.jsxs("span",{className:"flex shrink-0 items-center gap-0.5",children:[d.jsx("button",{type:"button","aria-label":`Previous ${e} keyframe`,disabled:!t.prevKeyframe,className:s,onClick:o=>{o.stopPropagation(),a(t.prevKeyframe)},children:"‹"}),i,d.jsx("button",{type:"button","aria-label":`Next ${e} keyframe`,disabled:!t.nextKeyframe,className:s,onClick:o=>{o.stopPropagation(),a(t.nextKeyframe)},children:"›"})]})}function U7e({lanesId:t,lane:e,laneIndex:n,isLastLane:r,expandedElement:i,currentTime:s,clipPercentage:a,gutterBackground:o,columnWidth:l,onTogglePropertyGroupKeyframe:c,onSeek:u,rovingTargetId:f=null}){const h=i.key??i.id,{navigation:m,values:y,label:p,toggleTarget:v}=Z7e(e,s,a);return d.jsxs("div",{id:G6(t,lv(h,e.group),"header"),"data-timeline-focus-id":lv(h,e.group),"data-timeline-element-id":h,tabIndex:f===lv(h,e.group)?0:-1,"data-property-group":e.group,"data-timeline-lane-top":jg(n),className:"absolute left-0 flex items-center gap-1 overflow-hidden px-1.5 text-[10px] text-white/65",style:{top:jg(n),width:l,height:Rg,background:o},children:[d.jsxs("span",{className:"relative h-full w-3 shrink-0","aria-hidden":"true",children:[d.jsx("span",{className:"absolute left-1.5 top-0 w-px bg-white/15",style:{height:r?"50%":"100%"}}),d.jsx("span",{className:"absolute left-1.5 top-1/2 h-px w-1.5 bg-white/15"})]}),d.jsx("span",{className:"w-[46px] shrink-0 truncate text-white",title:p,children:p}),d.jsx(G7e,{navigation:m,label:p,expandedElement:i,onSeek:u,children:d.jsx("button",{type:"button","aria-pressed":!!m.currentKeyframe,"aria-label":`${m.currentKeyframe?"Remove":"Add"} ${p} keyframe`,title:`${m.currentKeyframe?"Remove":"Add"} ${p} keyframe`,className:"flex h-6 w-6 shrink-0 items-center justify-center border-0 bg-transparent p-0 text-[11px] text-[#3CE6AC] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",onClick:b=>{b.stopPropagation(),v&&(c==null||c(i,v))},children:m.currentKeyframe?"◆":"◇"})}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-right tabular-nums text-white/45",title:eW(e.group,y),children:eW(e.group,y)})]})}function X7e({target:t,label:e,name:n,param:r,alsoAutomatedBy:i,top:s,isLastLane:a,gutterBackground:o,columnWidth:l,onRemove:c,isCarve:u,onReveal:f}){return d.jsxs("div",{"data-automation-lane-label":e,"data-timeline-lane-top":s,className:"absolute left-0 flex items-center gap-1 overflow-hidden px-1.5 text-[10px] text-white/65",style:{top:s,width:l,height:_d,background:o},children:[d.jsxs("span",{className:"relative h-full w-3 shrink-0","aria-hidden":"true",children:[d.jsx("span",{className:"absolute left-1.5 top-0 w-px bg-white/15",style:{height:a?"50%":"100%"}}),d.jsx("span",{className:"absolute left-1.5 top-1/2 h-px w-1.5 bg-white/15"})]}),d.jsxs("button",{type:"button",tabIndex:-1,"aria-label":f?`Show ${e} in the effect rack`:void 0,title:f?`Show ${e} in the effect rack`:e,disabled:!f,className:"flex min-w-0 flex-1 flex-col justify-center rounded border-0 bg-transparent p-0 text-left leading-tight enabled:hover:text-white focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),f==null||f()},children:[d.jsx("span",{"data-automation-lane-name":"",className:"truncate font-mono text-[9px] text-white/70",children:n}),r?d.jsx("span",{"data-automation-lane-param":"",className:"truncate font-mono text-[9px] text-white/40",children:r}):null,i?d.jsxs("span",{"data-automation-lane-also":"",className:"truncate text-[9px] text-[#F5C542]/80",title:`${i} is also fading this — the two multiply.`,children:[i," is also fading this."]}):null]}),c&&t!==null&&!u&&d.jsx("button",{type:"button","aria-label":`Remove ${e} automation`,title:`Remove ${e} automation`,className:"flex h-6 w-6 shrink-0 items-center justify-center border-0 bg-transparent p-0 text-[11px] text-white/35 hover:text-white focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),c(t)},children:"×"})]})}const W7e="#3CE6AC59",q7e=14,tW="rgba(255,255,255,0.035)";function h8(t,e){return e?`linear-gradient(${tW}, ${tW}), ${t}`:t}function Y7e({trackNumber:t,trackDisplayNumber:e,trackLabel:n,lanesId:r,contentOrigin:i,keyframeClip:s,trackElements:a,clipCount:o,isExpanded:l,animations:c,currentTime:u,isTrackHidden:f,isAudioTrack:h,isGroupMember:m=!1,theme:y,onToggleClipExpanded:p,onToggleTrackHidden:v,onTogglePropertyGroupKeyframe:b,onRemoveAutomationLane:w,onSeek:O,rovingTargetId:C=null}){const E=s?(u-s.start)/s.duration*100:0,M=s?qL(c,Yce(s),s.duration):[],N=i>=Vo,_=s?s.key??s.id:null,I=x.useMemo(()=>{var ye;return(ye=a.find(fe=>fe.audioGroup))==null?void 0:ye.audioGroup},[a]),j=x.useMemo(()=>{var ye;return(ye=a.find(fe=>fe.audioGroupLabel))==null?void 0:ye.audioGroupLabel},[a]),L=x.useMemo(()=>{var ye;return(ye=a.find(fe=>fe.audioGroupAutomation))==null?void 0:ye.audioGroupAutomation},[a]),H=x.useMemo(()=>{var ye;return(ye=a.find(fe=>fe.audioGroupFxChain))==null?void 0:ye.audioGroupFxChain},[a]),$=x.useMemo(()=>new Set(qf(I?[{id:I,tag:"audio",start:0,duration:0,track:0,...L?{automation:L}:{},...H?{fxChain:H}:{}}]:[]).map(ye=>ye.key)),[L,H,I]),G=ce(ye=>ye.setRevealedAudioFxTarget),q=s?$6(s):null,Y=x.useMemo(()=>qf(a).map(ye=>{const fe=ye.entries.find(me=>(me.element.key??me.element.id)===_);return{key:ye.key,label:ye.key,name:ye.name,param:ye.param,target:(fe==null?void 0:fe.lane.target)??null,isCarve:(()=>{const me=fe??ye.entries[0];return me?F_(me.lane.target,s3(me.element)):!1})()}}),[_,a]),J=M.length>0||Y.length>0,ie=!!s&&J&&!h,te=o>1?`Track${u3(e)}`:(s==null?void 0:s.label)??(s==null?void 0:s.domId)??(s==null?void 0:s.id)??n,{onGroupClips:ne,onSetElementAttributeLive:W,onSetElementAttributeQuiet:F}=wS(),U=IS(),Q=h&&o===1&&a.length>0?a[0]:null,K=a.some(ye=>ye.audioGroup),ee=!h&&a.some(ye=>ye.tag.toLowerCase()==="video"),se=(ye,fe,me)=>{const Te=fe.nodes.length?wu(fe):null;me?W==null||W(ye,qs,Te):F==null||F(ye,qs,Te,"Apply preset")},z=ye=>{U==null||U.handleTimelineElementSelect(ye)},V=a.map($6),ae=V.every(ye=>ye!==null)?V:null,he=((ae==null?void 0:ae.length)??0)>=2,ge=ye=>{var me;const fe=(me=U==null?void 0:U.previewIframeRef.current)==null?void 0:me.contentDocument;!fe||!ne||!ae||ae.length<2||ne(ae,Wfe(fe),ye)};return d.jsxs("div",{role:"rowheader","aria-colindex":1,className:"sticky left-0 z-[12] shrink-0",style:{width:N?Vo:i,background:h8(y.gutterBackground,m),borderRight:`1px solid ${y.gutterBorder}`,...m?{borderLeft:`2px solid ${W7e}`,paddingLeft:q7e}:{}},children:[ie?d.jsx(d.Fragment,{children:d.jsx(P7e,{name:te,clipCount:o,isExpanded:l,gutterBackground:h8(y.gutterBackground,m),columnWidth:N?Vo:i,lanesId:r,onToggleClipExpanded:p,children:d.jsx(Xfe,{hidden:f,trackNumber:t,trackDisplayNumber:e,visible:!h||f,onToggle:v})})}):d.jsx(d.Fragment,{children:d.jsx("div",{className:N?"flex flex-col justify-center gap-0.5 px-1.5 text-white/55":"flex flex-col items-center justify-center gap-0.5",style:{height:Xi},children:d.jsx(W9e,{trackNumber:t,trackDisplayNumber:e,trackLabel:n,clipCount:o,showTrackLabel:N,isTrackHidden:f,isAudioTrack:h,onToggleTrackHidden:v,trailing:d.jsxs(d.Fragment,{children:[Q&&d.jsx(V_,{variant:"chain",fxChainRaw:Q.fxChain,trackKind:M0(Q.id,Q.src),onChainChange:ye=>se(Q,ye,!1),onChainPreview:ye=>se(Q,ye,!0),auditionSpans:[Q],isMuted:f,onSetMutedLive:ye=>W==null?void 0:W(Q,"data-hidden",ye?"":null),onOpenRack:()=>z(Q)}),o>1&&!K&&(h?he:ee)&&d.jsx(V_,{variant:"group-pointer",clipCount:a.length,defaultLabel:n,refusal:h?void 0:"Video audio can't be grouped yet — only audio clips can join a group.",onGroupClips:ge}),J&&d.jsx(ihe,{name:te,isExpanded:l,lanesId:r,onToggle:p})]})})})}),l&&s&&M.map((ye,fe)=>d.jsx(U7e,{lanesId:r,lane:ye,laneIndex:fe,isLastLane:fe===M.length-1&&Y.length===0,expandedElement:s,currentTime:u,clipPercentage:E,gutterBackground:h8(y.gutterBackground,m),columnWidth:N?Vo:i,onTogglePropertyGroupKeyframe:b,onSeek:O,rovingTargetId:C},ye.group)),l&&Y.map((ye,fe)=>{const me=ye.target;return d.jsx(X7e,{target:ye.target,label:ye.label,name:ye.name,param:ye.param,alsoAutomatedBy:$.has(ye.key)?j??I:void 0,top:jg(M.length)+fe*_d,isLastLane:fe===Y.length-1,gutterBackground:h8(y.gutterBackground,m),columnWidth:N?Vo:i,onRemove:w,isCarve:ye.isCarve,onReveal:me&&q&&s?()=>{z(s),G({elementKey:q,automationTarget:me})}:void 0},ye.key)})]})}function she({index:t,rowKey:e,logicalRow:n,propertyRows:r,lanesId:i,headerLanesId:s,top:a,height:o,virtualized:l,background:c,borderColor:u,rovingTargetId:f=null,children:h}){return d.jsxs("div",{role:"rowgroup","data-index":t,"data-timeline-row":t,"data-timeline-row-key":e,className:l?"absolute left-0 right-0":"relative",style:{top:l?a:void 0,height:o,background:c,borderBottom:`1px solid ${u}`},children:[d.jsx("div",{role:"row","aria-rowindex":n.logicalIndex+1,"aria-level":n.level,"aria-expanded":n.expandable?n.expanded:void 0,"data-timeline-logical-row-id":n.id,"data-timeline-focus-id":n.id,tabIndex:f===n.id?0:-1,className:"flex",style:{height:o},children:h}),r.map(m=>{const y=m.propertyGroup,p=m.items.filter(b=>b.kind==="keyframe").length,v=m.items.filter(b=>b.kind==="ease").length;return d.jsxs("div",{role:"row","aria-rowindex":m.logicalIndex+1,"aria-level":m.level,"data-property-group":y,"data-timeline-logical-row-id":m.id,className:"sr-only",children:[d.jsx("div",{role:"rowheader","aria-colindex":1,"aria-owns":G6(s,m.id,"header"),children:y}),d.jsxs("div",{role:"gridcell","aria-colindex":2,"aria-owns":G6(i,m.id,"content"),children:[p," keyframes, ",v," ease controls"]})]},m.id)})]})}function K7e({label:t,memberCount:e,onOpenFxRack:n}){return d.jsxs("button",{type:"button",tabIndex:-1,"aria-label":`Open ${t} effects`,title:"Open effects",className:"flex h-6 min-w-0 items-center gap-1.5 rounded border-0 bg-transparent p-0 text-left text-[11px] text-white hover:text-[#3CE6AC] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",onPointerDown:r=>r.stopPropagation(),onClick:r=>{r.stopPropagation(),n()},children:[d.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-[12px] leading-none text-white/50",children:"▤"}),d.jsx("span",{className:"min-w-0 break-words text-left font-medium leading-tight",children:t}),d.jsx("span",{className:"shrink-0 rounded-full bg-white/10 px-1 text-[9px] leading-[14px] tabular-nums text-white/55","aria-hidden":"true",title:`${e} tracks`,children:e})]})}function J7e({label:t,memberCount:e,isExpanded:n,onToggleExpanded:r,laneCount:i,isLaneOpen:s,onToggleLanes:a,fxChain:o,onFxChainChange:l,onFxChainPreview:c,auditionSpans:u,onOpenFxRack:f,columnWidth:h,theme:m}){return d.jsxs("div",{role:"rowheader","aria-colindex":1,className:"sticky left-0 z-[12] flex shrink-0 items-center gap-1.5 overflow-hidden px-1.5 text-[11px]",style:{width:h,height:Xi,color:"#ffffff",background:m.gutterBackground,borderRight:`1px solid ${m.gutterBorder}`},children:[d.jsx("button",{type:"button",tabIndex:-1,"aria-expanded":n,"aria-label":`${n?"Hide":"Show"} ${t} tracks`,title:`${n?"Hide":"Show"} tracks`,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 font-mono text-[13px] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${n?"text-white":"text-white/55 hover:text-white"}`,onPointerDown:y=>y.stopPropagation(),onClick:y=>{y.stopPropagation(),r()},children:d.jsx("span",{"aria-hidden":"true",children:n?"▾":"▸"})}),d.jsx(K7e,{label:t,memberCount:e,onOpenFxRack:f}),d.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5",children:[d.jsx(V_,{fxChainRaw:o,onChainChange:l,onChainPreview:c,auditionSpans:u,onOpenRack:f}),i>0&&d.jsxs("button",{type:"button",tabIndex:-1,"aria-expanded":s,"aria-label":`${s?"Hide":"Show"} ${t} lanes`,title:`${s?"Hide":"Show"} lanes`,className:`ml-auto flex h-6 items-center justify-center gap-0.5 rounded border-0 bg-transparent px-1 text-[11px] leading-none focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${s?"text-[#3CE6AC]":"text-white/55 hover:text-white"}`,onPointerDown:y=>y.stopPropagation(),onClick:y=>{y.stopPropagation(),a()},children:[d.jsx("span",{"aria-hidden":"true",children:"∿"}),d.jsx("span",{className:"text-[9px] tabular-nums text-white/55",children:i})]})]})]})}function ahe(t,e){return{id:t.id,domId:t.id,label:t.label,tag:"audio",start:0,duration:e,track:t.anchorKey,...t.automation?{automation:t.automation}:{},...t.fxChain?{fxChain:t.fxChain}:{}}}const eje=33;function gF(){const t=ce(i=>i.currentTime),e=ce(i=>i.isPlaying),n=x.useRef(t),[,r]=x.useState(0);return e||(n.current=t),x.useEffect(()=>{if(!e)return;let i=0;const s=ba.subscribe(a=>{n.current=a,i||(i=setTimeout(()=>{i=0,r(o=>o+1)},eje))});return()=>{s(),i&&clearTimeout(i)}},[e]),e?n.current:t}function tje({groupElement:t,groupLabel:e,top:n,columnWidth:r,gutterBackground:i,accentColor:s,onReveal:a}){const o=gF(),l=qf([t]);return d.jsx(d.Fragment,{children:l.map((c,u)=>{var y;const f=(y=c.entries[0])==null?void 0:y.lane;if(!f)return null;const h={name:c.name,param:c.param},m=Gf(f,o);return d.jsxs("button",{type:"button",tabIndex:-1,"data-group-lane-label":f.target,"aria-label":`Show ${e} ${h.name}${h.param?` ${h.param}`:""} in the effect rack`,className:"absolute left-0 flex items-center gap-1.5 overflow-hidden border-0 px-1.5 text-left text-[10px] text-white/65 hover:text-white focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC]",style:{top:n+u*_d,width:r,height:_d,background:i,borderLeft:`2px solid ${s}`},title:`${e} · ${h.param?`${h.name} · ${h.param}`:h.name}`,onPointerDown:p=>p.stopPropagation(),onClick:p=>{p.stopPropagation(),a==null||a(f.target)},children:[d.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-[11px] text-white/40",children:"▤"}),d.jsxs("span",{className:"flex min-w-0 flex-1 flex-col justify-center leading-tight",children:[d.jsx("span",{className:"truncate font-mono text-[9px] text-white/70",children:h.name}),h.param?d.jsx("span",{className:"truncate font-mono text-[9px] text-white/40",children:h.param}):null]}),d.jsx("span",{className:"shrink-0 font-mono text-[9px] tabular-nums text-white/55",children:m.toFixed(2)})]},f.target)})})}const nW="#3CE6AC";function nje({index:t,rowKey:e,group:n,logicalRow:r,top:i,height:s,virtualized:a,contentOrigin:o,theme:l,rovingTargetId:c=null,collapsedGroupIds:u,expandedLaneOwnerIds:f,toggleGroupExpanded:h,toggleLaneOwnerExpanded:m,lanes:y,pps:p,currentTime:v,compositionDuration:b,beatTimes:w,contentGutter:O,trackContentWidth:C}){var Y;const E=n.memberElements,M=ahe(n,b),N=((Y=pue())==null?void 0:Y.domEditSelection)??null,_=(N==null?void 0:N.id)===n.id,I=f.has(n.id),{onSetAudioGroupAttributeLive:j,onSetAudioGroupAttributeQuiet:L}=wS(),H=IS(),$=ce(J=>J.setRevealedAudioFxTarget),G=(J,ie)=>{const te=J.nodes.length?wu(J):null;ie?j==null||j(n.id,qs,te):L==null||L(n.id,qs,te,"Apply preset")},q=J=>{const ie=H==null?void 0:H.handleTimelineElementSelect(M);!ie||!J||ie.then(()=>$({elementKey:n.id,automationTarget:J}))};return d.jsxs(she,{index:t,rowKey:e,logicalRow:r,propertyRows:[],lanesId:"",headerLanesId:"",top:i,height:s,virtualized:a,background:l.rowBackground,borderColor:l.rowBorder,rovingTargetId:c,children:[d.jsxs("div",{className:"sticky left-0 z-[12] shrink-0",style:{width:o>=Vo?Vo:o},children:[d.jsx(J7e,{label:n.label,memberCount:n.memberTracks.length,isExpanded:!u.has(n.id),onToggleExpanded:()=>h(n.id),laneCount:qf([M]).length,isLaneOpen:I,onToggleLanes:()=>m(n.id),fxChain:n.fxChain,onFxChainChange:J=>G(J,!1),onFxChainPreview:J=>G(J,!0),auditionSpans:E,onOpenFxRack:()=>q(),columnWidth:o>=Vo?Vo:o,theme:l}),I&&d.jsx(tje,{groupElement:M,groupLabel:n.label,top:Xi,columnWidth:o>=Vo?Vo:o,gutterBackground:l.gutterBackground,accentColor:nW,onReveal:q})]}),I&&d.jsx("div",{role:"gridcell","aria-colindex":2,style:{width:C,marginLeft:O},className:"relative",children:d.jsx(due,{elements:[M],isSelected:()=>_,lanes:y,pps:p,laneCount:0,topOffset:Xi,accentColor:nW,currentTime:v,beatTimes:w})})]})}function rje(){return{collapsedGroupIds:ce(t=>t.collapsedGroupIds),expandedLaneOwnerIds:ce(t=>t.expandedLaneOwnerIds),toggleGroupExpanded:ce(t=>t.toggleGroupExpanded),toggleLaneOwnerExpanded:ce(t=>t.toggleLaneOwnerExpanded)}}function ije(t,e){const n=x.useMemo(()=>{const i=new Map;for(const s of t){const a=i.get(s.physicalTrackKey)??[];a.push(s),i.set(s.physicalTrackKey,a)}return i},[t]),r=x.useMemo(()=>new Map(e.map(i=>[i.anchorKey,i])),[e]);return{logicalRowsByTrack:n,groupByAnchor:r}}function sje(){const t=ce(i=>i.expandedClipIds),e=ce(i=>i.expandClips),n=ce(i=>i.setClipExpanded),r=ce(i=>i.toggleClipExpanded);return{toggleRowExpanded:i=>{const s=!i.some(a=>t.has(a));if(QZ({expanded:s}),s)e(i);else for(const a of i)n(a,!1)},toggleClipExpanded:i=>{QZ({expanded:!t.has(i)}),r(i)}}}function ohe(t){return M3e()}function aje(t){const e=new Map,n=new Map,r=new Map,i=new Map,s=new Map,a=new Map,o=new Map;for(const[l,c]of t){const u=c.find(h=>h.audioGroup);if(!(u!=null&&u.audioGroup))continue;e.set(l,u.audioGroup),r.has(u.audioGroup)||(r.set(u.audioGroup,u.audioGroupLabel??u.audioGroup),i.set(u.audioGroup,u.audioGroupVolume??1),s.set(u.audioGroup,u.audioGroupHidden??!1),a.set(u.audioGroup,u.audioGroupFxChain),o.set(u.audioGroup,u.audioGroupAutomation));const f=n.get(u.audioGroup)??[];f.push(l),n.set(u.audioGroup,f)}return{trackToGroupId:e,memberTracksByGroup:n,labelByGroup:r,volumeByGroup:i,hiddenByGroup:s,fxChainByGroup:a,automationByGroup:o}}function oje(t,e,n,r){const i=[...n.memberTracksByGroup.get(t)??[]].sort((o,l)=>o-l),s=n.fxChainByGroup.get(t),a=n.automationByGroup.get(t);return{id:t,label:n.labelByGroup.get(t)??t,anchorKey:(i[0]??e)-.5,memberTracks:i,memberElements:i.flatMap(o=>r.get(o)??[]),volume:n.volumeByGroup.get(t)??1,hidden:n.hiddenByGroup.get(t)??!1,...s?{fxChain:s}:{},...a?{automation:a}:{}}}function lje(t,e,n,r,i){r.push([t.anchorKey,[]]);for(const s of t.memberTracks)n.set(s,t),i&&r.push([s,e.get(s)??[]])}function cje(t,e){const n=aje(t),r=new Map(t),i=[],s=new Map,a=new Set,o=[];for(const[l,c]of t){const u=n.trackToGroupId.get(l);if(!u){o.push([l,c]);continue}if(a.has(u))continue;a.add(u);const f=oje(u,l,n,r);i.push(f),lje(f,r,s,o,!e.has(u))}return{tracks:o,groups:i,trackGroupOf:s}}function uje(t){const e=x.useMemo(()=>{const l=new Map;for(const c of t){const u=l.get(c.track)??[];u.push(c),l.set(c.track,u)}return Array.from(l.entries()).sort(([c],[u])=>c-u)},[t]),n=ce(l=>l.collapsedGroupIds),{tracks:r,groups:i,trackGroupOf:s}=x.useMemo(()=>cje(e,n),[e,n]),a=x.useMemo(()=>{var c;const l=new Map;for(const[u,f]of r)l.set(u,ohe(((c=f[0])==null?void 0:c.tag)??""));return l},[r]),o=x.useMemo(()=>r.map(([l])=>l),[r]);return{tracks:r,trackStyles:a,trackOrder:o,groups:i,trackGroupOf:s}}function fje(t){return qf([ahe(t,0)]).length}function hje(t,e,n){return((e==null?void 0:e.length)??0)<2?!1:n.selectedElementId?t.some(r=>(r.key??r.id)===n.selectedElementId):t.some(r=>n.isMusicTrack(r))}function dje(t){return nl(t)?cue(t).length:0}function pje(t){return qf(t).length}function mje(t,e){return t.some(n=>e.has(n.key??n.id))}function yF(t,e,n,r,i=dje){const s=l=>(e.get(l.key??l.id)??0)+i(l),a=t.filter(l=>s(l)>=1);if(a.length===0)return null;const o=a.find(l=>{const c=l.key??l.id;return c===n||r.has(c)});return o||a.reduce((l,c)=>s(c)>s(l)?c:l)}function gje(t,e){const n=new Map;for(const[,r]of t)for(const i of r){const s=i.key??i.id,a=new Set;for(const o of e.get(s)??[])for(const l of r3(o))a.add(l);n.set(s,a.size)}return n}function yje(t,e,n,r){if(n.length===0)return e;const i=new Map(n.map(s=>[s.anchorKey,s]));return t.map(([s],a)=>{const o=i.get(s);return!o||!r.has(o.id)?e[a]??Xi:Xi+fje(o)*_d})}function xje(t,e,n,r,i){const s=ce(u=>u.expandedClipIds),a=ce(u=>u.expandedLaneOwnerIds),{laneCounts:o,rowGeometry:l}=x.useMemo(()=>{const u=gje(t,e),f=t.map(([,m])=>{const y=yF(m,u,n,r);if(!y)return[];const p=y.key??y.id,v=m.find(b=>s.has(b.key??b.id));return[{clipId:v?v.key??v.id:p,laneCount:u.get(p)??0,automationLaneCount:pje(m)}]}),h=yje(t,Y3e(f,s),i,a);return{laneCounts:u,rowGeometry:Kj(t.map(([m])=>m),h)}},[s,a,e,i,t,n,r]),c=x.useRef(l);return c.current=l,{laneCounts:o,rowGeometry:l,rowGeometryRef:c,rowHeights:l.rowHeights}}function bje(t,e,n,r){const{tracks:i,trackStyles:s,trackOrder:a,groups:o,trackGroupOf:l}=uje(t),c=x.useRef(a);c.current=a;const{laneCounts:u,rowGeometry:f,rowGeometryRef:h,rowHeights:m}=xje(i,e,n,r,o);return{tracks:i,trackStyles:s,trackOrder:a,trackOrderRef:c,laneCounts:u,rowGeometry:f,rowGeometryRef:h,rowHeights:m,groups:o,trackGroupOf:l}}function vje(t,e){return x.useMemo(()=>t.map(n=>{const r=e.getRowIndex(n);return r<0?Xi:e.getRowHeight(r)}),[t,e])}function Aje(t,e){return x.useMemo(()=>{if(!(t!=null&&t.started)||e.includes(t.previewTrack))return e;const n=t.previewTrack,r=[];let i=!1;for(const s of e)!i&&Number.isInteger(s)&&s>n&&(r.push(n),i=!0),r.push(s);return i||r.push(n),r},[t,e])}function Sje(t,e,n){const r=Aje(t,e),i=vje(r,n),s=x.useMemo(()=>Kj(r,i),[r,i]);return{displayTrackOrder:r,displayRowHeights:s.rowHeights,rowGeometry:s,totalH:s.canvasHeight}}function xF(t){return t.dragStarted&&t.selectedKeys.size>1&&t.selectedKeys.has(t.draggedKey)}function lhe(t){return xF(t)?t.draggedPreviewStart-t.draggedOriginStart:0}function che(t,e){return xF(e)&&t!==e.draggedKey&&e.selectedKeys.has(t)}function wje(t,e,n){if(!che(t,n))return 0;const r=Number.isFinite(e)?e:0;return lhe(n)*r}function Oje(t,e){if(e.length===0)return t;const n=Math.min(...e),r=n===0?0:-n;return t<r?r:t}function kje(t,e,n){const r=t&&xF(t)?lhe(t):0;return e&&t&&r!==0?[{range:{start:n.start-r,end:n.end-r},identities:t.selectedKeys}]:[]}function pa(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rW(t,e){return e==='"'?t.replace(/"/g,"&quot;"):t.replace(/'/g,"&#39;")}function bF(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Cje(t){return t.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function Eje(t){const e=[];let n="",r=null,i=!1,s=0;for(const a of t){if(i){n+=a,a===";"&&(i=!1);continue}if(a==="&"){i=!0,n+=a;continue}if(r){n+=a,a===r&&(r=null);continue}if(a==='"'||a==="'"){r=a,n+=a;continue}if(a==="("){s+=1,n+=a;continue}if(a===")"){s=Math.max(0,s-1),n+=a;continue}if(a===";"&&s===0){e.push(n),n="";continue}n+=a}return n&&e.push(n),e}function Tje(t,e,n,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${pa(e)}\\2[^>]*)>`,"i").exec(t);if(!s)return t;const a=s[1];return uhe(t,a,n,r)}function uhe(t,e,n,r){if(!e)return t;const i=/\bstyle=(")([^"]*)"|\bstyle=(')([^']*)'/.exec(e);if(i){const s=i[2]??i[4],a=i[1]??i[3],o=new Map;for(const u of Eje(s)){const f=u.indexOf(":");if(f<0)continue;const h=u.slice(0,f).trim(),m=u.slice(f+1).trim();h&&o.set(h,m)}r===null?o.delete(n):o.set(n,r);const l=Array.from(o.entries()).map(([u,f])=>`${u}: ${rW(f,a)}`).join("; "),c=e.replace(i[0],`style=${a}${l}${a}`);return t.replace(e,c)}else{if(r===null)return t;const s=e.endsWith("/"),o=`${s?e.slice(0,-1).trimEnd():e} style="${n}: ${rW(r,'"')}"${s?" /":""}`;return t.replace(e,o)}}function Pje(t,e,n,r){const i=Kf(t,e);if(!i)return t;const s=uhe(i.tag,i.tag,n,r);return hv(t,i,s)}function hv(t,e,n){return`${t.slice(0,e.start)}${n}${t.slice(e.end)}`}function NM(t,e,n){const i=new RegExp(`(<[^>]*\\b${e}=(["'])${pa(n)}\\2[^>]*)>`,"i").exec(t);return(i==null?void 0:i.index)==null?null:{tag:i[1],start:i.index,end:i.index+i[1].length}}function Mje(t,e){var l;const n=(l=e.selector)==null?void 0:l.match(/^\.([a-zA-Z0-9_-]+)$/);if(!n)return null;const r=n[1],i=new RegExp(`(<[^>]*\\bclass=(["'])[^"']*\\b${pa(r)}\\b[^"']*\\2[^>]*)>`,"gi"),s=e.selectorIndex??0;let a,o=0;for(;(a=i.exec(t))!==null;){if(o===s&&a.index!=null)return{tag:a[1],start:a.index,end:a.index+a[1].length};o+=1}return null}function Kf(t,e){if(e.hfId){const r=NM(t,"data-hf-id",e.hfId);if(r)return r}if(e.id){const r=NM(t,"id",e.id);if(r)return r}if(!e.selector)return null;const n=e.selector.match(/^\[data-composition-id="([^"]+)"\]$/);if(n){const r=NM(t,"data-composition-id",n[1]);if(r)return r}return Mje(t,e)}function H_(t,e,n){const r=Kf(t,e);if(!r)return;const i=n.startsWith("data-")?n:`data-${n}`,s=new RegExp(`\\b${i}=(["'])([^"']*)\\1`).exec(r.tag);return(s==null?void 0:s[2])!=null?Cje(s[2]):void 0}function _S(t,e){const n=Kf(t,e);return n==null?void 0:n.tag}function Nje(t,e,n,r){const i=Kf(t,e);if(!i)return t;const s=n.startsWith("data-")?n:`data-${n}`,a=new RegExp(`\\b${pa(s)}=(["'])([^"']*)\\1`),o=i.tag;if(r===null){if(!new RegExp(`\\b${pa(s)}(?:=(["'])[^"']*\\1)?`).test(o))return t;const f=new RegExp(`\\s+${pa(s)}(?:=(["'])[^"']*\\1)?`),h=o.replace(f,"");return hv(t,i,h)}const l=bF(r);if(a.test(o)){const u=o.replace(a,`${s}="${l}"`);return hv(t,i,u)}const c=o+` ${s}="${l}"`;return hv(t,i,c)}function Dje(t,e,n,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${pa(e)}\\2[^>]*)>`,"i").exec(t);if(!s)return t;const a=s[1],o=n.startsWith("data-")?n:`data-${n}`,l=new RegExp(`\\b${pa(o)}=(["'])([^"']*)\\1`);if(r===null){if(!new RegExp(`\\b${pa(o)}(?:=(["'])[^"']*\\1)?`).test(a))return t;const f=new RegExp(`\\s+${pa(o)}(?:=(["'])[^"']*\\1)?`),h=a.replace(f,"");return t.replace(a,h)}const c=bF(r);if(l.test(a)){const u=a.replace(l,`${o}="${c}"`);return t.replace(a,u)}else{const u=a+` ${o}="${c}"`;return t.replace(a,u)}}function Ije(t,e,n){const i=new RegExp(`(<([a-z0-9-]+)[^>]*\\bid=(["'])${pa(e)}\\3[^>]*>)`,"i").exec(t);if(!i||i.index==null)return t;const s=i[1],a=i[2],o=i.index+s.length,l=fhe(t,a,o);return l<0?t:`${t.slice(0,o)}${n}${t.slice(l)}`}function fhe(t,e,n){const r=new RegExp(`</?${pa(e)}\\b[^>]*>`,"gi");r.lastIndex=n;let i=1,s;for(;(s=r.exec(t))!==null;){const a=s[0];if(a.startsWith("</")){if(i-=1,i===0)return s.index;continue}a.endsWith("/>")||(i+=1)}return-1}const _je=new Set(["loop","muted","autoplay","playsinline","controls","default","defer","disabled","hidden","nomodule","open","readonly","required","reversed","selected"]);function hhe(t,e,n,r){if(!e)return t;if(_je.has(n)){const l=pa(n),c=new RegExp(`(?:^|\\s)${l}(?:\\s|=|$)`).test(e);if(r===null||r===""||r==="false"){if(!c)return t;const f=new RegExp(`\\s+${l}(?:=(["'])[^"']*\\1)?`),h=e.replace(f,"");return t.replace(e,h)}if(c)return t;const u=e+` ${n}`;return t.replace(e,u)}const s=new RegExp(`\\b${pa(n)}=(["'])([^"']*)\\1`);if(r===null){if(!s.test(e))return t;const l=new RegExp(`\\s+${pa(n)}=(["'])[^"']*\\1`),c=e.replace(l,"");return t.replace(e,c)}const a=bF(r);if(s.test(e)){const l=e.replace(s,`${n}="${a}"`);return t.replace(e,l)}const o=e+` ${n}="${a}"`;return t.replace(e,o)}function Rje(t,e,n,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${pa(e)}\\2[^>]*)>`,"i").exec(t);return s?hhe(t,s[1],n,r):t}function jje(t,e,n,r){const i=Kf(t,e);if(!i)return t;const s=hhe(i.tag,i.tag,n,r);return hv(t,i,s)}function Lje(t,e,n){const r=Kf(t,e);if(!r)return t;const i=/^<([a-z0-9-]+)/i.exec(r.tag),s=i==null?void 0:i[1];if(!s)return t;const a=fhe(t,s,r.end+1);return a<0?t:`${t.slice(0,r.end+1)}${n}${t.slice(a)}`}function Fje(t,e,n){switch(n.type){case"inline-style":return Tje(t,e,n.property,n.value);case"attribute":return Dje(t,e,n.property,n.value);case"html-attribute":return Rje(t,e,n.property,n.value);case"text-content":return n.value!==null?Ije(t,e,n.value):t;default:return t}}function Sd(t,e,n){if(e.id){const r=Fje(t,e.id,n);if(r!==t||!e.selector)return r}switch(n.type){case"inline-style":return Pje(t,e,n.property,n.value);case"attribute":return Nje(t,e,n.property,n.value);case"html-attribute":return jje(t,e,n.property,n.value);case"text-content":return n.value!==null?Lje(t,e,n.value):t;default:return t}}const iW=new WeakMap;function RS(t,e,n){let r=iW.get(t);r||(r=new Map,iW.set(t,r));const s=(r.get(e)??Promise.resolve()).then(n,n);return r.set(e,s),s.then(()=>{(r==null?void 0:r.get(e))===s&&r.delete(e)},()=>{(r==null?void 0:r.get(e))===s&&r.delete(e)}),s}function vF(t,e,n){const r=[...new Set(e)].sort(),i=s=>{const a=r[s];return a===void 0?n():RS(t,a,()=>i(s+1))};return i(0)}const dhe="__studioSaveAttempt";class h0 extends Error{constructor(n,r,i={}){super(n);vt(this,"statusCode");vt(this,"alreadyToasted");this.name="StudioSaveHttpError",this.statusCode=r,this.alreadyToasted=i.alreadyToasted??!1}}class phe extends Error{constructor(e,n){super(e,n),this.name="StudioSaveNetworkError"}}class N0 extends h0{constructor(n){super(`Save conflict: ${n.filePath} changed outside this Studio session`,409);vt(this,"filePath");vt(this,"currentVersion");vt(this,"currentContent");vt(this,"attemptedContent");this.name="StudioFileConflictError",this.filePath=n.filePath,this.currentVersion=n.currentVersion,this.currentContent=n.currentContent,this.attemptedContent=n.attemptedContent}}function U4(t,e){const r=t[e];return typeof r=="number"&&Number.isFinite(r)?r:void 0}function mhe(){if(typeof DOMException<"u")return new DOMException("Save aborted","AbortError");const t=new Error("Save aborted");return t.name="AbortError",t}function sW(t){if(t!=null&&t.aborted)throw mhe()}function $je(t,e){if(!t||typeof t!="object")return t;try{Object.defineProperty(t,dhe,{value:e,configurable:!0})}catch{}return t}function ju(t){return t instanceof Error&&t.message?t.message:typeof t=="string"&&t.trim()?t:"Unknown save failure"}function aW(t){if(!t||typeof t!="object")return t;try{Object.defineProperty(t,"alreadyToasted",{value:!0,configurable:!0})}catch{}return t}function AF(t){if(!t||typeof t!="object")return!1;if(t.alreadyToasted===!0)return!0;const e=t.cause;return e!==t&&AF(e)}function yA(t){if(!t||typeof t!="object")return;const e=U4(t,"statusCode")??U4(t,"status")??U4(t,"status_code");if(e!=null)return e;const n=t.cause;if(n&&n!==t)return yA(n)}function ghe(t){if(!t||typeof t!="object")return;const e=U4(t,dhe);if(e!=null)return e;const n=t.cause;if(n&&n!==t)return ghe(n)}function Bje(t){return t instanceof Error&&t.name==="AbortError"}function Vje(t){if(Bje(t))return!1;if(t instanceof phe)return!0;const e=yA(t);return e==null?!1:e===408||e===425||e===429||e>=500}function SF(t){const e=t.statusCode??yA(t.error)??null,n=t.attempt??ghe(t.error)??void 0;return{source:t.source,error_message:ju(t.error),status_code:e,file_path:t.filePath??t.targetSourceFile??void 0,mutation_type:t.mutationType??void 0,attempt:n,label:t.label??void 0,target_id:t.targetId??void 0,target_selector:t.targetSelector??void 0,target_source_file:t.targetSourceFile??void 0}}function tm(t){Tt("save_failure",SF(t))}function Hje(t){Tt("edit_blocked",SF(t))}async function $d(t,e,n={}){let r="";try{r=await t.text()}catch{r=""}const i=r.trim().slice(0,300),s=i?`${e} (${t.status}): ${i}`:`${e} (${t.status})`;return new h0(s,t.status,n)}async function Qje(t,e={}){const n=e.retries??3,r=e.baseDelayMs??500,i=e.maxDelayMs??8e3,s=e.jitterRatio??.25,a=e.random??Math.random,o=e.shouldRetry??Vje,l=e.sleep??((u,f)=>new Promise((h,m)=>{sW(f);const y=()=>{globalThis.clearTimeout(p),m(mhe())},p=globalThis.setTimeout(()=>{f==null||f.removeEventListener("abort",y),h()},u);f==null||f.addEventListener("abort",y,{once:!0})})),c=n+1;for(let u=1;u<=c;u++)try{return sW(e.signal),await t(u)}catch(f){const h=$je(f,u);if(u>=c||!o(h,u))throw h;const m=u-1,y=Math.min(r*2**m,i),p=y*s,v=Math.round(y+(a()*2-1)*p),b=Math.max(0,Math.min(i,v));await l(b,e.signal)}throw new Error("Save retry loop exited unexpectedly")}async function wF(t,e){const n=await fetch(`/api/projects/${t}/files/${encodeURIComponent(e)}`);if(!n.ok)throw await $d(n,`Failed to read ${e}`);const r=await n.json();if(typeof r.content!="string")throw new Error(`Missing file contents for ${e}`);return r.content}async function ol({label:t,kind:e,coalesceKey:n,coalesceMs:r,files:i,readFile:s,writeFile:a,recordEdit:o,diskContent:l}){return vF(a,Object.keys(i),async()=>{const c={};for(const[h,m]of Object.entries(i)){const y=await s(h);y!==m&&(c[h]={before:y,after:m})}const u=Object.keys(c);if(u.length===0)return[];const f=[];try{for(const h of u)await a(h,c[h].after,(l==null?void 0:l[h])??c[h].before),f.push(h);await o({label:t,kind:e,coalesceKey:n,coalesceMs:r,files:c})}catch(h){try{for(const m of f.reverse())await a(m,c[m].before,c[m].after)}catch(m){throw new AggregateError([h,m],"Failed to save project files and rollback did not complete")}throw h}return u})}const zje=64,Zje=2,Gje="rec709",xA=16,yhe=4,zn={hueDegrees:{min:0,max:360},unit:{min:0,max:1},signedUnit:{min:-1,max:1},secondaryHueRange:{min:0,max:180},secondaryHueSoftness:{min:0,max:180},secondaryHueCombinedMax:180,secondarySoftRangeSoftness:{min:0,max:.5},secondaryHueShift:{min:-180,max:180},effects:{asciiStyle:{min:0,max:7},bloom:{min:0,max:3},bloomRadius:{min:1,max:100},monoScreenShape:{min:0,max:4}}},Uje=["exposure","contrast","highlights","shadows","whites","blacks","temperature","tint","vibrance","saturation"],Xje=["shadows","midtones","highlights"],Wje=["master","red","green","blue"],qje=["hueVsHue","hueVsSaturation","hueVsLuma"],Yje=["vignette","vignetteMidpoint","vignetteRoundness","vignetteFeather","grain","grainSize","grainRoughness"],Kje=["blur","pixelate","chromaBleed","tapeDamage","tapeTracking","tapeNoise","tapeSpeed","filmArtifacts","halftone","halftoneSize","twoInkPrint","twoInkPrintSize","ascii","asciiSize","asciiInvert","asciiStyle","asciiColor","asciiRotation","dither","ditherSize","bloom","bloomRadius","monoScreen","monoScreenSize","monoScreenAngle","monoScreenSpread","monoScreenShape","monoScreenInvert","scanlines","scanlineCount","scanlineSoftness","chromaticAberration","chromaticAngle","crtCurvature","digitalGlitch","digitalGlitchColorSplit","digitalGlitchLineTear","digitalGlitchPixelate","digitalGlitchBlockAmount","digitalGlitchBlockDisplacement","digitalGlitchBlockOpacity","digitalGlitchSpeed","engraving","engravingSpacing","engravingMinThickness","engravingMaxThickness","engravingAngle","engravingContrast","engravingSharpness","engravingWave","engravingWaveFrequency","crosshatch","crosshatchSpacing","crosshatchThickness","crosshatchAngle","crosshatchContrast","crosshatchEdges","crosshatchLineWeight","crosshatchWave","crosshatchWaveFrequency","kuwahara","kuwaharaRadius","kuwaharaSharpness","kuwaharaSaturation"],xhe=1024,bA=xA;function oW(t,e,n,r){const i=((2*t+e)*n-t*r)/(t+e);return Math.sign(i)!==Math.sign(n)?0:Math.sign(n)!==Math.sign(r)&&Math.abs(i)>3*Math.abs(n)?3*n:i}function Ts(t,e){const n=t[e];if(n===void 0)throw new RangeError("Color curve points must be contiguous");return n}function Jje(t){const e=[],n=[];let r=Ts(t,0);for(const a of t.slice(1)){const o=a[0]-r[0];e.push(o),n.push((a[1]-r[1])/o),r=a}const i=Ts(n,0);if(t.length===2)return[i,i];const s=new Array(t.length);s[0]=oW(Ts(e,0),Ts(e,1),i,Ts(n,1)),s[s.length-1]=oW(Ts(e,e.length-1),Ts(e,e.length-2),Ts(n,n.length-1),Ts(n,n.length-2));for(let a=1;a<t.length-1;a+=1){const o=Ts(n,a-1),l=Ts(n,a);if(o===0||l===0||Math.sign(o)!==Math.sign(l)){s[a]=0;continue}const c=Ts(e,a-1),u=Ts(e,a),f=2*u+c,h=u+2*c;s[a]=(f+h)/(f/o+h/l)}return s}function bhe(t,e){if(t.length<2)throw new RangeError("A color curve requires at least two points");if(!Number.isInteger(e)||e<2)throw new RangeError("Curve LUT size must be at least 2");let n=Number.NEGATIVE_INFINITY;for(const[r,i]of t){if(!Number.isFinite(r)||!Number.isFinite(i))throw new TypeError("Color curve points must be finite");if(r<=n)throw new RangeError("Color curve inputs must be strictly increasing");n=r}}function eLe(t,e,n){if(!Number.isFinite(e)||!Number.isFinite(n)||e>=n)throw new RangeError("Curve output bounds must be finite and increasing");if(t.some(([,r])=>r<e||r>n))throw new RangeError(`Curve outputs must be between ${e} and ${n}`)}function tLe(t,e,n,r,i){const s=n[0]-e[0],a=Math.min(1,Math.max(0,(t-e[0])/s)),o=a*a,l=o*a;return(2*l-3*o+1)*e[1]+(l-2*o+a)*s*r+(-2*l+3*o)*n[1]+(l-o)*s*i}function vhe(t,e,n,r,i){eLe(t,r,i);const s=Jje(t),a=new Float32Array(e);let o=0;for(let l=0;l<e;l+=1){const c=n(l);for(;o<t.length-2&&c>Ts(t,o+1)[0];)o+=1;const u=Ts(t,o),f=Ts(t,o+1),h=tLe(c,u,f,Ts(s,o),Ts(s,o+1));a[l]=Math.min(i,Math.max(r,h))}return a}function nLe(t,e=xhe){var n,r;if(bhe(t,e),t.length>bA)throw new RangeError(`A color curve supports at most ${bA} points`);if(t.some(([i])=>i<0||i>1))throw new RangeError("Color curve inputs must be between 0 and 1");if(((n=t[0])==null?void 0:n[0])!==0||((r=t[t.length-1])==null?void 0:r[0])!==1)throw new RangeError("Color curves must include input endpoints 0 and 1");return vhe(t,e,i=>i/(e-1),0,1)}function rLe(t,e,n,r=xhe){var l;if(t.length<3)throw new RangeError("A hue curve requires at least three points");if(t.length>bA)throw new RangeError(`A hue curve supports at most ${bA} points`);const i=[...t].sort((c,u)=>c[0]-u[0]);for(let c=0;c<i.length;c+=1){const u=i[c];if(!u||u[0]<0||u[0]>=360)throw new RangeError("Hue curve inputs must be from 0 up to 360 degrees");if(c>0&&u[0]===((l=i[c-1])==null?void 0:l[0]))throw new RangeError("Hue curve inputs must be unique")}const s=i.slice(-2).map(([c,u])=>[c-360,u]),a=i.slice(0,2).map(([c,u])=>[c+360,u]),o=[...s,...i,...a];return bhe(o,r),vhe(o,r,c=>c/r*360,e,n)}const iLe="data-color-grading",h3="data-hf-color-grading-source-hidden",sLe="data-hf-authored-opacity",aLe="__hf_color_grading_",Ahe=Gje,uk={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},fk={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},vA={blur:0,pixelate:0,chromaBleed:0,tapeDamage:0,tapeTracking:0,tapeNoise:1,tapeSpeed:.5,filmArtifacts:0,halftone:0,halftoneSize:0,twoInkPrint:0,twoInkPrintSize:0,ascii:0,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0,dither:0,ditherSize:0,bloom:0,bloomRadius:8,monoScreen:0,monoScreenSize:0,monoScreenAngle:0,monoScreenSpread:0,monoScreenShape:0,monoScreenInvert:0,scanlines:0,scanlineCount:0,scanlineSoftness:0,chromaticAberration:0,chromaticAngle:0,crtCurvature:0,digitalGlitch:0,digitalGlitchColorSplit:0,digitalGlitchLineTear:0,digitalGlitchPixelate:0,digitalGlitchBlockAmount:0,digitalGlitchBlockDisplacement:0,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:0,engraving:0,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9,crosshatch:0,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9,kuwahara:0,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5},She=[{id:"noir",label:"Noir",group:"Classic",colors:["#000000","#ffffff"]},{id:"ink-paper",label:"Ink & Paper",group:"Classic",colors:["#1a1a2e","#f5f5dc"]},{id:"terminal",label:"Terminal",group:"Classic",colors:["#001100","#00ff00"]},{id:"amber-glow",label:"Amber Glow",group:"Classic",colors:["#1a0f00","#ffcc00"]},{id:"handheld-green",label:"Handheld Green",group:"Classic",colors:["#0f380f","#306230","#8bac0f","#9bbc0f"]},{id:"golden-hour",label:"Golden Hour",group:"Mood",colors:["#1a1205","#4a3510","#8b6914","#d4a017","#fff8dc"]},{id:"deep-sea",label:"Deep Sea",group:"Mood",colors:["#0a1628","#1a3a5c","#2d6187","#5ba4c9","#a8dce8"]},{id:"arctic-night",label:"Arctic Night",group:"Mood",colors:["#0a0a14","#1a2a4a","#3a5a8a","#6a9aca","#cae8ff"]},{id:"synthwave",label:"Synthwave",group:"Mood",colors:["#120458","#7b2cbf","#e040fb","#ff6ec7","#fff59d"]},{id:"vaporwave",label:"Vaporwave",group:"Mood",colors:["#1a0a2e","#3d1a5c","#ff71ce","#01cdfe","#fffb96"]},{id:"forest",label:"Forest",group:"Mood",colors:["#1a2e1a","#2d4a2d","#4a7c4a","#7ab37a","#c8e6c8"]},{id:"sepia",label:"Sepia",group:"Mono",colors:["#1a1610","#3d3020","#6b5a40","#a89070","#e8dcc8"]},{id:"blueprint",label:"Blueprint",group:"Mono",colors:["#001830","#003060","#0050a0","#0080e0","#e0f0ff"]},{id:"warm-print",label:"Warm Print",group:"HyperFrames",colors:["#17121a","#824c50","#e09873","#f7ddb1"]},{id:"electric-ink",label:"Electric Ink",group:"HyperFrames",colors:["#080717","#3c185f","#7e2278","#d9339f","#ff6b66","#aafae0"]}],OF=Uje,kF=Xje,CF=Wje,EF=qje,whe=Yje,Ohe=Kje,lW={exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},cW={vignette:.18};function ks(t,e,n={},r={},i={},s=1){return{id:t,label:e,intensity:s,adjust:{...uk,...n},details:{...fk,...r},effects:{...vA,...i}}}const jS=[ks("neutral","Neutral"),ks("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),ks("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),ks("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),ks("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),ks("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),ks("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),ks("vintage-wash","Vintage Wash",lW,cW),ks("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),ks("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),ks("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),ks("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),ks("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06}),ks("creator-camcorder","Creator Camcorder",{contrast:.08,highlights:-.05,shadows:.02,whites:.03,blacks:-.04,temperature:-.03,tint:-.015,vibrance:-.03,saturation:-.06},{vignette:.06,grain:.08,grainSize:.18,grainRoughness:.58},{chromaBleed:.55},.72),ks("vhs-playback","VHS Playback",{contrast:-.04,saturation:-.08},{grain:.16,grainSize:.12,grainRoughness:.72},{tapeDamage:.82,tapeTracking:.85,tapeNoise:.3,tapeSpeed:.5,chromaBleed:.5,chromaticAberration:.18,scanlines:.35,scanlineCount:.17,scanlineSoftness:1,digitalGlitch:.32,digitalGlitchLineTear:.08,digitalGlitchSpeed:.5}),ks("home-movie-8mm","8mm Home Movie",lW,{...cW,vignette:.28,vignetteMidpoint:.54,vignetteFeather:.72,grain:.34,grainSize:.18,grainRoughness:.72},{filmArtifacts:.62},.72),ks("editorial-halftone","Editorial Halftone",{contrast:.04,saturation:.04},{},{halftone:.94,halftoneSize:.36}),ks("two-ink-print","Two-Ink Print",{contrast:.08,highlights:-.06,shadows:.04},{},{twoInkPrint:1,twoInkPrintSize:.42})],oLe=new Map(jS.map(t=>[t.id,t])),khe={exposure:{min:-2,max:2},contrast:{min:-1,max:1},highlights:{min:-1,max:1},shadows:{min:-1,max:1},whites:{min:-1,max:1},blacks:{min:-1,max:1},temperature:{min:-1,max:1},tint:{min:-1,max:1},vibrance:{min:-1,max:1},saturation:{min:-1,max:1}},r1={hue:0,amount:0,level:0},hk={amount:zn.unit,level:zn.signedUnit},ud=[[0,0],[1,1]],lg=[],Che={hueVsHue:zn.secondaryHueShift,hueVsSaturation:zn.signedUnit,hueVsLuma:zn.signedUnit},DM={center:0,range:180,softness:0},IM={min:0,max:1,softness:.05},Ehe={vignette:zn.unit,vignetteMidpoint:zn.unit,vignetteRoundness:zn.signedUnit,vignetteFeather:zn.unit,grain:zn.unit,grainSize:zn.unit,grainRoughness:zn.unit},xf=zn.unit,The=zn.effects,d3=["blur","pixelate","chromaBleed","tapeDamage","filmArtifacts","halftone","twoInkPrint","ascii","dither","bloom","monoScreen","scanlines","chromaticAberration","crtCurvature","digitalGlitch","engraving","crosshatch","kuwahara"],lLe=[{id:"essentials",label:"Essentials",description:"Common optical, focus, and privacy-oriented primitives."},{id:"retro-glitch",label:"Retro & Glitch",description:"Tape, film, CRT, channel separation, and digital disruption."},{id:"print",label:"Print",description:"Halftone, limited-ink, dither, and screen-print rendering."},{id:"art",label:"Art",description:"ASCII, engraved, crosshatched, and painterly rendering."}],cLe={blur:{family:"essentials",label:"Blur",description:"Defocus or soften a full media layer."},pixelate:{family:"essentials",label:"Pixelate",description:"Turn a media layer into a block mosaic."},bloom:{family:"essentials",label:"Bloom",description:"Add thresholded glow around bright image regions."},chromaBleed:{family:"retro-glitch",label:"Chroma Softening",description:"Smear color like low-bandwidth video."},tapeDamage:{family:"retro-glitch",label:"Tape Damage",description:"Add moving tracking errors and tape noise."},filmArtifacts:{family:"retro-glitch",label:"Film Artifacts",description:"Add deterministic dust and film wear."},scanlines:{family:"retro-glitch",label:"Scanlines",description:"Overlay configurable horizontal display lines."},crtCurvature:{family:"retro-glitch",label:"CRT Curvature",description:"Warp media toward curved CRT geometry."},chromaticAberration:{family:"retro-glitch",label:"Channel Separation",description:"Offset color channels by angle."},digitalGlitch:{family:"retro-glitch",label:"Digital Glitch",description:"Compose tears, blocks, and color splits."},halftone:{family:"print",label:"Halftone",description:"Render source color through a print-dot raster."},twoInkPrint:{family:"print",label:"Two-Ink Print",description:"Reduce media to a two-ink print treatment."},dither:{family:"print",label:"Ordered Dither",description:"Quantize media into an ordered limited palette."},monoScreen:{family:"print",label:"Mono Screen",description:"Build monochrome dot, shape, or line artwork."},ascii:{family:"art",label:"ASCII",description:"Render media as configurable procedural glyph cells."},engraving:{family:"art",label:"Engraving",description:"Translate luminance into directional engraved lines."},crosshatch:{family:"art",label:"Crosshatch",description:"Translate media into layered hand-hatched lines."},kuwahara:{family:"art",label:"Kuwahara Paint",description:"Apply edge-preserving painterly smoothing."}},TF=jS.filter(t=>d3.some(e=>t.effects[e]>1e-4)),Phe=jS.filter(t=>!TF.includes(t)),AA={blur:{blur:.45},pixelate:{pixelate:.55},bloom:{bloom:.55,bloomRadius:8},chromaBleed:{chromaBleed:.55},tapeDamage:{tapeDamage:.65,tapeTracking:.55,tapeNoise:.25,tapeSpeed:.5},filmArtifacts:{filmArtifacts:.55},scanlines:{scanlines:.35,scanlineCount:.17,scanlineSoftness:1},chromaticAberration:{chromaticAberration:.15,chromaticAngle:0},crtCurvature:{crtCurvature:.2},digitalGlitch:{digitalGlitch:.55,digitalGlitchColorSplit:.25,digitalGlitchLineTear:.25,digitalGlitchPixelate:.15,digitalGlitchBlockAmount:.5,digitalGlitchBlockDisplacement:.25,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:.5},halftone:{halftone:.94,halftoneSize:.36},twoInkPrint:{twoInkPrint:1,twoInkPrintSize:.42},ascii:{ascii:1,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0},dither:{dither:1,ditherSize:.5},monoScreen:{monoScreen:1,monoScreenSize:.35,monoScreenAngle:.25,monoScreenSpread:.3,monoScreenShape:0,monoScreenInvert:0},engraving:{engraving:1,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9},crosshatch:{crosshatch:1,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9},kuwahara:{kuwahara:1,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5}},uLe=[{path:"intensity",name:"--hf-color-grading-intensity",min:0,max:1},{path:"lut.intensity",name:"--hf-color-grading-lut-intensity",min:0,max:1},{path:"adjust.exposure",name:"--hf-color-grading-exposure",min:-2,max:2},{path:"effects.blur",name:"--hf-color-grading-blur",min:0,max:1},{path:"effects.bloom",name:"--hf-color-grading-bloom",min:0,max:3},{path:"effects.kuwahara",name:"--hf-color-grading-kuwahara",min:0,max:1},{path:"effects.pixelate",name:"--hf-color-grading-pixelate",min:0,max:1},{path:"effects.ascii",name:"--hf-color-grading-ascii",min:0,max:1},{path:"effects.dither",name:"--hf-color-grading-dither",min:0,max:1}];function fLe(t){return The[t]??xf}const hLe=new Set(["ascii","dither","monoScreen","engraving","crosshatch"]),dLe=new Set(["blur","bloom","kuwahara"]);function PF(){return{version:Zje,targetTags:["img","video"],colorSpace:Ahe,intensity:{identity:1,min:0,max:1},palette:{minColors:2,maxColors:6,colorFormat:"#rrggbb"},lut:{format:"3d-cube",maxCubeSize:zje,intensity:{...xf}},presets:[...Phe,...TF].map(t=>({id:t.id,label:t.label,intensity:t.intensity})),adjustments:OF.map(t=>({key:t,identity:uk[t],...khe[t]})),wheels:{zones:kF,controls:{hue:{identity:0,unit:"degrees",wrap:!0,min:zn.hueDegrees.min,maxExclusive:zn.hueDegrees.max},amount:{identity:0,...hk.amount},level:{identity:0,...hk.level}}},curves:{channels:CF,input:{min:0,max:1},output:{min:0,max:1},minPoints:2,maxPoints:xA,implicitEndpoints:!0,endpointsCountTowardMax:!0},hueCurves:{channels:EF.map(t=>({key:t,input:{min:0,maxExclusive:360,unit:"degrees",wrap:!0},output:Che[t]})),minPoints:3,maxPoints:xA},secondaries:{max:yhe,hue:{center:{min:zn.hueDegrees.min,maxExclusive:zn.hueDegrees.max,unit:"degrees",wrap:!0},range:{...zn.secondaryHueRange,unit:"degrees"},softness:{...zn.secondaryHueSoftness,unit:"degrees"},rangePlusSoftnessMax:zn.secondaryHueCombinedMax},saturation:{min:{...xf},max:{...xf},relation:"min < max",softness:{...zn.secondarySoftRangeSoftness}},luma:{min:{...xf},max:{...xf},relation:"min < max",softness:{...zn.secondarySoftRangeSoftness}},correction:{hueShift:{...zn.secondaryHueShift,unit:"degrees"},saturation:{...zn.signedUnit},luma:{...zn.signedUnit},temperature:{...zn.signedUnit},tint:{...zn.signedUnit}}},effectFamilies:lLe,finishing:whe.map(t=>({key:t,identity:fk[t],...Ehe[t]})),effects:d3.map(t=>{const e=AA[t];return{key:t,...cLe[t],apply:{...e},supportsPalette:hLe.has(t),renderLane:dLe.has(t)?"multipass":"single-pass",controls:Ohe.filter(n=>Object.hasOwn(e,n)).map(n=>({key:n,identity:vA[n],recommended:e[n]??vA[n],...fLe(n)}))}}),palettes:She.map(({id:t,label:e,group:n,colors:r})=>({id:t,label:e,group:n,colors:r})),animatable:uLe}}const pLe=/^#[0-9a-f]{6}$/i;function mLe(t){return!Array.isArray(t)||t.length<2||t.length>6||!t.every(e=>typeof e=="string"&&pLe.test(e))?null:t.map(e=>e.toLowerCase())}function Fa(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function SA(t,e,n){return Number.isFinite(t)?Math.min(n,Math.max(e,t)):0}function Mhe(t,e){const n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):e}function ja(t,e){const n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?SA(n,e.min,e.max):0}function MF(t,e=0){const n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?(n%360+360)%360:e}function Q_(t,e,n){const r=SA((n-t)/(e-t),0,1);return r*r*(3-2*r)}function uW(t,e,n,r){return t<e?r<=0?0:Q_(e-r,e,t):t>n?r<=0?0:1-Q_(n,n+r,t):1}function gLe(t,e,n,r){const i=Math.abs(((t-r.hue.center+540)%360+360)%360-180);return(r.hue.range<179.999&&e<.001?0:i<=r.hue.range?1:r.hue.softness<=0?0:1-Q_(r.hue.range,r.hue.range+r.hue.softness,i))*uW(e,r.saturation.min,r.saturation.max,r.saturation.softness)*uW(n,r.luma.min,r.luma.max,r.luma.softness)}function yLe(t){const e=Fa(t)?t:{};return kF.reduce((n,r)=>{const i=Fa(e[r])?e[r]:{};return n[r]={hue:MF(i.hue,r1.hue),amount:ja(i.amount??r1.amount,hk.amount),level:ja(i.level??r1.level,hk.level)},n},{shadows:{...r1},midtones:{...r1},highlights:{...r1}})}function xLe(t){if(!Array.isArray(t)||t.length!==2)return null;const e=Number(t[0]),n=Number(t[1]);return Number.isFinite(e)&&Number.isFinite(n)?[SA(e,0,1),SA(n,0,1)]:null}function Nhe(t){return t.some((e,n)=>{var r;return n>0&&e[0]===((r=t[n-1])==null?void 0:r[0])})}function bLe(t){var e,n;(((e=t[0])==null?void 0:e[0])??0)>0&&t.unshift([0,0]),(((n=t.at(-1))==null?void 0:n[0])??1)<1&&t.push([1,1])}function vLe(t){if(!Array.isArray(t)||t.length<2)return ud;const e=[];for(const n of t){const r=xLe(n);if(!r)return ud;e.push(r)}return e.sort((n,r)=>n[0]-r[0]),Nhe(e)||(bLe(e),e.length>xA)?ud:e}function ALe(t){const e=Fa(t)?t:{};return CF.reduce((n,r)=>(n[r]=vLe(e[r]),n),{master:ud,red:ud,green:ud,blue:ud})}function SLe(t,e){if(!Array.isArray(t)||t.length!==2)return null;const n=Number(t[0]),r=Number(t[1]);return Number.isFinite(n)&&Number.isFinite(r)?[MF(n),SA(r,e.min,e.max)]:null}function wLe(t,e){if(!Array.isArray(t)||t.length<3||t.length>xA)return lg;const n=[];for(const r of t){const i=SLe(r,e);if(!i)return lg;n.push(i)}return n.sort((r,i)=>r[0]-i[0]),Nhe(n)?lg:n}function OLe(t){const e=Fa(t)?t:{};return EF.reduce((n,r)=>(n[r]=wLe(e[r],Che[r]),n),{hueVsHue:lg,hueVsSaturation:lg,hueVsLuma:lg})}function fW(t){const e=Fa(t)?t:{},n=ja(e.min??IM.min,xf),r=ja(e.max??IM.max,xf);return{min:Math.min(n,r),max:Math.max(n,r),softness:ja(e.softness??IM.softness,zn.secondarySoftRangeSoftness)}}function kLe(t){const e=Fa(t)?t:{},n=ja(e.range??DM.range,zn.secondaryHueRange);return{center:MF(e.center,DM.center),range:n,softness:ja(e.softness??DM.softness,{min:zn.secondaryHueSoftness.min,max:zn.secondaryHueCombinedMax-n})}}function CLe(t){return{hueShift:ja(t.hueShift??0,zn.secondaryHueShift),saturation:ja(t.saturation??0,zn.signedUnit),luma:ja(t.luma??0,zn.signedUnit),temperature:ja(t.temperature??0,zn.signedUnit),tint:ja(t.tint??0,zn.signedUnit)}}function ELe(t){return!Fa(t)||!Fa(t.key)||!Fa(t.correction)?null:{enabled:t.enabled!==!1,key:{hue:kLe(t.key.hue),saturation:fW(t.key.saturation),luma:fW(t.key.luma)},correction:CLe(t.correction)}}function TLe(t){if(!Array.isArray(t))return[];const e=[];for(const n of t.slice(0,yhe)){const r=ELe(n);r&&e.push(r)}return e}function PLe(t){if(t==null)return null;const e=String(t).trim();return e||null}function MLe(t){if(t==null)return null;if(typeof t=="string"){const n=t.trim();return n?{src:n,intensity:1}:null}if(!Fa(t))return null;const e=t.src;return typeof e!="string"||e.trim()===""?null:{src:e.trim(),intensity:Mhe(t.intensity,1)}}function NLe(t){if(typeof t=="string"){const e=t.trim();if(!e)return null;if(e.startsWith("{"))try{const n=JSON.parse(e);return Fa(n)?n:null}catch{return null}return{preset:e}}return Fa(t)?t:null}function DLe(t){return t?oLe.get(t)??null:null}function Ic(t){const e=NLe(t);if(!e||e.enabled===!1)return null;const n=PLe(e.preset),r=DLe(n),i=(r==null?void 0:r.adjust)??uk,s=(r==null?void 0:r.details)??fk,a=(r==null?void 0:r.effects)??vA,o=Fa(e.adjust)?e.adjust:{},l=Fa(e.details)?e.details:{},c=Fa(e.effects)?e.effects:{},u=OF.reduce((m,y)=>(m[y]=ja(o[y]??i[y],khe[y]),m),{...uk}),f=whe.reduce((m,y)=>(m[y]=ja(l[y]??s[y],Ehe[y]),m),{...fk}),h=Ohe.reduce((m,y)=>(m[y]=ja(c[y]??a[y],The[y]??xf),m),{...vA});return{enabled:!0,preset:n,intensity:Mhe(e.intensity,(r==null?void 0:r.intensity)??1),adjust:u,wheels:yLe(e.wheels),curves:ALe(e.curves),hueCurves:OLe(e.hueCurves),secondaries:TLe(e.secondaries),details:f,effects:h,palette:mLe(e.palette),lut:MLe(e.lut),colorSpace:typeof e.colorSpace=="string"&&e.colorSpace.trim()?e.colorSpace.trim():Ahe}}function Dhe(t){return kF.some(e=>Math.abs(t[e].amount)>1e-4||Math.abs(t[e].level)>1e-4)}function Ihe(t){return CF.some(e=>t[e].some(([n,r])=>Math.abs(n-r)>1e-4))}function _he(t){return EF.some(e=>t[e].some(([,n])=>Math.abs(n)>1e-4))}function ILe(t){return t.some(e=>e.enabled&&Object.values(e.correction).some(n=>Math.abs(n)>1e-4))}function z_(t){const e=Ic(t);if(!e)return"";const{enabled:n,wheels:r,curves:i,hueCurves:s,secondaries:a,palette:o,...l}=e;return JSON.stringify({...l,...Dhe(r)?{wheels:r}:{},...Ihe(i)?{curves:i}:{},..._he(s)?{hueCurves:s}:{},...a.length>0?{secondaries:a}:{},...o?{palette:o}:{}})}function d0(t){return t!=null&&t.enabled?Math.abs(t.details.vignette)>1e-4||Math.abs(t.details.grain)>1e-4||d3.some(n=>Math.abs(t.effects[n])>1e-4)?!0:t.intensity===0?!1:t.lut&&t.lut.intensity!==0?!0:OF.some(n=>Math.abs(t.adjust[n])>1e-4)||(t.wheels?Dhe(t.wheels):!1)||(t.curves?Ihe(t.curves):!1)||(t.hueCurves?_he(t.hueCurves):!1)||(t.secondaries?ILe(t.secondaries):!1):!1}function hW(t){var e;return t?(e=t.secondaries)!=null&&e.length?!0:d0(t):!1}function Rhe(t){return t.getAttribute(sLe)}function jhe(t,e){e===""?t.removeProperty("opacity"):t.setProperty("opacity",e)}const Lhe="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/MotionPathPlugin.min.js";function _Le(t){var r,i;if(!(t!=null&&t.contentWindow)||!t.contentDocument)return;const e=t.contentWindow,n=t.contentDocument;if(e.MotionPathPlugin){try{(r=e.gsap)!=null&&r.registerPlugin&&e.gsap.registerPlugin(e.MotionPathPlugin)}catch{}return}if((i=e.gsap)!=null&&i.registerPlugin&&!e.__hfMotionPathPluginLoading)try{e.__hfMotionPathPluginLoading=!0;const s=n.createElement("script");s.src=Lhe;const a=()=>{var o;e.__hfMotionPathPluginLoading=!1;try{e.MotionPathPlugin&&((o=e.gsap)!=null&&o.registerPlugin)&&e.gsap.registerPlugin(e.MotionPathPlugin)}catch{}};s.onload=a,s.onerror=a,n.head.appendChild(s)}catch{e.__hfMotionPathPluginLoading=!1}}function RLe(t){return t.includes("gsap.timeline")||t.includes("__timelines")||t.includes(".to(")||t.includes(".set(")}function p3(t){const e=[],n=t.querySelectorAll("script:not([src])");for(const r of n)RLe(r.textContent||"")&&e.push(r);return e}function dk(t){const e=new DOMParser().parseFromString(t,"text/html"),n=p3(e);return n.length!==1?null:n[0].textContent||null}function jLe(t,e){const n=t.__timelines;return n?e.length>0?e.every(r=>n[r]!=null):Object.keys(n).filter(r=>r!=="__proxied").length>0:!1}function Z_(t,e){var n,r,i,s;(r=(n=t.__player)==null?void 0:n.seek)==null||r.call(n,e),(i=t.__hfForceTimelineRebind)==null||i.call(t),(s=t.__hfStudioManualEditsApply)==null||s.call(t)}function NF(t,e){const n=t==null?void 0:t.contentWindow;if(!(n!=null&&n.__hfForceTimelineRebind))return!1;try{return n.__hfSuppressSceneMutations?n.__hfSuppressSceneMutations(()=>Z_(n,e)):Z_(n,e),!0}catch{return!1}}function DF(t,e,n={}){var b,w;const{onAsyncFailure:r,currentTimeOverride:i,authoredHtml:s}=n;if(!t||!e)return"cannot-soft-reload";const a=t.contentWindow,o=t.contentDocument;if(!a||!o||!a.gsap||!a.__hfForceTimelineRebind)return"cannot-soft-reload";const l=[...e.matchAll(/__timelines\s*\[\s*["'`]([^"'`]+)["'`]\s*\]/g)].map(O=>O[1]).filter(O=>O!=="__proxied");if(l.length===0)return"cannot-soft-reload";const c=p3(o);if(c.length===0)return"cannot-soft-reload";const u=c.filter(O=>l.some(C=>{const E=O.textContent||"";return E.includes(`__timelines["${C}"]`)||E.includes(`__timelines['${C}']`)}));if(c.length>1&&u.length===0)return"cannot-soft-reload";const f=i??((w=(b=a.__player)==null?void 0:b.getTime)==null?void 0:w.call(b))??0;let h=!1,m;const y=O=>{if(m===void 0)try{m=s?new DOMParser().parseFromString(s,"text/html"):null}catch{m=null}if(!m)return null;const C=O.getAttribute("data-hf-id");return C?m.querySelector(`[data-hf-id="${C}"]`):O.id?m.getElementById(O.id):null},p=O=>{const C=y(O);return C instanceof HTMLElement?C.style.opacity:Rhe(O)},v=()=>{var _,I,j;const O=a.__timelines,C=[];if(O)for(const L of l){const H=O[L];if(H){if(H.getChildren)try{for(const $ of H.getChildren(!0))if(typeof $.targets=="function")for(const G of $.targets())C.push(G)}catch{}try{(_=H.kill)==null||_.call(H)}catch{}delete O[L]}}const E=new Set(C);for(const L of o.querySelectorAll("[style*='transform']"))L.style.transform&&"_gsap"in L&&!E.has(L)&&(E.add(L),C.push(L));if(C.length>0&&((I=a.gsap)!=null&&I.set)){const L=[];for(const H of C){const $=H;((j=$.style)==null?void 0:j.cssText)!=null&&L.push([$,$.style.cssText])}try{a.gsap.set(C,{clearProps:"all"})}catch{}for(const[H,$]of L){const G=H.style;G.cssText=$,G.removeProperty("transform");const q=p(H);q!==null?jhe(G,q):H.hasAttribute(h3)&&G.getPropertyValue("opacity")==="0"&&G.getPropertyPriority("opacity")==="important"&&G.removeProperty("opacity")}}for(const L of u)L.remove();const M=()=>{var H;a.MotionPathPlugin&&((H=a.gsap)!=null&&H.registerPlugin)&&a.gsap.registerPlugin(a.MotionPathPlugin);const L=o.createElement("script");L.textContent=`(function(){${e}
203
203
  })();`,o.body.appendChild(L),Z_(a,f)};if(/motionPath\s*[:{]/.test(e)&&!a.MotionPathPlugin&&a.gsap){if(h=!0,a.__hfMotionPathPluginLoading){const H=Date.now(),$=a.setInterval(()=>{a.MotionPathPlugin?(a.clearInterval($),M()):(!a.__hfMotionPathPluginLoading||Date.now()-H>1e4)&&(a.clearInterval($),r==null||r())},50);return}a.__hfMotionPathPluginLoading=!0;const L=o.createElement("script");L.src=Lhe,L.onload=()=>{a.__hfMotionPathPluginLoading=!1,M()},L.onerror=()=>{a.__hfMotionPathPluginLoading=!1,r==null||r()},o.head.appendChild(L);return}M()};try{return a.__hfSuppressSceneMutations?a.__hfSuppressSceneMutations(v):v(),h||jLe(a,l)?"applied":"verify-failed"}catch{return"cannot-soft-reload"}}function LLe(t,e){if(!t||!Number.isFinite(e)||e<=0)return!1;const n=Array.from(t.querySelectorAll("[data-composition-id]")),r=n.find(i=>{var s;return!((s=i.parentElement)!=null&&s.closest("[data-composition-id]"))})??n[0]??null;return r?(r.setAttribute("data-duration",mi(e)),!0):!1}const FLe=5*6e4,wA=new Map;function Fhe(t){for(const[e,n]of wA)t-n>=FLe&&wA.delete(e)}function $he(t,e=Date.now()){Fhe(e),wA.set(t,e)}function $Le(t,e=Date.now()){return Fhe(e),!t||!wA.has(t)?!1:(wA.delete(t),!0)}async function BLe(t){const e=new TextEncoder().encode(t),n=await globalThis.crypto.subtle.digest("SHA-256",e);return`"sha256:${Array.from(new Uint8Array(n),i=>i.toString(16).padStart(2,"0")).join("")}"`}async function VLe(t,e,n){return n!==void 0?BLe(n):t.get(e)}function HLe(){const t=globalThis.crypto;if(typeof(t==null?void 0:t.randomUUID)=="function")return t.randomUUID();if(typeof(t==null?void 0:t.getRandomValues)!="function")throw new Error("Web Crypto getRandomValues is required for Studio write identity");const e=t.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const n=Array.from(e,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function ql(){const t=HLe();return $he(t),{"X-Hyperframes-Write-Token":t}}class OA extends Error{}class pk extends OA{}async function ta(t,e){if(e.includes("\0")||e.includes(".."))throw new Error(`Unsafe path: ${e}`);const n=await fetch(`/api/projects/${encodeURIComponent(t)}/files/${encodeURIComponent(e)}`);if(!n.ok)throw new Error(`Failed to read ${e}`);const r=await n.json();if(typeof r.content!="string")throw new Error(`Missing file contents for ${e}`);return r.content}async function QLe(t){const e=await fetch(`/api/projects/${encodeURIComponent(t)}/gsap-mutation-capabilities`);if(!e.ok)throw new pk("Server does not support owned GSAP mutations");const n=await e.json().catch(()=>null);if(!IF(n)||n.atomicOwnershipPairs!==!0)throw new pk("Invalid GSAP mutation capability response")}async function zLe(t,e,n,r){if(e.includes("\0")||e.includes(".."))throw new Error(`Unsafe path: ${e}`);const i=await fetch(`/api/projects/${encodeURIComponent(t)}/gsap-mutation-rollback/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expected:n,restore:r})});if(!i.ok)throw new Error(`Failed to restore ${e}`);const s=await i.json();if(s.restored===!0&&s.conflict===!1)return"restored";if(s.restored===!1&&s.conflict===!0)return"conflict";throw new Error(`Invalid restore response for ${e}`)}function Bhe(t,e){try{LLe((t==null?void 0:t.contentDocument)??null,e)}catch{}}function mk(t){const e=Bj((t==null?void 0:t.contentDocument)??null);e>0&&(ce.getState().setDuration(e),Bhe(t,e))}function kA(t){const e=ce.getState().duration;return()=>{ce.getState().duration!==e&&(ce.getState().setDuration(e),Bhe(t,e))}}function IF(t){return typeof t=="object"&&t!==null}function ZLe(t){if(!IF(t)||typeof t.mutated!="boolean"||typeof t.before!="string"||typeof t.after!="string"||t.mutated!==(t.before!==t.after)||"changed"in t&&t.changed!==t.mutated)throw new pk("Invalid owned GSAP mutation response");return{mutated:t.mutated,scriptText:typeof t.scriptText=="string"?t.scriptText:null,before:t.before,after:t.after}}function GLe(t,e){return IF(t)&&typeof t.error=="string"?t.error:e}async function Vhe(t,e,n,r){let i;try{i=await fetch(`/api/projects/${encodeURIComponent(t)}/gsap-mutations/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json",...ql()},body:JSON.stringify(n)})}catch(a){throw new OA(`${r}: mutation outcome unknown`,{cause:a})}const s=await i.json().catch(()=>null);if(!i.ok)throw new OA(GLe(s,r));return ZLe(s)}function ULe(t,e){return NF(t,e)}function XLe(t,e,n,r,i){if(!e.mutated&&i){ULe(t,n)||r();return}if(!t||!e.scriptText){r();return}DF(t,e.scriptText,{onAsyncFailure:r,currentTimeOverride:n})==="cannot-soft-reload"&&r()}async function Hhe(t){let e={mutated:!1,scriptText:null};if(t.gsapMutation)try{e=await t.gsapMutation()}catch(n){t.onGsapError(n),n instanceof OA&&t.reloadPreview();return}XLe(t.iframe,e,ce.getState().currentTime,t.reloadPreview,t.rebindWhenUnmutated)}const WLe=1e4;async function qLe(t,e,n){let r=!1;for(let i=e.length-1;i>=0;i-=1){const s=e[i];if(!(!s||s.before===s.after))try{await zLe(t,s.path,s.after,s.before)==="conflict"&&(r=!0)}catch(a){r=!0,n(a)}}return r?"convergence-required":"restored"}async function dW(t,e,n,r){throw await qLe(t,e,n)==="convergence-required"?new OA("GSAP rollback could not safely restore every owned write; preview reload required",{cause:r}):r}async function Qhe(t){const e=[],n=async(i,s)=>{const a=s();if(!a)return{mutated:!1,scriptText:null};const o=await a;if(!o.mutated)return o;if(o.before===void 0||o.after===void 0)throw new pk(`GSAP mutation returned no owned before/after pair for ${i}`);const l=[...e].reverse().find(u=>u.path===i),c={path:i,before:o.before,after:o.after};if(e.push(c),l&&l.after!==c.before)throw new Error(`GSAP mutation ownership chain broke for ${i}`);return o};let r;try{await QLe(t.projectId),r=await t.gsapMutation(n)}catch(i){return dW(t.projectId,e,t.onRollbackError,i)}if(r.mutated)try{const i=new Map;for(const a of e){const o=i.get(a.path);o?o.after=a.after:i.set(a.path,{before:a.before,after:a.after})}const s={};for(const[a,o]of i){if(await ta(t.projectId,a)!==o.after)throw new Error(`GSAP mutation ownership lost for ${a}`);o.before!==o.after&&(s[a]=o)}Object.keys(s).length>0&&await t.recordEdit({label:t.label,kind:"timeline",coalesceKey:t.coalesceKey,coalesceMs:WLe,files:s})}catch(i){return dW(t.projectId,e,t.onRollbackError,i)}return r}async function zhe(t,e,n,r){return r===0||!n?{mutated:!1,scriptText:null}:Vhe(t,e,{type:"shift-positions",targetSelector:`#${n}`,delta:r},"shift-positions failed")}async function Zhe(t,e,n,r,i,s,a){return!n||i<=0||a<=0?{mutated:!1,scriptText:null}:r===s&&i===a?{mutated:!1,scriptText:null}:Vhe(t,e,{type:"scale-positions",targetSelector:`#${n}`,oldStart:r,oldDuration:i,newStart:s,newDuration:a},"scale-positions failed")}function pW(t){const{projectId:e,targetPath:n,domId:r,edit:i}=t,s=i.kind==="shift"?i.delta!==0:i.from.start!==i.to.start||i.from.duration!==i.to.duration,a=(l,c)=>i.kind==="shift"?zhe(l,n,c,i.delta):Zhe(l,n,c,i.from.start,i.from.duration,i.to.start,i.to.duration),o=l=>console.error(`[Timeline] Failed to ${i.kind} GSAP positions`,l);return Hhe({iframe:t.iframe,reloadPreview:t.reloadPreview,gsapMutation:s&&r&&e?()=>Qhe({projectId:e,label:t.label,coalesceKey:t.coalesceKey,recordEdit:t.recordEdit,gsapMutation:l=>l(n,()=>a(e,r)),onRollbackError:o}):void 0,onGsapError:o,rebindWhenUnmutated:!0})}async function mW(t){const e=t.activeCompPath||"index.html",n=t.changes.some(i=>t.resolveChangePath(i.element)!==e),r=i=>console.error(`[Timeline] ${t.errorLabel}`,i);await Hhe({iframe:t.iframe,reloadPreview:t.reloadPreview,gsapMutation:()=>Qhe({projectId:t.projectId,label:t.label,coalesceKey:t.coalesceKey,recordEdit:t.recordEdit,gsapMutation:async i=>{let s=!1,a=null;for(const o of t.changes){const l=t.resolveChangePath(o.element),c=await i(l,()=>t.mutateChange(o,l));s=s||c.mutated,l===e&&(a=c.scriptText)}return{mutated:s,scriptText:n?null:a}},onRollbackError:r}),onGsapError:r,rebindWhenUnmutated:!n})}const Ghe=["position","display","top","left","right","bottom","inset","width","height","gap","justify-content","align-items","flex-direction","font-size","font-style","font-weight","font-family","line-height","letter-spacing","text-align","text-transform","color","background-color","background-image","opacity","mix-blend-mode","border-radius","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","outline-color","overflow","clip-path","box-shadow","filter","backdrop-filter","z-index","transform","object-fit","object-position"];function lu(t){if(!t)return null;const e=t.trim();if(!e.endsWith("px"))return null;const n=parseFloat(e);return Number.isFinite(n)?n:null}function YLe(t){const e=(t??"none").trim();if(!e||e==="none")return!0;const n=e.match(/^matrix\(([^)]+)\)$/i);if(n&&n[1]){const a=n[1].split(",");if(a.length!==6)return!1;const o=a.map(y=>Number.parseFloat(y.trim()));if(o.some(y=>!Number.isFinite(y)))return!1;const[l=0,c=0,u=0,f=0,h=0,m=0]=o;return Math.abs(l-1)<1e-4&&Math.abs(c)<1e-4&&Math.abs(u)<1e-4&&Math.abs(f-1)<1e-4&&Math.abs(h)<1e-4&&Math.abs(m)<1e-4}const r=e.match(/^matrix3d\(([^)]+)\)$/i);if(!r||!r[1])return!1;const i=r[1].split(",").map(a=>Number.parseFloat(a.trim()));if(i.length!==16||i.some(a=>!Number.isFinite(a)))return!1;const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return i.every((a,o)=>Math.abs(a-(s[o]??0))<1e-4)}function KLe(t){if(!t.hasStableTarget||t.isInsideLockedComposition)return{canSelect:!t.isInsideLockedComposition,canEditStyles:!1,canCrop:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:t.isInsideLockedComposition?"This element belongs to a locked composition.":"Studio could not resolve a stable patch target for this element."};if(!t.existsInSource)return{canSelect:!0,canEditStyles:!1,canCrop:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:"This element is generated by a script and cannot be edited visually."};if(t.isCompositionRoot)return{canSelect:!0,canEditStyles:!0,canCrop:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:"The root composition defines the preview bounds."};const e=t.computedStyles??{},n=e.position,r=lu(t.inlineStyles.left)??lu(e.left),i=lu(t.inlineStyles.top)??lu(e.top),s=lu(t.inlineStyles.width)??lu(e.width),a=lu(t.inlineStyles.height)??lu(e.height),o=!YLe(e.transform),l=(n==="absolute"||n==="fixed")&&r!=null&&i!=null&&!o,c=l&&(s!=null||a!=null),u=!t.isCompositionHost,f=u?void 0:"Select an internal layer to transform it.";return{canSelect:!0,canEditStyles:!(t.isCompositionHost&&t.isMasterView),canCrop:!0,canMove:l,canResize:c,canApplyManualOffset:u,canApplyManualSize:u,canApplyManualRotation:u,reasonIfDisabled:f}}function _F(t){const e=t.tag===xa,n=t.tag!=="audio"&&!e;return{text:t.hasEditableText&&!t.isCompositionHost&&!t.isInsideLockedComposition,media:t.tag==="video"||t.tag==="audio"||t.tag==="img",audioFx:t.tag==="audio"||e,colorGrading:t.tag==="video"||t.tag==="img",timing:!e&&(t.hasTimingStart||t.animationCount>0),animation:t.animationCount>0&&t.tag!=="audio"&&!e,layout:n,style:n}}function JLe(t){return{capabilities:KLe(t),sections:_F(t)}}function _c(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"&&t.nodeType===1}function eFe(t){return["div","span","p","strong","h1","h2","h3","h4","h5","h6"].includes(t)}function Uhe(t){const e=t.ownerDocument.defaultView;if(!e)return!0;let n=t;for(;n;){const r=e.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden")return!1;const i=Number.parseFloat(r.opacity);if(Number.isFinite(i)&&i<=.01&&!n.hasAttribute(h3))return!1;n=n.parentElement}return!0}function Xhe(t){var r;const e={},n=(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t);if(!n)return e;for(const i of Ghe){const s=n.getPropertyValue(i);s&&(e[i]=s)}return e}function Whe(t){const e={};for(const n of Ghe){const r=t.style.getPropertyValue(n);r&&(e[n]=r)}return e}function tFe(t){const e={};for(const n of t.attributes)n.name.startsWith("data-")&&(e[n.name.slice(5)]=n.value);return e}function G_(t,e){let n=t;for(;n;){const r=n;if(e.some(i=>r.hasAttribute(i)))return r;n=n.parentElement}return null}let X4=new Map;function gW(t){X4=t}function nFe(t){if(!t||X4.size===0)return;const e=t.getAttribute("data-hf-original-composition-id"),n=t.getAttribute("data-composition-id");return(e?X4.get(e):void 0)??(n?X4.get(n):void 0)}function LS(t,e){const n=G_(t,["data-composition-file","data-composition-src"]),r=G_(t,["data-composition-id"]),i=(n==null?void 0:n.getAttribute("data-composition-file"))??(n==null?void 0:n.getAttribute("data-composition-src"))??(r==null?void 0:r.getAttribute("data-composition-file"))??(r==null?void 0:r.getAttribute("data-composition-src"))??nFe(r)??e??"index.html";return{sourceFile:i,compositionPath:i}}function yW(t){const e=t==null?void 0:t.trim();if(!e)return;let n=e;try{n=new URL(e,"http://studio.local").pathname}catch{n=e}for(const r of["/preview/comp/","/preview/"]){const i=n.indexOf(r);if(i<0)continue;return n.slice(i+r.length).replace(/^\/+/,"")||e}return e}function qhe(t){const e=globalThis.CSS;if(typeof(e==null?void 0:e.escape)=="function")return e.escape(t);if(t==="-")return"\\-";let n="";for(let r=0;r<t.length;r+=1){const i=t[r]??"",s=i.charCodeAt(0);if(s===0){n+="�";continue}const a=s>=48&&s<=57,o=s>=65&&s<=90,l=s>=97&&s<=122,c=s>=1&&s<=31||s===127,u=r===0&&a,f=r===1&&t.startsWith("-")&&a;if(c||u||f){n+=`\\${s.toString(16)} `;continue}if(o||l||a||i==="-"||i==="_"||s>=128){n+=i;continue}n+=`\\${i}`}return n}function _f(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}function rFe(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return[]}}function d8(t){var e;return((e=t.replace(/\.html$/i,"").replace(/^compositions\//i,"").split("/").at(-1))==null?void 0:e.replace(/[-_]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()))??t}function FS(t){if(t.id)return`#${qhe(t.id)}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${_f(e)}"]`;const n=t.getAttribute("data-hf-group");return n?`[data-hf-group="${_f(n)}"]`:Yhe(t)}function Yhe(t){const e=Array.from(t.classList).map(r=>r.trim()).filter(Boolean);if(e.length===0)return;const n=e.find(r=>r!=="clip"&&!r.startsWith("__hf-"))??e[0];return n?`.${qhe(n)}`:void 0}function Khe(t){const e=t.getAttribute("data-composition-id");if(e&&e!=="main")return d8(e);const n=t.getAttribute("data-composition-src")??t.getAttribute("data-composition-file");if(n)return d8(n);const r=t.getAttribute("data-hf-group");if(r)return r;if(t.id)return d8(t.id);const i=Yhe(t);if(i)return d8(i.replace(/^\./,""));const s=(t.textContent??"").trim().replace(/\s+/g," ");return s?s.length>40?`${s.slice(0,39)}…`:s:t.tagName.toLowerCase()}function RF(t,e,n,r,i){if(n!=null&&n.startsWith("."))return Gse(t,e,n,r,s=>_c(s)?LS(s,i).sourceFile:void 0)}function Dy(t){return Uhe(t)}const xW=new Set(["img","video","canvas","svg","audio"]);function iFe(t){const e=t.ownerDocument.defaultView;if(!e)return!1;const n=e.getComputedStyle(t);return!!(n.backgroundImage!=="none"||n.backgroundColor&&n.backgroundColor!=="transparent"&&n.backgroundColor!=="rgba(0, 0, 0, 0)"||n.borderWidth&&parseFloat(n.borderWidth)>0&&n.borderStyle!=="none"||n.boxShadow&&n.boxShadow!=="none")}function sFe(t){const e=t.tagName.toLowerCase();if(xW.has(e)||iFe(t))return!1;const{children:n}=t;if(n.length===0)return(t.textContent??"").trim().length===0;for(let r=0;r<n.length;r+=1){const i=n[r];if(_c(i)&&(xW.has(i.tagName.toLowerCase())||Dy(i)))return!1}return!0}function aFe(t){const e=t.getBoundingClientRect();return!(e.width<=1||e.height<=1||!Dy(t)||sFe(t))}const oFe=new Set(["base","br","canvas","link","meta","script","source","style","template","track","wbr"]);function lFe(t){var r;const e=t.tagName.toLowerCase();if(oFe.has(e))return!1;const n=(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t);return!((n==null?void 0:n.display)==="none"||(n==null?void 0:n.visibility)==="hidden")}function Zg(t,e){if(!lFe(t)||t.hasAttribute("data-composition-id"))return null;const n=FS(t);if(!n)return null;const{sourceFile:r}=LS(t,e);return{id:t.id||void 0,hfId:t.getAttribute("data-hf-id")||void 0,selector:n,selectorIndex:RF(t.ownerDocument,t,n,r,e),sourceFile:r}}function cFe(t){let e=t;for(;e;){if(e.classList.contains("clip")&&(!(e.hasAttribute("data-composition-src")||e.hasAttribute("data-composition-file"))||e===t))return e;e=e.parentElement}return null}function uFe(t,e){if(e.preferClipAncestor){const n=cFe(t);if(n)return n}return t}function fFe(t,e){const n=[];for(const s of t)_c(s)&&aFe(s)&&Zg(s,e.activeCompositionPath)&&n.push(s);if(n.length===0)return[];const r=[];let i=n[0];for(let s=1;s<n.length;s++){const a=n[s];i.contains(a)||r.push(i),i=a}return r.push(i),r}function cs(t,e,n=null){const r=s=>_c(s)&&(!e.sourceFile||LS(s,n).sourceFile===e.sourceFile),i=s=>rFe(t,s).filter(r);if(e.hfId){const s=i(`[data-hf-id="${_f(e.hfId)}"]`)[0];if(s)return s}if(e.id){const s=i(`[id="${_f(e.id)}"]`)[0];if(s)return s}return e.selector?i(e.selector)[e.selectorIndex??0]??null:null}function Jhe(t,e,n){var f;const r=typeof e.id=="string"?e.id:"",i=yW(e.compositionSrc)??((f=n.compIdToSrc)==null?void 0:f.get(r)),s=i??yW(e.sourceFile)??n.activeCompositionPath??"index.html",a=_f(r),o=i?_f(i):null,l=e.selector??(i?`[data-composition-src="${o}"],[data-composition-file="${o}"],[data-composition-id="${a}"]`:a?`[data-composition-id="${a}"]`:void 0);if(l||e.domId){const h=cs(t,{id:e.domId??void 0,selector:l,selectorIndex:e.selectorIndex,sourceFile:s},n.activeCompositionPath);if(h)return h}const c=!!(e.domId||e.selector||i);if(n.isMasterView||c||!n.activeCompositionPath)return null;const u=t.querySelector("[data-composition-id]");return _c(u)&&LS(u,n.activeCompositionPath).sourceFile===s?u:null}function hFe(t,e){return Array.from(t.children).filter(n=>_c(n)&&Zg(n,e.activeCompositionPath)!==null)}let dFe=0;function pFe(t){const{selectedKeyframes:e,selectedElementId:n}=ce.getState();if(!n)return;const r=t.selectedGsapAnimations.filter(c=>c.keyframes),i=r.length===1?r[0]:void 0,s=new Map(r.map(c=>[c.id,c])),a=new Map;for(const c of e){const u=TTe(n,c);if(!u)continue;const f=u.animationId?s.get(u.animationId):i;if(!f)continue;const h=u.tweenPercentage??u.percentage;a.set(`${f.id}\0${h}`,{animationId:f.id,percentage:h})}const o=[...a.values()];if(o.length===0)return;const l={coalesceKey:`delete-keyframes:${++dFe}`,coalesceMs:Number.POSITIVE_INFINITY};for(const[c,u]of o.entries())t.handleGsapRemoveKeyframe(u.animationId,u.percentage,{...l,...c===o.length-1?{softReload:!0}:{skipReload:!0}})}function mFe(t){var n,r;if(!t)return!1;const e=((r=(n=t.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.HTMLElement)??globalThis.HTMLElement;return t instanceof e}function gFe(t){var s,a;if(t.element.tag==="audio")return Promise.resolve();const e=t.stackingReorder??null;if(e==null||e.zIndexChanges.length===0)return Promise.resolve();const n=new Map(t.timelineElements.map(o=>[Zn(o),o])),r=((s=t.iframe)==null?void 0:s.contentDocument)??null,i=[];for(const o of e.zIndexChanges){const l=n.get(o.key),c=o.domId??(l==null?void 0:l.domId),u=o.selector??(l==null?void 0:l.selector),f=o.selectorIndex??(l==null?void 0:l.selectorIndex),h=o.sourceFile??(l==null?void 0:l.sourceFile)??t.activeCompPath??"index.html",m=r?cs(r,{id:c,selector:u,selectorIndex:f,sourceFile:h},t.activeCompPath):null;if(!mFe(m))return Promise.resolve();g_(m)!==o.zIndex&&i.push({element:m,zIndex:o.zIndex,id:c??(l==null?void 0:l.id)??o.key,selector:u,selectorIndex:f,sourceFile:h,key:o.key})}return i.length===0?Promise.resolve():Promise.resolve((a=t.commit)==null?void 0:a.call(t,i,t.coalesceKey)).then(()=>{})}function gk(t){const e=ce.getState();return t<=e.duration?!1:(e.setDuration(t),!0)}function ep(t){return t.domId?{id:t.domId,hfId:t.hfId,selector:t.selector,selectorIndex:t.selectorIndex}:t.hfId?{hfId:t.hfId,selector:t.selector,selectorIndex:t.selectorIndex}:t.selector?{selector:t.selector,selectorIndex:t.selectorIndex}:null}function $S(t,e,n=null){try{const r=t==null?void 0:t.contentDocument;return r?e.kind==="composition"&&e.compositionSrc?Jhe(r,e,{activeCompositionPath:n,isMasterView:!0}):cs(r,{hfId:e.hfId,id:e.domId,selector:e.selector,selectorIndex:e.selectorIndex,sourceFile:e.sourceFile||n||"index.html"},n):null}catch{return null}}function yk(t,e,n,r=null){try{const i=$S(t,e,r);if(!i)return;for(const[s,a]of n)i.setAttribute(s,a)}catch{}}function xk(t){return t.playbackStartAttr==="playback-start"||t.kind==="composition"?"data-playback-start":"data-media-start"}function yFe(t,e,n,r){if(r.playbackStart!=null)return{attrName:xk(n).slice(5),value:r.playbackStart};const i=r.start-n.start;if(i===0)return null;const s=H_(t,e,"playback-start")??H_(t,e,"media-start"),a=s!=null?parseFloat(s):void 0;return a==null||!Number.isFinite(a)?null:{attrName:xk(n).slice(5),value:Math.max(0,a+i*Math.max(n.playbackRate??1,.1))}}function ede(t,e,n,r,i){if(!Number.isFinite(n)||!Number.isFinite(r))return console.warn(`[Timeline] buildTimelineMoveTimingPatch: non-finite timing (start=${n}, duration=${r}) — patch skipped`),t;let s=Sd(t,e,{type:"attribute",property:"start",value:mi(n)});return i!=null&&Number.isFinite(i)&&(s=Sd(s,e,{type:"attribute",property:"track-index",value:mi(i)})),iL(s,Vj(s))}function tde(t,e,n,r){const i=yFe(t,e,n,r);let s=Sd(t,e,{type:"attribute",property:"start",value:mi(r.start)});return s=Sd(s,e,{type:"attribute",property:"duration",value:mi(r.duration)}),i&&(s=Sd(s,e,{type:"attribute",property:i.attrName,value:mi(i.value)})),iL(s,Vj(s))}async function xFe(t){const e=t.element.sourceFile||t.activeCompPath||"index.html",n=await ta(t.projectId,e),r=ep(t.element);if(!r)throw new Error(`Timeline element ${t.element.id} is missing a patchable target`);const i=t.buildPatches(n,r);if(i===n)throw new Error(`Unable to patch timeline element ${t.element.id} in ${e}`);t.pendingTimelineEditPathRef.current.add(e),t.domEditSaveTimestampRef.current=Date.now(),await ol({projectId:t.projectId,label:t.label,kind:"timeline",coalesceKey:t.coalesceKey,files:{[e]:i},readFile:async()=>n,writeFile:t.writeProjectFile,recordEdit:t.recordEdit}),t.domEditSaveTimestampRef.current=Date.now()}async function bFe(t){const e=new Map,n=new Map;for(const i of t.changes){const s=i.element.sourceFile||t.activeCompPath||"index.html",a=e.get(s)??await ta(t.projectId,s);e.set(s,a);const o=ep(i.element);if(!o)throw new Error(`Timeline element ${i.element.id} is missing a patchable target`);const l=n.get(s)??a;if(!Kf(l,o))throw new Error(`Unable to patch timeline element ${i.element.id} in ${s}`);const c=i.buildPatches(l,o);c!==l&&n.set(s,c)}if(n.size===0)return;const r=Object.fromEntries(n);for(const i of Object.keys(r))t.pendingTimelineEditPathRef.current.add(i);t.domEditSaveTimestampRef.current=Date.now(),await ol({projectId:t.projectId,label:t.label,kind:"timeline",coalesceKey:t.coalesceKey,coalesceMs:t.coalesceMs,files:r,readFile:async i=>e.get(i)??ta(t.projectId,i),writeFile:t.writeProjectFile,recordEdit:t.recordEdit}),t.domEditSaveTimestampRef.current=Date.now()}async function nde({projectId:t,targetPath:e,patchTarget:n,attr:r,value:i,label:s,writeProjectFile:a,recordEdit:o,domEditSaveTimestampRef:l,pendingTimelineEditPathRef:c,patchLive:u}){const f=await ta(t,e);if(_S(f,n)===void 0)throw new Error(`Unable to patch element in ${e}`);const h=H_(f,n,r)??null;u(i);const y=Sd(f,n,{type:"attribute",property:r,value:i});c.current.add(e),l.current=Date.now();try{const p=await ol({projectId:t,label:s,kind:"timeline",files:{[e]:y},readFile:async v=>v===e?f:ta(t,v),writeFile:a,recordEdit:o});return l.current=Date.now(),p}catch(p){throw u(h),p}}const bk=.03;function vFe(t,e,n){return t>=e+bk&&t<=e+n-bk}function m3(t){const e=!!(t.hfId||t.domId||t.selector),n=t.playbackRate==null||Number.isFinite(t.playbackRate)&&t.playbackRate>0;return!t.timelineLocked&&t.timingSource!=="implicit"&&e&&n&&!!t.duration&&Number.isFinite(t.duration)}function rde(t,e){return m3(t)&&vFe(e,t.start,t.duration)}function AFe(t,e){return t.filter(n=>rde(n,e))}function SFe(t,e,n,r){return e.button!==0||e.shiftKey||!r?!1:t==="start"?n.canTrimStart:n.canTrimEnd}function wFe(t,e,n){return t?t==="move"?!!n:!!e:!1}function OFe(t,e,n,r){if(t.button!==0)return{kind:"ignore"};if(ce.getState().activeTool==="razor")return{kind:"ignore"};if(t.shiftKey)return{kind:"arm-shift-click"};const i=t.currentTarget.getBoundingClientRect(),s=O5e({width:i.width,offsetX:t.clientX-i.left,handleWidth:U3e,capabilities:e});return wFe(s,n,r)?{kind:"block",intent:s,rect:i}:!r||!e.canMove?{kind:"ignore"}:{kind:"move",rect:i}}function kFe(t,e,n,r,i){const{pps:s,onResizeElement:a,onMoveElement:o,onRazorSplit:l,onRazorSplitAll:c,blockedClipRef:u,shiftClickClipRef:f,suppressClickRef:h,scrollRef:m,setShowPopover:y,setRangeSelection:p,setResizingClip:v,setDraggedClip:b,setSelectedElementId:w,onSelectElement:O}=i;return{onResizeStart:(N,_)=>{var I;SFe(N,_,r,a)&&(_.stopPropagation(),u.current=null,y(!1),p(null),v({pointerId:_.pointerId,element:t,edge:N,originClientX:_.clientX,originScrollLeft:((I=m.current)==null?void 0:I.scrollLeft)??0,previewStart:t.start,previewDuration:t.duration,previewPlaybackStart:t.playbackStart,started:!1}))},onPointerDown:N=>{var j,L;const _=OFe(N,r,a,o);if(_.kind==="ignore")return;if(_.kind==="arm-shift-click"){f.current={element:t,anchorX:N.clientX,anchorY:N.clientY};return}if(_.kind==="block"){u.current={pointerId:N.pointerId,element:t,intent:_.intent,originClientX:N.clientX,originClientY:N.clientY,started:!1};return}const{rect:I}=_;u.current=null,y(!1),p(null),b({pointerId:N.pointerId,element:t,originClientX:N.clientX,originClientY:N.clientY,originScrollLeft:((j=m.current)==null?void 0:j.scrollLeft)??0,originScrollTop:((L=m.current)==null?void 0:L.scrollTop)??0,pointerClientX:N.clientX,pointerClientY:N.clientY,pointerOffsetX:N.clientX-I.left,pointerOffsetY:N.clientY-I.top,previewStart:t.start,previewTrack:t.track,desiredTrack:t.track,insertRow:null,snapTime:null,snapType:null,started:!1})},onClick:N=>{if(N.stopPropagation(),h.current)return;const{activeTool:_}=ce.getState();if(_==="razor"&&l){const I=N.currentTarget.getBoundingClientRect(),j=N.clientX-I.left,L=n.start+j/s,H=Math.max(n.start+bk,Math.min(n.start+n.duration-bk,L));N.shiftKey&&c?c(H):l(t,H);return}w(e),O==null||O(t)}}}function CFe(t,e,n){return n?{priority:"interaction",rich:!0}:{priority:t.start<e.end&&t.start+t.duration>e.start?"visible":"overscan",rich:!1}}function EFe({element:t}){const e=ce(n=>n.lintFindingsByElement.get(t.key??t.id));return!e||e.count===0?null:d.jsx("span",{className:"absolute w-1.5 h-1.5 rounded-full bg-amber-400",style:{top:7,right:7},title:e.messages.join(`
204
- `)})}function ide(t,e,n,r,i={priority:"visible",rich:!1}){return d.jsxs(d.Fragment,{children:[r==null?void 0:r(t),!n&&d.jsx(EFe,{element:t}),n&&d.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{borderRadius:"inherit"},children:n(t,e,i)})]})}function sde(t,e){return Number.isFinite(e)&&!t.hidden&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e>=t.start&&e<=t.end}function ade(t,e){return sde({start:t.start,end:t.start+Math.max(0,t.duration),hidden:t.hidden===!0},e)}function bW(t){if(t===void 0||t.trim()==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}function TFe(t){if(!(t instanceof HTMLElement))return null;const e=t.dataset.elId,n=bW(t.dataset.clipStart),r=bW(t.dataset.clipEnd);return!e||n===null||r===null?null:{id:e,start:n,end:r,hidden:t.dataset.clipHidden==="true",element:t}}function PFe(t){return[...t.querySelectorAll('[data-clip="true"]')].map(TFe).filter(e=>e!==null)}function MFe(t,e){return new Set(t.filter(n=>sde(n,e)).map(n=>n.id))}function vW(t,e,n,r=!1){const i=MFe(t,n);for(const s of t){const a=i.has(s.id);(r||e.has(s.id)!==a)&&s.element.toggleAttribute("data-active",a)}e.clear();for(const s of i)e.add(s)}function NFe({scrollRef:t,currentTime:e,clipStateVersion:n,elementStateVersion:r}){const i=x.useRef([]),s=x.useRef(new Set),a=x.useCallback(o=>{const l=t.current;if(!l){i.current=[],s.current.clear();return}i.current=PFe(l),vW(i.current,s.current,o,!0)},[t]);x.useLayoutEffect(()=>{a(e)},[n,e,r,a]),kr(()=>ba.subscribe(o=>{vW(i.current,s.current,o)}))}const DFe=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function IFe(t){return DFe.has(t)}function cg(t){return t.key??t.id}function _Fe(t,e){return[...e].sort((n,r)=>n.start-r.start||n.start+n.duration-(r.start+r.duration)||cg(n).localeCompare(cg(r))).map(n=>{const r=cg(n);return{id:OS(r),kind:"clip",rowId:t,elementId:r,time:n.start+n.duration/2}})}function RFe(t,e,n,r,i){const s=yF(t,e,n,r),a=s?cg(s):null,o=s?qL(i.get(cg(s))??[],s.start,s.duration):[];return{activeClip:s,activeId:a,lanes:o}}function jFe(t){return{percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId,collidingAnimationTargets:t.collidingAnimationTargets}}function LFe(t,e,n){var o;const r=cg(e),i=new Map;for(const l of n){const c=jFe(l),u=Nf(r,c);i.has(u)||i.set(u,{target:c,time:e.start+l.percentage/100*e.duration})}const s=[...i.entries()].sort(([l,c],[u,f])=>c.time-f.time||l.localeCompare(u)),a=[];for(let l=0;l<s.length;l+=1){const[,c]=s[l],u=(o=s[l-1])==null?void 0:o[1];u&&c.time>u.time&&c.target.animationId!==void 0&&a.push({id:Coe(r,c.target),kind:"ease",rowId:t,elementId:r,time:u.time+(c.time-u.time)/2,keyframeTarget:c.target}),a.push({id:koe(r,c.target),kind:"keyframe",rowId:t,elementId:r,time:c.time,keyframeTarget:c.target})}return a}function FFe(t,e,n){return t===null?!1:e.has(t)||n.has(t)}function $Fe(t,e,n,r,i,s,a){const o=lv(n,i.group);return{id:o,kind:"row",physicalTrackKey:t,logicalIndex:e,level:s,parentId:a,elementId:n,expandable:!1,expanded:!1,propertyGroup:i.group,items:LFe(o,r,i.keyframes)}}function BFe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,collapsedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){const f=new Map(t),h=new Map(l.map(v=>[v.anchorKey,v])),m=[];function y(v,b,w){const O=f.get(v)??[],C=PTe(v),{activeClip:E,activeId:M,lanes:N}=RFe(O,n,r,i,u),_=zFe(O,N.length),I=FFe(M,s,o)&&_;if(m.push({id:C,kind:"row",physicalTrackKey:v,logicalIndex:m.length,level:b,parentId:w,elementId:M,expandable:_,expanded:I,items:_Fe(C,O)}),!(!I||!E||!M))for(const j of N)m.push($Fe(v,m.length,M,E,j,b===1?2:3,C))}function p(v){const b=MTe(v.id),w=!a.has(v.id);if(m.push({id:b,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:m.length,level:1,parentId:null,elementId:null,groupId:v.id,expandable:v.memberTracks.length>0,expanded:w,items:[]}),o.has(v.id))for(const O of qf(v.memberElements))m.push({id:`${b}::${O.key}`,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:m.length,level:2,parentId:b,elementId:null,expandable:!1,expanded:!1,items:[]});if(w)for(const O of v.memberTracks)y(O,2,b)}for(const v of e){const b=h.get(v);if(b){p(b);continue}c.has(v)||y(v,1,null)}return m}function Nl(t,e){for(let n=0;n<t.length;n+=1){const r=t[n];if(r.id===e)return{row:r,rowIndex:n,itemIndex:-1,target:r};const i=r.items.findIndex(s=>s.id===e);if(i>=0)return{row:r,rowIndex:n,itemIndex:i,target:r.items[i]}}return null}function VFe(t,e){return[...t.items].sort((n,r)=>Math.abs(n.time-e)-Math.abs(r.time-e)||n.time-r.time||n.id.localeCompare(r.id))[0]??t}function HFe(t,e,n,r={}){var p;const i=Nl(t,e);if(!i)return null;const{row:s,rowIndex:a,itemIndex:o,target:l}=i;if(n==="Home"||n==="End"){const v=r.timelineBoundary?n==="Home"?t[0]:t.at(-1):s;return v?r.timelineBoundary||n==="Home"?v:v.items.at(-1)??v:l}if(n==="ArrowLeft")return o<0?s.parentId?((p=Nl(t,s.parentId))==null?void 0:p.target)??s:s:o===0?s:s.items[o-1];if(n==="ArrowRight")return o<0?s.items[0]??s:s.items[o+1]??l;const c=n==="ArrowUp"||n==="PageUp"?-1:1,u=n==="PageUp"||n==="PageDown",f=r.pageSize;if(u&&(f===void 0||!Number.isFinite(f)||f<1))return l;const h=u?Math.floor(f):1,m=Math.max(0,Math.min(t.length-1,a+c*h)),y=t[m];return!y||m===a?l:l.kind==="row"?y:VFe(y,l.time)}function QFe(t,e,n){const r=Nl(e,n);if(r)return r.target;const i=Nl(t,n);if(!i)return null;if(i.itemIndex>=0){for(let a=i.itemIndex-1;a>=0;a-=1){const o=Nl(e,i.row.items[a].id);if(o)return o.target}for(let a=i.itemIndex+1;a<i.row.items.length;a+=1){const o=Nl(e,i.row.items[a].id);if(o)return o.target}}const s=Nl(e,i.row.id);if(s)return s.target;if(i.row.parentId){const a=Nl(e,i.row.parentId);if(a)return a.target}return e[i.rowIndex]??e[i.rowIndex-1]??null}function zFe(t,e){return e>0||qf(t).length>0}function AW(t){if(!(t.target instanceof Element))return null;const e=t.target.closest("button, input, select, textarea, a[href], [contenteditable], [data-timeline-focus-id]");return e!=null&&e.dataset.timelineFocusId&&t.currentTarget.contains(e)?e:null}function ZFe(t,e,n,r){if(!r||t.size===0)return 1;const i=n.getRowIndex(e),s=Math.max(0,i>=0?i:Math.floor(n.getRowFromY(r.scrollTop))),a=i>=0?n.getRowTop(i):r.scrollTop,o=Math.min(n.rowKeys.length-1,Math.floor(n.getRowFromY(a+Math.max(0,r.clientHeight-.001))));let l=0;for(let c=s;c<=o;c+=1)l+=t.get(n.rowKeys[c])??0;return Math.max(1,l)}function GFe(t){const e=t.getBoundingClientRect();t.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.left+e.width/2,clientY:e.top+e.height/2}))}function UFe({logicalRows:t,focusedTargetId:e,rowGeometry:n,scrollRef:r,onToggleRow:i}){var c,u;const s=(e&&((c=Nl(t,e))==null?void 0:c.target.id))??((u=t[0])==null?void 0:u.id)??null,a=x.useMemo(()=>{const f=new Map;for(const h of t)f.set(h.physicalTrackKey,(f.get(h.physicalTrackKey)??0)+1);return f},[t]),o=x.useCallback(f=>{var m;const h=(m=AW(f))==null?void 0:m.dataset.timelineFocusId;h&&h!==e&&ce.getState().requestTimelineFocus(h)},[e]),l=x.useCallback(f=>{const h=AW(f),m=h==null?void 0:h.dataset.timelineFocusId;if(!h||!m)return;const y=Nl(t,m);if(y){if(IFe(f.key)){if(y.target.kind==="row"&&(f.key==="ArrowRight"&&y.target.expandable&&!y.target.expanded||f.key==="ArrowLeft"&&y.target.expandable&&y.target.expanded)){f.preventDefault(),i(y.target);return}const p=HFe(t,m,f.key,{pageSize:ZFe(a,y.row.physicalTrackKey,n,r.current),timelineBoundary:f.ctrlKey||f.metaKey});f.preventDefault(),p&&p.id!==m&&ce.getState().requestTimelineFocus(p.id);return}if(f.key==="ContextMenu"||f.key==="F10"&&f.shiftKey){f.preventDefault(),GFe(h);return}f.key!=="Enter"&&f.key!==" "||y.target.kind!=="row"||!y.target.expandable||(f.preventDefault(),i(y.target))}},[a,t,i,n,r]);return{rovingTargetId:s,onFocus:o,onKeyDown:l}}function XFe({pps:t,contentOrigin:e,contentGutter:n,trackContentWidth:r,theme:i,displayTrackOrder:s,rowGeometry:a,virtualRows:o,logicalRows:l,focusedTargetId:c,rowsVirtualized:u,clipIndex:f,renderTimeRange:h,visibleTimeRange:m,pinnedClipIdentities:y,trackOrder:p,tracks:v,trackStyles:b,groups:w,laneCounts:O,selectedElementId:C,selectedElementIds:E,hoveredClip:M,draggedClip:N,draggedElement:_,multiDragPreview:I,blockedClipRef:j,suppressClickRef:L,scrollRef:H,renderClipContent:$,renderClipOverlay:G,onDrillDown:q,onSelectElement:Y,setHoveredClip:J,setShowPopover:ie,setRangeSelection:te,setResizingClip:ne,setDraggedClip:W,setSelectedElementId:F,shiftClickClipRef:U,getPreviewElement:Q,getTrackStyle:K,keyframeCache:ee,gsapAnimations:se,selectedKeyframes:z,currentTime:V,onSeek:ae,onSelectSegment:he,onClickKeyframe:ge,onShiftClickKeyframe:ye,onContextMenuKeyframe:fe,onMoveKeyframe:me,onContextMenuClip:Te,onContextMenuLane:ve,beatAnalysis:xe,onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onResizeElement:Me,onMoveElement:Qe,onRazorSplit:qe,onRazorSplitAll:Ge}){const Ye=`timeline-lanes${x.useId().replaceAll(":","")}`,st=ce(Ke=>Ke.expandedClipIds),{collapsedGroupIds:nt,expandedLaneOwnerIds:yt,toggleGroupExpanded:dt,toggleLaneOwnerExpanded:zt}=rje(),Kt=f_e(),dn=ce(Ke=>Ke.duration);O_e({lanes:Kt});const{logicalRowsByTrack:en,groupByAnchor:et}=ije(l,w),Ot=x.useMemo(()=>new Set(w.flatMap(Ke=>Ke.memberTracks)),[w]),{toggleRowExpanded:St,toggleClipExpanded:Je}=sje(),Be=kje(I,u,h),We=UFe({logicalRows:l,focusedTargetId:c,rowGeometry:a,scrollRef:H,onToggleRow:Ke=>{Ke.elementId&&Je(Ke.elementId)}});return d.jsx("div",{role:"treegrid","aria-label":"Timeline tracks","aria-rowcount":l.length,"aria-colcount":2,onFocus:We.onFocus,onKeyDown:We.onKeyDown,className:u?"absolute inset-0":void 0,children:o.map(({index:Ke,rowKey:Xt})=>{var nr,bt,or,wn,Rn;const Pe=s[Ke];if(Pe===void 0)return null;const De=et.get(Pe);if(De){const wt=(nr=en.get(Pe))==null?void 0:nr[0];return wt?d.jsx(nje,{index:Ke,rowKey:Xt,group:De,logicalRow:wt,top:a.getRowTop(Ke),height:a.getRowHeight(Ke),virtualized:u,contentOrigin:e,theme:i,rovingTargetId:We.rovingTargetId,collapsedGroupIds:nt,expandedLaneOwnerIds:yt,toggleGroupExpanded:dt,toggleLaneOwnerExpanded:zt,lanes:Kt,pps:t,currentTime:V,compositionDuration:dn,beatTimes:xe==null?void 0:xe.beatTimes,contentGutter:n,trackContentWidth:r},Xt):null}const ze=Ufe(s,Pe),at=en.get(Pe)??[],Wt=at[0];if(!Wt)return null;const cn=a.getRowHeight(Ke),Jt=((bt=v.find(([wt])=>wt===Pe))==null?void 0:bt[1])??[],Pn=u?coe(f,Pe,h,y,Be):Jt,Cr=b.get(Pe)??K(""),mt=(N==null?void 0:N.started)===!0&&!p.includes(Pe)&&Jt.length===0,pn=i.rowBackground,un=hje(Jt,xe==null?void 0:xe.beatTimes,{selectedElementId:C,isMusicTrack:ky}),Cn=Jt.length>0&&Jt.every(wt=>wt.hidden===!0),Ln=Jt.length>0&&Jt.some(nl),tt=yF(Jt,O,C,E),Yn=(tt==null?void 0:tt.key)??(tt==null?void 0:tt.id),Pt=mje(Jt,st),mn=Pt?Xi-2*da:void 0,Ht=Jt.map(Q),gn=`${Ye}-track-${Ke}`,tr=`${gn}-automation`,_n=tt&&Yn?Kt.bind(tt,C===Yn||E.has(Yn)):null,br=_n&&!_n.readOnly?wt=>_n.onCommit({version:1,lanes:_n.lanes.filter(Zt=>Zt.target!==wt)}):void 0;return d.jsxs(she,{index:Ke,rowKey:Xt,logicalRow:Wt,propertyRows:at.slice(1),lanesId:gn,headerLanesId:`${gn} ${tr}`,top:a.getRowTop(Ke),height:cn,virtualized:u,background:pn,borderColor:i.rowBorder,rovingTargetId:We.rovingTargetId,children:[d.jsx(Y7e,{trackNumber:Pe,trackDisplayNumber:ze,trackLabel:((or=Jt[0])==null?void 0:or.label)??((wn=Jt[0])==null?void 0:wn.domId)??((Rn=Jt[0])==null?void 0:Rn.id)??`Track${u3(ze)}`,lanesId:`${gn} ${tr}`,contentOrigin:e,keyframeClip:tt,trackElements:Jt,clipCount:Jt.length,isExpanded:Pt,animations:Yn?se.get(Yn)??[]:[],currentTime:V,isTrackHidden:Cn,isAudioTrack:Ln,isGroupMember:Ot.has(Pe),theme:i,onToggleClipExpanded:()=>{const wt=Jt.map(Zn);wt.length>0&&St(wt)},onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onRemoveAutomationLane:br,onSeek:ae,rovingTargetId:We.rovingTargetId}),d.jsxs("div",{role:"gridcell","aria-colindex":2,style:{width:r,marginLeft:n,opacity:Cn?.35:1,transition:"opacity 120ms ease"},className:"relative",onContextMenu:wt=>{if(wt.defaultPrevented||!ve)return;const Zt=wt.currentTarget.getBoundingClientRect(),Ct=(wt.clientX-Zt.left)/t;Ct<0||(wt.preventDefault(),ve(wt,Pe,Ct))},children:[d.jsx(CTe,{beatTimes:xe==null?void 0:xe.beatTimes,beatStrengths:xe==null?void 0:xe.beatStrengths,pps:t,highlightTime:N!=null&&N.started&&N.snapType==="beat"?N.snapTime:null,renderTimeRange:u?h:void 0}),un&&d.jsx(ETe,{beatTimes:xe==null?void 0:xe.beatTimes,beatStrengths:xe==null?void 0:xe.beatStrengths,pps:t,renderTimeRange:u?h:void 0}),mt&&d.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:Cr.label,fontSize:11,letterSpacing:"0.06em",textTransform:"uppercase",opacity:.5},children:"New track"}),Pn.map(wt=>{const Zt=K(wt.tag),Ct=Zn(wt),fr=Ct===Yn,Nt=fr&&Pt,kt=vS(wt),xn=C===Ct||E.has(Ct),Rt=!!wt.compositionSrc,sn=Ct;if((N==null?void 0:N.started)===!0&&_!=null&&Zn(_)===Ct)return null;const Fn=Q(wt),ri=CFe(Fn,m,xn||M===sn||y.has(sn)),fn=I!=null&&che(sn,I),En=fn?wje(sn,t,I):0,rr=kFe(wt,Ct,Fn,kt,{pps:t,onResizeElement:Me,onMoveElement:Qe,onRazorSplit:qe,onRazorSplitAll:Ge,blockedClipRef:j,shiftClickClipRef:U,suppressClickRef:L,scrollRef:H,setShowPopover:ie,setRangeSelection:te,setResizingClip:ne,setDraggedClip:W,setSelectedElementId:F,onSelectElement:Y}),Ti=d.jsx(Eoe,{onContextMenu:Dr=>{Dr.preventDefault(),Te==null||Te(Dr,wt)},el:Fn,pps:t,clipY:da,clipHeight:mn,isSelected:xn,isHovered:M===sn,isDragging:!1,isActive:ade(Fn,V),hasCustomContent:!!$,capabilities:kt,theme:i,isComposition:Rt,tabIndex:We.rovingTargetId===OS(Ct)?0:-1,onHoverStart:()=>J(sn),onHoverEnd:()=>J(null),onResizeStart:rr.onResizeStart,onPointerDown:rr.onPointerDown,onClick:rr.onClick,onDoubleClick:Dr=>{Dr.stopPropagation(),!L.current&&Rt&&q&&q(wt)},children:ide(Fn,Zt,$,G,ri)},sn),Jr=ee==null?void 0:ee.get(Ct),$i=!Nt&&Jr&&d.jsx(RPe,{element:Fn,elementId:Ct,keyframesData:Jr,pixelsPerSecond:t,rowHeight:cn,beatsActive:un,accentColor:Zt.accent,isSelected:xn,currentTime:V,selectedKeyframes:z,rovingTargetId:We.rovingTargetId,onClickKeyframe:ge,onShiftClickKeyframe:ye,onContextMenuKeyframe:fe,onMoveKeyframe:me,onSelectSegment:he,suppressClickRef:L},`${sn}-diamonds`),ps=fr&&d.jsx(oIe,{id:gn,animations:Nt?se.get(Ct)??[]:[],clipStart:Yce(Fn),clipDuration:Fn.duration,clipLeftPx:Fn.start*t,clipWidthPx:Math.max(Fn.duration*t,4),accentColor:Zt.accent,isSelected:xn,currentPercentage:Fn.duration>0?(V-Fn.start)/Fn.duration*100:0,elementId:Ct,selectedKeyframes:z,rovingTargetId:We.rovingTargetId,onSelectSegment:Dr=>he==null?void 0:he(Ct,Dr),onClickKeyframe:Dr=>ge==null?void 0:ge(Fn,Dr),onShiftClickKeyframe:Dr=>ye==null?void 0:ye(Ct,Dr),onContextMenuKeyframe:(Dr,Za)=>fe==null?void 0:fe(Dr,Ct,Za),onMoveKeyframe:(Dr,Za)=>(me==null?void 0:me(Ct,Dr,Za))??Promise.resolve(!1),suppressClickRef:L},`${sn}-property-lanes`);return fn?d.jsxs("div",{className:"absolute inset-0",style:{transform:`translateX(${En}px)`,opacity:.85,zIndex:20,pointerEvents:"none"},children:[Ti,$i,ps]},sn):d.jsxs(x.Fragment,{children:[Ti,$i,ps]},sn)}),d.jsx("div",{id:tr,children:Pt?d.jsx(due,{elements:Ht,isSelected:wt=>{const Zt=Zn(wt);return C===Zt||E.has(Zt)},lanes:Kt,pps:t,laneCount:Yn?O.get(Yn)??0:0,accentColor:K((tt==null?void 0:tt.tag)??"").accent,currentTime:V,beatTimes:xe==null?void 0:xe.beatTimes}):null})]})]},Xt)})})}const ode=8,vk={playhead:0,"clip-edge":1,beat:2};function WFe(t){const e=new Map,n=(r,i)=>{if(!Number.isFinite(r)||r<0)return;const s=Math.round(r*1e3)/1e3,a=e.get(s);(!a||vk[i]<vk[a.type])&&e.set(s,{time:s,type:i})};for(const r of t.beatTimes)n(r,"beat");for(const r of t.elements)t.excludeElementKey!=null&&(r.key??r.id)===t.excludeElementKey||(n(r.start,"clip-edge"),n(r.start+r.duration,"clip-edge"));return t.playheadTime!=null&&n(t.playheadTime,"playhead"),Array.from(e.values()).sort((r,i)=>r.time-i.time)}function Ak(t,e,n){let r=null,i=n;for(const s of e){const a=Math.abs(s.time-t);(a<i||a===i&&r&&vk[s.type]<vk[r.type])&&(i=a,r=s)}return r?{time:r.time,target:r}:{time:t,target:null}}function qFe(t,e,n,r,i){if(n.length===0)return{start:t,snapTime:null,snapType:null};const s=ode/Math.max(r,1),a=Ak(t,n,s),o=Ak(t+e,n,s),l=a.target!==null,c=o.target!==null;let u=t,f=null;l&&(!c||Math.abs(a.time-t)<=Math.abs(o.time-(t+e)))?(u=a.time,f=a.target):c&&(u=o.time-e,f=o.target);const h=Math.max(0,i-e),m=Math.round(u*1e3)/1e3,y=Math.max(0,Math.min(h,m));return f&&Math.abs(y-m)>1e-6&&(f=null),{start:y,snapTime:(f==null?void 0:f.time)??null,snapType:(f==null?void 0:f.type)??null}}function YFe(t,e,n,r){if(n<0)return t;const i=e.indexOf(t);return i<0?t:r?i>=n?t:e[n]??t:i<n?t:e[n-1]??t}function SW(t,e,n){return e<0?!0:n?t>=e:t<=e}function KFe(t,e,n,r){if(e.length===0)return n<0?0:n;const i=t.indexOf(e[0]),s=t.indexOf(e[e.length-1])+1;return r<Math.min(...e)?i:s}function JFe(t){var b;const{order:e,audioTracks:n,elements:r,desiredTrack:i,deliberateInsertRow:s}=t,{start:a,duration:o,dragKey:l,isAudio:c,preferInsertAbove:u}=t,f=e.findIndex(w=>n.has(w));if(s!==null&&SW(s,f,c))return{track:i,insertRow:s};const h=YFe(i,e,f,c),m=e.filter(w=>n.has(w)===c),y=t$e({elements:r,desiredTrack:h,start:a,duration:o,trackOrder:m,excludeKey:l}),p=(b=r.find(w=>(w.key??w.id)===l))==null?void 0:b.track,v=p!=null&&h!==p&&y.track===p;if(y.needsInsert||v){const w=e.indexOf(h);if(w<0)return{track:h,insertRow:KFe(e,m,f,h)};const O=p==null?-1:e.indexOf(p),E=(v?O>w:u&&SW(w,f,c))?w:w+1;return{track:h,insertRow:E}}return{track:y.track,insertRow:null}}function e$e(t,e,n=W3e){if(e===0||t<=0)return 0;if(t>=e)return e;const r=Math.floor(t),i=t-r;return i<n?r:i>1-n?r+1:null}function lde(t,e,n,r){return t<r&&n<e}function W4(t,e,n,r,i){return!t.some(s=>(s.key??s.id)!==i&&s.track===e&&lde(n,r,s.start,s.start+s.duration))}function t$e({elements:t,desiredTrack:e,start:n,duration:r,trackOrder:i,excludeKey:s}){const a=n+r,o=i.indexOf(e);if(o===-1)return{track:e,needsInsert:!0};if(W4(t,e,n,a,s))return{track:e,needsInsert:!1};for(let l=o-1;l>=0;l--)if(W4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};for(let l=o+1;l<i.length;l++)if(W4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};return{track:e,needsInsert:!0}}function n$e(t,e){if(!t.started||!e)return null;const n=e.getBoundingClientRect();return{left:t.pointerClientX-n.left+e.scrollLeft-t.pointerOffsetX,top:t.pointerClientY-n.top+e.scrollTop-t.pointerOffsetY}}function r$e(t,e,n){return Math.max(n,t&&e>0?t.scrollWidth/e:n)}function i$e(t,e,n,r,i){if(i.size<=1||!i.has(n))return t;const s=r.filter(o=>i.has(o.key??o.id)).map(o=>o.start),a=Oje(t-e.start,s);return e.start+a}function s$e(t,e,n,r,i){const{scroll:s,trackOrder:a,rowHeights:o,elements:l}=i,c=s?J3e(e-s.getBoundingClientRect().top+s.scrollTop,o):{rowFloat:0,fraction:0,rowHeight:eoe(0,o)},u=e$e(c.rowFloat,a.length,e5e(c.rowHeight)),f=c.fraction<.5,h=i.audioTracks??new Set(l.filter(nl).map(m=>m.track));return JFe({order:a,audioTracks:h,elements:l,desiredTrack:r,deliberateInsertRow:u,start:n,duration:t.element.duration,dragKey:t.element.key??t.element.id,isAudio:nl(t.element),preferInsertAbove:f})}function a$e(t,e,n,r){const{scroll:i,pps:s,duration:a,trackOrder:o,elements:l,selectedKeys:c,buildSnapTargets:u}=r,f=r$e(i,s,a),h=(i==null?void 0:i.scrollTop)??t.originScrollTop,m=(i==null?void 0:i.getBoundingClientRect().top)??0,y=x_(t.originClientY-m+t.originScrollTop,r.rowHeights),p=x_(n-m+h,r.rowHeights),v=S5e({start:t.element.start,track:t.element.track,duration:t.element.duration,originClientX:t.originClientX,originRow:y,originScrollLeft:t.originScrollLeft,currentScrollLeft:(i==null?void 0:i.scrollLeft)??t.originScrollLeft,pixelsPerSecond:s,maxStart:f,trackOrder:o},e,p),b=u(t.element.key??t.element.id,!ky(t.element)),w=qFe(v.start,t.element.duration,b,s,f+t.element.duration),O=t.element.key??t.element.id,C=i$e(w.start,t.element,O,l,c),{track:E,insertRow:M}=s$e(t,n,C,v.track,r);return{...t,started:!0,pointerClientX:e,pointerClientY:n,previewStart:C,previewTrack:E,desiredTrack:v.track,insertRow:M,snapTime:w.snapTime,snapType:w.snapType}}function o$e(t,e,n){const{scroll:r,pps:i,buildSnapTargets:s}=n,a=t.originScrollLeft??(r==null?void 0:r.scrollLeft)??0,o=e+(((r==null?void 0:r.scrollLeft)??a)-a),l=t.element.sourceDuration!=null?Math.max(0,(t.element.sourceDuration-(t.element.playbackStart??0))/Math.max(t.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,c=t.element.tag.toLowerCase(),u=t.element.kind==="composition"||c==="audio"||c==="video",f=Math.max(t.element.playbackRate??1,.1),h=t.element.start+l;let m=w5e({start:t.element.start,duration:t.element.duration,originClientX:t.originClientX,pixelsPerSecond:i,minStart:0,maxEnd:h,playbackStart:t.edge==="start"&&u?t.element.playbackStart??0:t.element.playbackStart,playbackRate:t.element.playbackRate},t.edge,o);const y=s(t.element.key??t.element.id,!ky(t.element));if(y.length>0){const p=ode/Math.max(i,1);if(t.edge==="end"){const v=m.start+m.duration,b=Ak(v,y,p).time,w=Math.round((b-m.start)*1e3)/1e3;b!==v&&b<=h+1e-6&&w>=.05&&(m={...m,duration:w})}else{const v=Ak(m.start,y,p).time,b=m.start-v,w=m.playbackStart!=null?m.playbackStart/f:Number.POSITIVE_INFINITY,O=Math.round((m.duration+b)*1e3)/1e3;v!==m.start&&v>=0&&b<=w+1e-6&&O>=.05&&(m={...m,start:v,duration:O,playbackStart:m.playbackStart!=null?Math.round(Math.max(0,m.playbackStart-b*f)*1e3)/1e3:void 0})}}return{originScrollLeft:a,previewStart:m.start,previewDuration:m.duration,previewPlaybackStart:m.playbackStart}}function l$e(t,e,n){const r=A5e(t,e);n({originScrollLeft:e.originScrollLeft,previewStart:(r==null?void 0:r.start)??e.previewStart,previewDuration:(r==null?void 0:r.duration)??e.previewDuration,previewPlaybackStart:(r==null?void 0:r.playbackStart)??e.previewPlaybackStart,groupPreview:t.changes})}const c$e=x.memo(function({drag:e,scrollRef:n,pixelsPerSecond:r,rowHeight:i,selectedElementId:s,currentTime:a,theme:o,getTrackStyle:l,renderClipContent:c,renderClipOverlay:u}){const f=(e==null?void 0:e.started)===!0?D3e({element:e.element,draggedElementId:e.element.key??e.element.id,previewStart:e.previewStart,previewTrack:e.previewTrack}):null,h=e?n$e(e,n.current):null;return d.jsx("div",{"data-timeline-gesture-overlay":!0,className:"absolute inset-0 pointer-events-none",children:f&&h&&d.jsx("div",{"data-timeline-gesture-actor":f.key??f.id,className:"absolute",style:{top:h.top,left:h.left,width:Math.max(f.duration*r,4),height:i,zIndex:40},children:d.jsx(Eoe,{el:{...f,start:0},pps:r,clipY:0,isSelected:s===(f.key??f.id),isHovered:!1,isDragging:!0,isGestureActor:!0,isActive:ade(f,a),hasCustomContent:!!c,capabilities:vS(f),theme:o,isComposition:!!f.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:ide(f,l(f.tag),c,u,{priority:"interaction",rich:!0})})})})}),u$e=x.memo(function(e){const{draggedClip:n,scrollRef:r,selectedElementIds:i,displayTrackOrder:s}=e,a=(n==null?void 0:n.started)===!0?s.indexOf(n.previewTrack):-1,o=eoe(a,e.rowHeights),l=Math.min(o,Xi)-da*2,{onResizeElement:c,onMoveElement:u,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onRazorSplit:m,onRazorSplitAll:y}=wS(),p=ce(O=>O.beatDragging),v=(n==null?void 0:n.element)??null,b=v?Zn(v):null,w=(n==null?void 0:n.started)===!0&&v&&b?{dragStarted:!0,draggedKey:b,draggedOriginStart:v.start,draggedPreviewStart:n.previewStart,selectedKeys:i}:null;return d.jsxs("div",{className:"relative",style:{height:e.totalH,width:e.contentOrigin+e.trackContentWidth},children:[d.jsx(mTe,{major:e.major,minor:e.minor,pps:e.pps,trackContentWidth:e.trackContentWidth,totalH:e.totalH,effectiveDuration:e.effectiveDuration,majorTickInterval:e.majorTickInterval,theme:e.theme,beatAnalysis:e.beatAnalysis,contentOrigin:e.contentOrigin,renderTimeRange:e.rowsVirtualized?e.renderTimeRange:void 0}),d.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:u0}}),d.jsx(XFe,{...e,draggedElement:v,multiDragPreview:w,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onResizeElement:c,onMoveElement:u,onRazorSplit:m,onRazorSplitAll:y}),d.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:Jae}}),e.laneGapStrips.map(O=>{const C=s.indexOf(O.track);if(C<0)return null;const E=O.kind==="hover";return(e.rowsVirtualized?O.intervals.filter(N=>N.start<e.renderTimeRange.end&&N.end>e.renderTimeRange.start):O.intervals).map(N=>d.jsx("div",{className:"pointer-events-none absolute",style:{top:nM(C,e.rowHeights)+da,left:e.contentOrigin+N.start*e.pps,width:Math.max((N.end-N.start)*e.pps,2),height:Xi-da*2,background:E?"rgba(60,230,172,0.18)":"rgba(60,230,172,0.055)",borderRadius:4,zIndex:25}},`gap-${O.kind}-${O.track}-${N.start}`))}),(n==null?void 0:n.started)&&n.insertRow==null&&a>=0&&d.jsx("div",{className:"absolute pointer-events-none",style:{top:nM(a,e.rowHeights)+da,left:e.contentOrigin+n.previewStart*e.pps,width:Math.max(n.element.duration*e.pps,4),height:l,border:"1px solid rgba(60,230,172,0.55)",background:"rgba(60,230,172,0.12)",borderRadius:4,zIndex:30}}),(n==null?void 0:n.started)&&n.insertRow!=null&&d.jsx("div",{className:"absolute pointer-events-none",style:{top:nM(n.insertRow,e.rowHeights)-.5,left:e.contentOrigin,width:e.trackContentWidth,height:1,background:"#3CE6AC",boxShadow:"0 0 3px rgba(60,230,172,0.5)",zIndex:55}}),(n==null?void 0:n.started)&&n.snapTime!=null&&n.snapType!=="beat"&&d.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+n.snapTime*e.pps,top:La,bottom:0,width:1,background:n.snapType==="playhead"?"#3CE6AC":"rgba(255,255,255,0.6)",boxShadow:n.snapType==="playhead"?"0 0 6px rgba(60,230,172,0.5)":"0 0 6px rgba(255,255,255,0.4)",zIndex:60}}),d.jsx(c$e,{drag:n,scrollRef:r,pixelsPerSecond:e.pps,rowHeight:l,selectedElementId:e.selectedElementId,currentTime:e.currentTime,theme:e.theme,getTrackStyle:e.getTrackStyle,renderClipContent:e.renderClipContent,renderClipOverlay:e.renderClipOverlay}),e.marqueeRect&&d.jsx("div",{"aria-hidden":"true",className:"absolute pointer-events-none",style:{left:e.marqueeRect.left,top:e.marqueeRect.top,width:e.marqueeRect.width,height:e.marqueeRect.height,background:"rgba(60,230,172,0.10)",border:"1px dashed rgba(60,230,172,0.7)",borderRadius:2,zIndex:70}}),e.rangeSelection&&d.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+Math.min(e.rangeSelection.start,e.rangeSelection.end)*e.pps,width:Math.abs(e.rangeSelection.end-e.rangeSelection.start)*e.pps,top:La,bottom:0,backgroundColor:"rgba(59, 130, 246, 0.12)",borderLeft:"1px solid rgba(59, 130, 246, 0.4)",borderRight:"1px solid rgba(59, 130, 246, 0.4)",zIndex:50}}),d.jsx("div",{ref:e.playheadRef,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${b_(0,0,e.contentOrigin)}px`,width:Q6,zIndex:100,display:p?"none":void 0},children:d.jsx(gTe,{scrubbing:e.isScrubbing})})]})});function Ec(t){return nl(t)?"audio":"visual"}const Sk=t=>t.key??t.id,wW=1e-6;function f$e(t,e){return t.start<e.start+e.duration-wW&&e.start<t.start+t.duration-wW}function h$e(t,e){const n=Sk(t),r=Sk(e);return n<r?-1:n>r?1:0}function d$e(t,e,n){const r=[...t].sort(h$e),i=[];for(const s of r){let a=i.findIndex(o=>o.every(l=>!f$e(l,s)));a===-1&&(a=i.length,i.push([])),i[a].push(s),n.set(Sk(s),e+a)}return Math.max(1,i.length)}function OW(t,e,n){const r=new Map;for(const s of t){const a=r.get(s.track);a?a.push(s):r.set(s.track,[s])}let i=0;for(const s of[...r.keys()].sort((a,o)=>a-o))i+=d$e(r.get(s),e+i,n);return i}function cde(t){if(t.length===0)return t;const e=new Map,n=[],r=[];for(const o of t)(Ec(o)==="audio"?r:n).push(o);let i=0;i+=OW(n,i,e),OW(r,i,e);let s=!1;const a=t.map(o=>{const l=e.get(Sk(o));return l==null||l===o.track?o:(s=!0,{...o,track:l,authoredTrack:o.authoredTrack??o.track})});return s?a:t}const kW=1e-6,wk=t=>JSON.stringify([t.sourceFile??null,t.stackingContextId??null]);function jF(t,e){return wk(t)===wk(e)}function p$e(t,e){return t.start<e.start+e.duration-kW&&e.start<t.start+t.duration-kW}function U_(t,e){return t.track<e.track}function Gg(t,e){return t.zIndex!==e.zIndex?t.zIndex>e.zIndex:t.domIndex!=null&&e.domIndex!=null?t.domIndex>e.domIndex:!1}function X_(t,e){return t.length>0?e(t.map(n=>n.zIndex)):null}function m$e(t,e,n,r){const i=e.filter(h=>!h.isAudio);if(i.length===0)return!1;const s=i.filter(h=>U_(t,h)),a=i.filter(h=>U_(h,t));if(s.every(h=>Gg(t,h))&&a.every(h=>Gg(h,t)))return!1;const l=X_(s,h=>Math.max(...h)),c=x$e(t,s,a);if(c!=null)return c!==t.zIndex&&r(t,c),c!==t.zIndex;const u=l!=null?l+1:0,f=Math.max(0,u);return f!==t.zIndex&&r(t,f),b$e(t,n,r),!0}function g$e(t,e,n){if(e-t>=2){const r=Math.floor((t+e)/2);return r>t&&r<e?r:null}return n(e)?e:null}function y$e(t,e){const n=t-1;return n>=0?n:e(t)?t:null}function x$e(t,e,n){const r=X_(e,a=>Math.max(...a)),i=X_(n,a=>Math.min(...a)),s=a=>{const o={...t,zIndex:a};return e.every(l=>Gg(o,l))&&n.every(l=>Gg(l,o))};return r!=null&&i!=null?g$e(r,i,s):r!=null?r+1:i!=null?y$e(i,s):null}function b$e(t,e,n){const r=[t],i=(s,a)=>{Gg(s,a)||(n(s,a.zIndex+1),r.push(s))};for(;r.length>0;){const s=r.shift();for(const a of e(s))U_(a,s)&&!Gg(a,s)&&i(a,s)}}function v$e(t,e){const n=new Set(e);if(n.size===0)return[];const r=t.filter(y=>Number.isFinite(y.zIndex)),i=new Set(r.filter(y=>n.has(y.key)).map(wk)),s=r.filter(y=>i.has(wk(y))),a=new Map(s.map(y=>[y.key,{...y}])),o=s.filter(y=>n.has(y.key)&&!y.isAudio).map(y=>a.get(y.key)).sort((y,p)=>p.track-y.track),l=new Map,c=(y,p)=>{y.zIndex=p,l.set(y.key,p)},u=[...a.values()],f=y=>u.filter(p=>p.key!==y.key&&!p.isAudio&&jF(y,p)&&p$e(y,p));for(const y of o)m$e(y,f(y),f,c);const h=new Set,m=[];for(const y of o)l.has(y.key)&&!h.has(y.key)&&(m.push({key:y.key,zIndex:l.get(y.key)}),h.add(y.key));for(const[y,p]of l)h.has(y)||(m.push({key:y,zIndex:p}),h.add(y));return m}function dv(t){return vS({tag:t.tag,kind:t.kind,duration:t.duration,domId:t.domId,selector:t.selector,compositionSrc:t.compositionSrc,playbackStart:t.playbackStart,playbackStartAttr:t.playbackStartAttr,sourceDuration:t.sourceDuration,timingSource:t.timingSource,timelineLocked:t.timelineLocked}).canMove}function A$e(t,e){const n=e.selectedKeys;if(!n)return null;const r=new Set(n),i=e.elements.includes(t.element)?e.elements:[...e.elements,t.element];for(const u of i){const f=u.expandedHostKey,h=Zn(u);f&&r.has(f)&&r.has(h)&&r.delete(h)}const s=t.element.expandedHostKey,a=Zn(t.element);if(!s||r.has(a))return r.size===n.size?null:{drag:t,selectedKeys:r};const o=e.elements.find(u=>Zn(u)===s);if(!o||!dv(o))return null;const l=t.previewStart-t.element.start,c=u=>u===t.element.track?o.track:u;return{drag:{...t,element:o,previewStart:Math.max(0,Math.round((o.start+l)*1e3)/1e3),previewTrack:c(t.previewTrack)??o.track,desiredTrack:c(t.desiredTrack)},selectedKeys:r}}const W_=new WeakMap;function g3(t,e){let n=W_.get(t);n||(n=new Map,W_.set(t,n));const r=new Map;for(const i of e){const s=(n.get(i)??0)+1;n.set(i,s),r.set(i,s)}return r}function Ok(t,e,n){var r;return((r=W_.get(t))==null?void 0:r.get(n))===e.get(n)}function q_(t,e,n){for(const r of n)Ok(t,e,r.key)&&t(r.key,r.updates)}let p8=null;function LF(t){const e=p8;let n;if(e)n=e.then(t,t);else try{n=Promise.resolve(t())}catch(i){n=Promise.reject(i)}const r=n.then(()=>{},()=>{});return p8=r,r.then(()=>{p8===r&&(p8=null)}),n}function ude(t){return LF(async()=>{const n=await t.commitZ();return n&&!n.durable?!1:t.mirror()})}function fde(t){return LF(async()=>await t.commitLane()?(await t.commitZ(),!0):!1)}function Ug(t,e){return t.then(n=>{var r;return n&&((r=e.refreshAfterLaneMove)==null||r.call(e)),n})}const CW=t=>t.key??t.id,FF=(t,e)=>(t.sourceFile??null)===(e.sourceFile??null);function $F(t,e,n){const r=CW(n),i=e.filter(o=>CW(o)!==r&&FF(o,n)),s=i.find(o=>o.track===t);if(s)return s.authoredTrack??s.track;let a=null;for(const o of i)(!a||Math.abs(o.track-t)<Math.abs(a.track-t))&&(a=o);return a?Math.round((a.authoredTrack??a.track)+(t-a.track)):t}const Gr=t=>t.key??t.id,S$e=t=>Math.round(t*1e3)/1e3;let hde=0;function wd(t,e,n,r="timing",i){if(t.length===0)return Promise.resolve(!0);const{updateElement:s,onMoveElement:a,onMoveElements:o}=e;o||console.warn(a?`[Timeline] persistMoveEdits: only single-clip onMoveElement wired — this ${t.length}-clip move degrades to a per-clip persist race (no atomic single-undo)`:`[Timeline] persistMoveEdits: no move persist handler wired — ${t.length} edit(s) applied to the store only, not saved`);const l=t.map(m=>({key:Gr(m.element),start:m.element.start,track:m.element.track,authoredTrack:m.element.authoredTrack})),c=g3(s,t.map(m=>Gr(m.element))),u=m=>{const y=m.persistTrack??(m.updates.track!==m.element.track?m.updates.track:void 0);s(Gr(m.element),y==null?m.updates:{...m.updates,authoredTrack:y})};for(const m of t)u(m);const f=t.map(m=>m.persistTrack==null||m.persistTrack===m.updates.track?m:{element:m.element,updates:{...m.updates,track:m.persistTrack}}),h=o?o(f,n,r,i):Promise.all(f.map(m=>Promise.resolve(a==null?void 0:a(m.element,m.updates))));return Promise.resolve(h).then(()=>{for(const m of t){const y=Gr(m.element);Ok(s,c,y)&&u(m)}return!0},m=>{for(const y of l)Ok(s,c,y.key)&&s(y.key,{start:y.start,track:y.track,authoredTrack:y.authoredTrack});return console.error("[Timeline] Failed to persist clip edits",m),!1})}function EW(t,e){return t.length===0?0:e<=0?t[0]-.5:e>=t.length?t[t.length-1]+.5:(t[e-1]+t[e])/2}function w$e(t,e){const{elements:n,selectedKeys:r}=e,i=Gr(t.element);if(!r||r.size<=1||!r.has(i))return null;const s=new Set([...r].filter(l=>{const c=n.find(u=>Gr(u)===l);return c?dv(c):!1})),a=t.previewStart-t.element.start;return{keys:s,movedStart:l=>Gr(l)===i?t.previewStart:Math.max(0,S$e(l.start+a))}}function dde(t,e){const n=A$e(t,e);if(n){dde(n.drag,{...e,selectedKeys:n.selectedKeys});return}const{elements:r,updateElement:i,onMoveElement:s}=e,a=Gr(t.element),o=t.insertRow!=null,l=t.previewTrack!==t.element.track,c=t.desiredTrack??t.previewTrack,u=o||c!==t.element.track,f=w$e(t,e);if(!o&&!l){if(t.previewStart-t.element.start===0)return;if(f){const E=r.filter(M=>f.keys.has(Gr(M))).map(M=>({element:M,updates:{start:f.movedStart(M),track:M.track}})).filter(M=>M.updates.start!==M.element.start);wd(E,e);return}const w={start:t.previewStart,track:t.element.track},O={start:t.element.start,track:t.element.track},C=g3(i,[a]);i(a,w),Promise.resolve(s==null?void 0:s(t.element,w)).catch(E=>{Ok(i,C,a)&&i(a,O),console.error("[Timeline] Failed to persist clip edit",E)});return}if(o){O$e(t,e,f);return}const h={element:t.element,updates:{start:t.previewStart,track:t.previewTrack},persistTrack:$F(t.previewTrack,r,t.element)},m=u?`clip-lane-move:${hde++}`:void 0,y=[h];if(f)for(const b of r){if(Gr(b)===a||!f.keys.has(Gr(b)))continue;const w=f.movedStart(b);w!==b.start&&y.push({element:b,updates:{start:w,track:b.track}})}const p=r.map(b=>Gr(b)===a?{...b,start:t.previewStart,track:t.previewTrack}:f!=null&&f.keys.has(Gr(b))?{...b,start:f.movedStart(b)}:b),v=f?f.keys:null;if(!u||!e.readZIndex||!e.onStackingPatches){Ug(wd(y,e,m,"lane-reorder"),e);return}Ug(fde({commitLane:()=>wd(y,e,m,"lane-reorder"),commitZ:()=>mde(p,a,t.element.track,t.previewTrack,v,e,m)}),e).catch(()=>{})}function pde(t,e,n,r,i){const{elements:s,trackOrder:a}=i,o=Gr(t);if(t.expandedParentStart!=null)return null;const l=EW(a,n),c=s.map(w=>Gr(w)===o?{...w,start:e,track:l}:r!=null&&r.keys.has(Gr(w))?{...w,start:r.movedStart(w)}:w),u=Ec(t),f=w=>FF(w,t)&&Ec(w)===u&&w.expandedParentStart==null,h=[...new Set(s.filter(f).map(w=>w.track))].sort((w,O)=>w-O),m=h.filter(w=>w<l).length,y=EW(h,m),p=cde(s.filter(f).map(w=>Gr(w)===o?{...w,start:e,track:y}:r!=null&&r.keys.has(Gr(w))?{...w,start:r.movedStart(w)}:w)),v=new Map(s.map(w=>[Gr(w),w]));for(const w of p){const O=v.get(Gr(w));if(O&&f(O)&&!dv(O)&&w.track!==(O.authoredTrack??O.track))return console.warn(`[Timeline] Track insert refused: locked clip ${Gr(O)} would need renumbering`),null}const b=[];if(r)for(const w of s){const O=Gr(w);O!==o&&r.keys.has(O)&&!f(w)&&dv(w)&&b.push({element:w,updates:{start:r.movedStart(w),track:w.track},persistTrack:w.authoredTrack})}for(const w of p){const O=v.get(Gr(w));if(!O||!dv(O))continue;const C=Gr(w)===o||r!=null&&r.keys.has(Gr(w))?(r==null?void 0:r.movedStart(O))??e:O.start;b.push({element:O,updates:{start:C,track:w.track}})}return{candidate:c,edits:b}}function O$e(t,e,n){const r=Gr(t.element),i=pde(t.element,t.previewStart,t.insertRow,n,e);if(!i)return;const{candidate:s,edits:a}=i;if(a.length===0)return;const o=`clip-lane-move:${hde++}`;if(!e.readZIndex||!e.onStackingPatches){Ug(wd(a,e,o,"track-insert"),e);return}Ug(fde({commitLane:()=>wd(a,e,o,"track-insert"),commitZ:()=>mde(s,r,t.element.track,t.insertRow,n?n.keys:null,e,o)}),e).catch(()=>{})}function k$e(t,e,n,r,i){if(e.kind==="move"){const a={element:t,updates:{start:t.start,track:e.displayTrack},persistTrack:e.persistTrack};return Ug(wd([a],n,r,"lane-reorder",i),n)}const s=pde(t,t.start,e.insertRow,null,n);return!s||s.edits.length===0?Promise.resolve(!1):Ug(wd(s.edits,n,r,"track-insert",i),n)}function mde(t,e,n,r,i,s,a){const{readZIndex:o,onStackingPatches:l}=s;if(!o||!l||r===n)return Promise.resolve();const c=t.map((h,m)=>({key:Gr(h),start:h.start,duration:h.duration,track:h.track,zIndex:o(h),isAudio:Ec(h)==="audio",sourceFile:h.sourceFile,domIndex:m,stackingContextId:h.stackingContextId??null})),u=[e];if(i)for(const h of i)h!==e&&u.push(h);const f=v$e(c,u);return f.length===0?Promise.resolve():Promise.resolve(l(f,a)).then(()=>{})}function C$e(t,e,n){if(!t.hasChanged)return;const r=t.changes,i=g3(e,r.map(a=>a.key));for(const a of r)e(a.key,{start:a.start,duration:a.duration,playbackStart:a.playbackStart});if(!n){q_(e,i,t.members.map(a=>({key:a.key,updates:a})));return}const s=`clip-group-resize:${r.map(a=>a.key).join(":")}`;Promise.resolve(n(r.map(a=>({element:a.element,start:a.start,duration:a.duration,playbackStart:a.playbackStart})),{coalesceKey:s})).catch(a=>{q_(e,i,t.members.map(o=>({key:o.key,updates:o}))),console.error("[Timeline] Failed to persist group clip resize",a)})}function E$e({lifecycleRef:t,sessionEpochRef:e,cancelGestureRef:n,scrollRef:r,draggedClipRef:i,resizingClipRef:s,blockedClipRef:a,groupResizeRef:o,suppressClickRef:l,gestureSelectedKeysRef:c,elementsRef:u,trackOrderRef:f,setDraggedClipState:h,setResizingClipState:m,setShowPopover:y,setRangeSelectionRef:p,applyResizePointerRef:v,syncClipDragAutoScrollRef:b,stopClipDragAutoScrollRef:w,updateDraggedClipPreviewRef:O,publishDraggedClip:C,updateElement:E,onMoveElementRef:M,onMoveElementsRef:N,onResizeElementRef:_,onResizeElementsRef:I,onBlockedEditAttemptRef:j,readZIndexRef:L,onStackingPatchesRef:H,refreshAfterLaneMoveRef:$}){const G=()=>{requestAnimationFrame(()=>{l.current=!1})},q=fe=>{const me=t.current.pointerId;return me===null||fe.pointerId===me},Y=fe=>{if(fe===null)return;const me=r.current;try{me!=null&&me.hasPointerCapture(fe)&&me.releasePointerCapture(fe)}catch{}},J=fe=>{var me;if(fe!==null)try{(me=r.current)==null||me.setPointerCapture(fe)}catch{}},ie=fe=>{i.current=null,s.current=null,o.current=null,fe&&(h(null),m(null))},te=({updateReact:fe=!0,suppressClick:me=!1}={})=>{const Te=t.current;return Te.phase!=="active"?!1:(Te.phase="cancelled",w.current(),ie(fe),Y(Te.pointerId),me&&(l.current=!0),Te.kind=null,Te.pointerId=null,Te.phase="complete",!0)};n.current=te;const ne=(fe,me)=>{var ve;const Te=Math.abs(fe.clientX-me.originClientX);!me.started&&Te<2||(me.started||J(me.pointerId),y(!1),(ve=p.current)==null||ve.call(p,null),v.current(me,fe.clientX),b.current(fe.clientX,fe.clientY))},W=(fe,me)=>{var xe,we;const Te=Math.hypot(fe.clientX-me.originClientX,fe.clientY-me.originClientY),ve=me.intent==="move"?4:2;!me.started&&Te<ve||me.started||(me.started=!0,a.current=me,J(me.pointerId),l.current=!0,y(!1),(xe=p.current)==null||xe.call(p,null),(we=j.current)==null||we.call(j,me.element,me.intent))},F=(fe,me)=>{var ve;const Te=Math.hypot(fe.clientX-me.originClientX,fe.clientY-me.originClientY);!me.started&&Te<4||(me.started||J(me.pointerId),y(!1),(ve=p.current)==null||ve.call(p,null),C(O.current(me,fe.clientX,fe.clientY)),b.current(fe.clientX,fe.clientY))},U=fe=>{const me=s.current;if(me)return q(fe)?ne(fe,me):void 0;const Te=a.current;if(Te)return Te.pointerId!==fe.pointerId?void 0:W(fe,Te);const ve=i.current;ve&&q(fe)&&F(fe,ve)},Q=(fe,me)=>{var we;if(!fe.started)return;if(l.current=!0,G(),me){C$e(me,E,I.current);return}if(!(fe.previewStart!==fe.element.start||fe.previewDuration!==fe.element.duration||fe.previewPlaybackStart!==fe.element.playbackStart))return;const ve=fe.element.key??fe.element.id,xe=g3(E,[ve]);E(ve,{start:fe.previewStart,duration:fe.previewDuration,playbackStart:fe.previewPlaybackStart}),Promise.resolve((we=_.current)==null?void 0:we.call(_,fe.element,{start:fe.previewStart,duration:fe.previewDuration,playbackStart:fe.previewPlaybackStart})).catch(ke=>{q_(E,xe,[{key:ve,updates:{start:fe.element.start,duration:fe.element.duration,playbackStart:fe.element.playbackStart}}]),console.error("[Timeline] Failed to persist clip resize",ke)})},K=fe=>{a.current=null,fe.started&&G()},ee=fe=>{fe.started&&(l.current=!0,G(),dde(fe,{elements:u.current,trackOrder:f.current,updateElement:E,onMoveElement:M.current,onMoveElements:N.current,selectedKeys:c.current,readZIndex:L.current,onStackingPatches:H.current,refreshAfterLaneMove:$.current}))},se=()=>{var Te,ve,xe;const fe=((Te=o.current)==null?void 0:Te.members.map(we=>we.element))??[((ve=s.current)==null?void 0:ve.element)??((xe=i.current)==null?void 0:xe.element)],me=new Set(u.current.map(we=>we.key??we.id));return fe.every(we=>we===void 0||me.has(we.key??we.id))},z=fe=>{const me=t.current;if(me.phase!=="active")return null;if(!q(fe))return"ignored";if(me.sessionEpoch!==e.current||!se())return te(),"ignored";me.phase="committing";const Te=me.kind?{kind:me.kind,drag:i.current,resize:s.current,groupResize:o.current}:"ignored";return w.current(),ie(!0),Y(me.pointerId),Te==="ignored"&&(me.phase="complete"),Te},V=fe=>{try{fe.kind==="resize"&&fe.resize?Q(fe.resize,fe.groupResize):fe.kind==="drag"&&fe.drag&&ee(fe.drag)}finally{const me=t.current;me.kind=null,me.pointerId=null,me.phase="complete"}},ae=fe=>{const me=z(fe);if(me==="ignored")return;if(me){V(me);return}const Te=a.current;if(Te)return Te.pointerId!==fe.pointerId?void 0:K(Te);l.current&&G()},he=fe=>{t.current.phase==="active"&&q(fe)&&te({suppressClick:!0})&&G();const me=a.current;me&&me.pointerId!==fe.pointerId||(a.current=null,l.current&&G())},ge=fe=>{t.current.phase==="active"&&q(fe)&&te({suppressClick:!0})&&G()},ye=fe=>{const me=E5e({key:fe.key,drag:i.current,resize:s.current,blocked:a.current});me.cancel&&(fe.preventDefault(),a.current=null,te({suppressClick:me.suppressClick}))};return window.addEventListener("pointermove",U),window.addEventListener("pointerup",ae),window.addEventListener("pointercancel",he),window.addEventListener("lostpointercapture",ge),window.addEventListener("keydown",ye),()=>{te({updateReact:!1}),n.current=()=>!1,window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",ae),window.removeEventListener("pointercancel",he),window.removeEventListener("lostpointercapture",ge),window.removeEventListener("keydown",ye)}}const m8=[];function T$e({scrollRef:t,ppsRef:e,durationRef:n,trackOrderRef:r,rowGeometryRef:i,onMoveElement:s,onMoveElements:a,onResizeElement:o,onResizeElements:l,onBlockedEditAttempt:c,setShowPopover:u,setRangeSelectionRef:f,readZIndex:h,onStackingPatches:m,refreshAfterLaneMove:y,sessionEpoch:p=0}){const v=ce(et=>et.updateElement),b=ce(et=>{var Ot;return((Ot=et.beatAnalysis)==null?void 0:Ot.beatTimes)??m8}),w=ce(et=>{var Ot;return((Ot=et.beatAnalysis)==null?void 0:Ot.beatStrengths)??m8}),O=ce(et=>et.beatEdits),C=ce(et=>O0(et.elements).musicElement),E=(C==null?void 0:C.start)??0,M=(C==null?void 0:C.playbackStart)??0,N=(C==null?void 0:C.duration)??0,_=(C==null?void 0:C.src)??null,I=x.useMemo(()=>{if(b===m8||N===0)return m8;const et=zj(b,w,O,_),Ot=M+N,St=E-M;return et.times.filter(Je=>Je>=M&&Je<=Ot).map(Je=>Math.round((Je+St)*1e3)/1e3)},[b,w,O,_,E,M,N]),j=ce(et=>et.elements),L=ce(et=>et.timelineSnapEnabled),H=x.useRef({beatTimes:[],enabled:!0});H.current={beatTimes:I,enabled:L};const $=x.useRef(j);$.current=j;const G=x.useRef(new Map),q=x.useRef(null),Y=x.useCallback((et,Ot)=>{if(!H.current.enabled)return[];const St=`${et??""}|${Ot?1:0}`,Je=G.current.get(St);if(Je)return Je;const Be=WFe({elements:$.current,playheadTime:ce.getState().currentTime,beatTimes:Ot?H.current.beatTimes:[],excludeElementKey:et});return G.current.set(St,Be),Be},[]),[J,ie]=x.useState(null),te=x.useRef(null),ne=x.useCallback(et=>{te.current=et,ie(et)},[]),[W,F]=x.useState(null),U=x.useRef(null),Q=x.useCallback(et=>{U.current=et,F(et)},[]),K=x.useRef({kind:null,phase:"complete",pointerId:null,sessionEpoch:p}),ee=x.useRef(p);ee.current=p;const se=x.useRef(new Set),z=x.useRef(()=>!1),V=x.useCallback((et,Ot)=>{K.current.phase==="active"&&z.current(),K.current={kind:et,phase:"active",pointerId:Ot,sessionEpoch:ee.current},se.current=new Set(ce.getState().selectedElementIds)},[]),ae=x.useCallback(et=>{if(!et){z.current();return}V("drag",et.pointerId),ne(et)},[V,ne]),he=x.useCallback(et=>{if(!et){z.current();return}V("resize",et.pointerId),Q(et)},[V,Q]),ge=x.useRef(null),ye=x.useRef(!1),fe=x.useRef(null),me=x.useRef(s);me.current=s;const Te=x.useRef(a);Te.current=a;const ve=x.useRef(c);ve.current=c;const xe=x.useRef(o);xe.current=o;const we=x.useRef(l);we.current=l;const ke=x.useRef(h);ke.current=h;const Me=x.useRef(m);Me.current=m;const Qe=x.useRef(y);Qe.current=y;const qe=x.useRef(0),Ge=x.useRef(null),Ye=x.useCallback((et,Ot,St)=>(q.current||(q.current=O0($.current).audioTracks),a$e(et,Ot,St,{scroll:t.current,pps:e.current,duration:n.current,trackOrder:r.current,rowHeights:i==null?void 0:i.current.rowHeights,elements:$.current,selectedKeys:se.current,buildSnapTargets:Y,audioTracks:q.current})),[t,e,n,r,i,Y]),st=x.useCallback((et,Ot)=>{const St=o$e(et,Ot,{scroll:t.current,pps:e.current,buildSnapTargets:Y}),Je=Ke=>Q(U.current?{...U.current,started:!0,...Ke}:null),Be=et.element.key??et.element.id;let We=fe.current;if(!We||We.grabbedKey!==Be||We.edge!==et.edge){const Ke=b5e($.current,se.current,Be,et.edge);We=Ke?{grabbedKey:Be,edge:et.edge,members:Ke,changes:[],hasChanged:!1}:null,fe.current=We}if(!We){Je(St);return}l$e(We,St,Je)},[t,e,Y,Q]),nt=x.useRef(st);nt.current=st;const yt=x.useCallback(()=>{Ge.current=null,qe.current&&(cancelAnimationFrame(qe.current),qe.current=0),G.current.clear(),q.current=null},[]),dt=x.useCallback(()=>{qe.current=0;const et=te.current,Ot=U.current,St=Ge.current,Je=t.current;!et&&!Ot||!St||!Je||BE(Je,St.clientX,St.clientY)&&(et?ne(Ye(et,St.clientX,St.clientY)):Ot&&nt.current(Ot,St.clientX),qe.current=requestAnimationFrame(dt))},[ne,t,Ye]),zt=x.useCallback((et,Ot)=>{Ge.current={clientX:et,clientY:Ot};const St=AS(t.current,et,Ot,qe.current!==0);St==="stop"?(cancelAnimationFrame(qe.current),qe.current=0):St==="start"&&(qe.current=requestAnimationFrame(dt))},[t,dt]),Kt=x.useRef(Ye);Kt.current=Ye;const dn=x.useRef(zt);dn.current=zt;const en=x.useRef(yt);return en.current=yt,kr(()=>E$e({onStackingPatchesRef:Me,refreshAfterLaneMoveRef:Qe,readZIndexRef:ke,onBlockedEditAttemptRef:ve,onResizeElementsRef:we,onResizeElementRef:xe,onMoveElementsRef:Te,onMoveElementRef:me,updateElement:v,publishDraggedClip:ne,updateDraggedClipPreviewRef:Kt,stopClipDragAutoScrollRef:en,syncClipDragAutoScrollRef:dn,applyResizePointerRef:nt,setRangeSelectionRef:f,setShowPopover:u,setResizingClipState:F,setDraggedClipState:ie,trackOrderRef:r,elementsRef:$,gestureSelectedKeysRef:se,suppressClickRef:ye,groupResizeRef:fe,blockedClipRef:ge,resizingClipRef:U,draggedClipRef:te,scrollRef:t,cancelGestureRef:z,sessionEpochRef:ee,lifecycleRef:K})),x.useEffect(()=>{z.current()},[p]),{draggedClip:J,setDraggedClip:ae,resizingClip:W,setResizingClip:he,blockedClipRef:ge,suppressClickRef:ye,stopClipDragAutoScroll:yt}}function TW(t){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.border="0",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length);try{return document.execCommand("copy")}catch{return!1}finally{e.remove()}}function P$e(){if(typeof navigator>"u")return!1;const t=navigator.userAgent;return/Safari/i.test(t)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(t)}async function Jf(t){const e=P$e();if(e&&TW(t))return!0;const n=typeof navigator<"u"?navigator.clipboard:void 0;if(n!=null&&n.writeText)try{return await n.writeText(t),!0}catch{}return!e&&TW(t)}function M$e(t,e){return`hf-edit-draft:${t.toFixed(2)}:${e.toFixed(2)}`}function N$e(t){try{return sessionStorage.getItem(t)??""}catch{return""}}function PW(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function D$e({rangeStart:t,rangeEnd:e,anchorX:n,anchorY:r,onClose:i}){const s=ce(I=>I.elements),a=Math.min(t,e),o=Math.max(t,e),l=M$e(a,o),[c,u]=x.useState(()=>N$e(l)),f=I=>{u(I),PW(l,I)},[h,m]=x.useState(!1),[y,p]=x.useState(!1),[v,b]=x.useState(!1),w=x.useRef(null),O=x.useRef(null),C=x.useMemo(()=>s.filter(I=>{const j=I.start+I.duration;return I.start<o&&j>a}),[s,a,o]);kr(()=>{setTimeout(()=>{var I;return(I=O.current)==null?void 0:I.focus()},50)}),kr(()=>{const I=j=>{j.key==="Escape"&&i()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)}),kr(()=>{const I=j=>{w.current&&!w.current.contains(j.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",I),100),()=>window.removeEventListener("mousedown",I)});const E=x.useCallback(()=>C5e({rangeStart:a,rangeEnd:o,elements:C,prompt:c}),[a,o,C,c]),M=x.useCallback(async()=>{if(!await Jf(E())){b(!0);return}b(!1),PW(l,""),m(!0),setTimeout(()=>{m(!1),i()},800)},[E,i,l]),N=x.useCallback(async()=>{const I=lU(c);if(!I)return;if(!await Jf(I)){b(!0);return}b(!1),p(!0),setTimeout(()=>{p(!1)},800)},[c]),_={position:"fixed",left:Math.max(8,Math.min(n-160,window.innerWidth-336)),top:Math.max(8,r-280),zIndex:200};return d.jsx("div",{ref:w,style:_,children:d.jsxs("div",{className:"w-80 bg-neutral-900 border border-neutral-700/60 rounded-xl shadow-2xl shadow-black/40 overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-neutral-800/60",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-studio-accent"}),d.jsxs("span",{className:"text-[11px] font-medium text-neutral-300",children:[os(a)," — ",os(o)]})]}),d.jsxs("span",{className:"text-[10px] text-neutral-600",children:[C.length," element",C.length!==1?"s":""]})]}),C.length>0&&d.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:C.map(I=>d.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[d.jsxs("span",{className:"text-[10px] font-mono text-studio-accent/80",children:["#",I.id]}),d.jsx("span",{className:"text-[10px] text-neutral-600",children:I.tag})]},I.id))}),d.jsx("div",{className:"p-3",children:d.jsx("textarea",{ref:O,value:c,onChange:I=>f(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),M())},placeholder:"What should change?",rows:2,className:"w-full px-3 py-2 text-xs bg-neutral-800/60 border border-neutral-700/40 rounded-lg text-neutral-200 placeholder:text-neutral-600 resize-none focus:outline-none focus:border-studio-accent/40 transition-colors"})}),v&&d.jsx("p",{className:"px-3 pb-2 text-[10px] text-red-400",role:"alert",children:"Copy failed — check clipboard permissions and try again."}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 px-3 pb-3",children:[d.jsx("button",{onClick:N,disabled:!lU(c),className:`py-1.5 text-[11px] font-medium rounded-lg transition-all border ${y?"bg-green-500/20 text-green-400 border-green-500/30":"bg-neutral-800/70 text-neutral-200 border-neutral-700/50 hover:bg-neutral-800"} disabled:opacity-50 disabled:cursor-not-allowed`,children:y?"Prompt Copied!":"Copy Prompt"}),d.jsxs("button",{onClick:M,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${h?"bg-green-500/20 text-green-400 border border-green-500/30":"bg-studio-accent/15 text-studio-accent border border-studio-accent/25 hover:bg-studio-accent/25"}`,children:[h?"Copied!":"Copy to Agent",!h&&d.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}function gde(t){x.useEffect(()=>{var s;const e=t.current;if(!e)return;const n=document.activeElement,r=()=>Array.from(e.querySelectorAll('[role="menuitem"]')).filter(a=>!a.disabled);(s=r()[0])==null||s.focus();const i=a=>{var u;if(a.key!=="ArrowDown"&&a.key!=="ArrowUp"&&a.key!=="Home"&&a.key!=="End")return;const o=r();if(o.length===0)return;a.preventDefault();const l=o.findIndex(f=>f===document.activeElement);let c;a.key==="ArrowDown"?c=l<0?0:(l+1)%o.length:a.key==="ArrowUp"?c=l<0?o.length-1:(l-1+o.length)%o.length:a.key==="Home"?c=0:c=o.length-1,(u=o[c])==null||u.focus()};return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i),n instanceof HTMLElement&&document.contains(n)&&n.focus()}},[t])}const _M="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-200 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",I$e="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left";function yde({state:t,onClose:e,onDelete:n,onDeleteAll:r,onEditEase:i,onCopyProperties:s,onMoveToPlayhead:a}){const o=X0(e),l={percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId};gde(o);const[c,u]=x.useState("idle"),f=async()=>{if(!s)return;if(await s(t.elementId,l)===!1){u("failed"),setTimeout(()=>u("idle"),1500);return}u("copied"),setTimeout(e,700)},h=200,y=10+(1+(a?1:0)+(i?1:0)+(s?1:0)+(n?1:0))*30+9,p=t.y+y-window.innerHeight,v=t.x+h>window.innerWidth?t.x-h:t.x,b=Math.max(8,p>0?t.y-p-8:t.y);return Zl.createPortal(d.jsxs("div",{ref:o,role:"menu","aria-label":"Keyframe actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px] overflow-y-auto",style:{left:v,top:b,maxHeight:`calc(100vh - ${b+8}px)`},children:[a&&d.jsx("button",{type:"button",role:"menuitem",className:_M,onClick:()=>{a(t.element,l),e()},children:"Move to Playhead"}),i&&d.jsxs("button",{type:"button",role:"menuitem",className:`${_M} justify-between`,onClick:()=>{i(t.elementId,l),e()},children:[d.jsx("span",{children:"Edit Ease…"}),d.jsx("span",{className:"text-[10px] text-neutral-500",children:t.currentEase??"default"})]}),s&&d.jsx("button",{type:"button",role:"menuitem",className:_M,onClick:()=>{f()},children:c==="copied"?"Copied!":c==="failed"?"Copy failed — check permissions":"Copy Properties"}),n&&d.jsx("button",{type:"button",role:"menuitem",className:I$e,onClick:()=>{n(t.elementId,l),e()},children:"Delete Keyframe"}),d.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),d.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),d.jsx("button",{type:"button",role:"menuitem",className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-red-950/40 focus-visible:bg-red-950/40 outline-none cursor-pointer text-left",onClick:()=>{r(t.element,t.animationId),e()},children:"Delete All Keyframes"})]}),document.body)}const _$e=x.memo(function({x:e,y:n,element:r,currentTime:i,onClose:s,onSplit:a,onDelete:o}){const l=X0(s);gde(l);const c=200,f=n+80-window.innerHeight,h=e+c>window.innerWidth?e-c:e,m=f>0?n-f-8:n,y=m3(r)&&["video","audio","img"].includes(r.tag),p=y&&i>r.start&&i<r.start+r.duration,v=y?p?`Split at ${i.toFixed(2)}s`:"Split (move playhead inside clip)":null;return Zl.createPortal(d.jsxs("div",{ref:l,role:"menu","aria-label":"Clip actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:h,top:m},children:[v&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",role:"menuitem",className:`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left outline-none focus-visible:bg-neutral-800 ${p?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,disabled:!p,onClick:()=>{p&&(a(r,i),s())},children:[d.jsx("span",{children:v}),d.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"S"})]}),d.jsx("div",{className:"my-1 border-t border-neutral-700/60"})]}),d.jsxs("button",{type:"button",role:"menuitem",className:"w-full flex items-center justify-between px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",onClick:()=>{o(r),s()},children:[d.jsx("span",{children:"Delete"}),d.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"⌫"})]})]}),document.body)}),R$e=x.memo(function({x:e,y:n,gapWidth:r,canCloseGap:i,canCloseAllGaps:s,hasAnyGaps:a,onClose:o,onCloseGap:l,onCloseAllGaps:c,onHoverAction:u}){const f=X0(o),h=200,y=n+68-window.innerHeight,p=e+h>window.innerWidth?e-h:e,v=y>0?n-y-8:n,b=C=>`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left ${C?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,w=i?void 0:r==null?"No gap here":"A clip on this track can't be moved",O=s?void 0:a?"A clip on this track can't be moved":"No gaps on this track";return Zl.createPortal(d.jsxs("div",{ref:f,className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:p,top:v},onPointerLeave:()=>u(null),children:[d.jsxs("button",{type:"button",className:b(i),disabled:!i,title:w,onPointerEnter:()=>u(i?"close-gap":null),onClick:()=>{i&&(l(),o())},children:[d.jsx("span",{children:"Close gap"}),r!=null&&d.jsxs("span",{className:"text-neutral-500 text-[10px] ml-3",children:[r.toFixed(2),"s"]})]}),d.jsx("button",{type:"button",className:b(s),disabled:!s,title:O,onPointerEnter:()=>u(s?"close-all":null),onClick:()=>{s&&(c(),o())},children:d.jsx("span",{children:"Close all gaps"})})]}),document.body)});function j$e({theme:t}){return d.jsx("div",{className:"absolute bottom-2 right-3 pointer-events-none z-20",children:d.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-md border",style:{background:"rgba(17,23,35,0.84)",borderColor:t.gutterBorder},children:[d.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:t.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),d.jsx("span",{className:"text-[9px]",style:{color:t.textSecondary},children:"+ drag/click to edit range"})]})})}function Y_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:n,selectedElementId:r,elements:i}){const s=t.key??t.id;return e!==n||r!==s?null:i.find(a=>(a.key??a.id)===s)??null}function L$e(t,e,n){const r=ce.getState();return Y_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:r.timelineSessionEpoch,selectedElementId:r.selectedElementId,elements:n})}function F$e({elements:t,elementsRef:e,theme:n,showShortcutHint:r,showPopover:i,rangeSelection:s,setShowPopover:a,setRangeSelection:o,kfContextMenu:l,setKfContextMenu:c,onDeleteKeyframe:u,onDeleteAllKeyframes:f,onMoveKeyframeToPlayhead:h,clipContextMenu:m,setClipContextMenu:y,currentTime:p,onSplitElement:v,pinZoomBeforeEdit:b,onDeleteElement:w,gapContextMenu:O,onDismissGapContextMenu:C,onCloseTrackGap:E,onCloseAllTrackGaps:M,onHoverGapAction:N}){const _=ce(q=>q.selectedElementId),I=ce(q=>q.timelineSessionEpoch),j=l==null?void 0:l.sessionEpoch,L=m==null?void 0:m.sessionEpoch,H=l?Y_({capturedElement:l.element,targetSessionEpoch:j,sessionEpoch:I,selectedElementId:_,elements:t}):null,$=m?Y_({capturedElement:m.element,targetSessionEpoch:L,sessionEpoch:I,selectedElementId:_,elements:t}):null,G=(q,Y)=>L$e(q,Y,e.current);return x.useEffect(()=>{l&&!H&&c(null)},[H,l,c]),x.useEffect(()=>{m&&!$&&y(null)},[m,$,y]),d.jsxs(d.Fragment,{children:[r&&!i&&!s&&d.jsx(j$e,{theme:n}),i&&s&&d.jsx(D$e,{rangeStart:s.start,rangeEnd:s.end,anchorX:s.anchorX,anchorY:s.anchorY,onClose:()=>{a(!1),o(null)}}),l&&H&&d.jsx(yde,{state:{...l,element:H},onClose:()=>c(null),onDelete:(...q)=>{G(H,j)&&(u==null||u(...q))},onDeleteAll:(q,Y)=>{const J=G(H,j);J&&(f==null||f(J,Y))},onMoveToPlayhead:h?(q,...Y)=>{const J=G(H,j);J&&h(J,...Y)}:void 0,onEditEase:l.animationId!==void 0&&l.tweenPercentage!==void 0?(q,Y)=>{Y.animationId===void 0||Y.tweenPercentage===void 0||(ce.getState().setFocusedEaseSegment({animationId:Y.animationId,collidingAnimationTargets:Y.collidingAnimationTargets,tweenPercentage:Y.tweenPercentage,elementId:q}),dj({action:"open"}))}:void 0,onCopyProperties:(q,Y)=>{const J=ce.getState().keyframeCache.get(q),ie=J==null?void 0:J.keyframes.find(te=>Math.abs(te.percentage-Y.percentage)<.5);return ie?Jf(JSON.stringify(ie.properties,null,2)):!1}}),m&&$&&d.jsx(_$e,{x:m.x,y:m.y,element:$,currentTime:p,onClose:()=>y(null),onSplit:(q,Y)=>{const J=G($,L);J&&(v==null||v(J,Y))},onDelete:()=>{const q=G($,L);q&&(b(),w==null||w(q))}}),O&&d.jsx(R$e,{x:O.x,y:O.y,gapWidth:O.gapWidth,canCloseGap:O.canCloseGap,canCloseAllGaps:O.canCloseAllGaps,hasAnyGaps:O.hasAnyGaps,onClose:C,onCloseGap:E,onCloseAllGaps:M,onHoverAction:N})]})}function $$e({ppsRef:t,fitPpsRef:e,onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onFileDrop:a,onAssetDrop:o,onBlockDrop:l,onCompositionDrop:c}){const u=ce(E=>E.pinTimelineZoom),f=x.useCallback(()=>{u(t.current,e.current)},[u,t,e]),h=x.useRef(null),m=x.useMemo(()=>n&&((...E)=>(f(),n(...E))),[n,f]),y=x.useMemo(()=>r&&((...E)=>(f(),r(...E))),[r,f]),p=x.useMemo(()=>i&&((...E)=>(f(),i(...E))),[i,f]),v=x.useMemo(()=>s&&((...E)=>(f(),s(...E))),[s,f]),b=x.useMemo(()=>a&&((...E)=>(f(),a(...E))),[a,f]),w=x.useMemo(()=>o&&((...E)=>(f(),o(...E))),[o,f]),O=x.useMemo(()=>l&&((...E)=>(f(),l(...E))),[l,f]),C=x.useMemo(()=>c&&((...E)=>(f(),c(...E))),[c,f]);return{pinZoomBeforeEdit:f,setRangeSelectionRef:h,pinnedOnMoveElement:m,pinnedOnMoveElements:y,pinnedOnResizeElement:p,pinnedOnResizeElements:v,pinnedOnFileDrop:b,pinnedOnAssetDrop:w,pinnedOnBlockDrop:O,pinnedOnCompositionDrop:C}}const BF=Bc("StudioShellContext",null),VF=Bc("StudioPlaybackContext",null);function Yl(){const t=x.useContext(BF);if(!t)throw new Error("useStudioShellContext must be used within StudioShellProvider");return t}function HF(){return x.useContext(BF)}function Iy(){const t=x.useContext(VF);if(!t)throw new Error("useStudioPlaybackContext must be used within StudioPlaybackProvider");return t}function B$e(){return x.useContext(VF)}function V$e({value:t,children:e}){const{projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,writeBlockedReason:l,handleUndo:c,handleRedo:u,renderQueue:f,compositionDimensions:h,waitForPendingDomEditSaves:m,handlePreviewIframeRef:y}=t,p=x.useMemo(()=>({projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,writeBlockedReason:l,handleUndo:c,handleRedo:u,renderQueue:f,compositionDimensions:h,waitForPendingDomEditSaves:m,handlePreviewIframeRef:y}),[n,r,h,o,f,i,s,a,l,c,u,m,y]);return d.jsx(BF,{value:p,children:e})}function H$e({value:t,children:e}){const{captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}=t,c=x.useMemo(()=>({captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}),[n,r,i,a,o,s,l]);return d.jsx(VF,{value:c,children:e})}function Q$e(t){var e;try{const n=(e=t.ownerDocument)==null?void 0:e.defaultView;if(!n)return!0;const r=n.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1;const i=Number.parseFloat(r.opacity);return!(Number.isFinite(i)&&i<=.01&&!t.hasAttribute(h3))}catch{return!0}}function MW(t){if(!t||t==="auto")return 0;const e=parseInt(t,10);return Number.isFinite(e)?e:0}function y3(t){var r;const e=$j(t);if(e!=null)return e;const n=t.style.zIndex;if(n&&n!=="auto")return MW(n);try{const i=(r=t.ownerDocument)==null?void 0:r.defaultView;if(i)return MW(i.getComputedStyle(t).zIndex)}catch{}return 0}function xde(t){var n;const e=(n=t.ownerDocument)==null?void 0:n.defaultView;return e&&t instanceof e.HTMLElement?!0:t.nodeType===1}const z$e=new Set(["AUDIO","SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Z$e(t){return xde(t)&&!z$e.has(t.tagName)}function bde(t){const e=t.parentElement;if(!e)return{entries:[],targetIndex:-1};const n=[];let r=-1,i=0;for(const s of Array.from(e.children))s!==t&&!Z$e(s)||xde(s)&&(s===t&&(r=n.length),n.push({element:s,zIndex:y3(s),domIndex:i}),i+=1);return{entries:n,targetIndex:r}}function G$e(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}function U$e(t,e,n){const r=e.filter(a=>a.element===t||n(a.element));let i;try{i=t.getBoundingClientRect()}catch{return r}if(i.width===0&&i.height===0)return r;const s={left:i.left,top:i.top,right:i.right,bottom:i.bottom};return r.filter(a=>{if(a.element===t)return!0;try{const o=a.element.getBoundingClientRect();return G$e(s,{left:o.left,top:o.top,right:o.right,bottom:o.bottom})}catch{return!1}})}function QF(t){return[...t].sort((e,n)=>e.zIndex-n.zIndex||e.domIndex-n.domIndex)}function X$e(t,e){if(t&&e)return e.zIndex-t.zIndex>=2?t.zIndex+1:null;if(t)return t.zIndex+1;if(e){const n=Math.max(0,e.zIndex-1);return n>=e.zIndex?null:n}return null}function vde(t,e,n,r){const i=e.findIndex(l=>l.element===n);if(i===-1)return null;const s=y3(n),a=t.map(l=>l.zIndex);if(!a.some((l,c)=>a.indexOf(l)!==c)){const l=X$e(e[i-1],e[i+1]);if(l!==null)return l===s?null:[{element:n,zIndex:l}]}return W$e(t,e,n,r)}function W$e(t,e,n,r){const i=new Set(e.map(m=>m.element)),s=r.filter(m=>!i.has(m.element)),a=e.length,o=t.map(m=>m.zIndex),l=Math.min(...o),c=Math.max(...o);if(!s.some(m=>m.zIndex>=l&&m.zIndex<=c)){const m=s.filter(w=>w.zIndex<l).map(w=>w.zIndex),y=s.filter(w=>w.zIndex>c).map(w=>w.zIndex),p=m.length>0?Math.max(...m)+1:0,v=y.length>0,b=v?Math.min(...y)-a:Number.POSITIVE_INFINITY;if(p<=b){let w=Math.max(l,p);v&&(w=Math.min(w,b));const O=[];return e.forEach((C,E)=>{C.zIndex!==w+E&&O.push({element:C.element,zIndex:w+E})}),O.length===0?null:O}}const f=q$e(r,e,n),h=[];return f.forEach((m,y)=>{m.zIndex!==y&&h.push({element:m.element,zIndex:y})}),h.length===0?null:h}function q$e(t,e,n){const r=QF(t),i=r.find(f=>f.element===n),s=r.filter(f=>f.element!==n);if(!i)return s;const a=e.findIndex(f=>f.element===n),o=e[a-1],l=e[a+1],c=o?s.findIndex(f=>f.element===o.element):-1,u=l?s.findIndex(f=>f.element===l.element):-1;return c>=0?s.splice(c+1,0,i):u>=0?s.splice(u,0,i):s.unshift(i),s}function Ade(t,e,n){const{entries:r}=bde(t);if(r.length<2)return null;const s=e==="bring-to-front"||e==="send-to-back"?r:U$e(t,r,Q$e);if(s.length<2)return null;const a=QF(s),o=a.findIndex(l=>l.element===t);return o===-1?null:{entries:r,order:a,pos:o}}function Sde(t,e,n){const r=Ade(t,e);if(!r)return null;const{entries:i,order:s,pos:a}=r,o=[...s],[l]=o.splice(a,1);switch(e){case"bring-forward":if(a>=s.length-1)return null;o.splice(a+1,0,l);break;case"send-backward":if(a<=0)return null;o.splice(a-1,0,l);break;case"bring-to-front":if(a>=s.length-1)return null;o.push(l);break;case"send-to-back":if(a<=0)return null;o.unshift(l);break}return vde(s,o,t,i)}function Y$e(t,e){const{entries:n}=bde(t);if(n.length<2)return null;const r=new Map(n.map(a=>[a.element,a])),i=[];for(const a of e){const o=r.get(a);if(!o)return null;i.push(o)}if(i.length<2||!i.some(a=>a.element===t))return null;const s=QF(i);return s.every((a,o)=>a.element===i[o].element)?null:vde(s,i,t,n)}function K$e(t,e,n){if(e!=="bring-forward"&&e!=="send-backward")return null;const r=Ade(t,e);if(!r)return null;const{order:i,pos:s}=r,a=e==="bring-forward"?i[s+1]:i[s-1];return(a==null?void 0:a.element)??null}function J$e(t,e,n){return Sde(t,e)!==null}function eBe({expandedElementsRef:t}){const e=IS(),n=HF(),r=(e==null?void 0:e.previewIframeRef)??null,i=e==null?void 0:e.handleDomZIndexReorderCommit,s=(n==null?void 0:n.activeCompPath)??null,a=x.useCallback(u=>{var h;const f=((h=r==null?void 0:r.current)==null?void 0:h.contentDocument)??null;return f?cs(f,{hfId:u.hfId,id:u.domId??u.id,selector:u.selector,selectorIndex:u.selectorIndex,sourceFile:u.sourceFile??s??"index.html"},s):null},[r,s]),o=x.useCallback(u=>{const f=a(u);return f?y3(f):Number.NaN},[a]),l=x.useCallback((u,f)=>{if(!i)return Promise.resolve();const h=u.flatMap(m=>{const y=t.current.find(v=>(v.key??v.id)===m.key),p=y&&a(y);return!y||!p?[]:[{element:p,zIndex:m.zIndex,id:y.domId??y.id,selector:y.selector,selectorIndex:y.selectorIndex,sourceFile:y.sourceFile??s??"index.html",key:m.key}]});return h.length?i(h,f).then(()=>{}):Promise.resolve()},[i,a,s,t]);return{readClipZIndex:o,applyStackingPatches:l,zSyncEnabled:!!(i&&r)}}function tBe({viewportWidth:t,effectiveDuration:e,zoomMode:n,manualZoomPercent:r,ppsRef:i,fitPpsRef:s,draggedClip:a,resizingClip:o,expandedElements:l,isDragging:c,scrollRef:u,lastScrollLeftRef:f,contentOrigin:h}){const m=n5e(t,e,h),y=cCe(m,n,r);i.current=y;const p=Math.max(0,e*y),v=a!=null&&a.started?(a.previewStart+a.element.duration)*y+nU:0,b=o!=null&&o.started?(o.previewStart+o.previewDuration)*y+nU:0,w=r5e({trackContentWidth:p,viewportWidth:t,contentOrigin:h,pps:y,dragGhostEndPx:v,resizeGhostEndPx:b}),O=y>0?w/y:e,C=x.useRef(n);C.current=n;const E=x.useRef(r);return E.current=r,s.current=m,x.useEffect(()=>{if(n!=="manual"||c.current)return;const M=u.current,N=f.current;if(!M||N<=0)return;const _=requestAnimationFrame(()=>{const I=Math.max(0,M.scrollWidth-M.clientWidth),j=Math.min(N,I);Math.abs(M.scrollLeft-j)>.5&&(M.scrollLeft=j)});return()=>cancelAnimationFrame(_)},[l,n]),x.useEffect(()=>{ce.getState().setTimelineScale(y,m)},[y,m]),{pps:y,fitPps:m,displayContentWidth:w,displayDuration:O,clipStateVersion:l,zoomModeRef:C,manualZoomPercentRef:E}}function nBe(t,e){for(const r of e)t.has(r)||e.delete(r);const n=[];for(const[r,i]of t)e.has(r)||i.some(nue)&&n.push(r);return n}function rBe(t){var i;const e=ce(s=>s.expandClips),n=((i=HF())==null?void 0:i.projectId)??null,r=x.useRef({projectId:n,source:t,clips:new Set});x.useEffect(()=>{if(r.current.projectId!==n){const a=r.current.source!==t;if(r.current={projectId:n,source:t,clips:new Set},!a)return}else r.current.source=t;const s=nBe(t,r.current.clips);if(s.length!==0){for(const a of s)r.current.clips.add(a);e(s)}},[t,e,n])}const iBe=!0,sBe=Object.freeze({scrollLeft:0,scrollTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,isScrolling:!1});function aBe(t,e){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,isScrolling:e}}function oBe(t,e){const[n,r]=x.useState(sBe),[i,s]=x.useState(!0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(0),c=x.useRef(null),u=x.useRef(!1),f=x.useCallback((p,v=!1)=>{u.current=v;const b=()=>{l.current=0,r(aBe(p,u.current))};if(v)l.current||(l.current=requestAnimationFrame(b));else{l.current&&cancelAnimationFrame(l.current),b();return}c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,u.current=!1,l.current&&cancelAnimationFrame(l.current),b()},100)},[]),h=x.useCallback(()=>{const p=t.current;s(p?o5e(p.scrollHeight,p.clientHeight):!0)},[t]),m=x.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{o.current=0,h()})},[h]),y=x.useCallback(p=>{if(a.current&&(a.current.disconnect(),a.current=null),t.current=p,!p){c.current&&clearTimeout(c.current),c.current=null,u.current=!1;return}const v=()=>{f(p,u.current),m()};v(),a.current=new ResizeObserver(v),a.current.observe(p)},[t,m,f]);return kr(()=>()=>{var p;(p=a.current)==null||p.disconnect(),o.current&&cancelAnimationFrame(o.current),l.current&&cancelAnimationFrame(l.current),c.current&&clearTimeout(c.current)}),x.useEffect(()=>{h()},[h,...e]),{viewport:n,showShortcutHint:i,setScrollRef:y,syncScrollViewport:f}}function lBe(t){const e=wS(),{onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onBlockedEditAttempt:a,onSplitElement:o}=t;return x.useMemo(()=>({...e,onMoveElement:n??e.onMoveElement,onMoveElements:r??e.onMoveElements,onResizeElement:i??e.onResizeElement,onResizeElements:s??e.onResizeElements,onBlockedEditAttempt:a??e.onBlockedEditAttempt,onSplitElement:o??e.onSplitElement}),[e,n,r,i,s,a,o])}const x3=.001,Xg=t=>t.key??t.id;function CA(t){return Math.max(0,...t.map(e=>e.expandedParentStart??0))}const wde=t=>Math.round(t*1e3)/1e3,kk=t=>t.start+t.duration;function b3(t){return[...t].sort((e,n)=>e.start-n.start||Xg(e).localeCompare(Xg(n)))}function K_(t,e,n=x3,r=0){const i=b3(t);if(i.some(c=>e>=c.start-n&&e<kk(c)-n))return null;const a=i.filter(c=>c.start>e-n);if(a.length===0)return null;const o=a[0].start,l=Math.max(r,...i.filter(c=>c.start<=e-n).map(c=>kk(c)));return o-l<=n?null:{gapStart:l,gapEnd:o,followingKeys:a.map(Xg)}}function Ode(t,e=x3,n=0){const r=[];let i=n;for(const s of b3(t))s.start-i>e&&r.push({start:i,end:s.start}),i=Math.max(i,kk(s));return r}function kde(t,e=x3,n=0){const r=[];let i=n;for(const s of b3(t)){const a=wde(i);Math.abs(a-s.start)>e&&r.push({key:Xg(s),newStart:a}),i+=s.duration}return r}function cBe(t,e,n=x3,r=0){const i=Ode(t,n,r),s=Math.max(r,...t.map(kk));return e-s>n&&i.push({start:s,end:e}),i}function Cde(t,e){const n=e.gapEnd-e.gapStart,r=new Set(e.followingKeys);return b3(t).filter(i=>r.has(Xg(i))).map(i=>({key:Xg(i),newStart:Math.max(e.gapStart,wde(i.start-n))}))}const Ede=t=>t.key??t.id;let uBe=0;function J_(t,e){const n=new Map(t.map(r=>[Ede(r),r]));return e.every(r=>{const i=n.get(r.key);return i!=null&&vS(i).canMove})}function fBe(t,e){if(e.length===0||!J_(t,e))return null;const n=new Map(t.map(r=>[Ede(r),r]));return e.map(r=>{const i=n.get(r.key);return{element:i,updates:{start:r.newStart,track:i.track}}})}function Tde(t,e,n){const r=fBe(t,e);return r?(wd(r,n,`track-gap-close:${uBe++}`),!0):!1}function hBe(t,e,n){const r=K_(t,e,void 0,CA(t));return r?Tde(t,Cde(t,r),n):!1}function dBe(t,e){return Tde(t,kde(t,void 0,CA(t)),e)}function pBe({tracks:t,expandedElementsRef:e,trackOrderRef:n,onMoveElement:r,onMoveElements:i}){const s=ce(w=>w.updateElement),a=ce(w=>w.timelineSessionEpoch),[o,l]=x.useState(null),[c,u]=x.useState(null),f=x.useMemo(()=>{var w;return(o==null?void 0:o.sessionEpoch)===a?((w=t.find(([O])=>O===o.track))==null?void 0:w[1])??[]:null},[o,a,t]),h=x.useMemo(()=>{if(!o||!f)return null;const w=CA(f),O=K_(f,o.time,void 0,w),C=kde(f,void 0,w);return{x:o.x,y:o.y,gapWidth:O?O.gapEnd-O.gapStart:null,canCloseGap:O!=null&&J_(f,Cde(f,O)),hasAnyGaps:C.length>0,canCloseAllGaps:C.length>0&&J_(f,C)}},[o,f]),m=x.useMemo(()=>{if(!o||!f||!c)return null;const w=CA(f);if(c==="close-gap"){const C=K_(f,o.time,void 0,w);return C?{track:o.track,intervals:[{start:C.gapStart,end:C.gapEnd}]}:null}const O=Ode(f,void 0,w);return O.length>0?{track:o.track,intervals:O}:null},[o,f,c]),y=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ce.getState().timelineSessionEpoch||hBe(f,o.time,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),p=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ce.getState().timelineSessionEpoch||dBe(f,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),v=x.useCallback(w=>{u(null),l({...w,sessionEpoch:ce.getState().timelineSessionEpoch})},[]),b=x.useCallback(()=>{u(null),l(null)},[]);return x.useEffect(()=>{o&&o.sessionEpoch!==a&&b()},[b,o,a]),{gapMenuModel:h,gapHighlight:m,setHoveredGapAction:u,openGapMenu:v,dismissGapMenu:b,closeTrackGap:y,closeAllTrackGaps:p}}function mBe(t,e){return e.size===0||e.size===1&&e.has(t)}function gBe(t){var c;const{selectedElementId:e,selectedElementIds:n,expandedElements:r,tracks:i,gapHighlight:s}=t;if(!e||!mBe(e,n))return null;const a=r.find(u=>(u.key??u.id)===e);if(!a||a.track===(s==null?void 0:s.track))return null;const o=((c=i.find(([u])=>u===a.track))==null?void 0:c[1])??[],l=cBe(o,t.displayDuration,void 0,CA(o));return l.length>0?{track:a.track,intervals:l,kind:"selected"}:null}function yBe(t){if(t.dragActive)return[];const e=[];t.gapHighlight&&t.gapHighlight.intervals.length>0&&e.push({...t.gapHighlight,kind:"hover"});const n=gBe(t);return n&&e.push(n),e}function xBe(t){const{gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}=t;return x.useMemo(()=>yBe({gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}),[e,n,r,i,s,a,o])}function bBe({active:t,scrollRef:e,contentOrigin:n,pixelsPerSecond:r,onSplitAll:i}){const[s,a]=x.useState(null),o=x.useCallback(u=>{const f=e.current;if(!t||!f)return;const h=f.getBoundingClientRect();a(u.clientX-h.left+f.scrollLeft)},[t,e]),l=x.useCallback(()=>a(null),[]),c=x.useCallback(u=>{const f=e.current;if(!t||!u.shiftKey||u.button!==0||!f)return!1;const h=f.getBoundingClientRect(),m=FE({clientX:u.clientX,rectLeft:h.left,scrollLeft:f.scrollLeft,contentOrigin:n});return i==null||i(Math.max(0,m/r)),!0},[t,n,i,r,e]);return{razorGuideX:s,updateRazorGuide:o,clearRazorGuide:l,splitAllAtPointer:c}}function vBe({x:t}){return d.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none z-10",style:{left:t,width:1,background:"rgba(239,68,68,0.7)"}})}const ABe=400,SBe=6e4;function NW(t,e){if(t.length===0)return;const n=[...t].sort((i,s)=>i-s),r=Math.min(n.length-1,Math.ceil(n.length*e)-1);return Number(n[Math.max(0,r)].toFixed(2))}function wBe(t,e,n,r){const i=NW(n,.95);if(i===void 0)return null;const s=NW(r,.95);return{total_clip_count:e.totalClipCount,mounted_clip_count:t.querySelectorAll('[data-clip="true"]').length,total_row_count:e.totalRowCount,timeline_dom_node_count:t.querySelectorAll("*").length,viewport_width:t.clientWidth,viewport_height:t.clientHeight,zoom_mode:e.zoomMode,scroll_sample_count:n.length,scroll_frame_latency_p95_ms:i,scroll_frame_latency_max_ms:Number(Math.max(...n).toFixed(2)),...s===void 0?{}:{frame_interval_p95_ms:s}}}function DW(t){t.previousFrameAt=null,t.frameLatencies=[],t.frameIntervals=[]}function OBe(t){const e=x.useRef({frameRequest:0,idleTimer:null,pendingScrollStartedAt:0,previousFrameAt:null,frameLatencies:[],frameIntervals:[],lastEmittedAt:Number.NEGATIVE_INFINITY}),n=r=>{const i=e.current,s=performance.now();i.frameRequest===0&&(i.pendingScrollStartedAt=s,i.frameRequest=requestAnimationFrame(a=>{i.frameRequest=0,i.frameLatencies.push(performance.now()-i.pendingScrollStartedAt),i.previousFrameAt!==null&&i.frameIntervals.push(a-i.previousFrameAt),i.previousFrameAt=a})),i.idleTimer!==null&&clearTimeout(i.idleTimer),i.idleTimer=setTimeout(()=>{if(i.idleTimer=null,i.frameRequest!==0){cancelAnimationFrame(i.frameRequest),i.frameRequest=0,DW(i);return}const a=performance.now();if(a-i.lastEmittedAt>=SBe){const o=wBe(r,t,i.frameLatencies,i.frameIntervals);o&&(V8e(o),i.lastEmittedAt=a)}DW(i)},ABe)};return kr(()=>()=>{const r=e.current;r.frameRequest!==0&&cancelAnimationFrame(r.frameRequest),r.idleTimer!==null&&clearTimeout(r.idleTimer)}),{recordTimelineScroll:n}}function kBe(t){return Array.from(t.values()).some(e=>e.some(nue))}function CBe(t,e){return kBe(t)||e.some(n=>!!n.audioGroup)}function Pde(t,e){const n=Number.isFinite(t)?t:0;if(e.length===0)return n;const r=Math.max(n,...e.map(i=>i.start+i.duration));return Number.isFinite(r)?r:n}function EBe(t,e){var i;const n=Zn(t),r=(i=e==null?void 0:e.groupPreview)==null?void 0:i.find(s=>s.key===n);return r?{...t,...r}:e&&Zn(e.element)===n?{...t,start:e.previewStart,duration:e.previewDuration,playbackStart:e.previewPlaybackStart}:t}function TBe(t,e,n,r){const i=x.useMemo(()=>t.find(o=>Zn(o)===e)??null,[t,e]),s=x.useRef(i);s.current=i;const a=x.useRef(s.current);x.useEffect(()=>{const o=a.current,l=s.current;a.current=l,o&&!l&&(n(!1),r())})}function PBe(){const[t,e]=x.useState(!1);return kr(()=>{const n=i=>i.key==="Shift"&&e(i.type==="keydown"),r=()=>e(!1);return window.addEventListener("keydown",n),window.addEventListener("keyup",n),window.addEventListener("blur",r),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",n),window.removeEventListener("blur",r)}}),t}function MBe(t,e,n,r){const i=n==="frame"?Wd:void 0;return{...x.useMemo(()=>dTe(t,e,i,r),[t,i,e,r]),majorTickInterval:yoe(t,e,i)}}const RM=1024*1024,NBe=1440*60*1e3,il=Object.freeze({directScrollSafetyPx:8e6,rowOverscanPerSide:2,timeOverscanViewportRatio:.25,maxMountedRows:64,maxMountedClipRoots:512,maxMountedClipRootsPerRow:128,maxMountedTimelineDescendants:5e3,posterMaxPhysicalWidth:240,posterMaxPhysicalHeight:135,posterDprCap:1.5,richPreviewFrameCount:6,concurrentVideoDecodes:2,concurrentMetadataJobs:4,concurrentCompositionFetches:2,concurrentServerPages:1,thumbnailLoadTimeoutMs:3e4,thumbnailCacheBytes:64*RM,thumbnailCacheEntries:256,thumbnailCacheEntriesPerProject:96,metadataRegistryEntries:512,metadataFailureTtlMs:3e4,waveformCacheBytes:16*RM,waveformCacheEntries:256,compositionDiskCacheBytes:512*RM,compositionDiskCacheMaxAgeMs:14*NBe,interactionP95Ms:50,frameIntervalP95Ms:33.3,constrainedInteractionP95Ms:75,constrainedFrameIntervalP95Ms:75,longTaskLimitMs:50,constrainedLongTaskLimitMs:300,memoryReturnToleranceRatio:.15,posterColdP95Ms:750,posterCachedP95Ms:250,constrainedPosterColdP95Ms:1200,constrainedPosterCachedP95Ms:400,posterCoverageRatio:.9,posterCoverageSettleMs:1500,constrainedPosterCoverageSettleMs:2500,richPreviewP95Ms:750,constrainedRichPreviewP95Ms:1200,supportedFixtureFallbackRatio:.02,scrollSamplesPerRun:21,warmupRuns:3,measuredRuns:5,requiredPassingRuns:4});function DBe(t,e,n,r){if(!(e>0)||!(r>0)||!(t.clientWidth>0))return{start:0,end:0};const i=t.clientWidth*il.timeOverscanViewportRatio,s=t.scrollLeft-n-i,a=t.scrollLeft+t.clientWidth-n+i;return{start:Math.min(r,Math.max(0,s/e)),end:Math.min(r,Math.max(0,a/e))}}function IBe(t,e,n,r){if(!(e>0)||!(r>0))return{start:0,end:0};const i=Math.max(0,(t.scrollLeft-n)/e),s=Math.min(r,Math.max(i,(t.scrollLeft+t.clientWidth-n)/e));return{start:Math.min(i,r),end:s}}function _Be(t,e,n){const r=t.getRowPositionFromY(n+La);if(r.row<0||r.row>=t.rowKeys.length)return n;const i=t.rowKeys[r.row];if(i===void 0)return n;const s=e.getRowIndex(i);return s<0?n:Math.max(0,n+e.getRowTop(s)-t.getRowTop(r.row))}function RBe({tracks:t,viewport:e,pixelsPerSecond:n,contentOrigin:r,duration:i,selectedElementId:s,draggedElementId:a,resizingElementIds:o,focusedElementId:l,focusedEaseElementId:c,clipContextMenuElementId:u,keyframeContextMenuElementId:f}){const h=x.useMemo(()=>N5e(t),[t]),m=x.useMemo(()=>DBe(e,n,r,i),[r,i,n,e]),y=x.useMemo(()=>IBe(e,n,r,i),[r,i,n,e]),p=x.useMemo(()=>new Set([s,a,...o??[],l,c,u,f].filter(v=>v!==void 0)),[u,a,c,l,f,o,s]);return{clipIndex:h,renderTimeRange:m,visibleTimeRange:y,pinnedClipIdentities:p}}function jBe(){var e;const t=(e=B$e())==null?void 0:e.setRefreshKey;return x.useCallback(()=>t==null?void 0:t(n=>n+1),[t])}const g8=12;function IW(t,e,n,r,i){const s=t+n+g8,a=t+e-g8,o=a-s;return o<=0||r>=s&&i<=a?null:i-r>o||r<s?Math.max(0,r-n-g8):Math.max(0,i-e+g8)}function LBe(t){return{left:t.allowHorizontal?IW(t.scrollLeft,t.viewportWidth,t.stickyLeft,t.clipLeft,t.clipRight):null,top:IW(t.scrollTop,t.viewportHeight,t.stickyTop,t.clipTop,t.clipBottom)}}function _W(t,e,n){return t!==null&&t.projectId===e&&t.sessionEpoch===n}function FBe(t,e){const n=t.querySelector(`[data-timeline-focus-id=${CSS.escape(e)}]`);return n?n.ownerDocument.activeElement===n?!0:(n.setAttribute("data-reveal-highlight","true"),n.focus({preventScroll:!0}),n.ownerDocument.activeElement!==n?(n.removeAttribute("data-reveal-highlight"),!1):(n.addEventListener("blur",()=>n.removeAttribute("data-reveal-highlight"),{once:!0}),!0)):!1}function $Be(t,e,n,r,i,s,a){const o=r.getRowIndex(e.row.physicalTrackKey);if(o<0)return!1;const l=e.target.kind==="row"?e.row.elementId:e.target.elementId,c=l?n.find(p=>(p.key??p.id)===l):void 0,u=e.target.kind==="row"?null:e.target.time,f=c&&e.target.kind==="clip"?c.start:u,h=c&&e.target.kind==="clip"?c.start+c.duration:u,m=r.getRowTop(o),y=LBe({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,viewportWidth:t.clientWidth,viewportHeight:t.clientHeight,clipLeft:s+(f??0)*i,clipRight:s+(h??0)*i,clipTop:m+da,clipBottom:m+r.getRowHeight(o)-da,stickyLeft:s,stickyTop:La,allowHorizontal:a&&f!==null});return y.left!==null&&(t.scrollLeft=y.left),y.top!==null&&(t.scrollTop=y.top),y.left!==null||y.top!==null}function BBe({scrollRef:t,logicalRows:e,elements:n,rowGeometry:r,pixelsPerSecond:i,contentOrigin:s,allowHorizontal:a,viewportVersion:o,projectId:l,sessionEpoch:c,syncScrollViewport:u}){const f=ce(b=>b.timelineFocus),h=x.useRef(e),m=x.useRef(null),y=x.useRef(null),p=x.useMemo(()=>{var b;if(_W(f,l,c)){((b=m.current)==null?void 0:b.nonce)!==f.nonce&&(m.current={nonce:f.nonce,id:f.id});const w=m.current.id;let O=Nl(e,w);if(!O){const C=QFe(h.current,e,w);C&&(m.current={nonce:f.nonce,id:C.id},O=Nl(e,C.id))}return O?{target:O.target,row:O.row}:null}return m.current=null,null},[e,l,f,c]);x.useLayoutEffect(()=>{h.current=e},[e]),x.useEffect(()=>{var w;if(!_W(f,l,c))return;if(!p){ce.getState().clearTimelineFocus(f.nonce);return}if(p.target.id!==f.id){ce.getState().requestTimelineFocus(p.target.id);return}if(((w=y.current)==null?void 0:w.nonce)===f.nonce&&y.current.id===p.target.id)return;const b=t.current;b&&($Be(b,p,n,r,i,s,a)&&u(b),FBe(b,p.target.id)&&(y.current={nonce:f.nonce,id:p.target.id}))},[a,s,n,i,l,f,p,r,t,c,u,o]);const v=p?p.target.kind==="row"?p.row.elementId??void 0:p.target.elementId:void 0;return{focusedTargetId:(p==null?void 0:p.target.id)??null,focusedRowKey:p==null?void 0:p.row.physicalTrackKey,pinnedElementId:v}}function VBe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,collapsedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){return x.useMemo(()=>BFe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,collapsedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}),[e,s,a,o,l,c,u,n,r,i,t])}function RW(t,e){if(!e)return null;const n=O0(t).byKey.get(e);return n?{elementId:e,rowKey:n.track}:null}function HBe(t,e,n){const r=new Array(t);return new Proxy(r,{get(i,s,a){if(typeof s=="string"){const o=s.charCodeAt(0);if(o>=48&&o<=57){const l=+s;if(Number.isInteger(l)&&l>=0&&l<t){let c=i[l];if(!c){const u=e[l*2];c=i[l]={index:l,key:n(l),start:u,size:e[l*2+1],end:u+e[l*2+1],lane:0}}return c}}if(s==="length")return t}return Reflect.get(i,s,a)}})}function i1(t,e,n){let r=n.initialDeps??[],i,s=!0;function a(){const o=t();return(o.length!==r.length||o.some((c,u)=>r[u]!==c))&&(r=o,i=e(...o),n!=null&&n.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1),i}return a.updateDeps=o=>{r=o},a}function jW(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const QBe=(t,e)=>Math.abs(t-e)<1.01,zBe=(t,e,n)=>{let r;return function(...i){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,i),n)}};let ub;const jM=()=>{if(ub!==void 0)return ub;if(typeof navigator>"u")return ub=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return ub=!0;const t=navigator.maxTouchPoints;return ub=navigator.platform==="MacIntel"&&t!==void 0&&t>0},LW=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},ZBe=t=>t,Mde=t=>{const e=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1)-e+1,i=new Array(r);for(let s=0;s<r;s++)i[s]=e+s;return i},GBe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const i=a=>{const{width:o,height:l}=a;e({width:Math.round(o),height:Math.round(l)})};if(i(LW(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(LW(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},Ck={passive:!0},UBe=typeof window>"u"?!0:"onscrollend"in window,XBe=(t,e,n)=>{const r=t.scrollElement;if(!r)return;const i=t.targetWindow;if(!i)return;const s=t.options.useScrollendEvent&&UBe;let a=0;const o=s?null:zBe(i,()=>e(a,!1),t.options.isScrollingResetDelay),l=f=>()=>{a=n(r),o==null||o(),e(a,f)},c=l(!0),u=l(!1);return r.addEventListener("scroll",c,Ck),s&&r.addEventListener("scrollend",u,Ck),()=>{r.removeEventListener("scroll",c),s&&r.removeEventListener("scrollend",u)}},WBe=(t,e)=>XBe(t,e,n=>{const{horizontal:r,isRtl:i}=t.options;return r?n.scrollLeft*(i&&-1||1):n.scrollTop}),qBe=(t,e,n)=>{if(n.options.useCachedMeasurements){const r=n.indexFromElement(t),i=n.options.getItemKey(r);return n.itemSizeCache.get(i)??n.options.estimateSize(r)}if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}if(!e){const r=n.indexFromElement(t),i=n.options.getItemKey(r),s=n.itemSizeCache.get(i);if(s!==void 0)return s}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},YBe=(t,{adjustments:e=0,behavior:n},r)=>{var i,s;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:t+e,behavior:n})},KBe=YBe;class JBe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,r,i;return((i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const a=()=>{const o=s.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[c,u]of this.elementsCache)if(u===o){this.elementsCache.delete(c);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,s,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{var r,i;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ZBe,rangeExtractor:Mde,onChange:()=>{},measureElement:qBe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in n){const m=n[h];m!==void 0&&(s[h]=m)}const a=this.options;let o=null,l=null,c=!1;if(a!==void 0&&a.enabled&&s.enabled&&s.anchorTo==="end"&&this.scrollElement!==null){const h=a.count,m=s.count,y=this.getMeasurements(),p=h>0?((r=y[0])==null?void 0:r.key)??a.getItemKey(0):null,v=h>0?((i=y[h-1])==null?void 0:i.key)??a.getItemKey(h-1):null;if(m!==h||h>0&&m>0&&(s.getItemKey(0)!==p||s.getItemKey(m-1)!==v)){c=!0;const O=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??y[0]:null;O&&(o=[O.key,this.getScrollOffset()-O.start]);const C=s.followOnAppend===!0?"auto":s.followOnAppend||null;C&&m>h&&this.isAtEnd(a.scrollEndThreshold)&&(h===0||s.getItemKey(m-1)!==v)&&(l=C)}}this.options=s,c&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,f=0;if(o&&this.scrollOffset!==null){const[h,m]=o,y=this.getMeasurements(),{count:p,getItemKey:v}=this.options;let b=0;for(;b<p&&v(b)!==h;)b++;if(b<p){const w=y[b];if(w){const O=w.start+m;O!==this.scrollOffset&&(f=O-this.scrollOffset,this.scrollOffset=O,u=!0)}}}(u||l)&&(this.pendingScrollAnchor=[u?o[0]:null,u?o[1]:0,l,f])},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=i1(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{if(a&&this._intendedScrollOffset===null&&s===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(s-this._intendedScrollOffset)<1.5&&(s=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===s?this.scrollDirection:o<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const s=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!jM()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};s.addEventListener("touchstart",a,Ck),s.addEventListener("touchend",o,Ck),this.unsubs.push(()=>{s.removeEventListener("touchstart",a),s.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[s,a,o,l]=i;s!==null&&!o&&(jM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)return;const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=i1(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,r,i,s,a,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c}),{key:!1}),this.getMeasurements=i1(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c},u)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),o===1){const b=n*2;let w=this._flatMeasurements;if(!w||w.length<b){const E=new Float64Array(b);w&&h>0&&E.set(w.subarray(0,h*2)),w=E,this._flatMeasurements=w}let O;if(h===0)O=r+i;else{const E=h-1;O=w[E*2]+w[E*2+1]+c}for(let E=h;E<n;E++){const M=s(E),N=f.get(M),_=typeof N=="number"?N:this.options.estimateSize(E);w[E*2]=O,w[E*2+1]=_,O+=_+c}const C=HBe(n,w,s);return this.measurementsCache=C,C}const m=this.measurementsCache.slice(0,h),y=new Array(o).fill(void 0),p=new Float64Array(o);let v=0;for(let b=0;b<h;b++){const w=m[b];w&&(y[w.lane]===void 0&&v++,y[w.lane]=b,p[w.lane]=w.end)}for(let b=h;b<n;b++){const w=s(b),O=this.laneAssignments.get(b);let C,E;const M=l==="estimate"||f.has(w);if(O!==void 0&&this.options.lanes>1){C=O;const j=y[C],L=j!==void 0?m[j]:void 0;E=L?L.end+c:r+i}else if(v===o){let j=0,L=p[0],H=y[0];for(let $=1;$<o;$++){const G=p[$];(G<L||G===L&&y[$]<H)&&(j=$,L=G,H=y[$])}C=j,E=L+c,M&&this.laneAssignments.set(b,C)}else C=b%this.options.lanes,E=r+i,M&&this.laneAssignments.set(b,C);const N=f.get(w),_=typeof N=="number"?N:this.options.estimateSize(b),I=E+_;m[b]={index:b,start:E,size:_,end:I,key:w,lane:C},y[C]===void 0&&v++,y[C]=b,p[C]=I}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i1(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>n.length===0||r===0?(this.range=null,null):(this.range=tVe(n,r,i,s,s===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i1(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,s,a)=>s===null||a===null?[]:n({startIndex:s,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(i!==void 0&&this.range){const s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-s),o=Math.min(this.options.count-1,i+s);return n>=a&&n<=o}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(n),i=this.options.getItemKey(r),s=this.elementsCache.get(i);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(i,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var i,s;if(n<0||n>=this.options.count)return;let a,o,l;const c=this._flatMeasurements;if(this.options.lanes===1&&c!==null)l=this.options.getItemKey(n),o=c[n*2],a=c[n*2+1];else{const h=this.measurementsCache[n];if(!h)return;l=h.key,o=h.start,a=h.size}const u=this.itemSizeCache.get(l)??a,f=r-u;if(f!==0){const h=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=h?this.getTotalSize():0,y=((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:l,start:o,size:a,end:o+a,lane:0},f,this):o<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(l)||this.scrollDirection!=="backward"));(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(l,r),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-m):y&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=i1(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,a=n.length;s<a;s++){const o=n[s],l=r[o];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const i=this._flatMeasurements,s=this.options.lanes===1&&i!=null,a=Nde(0,r.length-1,s?o=>i[o*2]:o=>jW(r[o]).start,n);return jW(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+s?"end":"start"),r==="center"?n+=(i-s)/2:r==="end"&&(n-=s);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getSize(),s=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(r==="auto")if(a.end>=s+i-this.options.scrollPaddingEnd)r="end";else if(a.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:i="auto"}={})=>{const s=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:i,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:i="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getOffsetForIndex(n,r);if(!s)return;const[a,o]=s,l=this.now();this.scrollState={index:n,align:o,behavior:i,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const i=this.getScrollOffset()+n,s=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:s,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const s=r.length-1,a=this._flatMeasurements;a!=null?i=a[s*2]+a[s*2+1]:i=((n=r[s])==null?void 0:n.end)??0}else{const s=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&s.some(o=>o===null);){const o=r[a];s[o.lane]===null&&(s[o.lane]=o.end),a--}i=Math.max(...s.filter(o=>o!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const r=this.getMeasurements();for(const i of r)i&&this.itemSizeCache.has(i.key)&&n.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return n},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,n){e!==0&&(jM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=r?r[0]:this.scrollState.lastTargetOffset,s=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&QBe(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=s){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(i-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=i,c||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Nde=(t,e,n,r)=>{for(;t<=e;){const i=(t+e)/2|0,s=n(i);if(s<r)t=i+1;else if(s>r)e=i-1;else return i}return t>0?t-1:0};function eVe(t,e,n){let r=0;for(;r<=e;){const i=(r+e)/2|0,s=t[i*2];if(s<n)r=i+1;else if(s>n)e=i-1;else return i}return r>0?r-1:0}function tVe(t,e,n,r,i){const s=t.length-1;if(t.length<=r)return{startIndex:0,endIndex:s};if(r===1&&i!==null){const c=eVe(i,s,n);let u=c;const f=n+e;for(;u<s&&i[u*2]+i[u*2+1]<f;)u++;return{startIndex:c,endIndex:u}}let o=Nde(0,s,c=>t[c].start,n),l=o;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<s&&c.some(f=>f<n+e);){const f=t[l];c[f.lane]=f.end,l++}const u=Array(r).fill(n+e);for(;o>=0&&u.some(f=>f>=n);){const f=t[o];u[f.lane]=f.start,o--}o=Math.max(0,o-o%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const LM=typeof document<"u"?x.useLayoutEffect:x.useEffect;function nVe({useFlushSync:t=!0,directDomUpdates:e=!1,directDomUpdatesMode:n="transform",...r}){const i=x.useReducer(c=>c+1,0)[1],s=x.useRef({enabled:e,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=e,s.current.mode=n;const a=c=>{const u=s.current;if(!u.enabled||!u.container)return;const f=c.getTotalSize();if(f!==u.lastSize){u.lastSize=f;const b=c.options.horizontal?"width":"height";u.container.style[b]=`${f}px`}const h=!!c.options.horizontal,m=u.mode==="transform",y=h?"left":"top",p=c.options.scrollMargin,v=c.getVirtualItems();for(const b of v){const w=b.start-p,O=c.elementsCache.get(b.key);O&&u.lastPositions.get(O)!==w&&(u.lastPositions.set(O,w),m?O.style.transform=h?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:O.style[y]=`${w}px`)}},o={...r,onChange:(c,u)=>{var f;const h=s.current;let m=!0;if(h.enabled){a(c);const y=c.range,p=h.prevRange;m=!p||p.isScrolling!==c.isScrolling||p.startIndex!==(y==null?void 0:y.startIndex)||p.endIndex!==(y==null?void 0:y.endIndex),m&&(h.prevRange=y?{startIndex:y.startIndex,endIndex:y.endIndex,isScrolling:c.isScrolling}:null)}m&&(t&&u?Zl.flushSync(i):i()),(f=r.onChange)==null||f.call(r,c,u)}},[l]=x.useState(()=>{const c=new JBe(o);return Object.assign(c,{containerRef:u=>{const f=s.current;if(f.container=u,f.lastSize=null,u&&f.enabled){const h=c.getTotalSize();f.lastSize=h;const m=c.options.horizontal?"width":"height";u.style[m]=`${h}px`}}})});return l.setOptions(o),LM(()=>l._didMount(),[]),LM(()=>l._willUpdate()),LM(()=>{a(l)}),l}function rVe(t){return nVe({observeElementRect:GBe,observeElementOffset:WBe,scrollToFn:KBe,...t})}function iVe(t,e){const n=new Set(Mde(t));for(const r of e)r>=0&&r<t.count&&n.add(r);return[...n].sort((r,i)=>r-i)}function sVe(t,e){const n=Math.min(t,il.rowOverscanPerSide*2+1),r=new Set(Array.from({length:n},(i,s)=>s));for(const i of e)i>=0&&i<t&&r.add(i);return[...r].sort((i,s)=>i-s)}function aVe({enabled:t,scrollRef:e,viewport:n,rowGeometry:r,sessionEpoch:i,pinnedRowKeys:s,focusedRowKey:a}){const o=n.clientWidth>0&&n.clientHeight>0,l=x.useMemo(()=>[...new Set([...s,...a===void 0?[]:[a]].map(b=>r.getRowIndex(b)))],[a,s,r]),c=x.useCallback(b=>r.getRowHeight(b),[r]),u=x.useCallback(b=>r.rowKeys[b]??b,[r]),f=x.useCallback(b=>iVe(b,l),[l]),h=x.useCallback(()=>n.scrollTop,[n.scrollTop]),m=rVe({enabled:o,useFlushSync:!1,count:r.rowKeys.length,getScrollElement:()=>e.current,estimateSize:c,getItemKey:u,overscan:il.rowOverscanPerSide,rangeExtractor:f,scrollMargin:La+u0,initialRect:{width:n.clientWidth,height:n.clientHeight},initialOffset:h});x.useEffect(()=>{var b;o&&(m.measure(),(b=e.current)==null||b.dispatchEvent(new Event("scroll")))},[t,e,i,o,m]);const y=a===void 0?-1:r.getRowIndex(a),p=y<0?0:r.getRowHeight(y);x.useEffect(()=>{o&&y>=0&&m.resizeItem(y,p)},[t,p,y,i,o,m]);const v=x.useMemo(()=>null,[t,r]);return v||(o?m.getVirtualItems().map(({index:b})=>({index:b,rowKey:r.rowKeys[b]??b})):sVe(r.rowKeys.length,l).map(b=>({index:b,rowKey:r.rowKeys[b]??b})))}function FW(t){var r;if(!(t instanceof Element))return;const e=(r=t.closest("[data-timeline-row-key]"))==null?void 0:r.dataset.timelineRowKey;if(e===void 0)return;const n=Number(e);return Number.isFinite(n)?n:void 0}function oVe({scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,elements:i,selectedElementId:s,focusedRowKey:a,draggedRowKey:o,resizingElementIds:l,clipContextMenuRowKey:c,keyframeContextMenuRowKey:u,lastScrollLeftRef:f,syncScrollViewport:h}){const m=iBe,[y,p]=x.useState(),v=x.useCallback(_=>{p(FW(_.target))},[]),b=x.useCallback(_=>{p(FW(_.relatedTarget))},[]),w=x.useMemo(()=>RW(i,s),[i,s]),O=x.useMemo(()=>(l==null?void 0:l.map(_=>{var I;return(I=RW(i,_))==null?void 0:I.rowKey}).filter(_=>_!==void 0))??[],[i,l]),C=x.useMemo(()=>[o,...O,w==null?void 0:w.rowKey,a,c,u].filter(_=>_!==void 0),[c,o,a,u,O,w]),E=aVe({enabled:m,scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,pinnedRowKeys:C,focusedRowKey:y??a}),M=x.useRef(n),N=x.useRef(r);return x.useLayoutEffect(()=>{const _=t.current,I=M.current;if(N.current!==r)N.current=r,f.current=0,_&&(_.scrollLeft=0,_.scrollTop=0,h(_));else if(_&&I!==n){const j=_Be(I,n,_.scrollTop);j!==_.scrollTop&&(_.scrollTop=j,h(_))}M.current=n},[f,n,t,r,h]),{enabled:m,virtualRows:E,timelineFocusProps:{onFocus:v,onBlur:b}}}function lVe(t){const e=ce(l=>l.expandedClipIds),n=ce(l=>l.collapsedGroupIds),r=ce(l=>l.expandedLaneOwnerIds),i=ce(l=>l.timelineProjectId),s=VBe({tracks:t.tracks,displayTrackOrder:t.layout.displayTrackOrder,laneCounts:t.laneCounts,selectedElementId:t.selectedElementId,selectedElementIds:t.selectedElementIds,expandedClipIds:e,collapsedGroupIds:n,expandedLaneOwnerIds:r,groups:t.groups,trackGroupOf:t.trackGroupOf,gsapAnimations:t.gsapAnimations}),a=BBe({scrollRef:t.scrollRef,logicalRows:s,elements:t.elements,rowGeometry:t.layout.rowGeometry,pixelsPerSecond:t.pixelsPerSecond,contentOrigin:t.contentOrigin,allowHorizontal:t.allowHorizontal,viewportVersion:t.viewport,projectId:i,sessionEpoch:t.sessionEpoch,syncScrollViewport:t.syncScrollViewport}),o=oVe({scrollRef:t.scrollRef,viewport:t.viewport,rowGeometry:t.layout.rowGeometry,sessionEpoch:t.sessionEpoch,elements:t.elements,selectedElementId:t.selectedElementId,focusedRowKey:a.focusedRowKey,draggedRowKey:t.draggedRowKey,resizingElementIds:t.resizingElementIds,clipContextMenuRowKey:t.clipContextMenuRowKey,keyframeContextMenuRowKey:t.keyframeContextMenuRowKey,lastScrollLeftRef:t.lastScrollLeftRef,syncScrollViewport:t.syncScrollViewport});return{logicalRows:s,...a,rowVirtualizationActive:o.enabled,virtualRows:o.virtualRows,timelineFocusProps:o.timelineFocusProps}}const cVe=x.memo(function({onSeek:e,onDrillDown:n,renderClipContent:r,renderClipOverlay:i,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l,onDeleteElement:c,onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:m,onBlockedEditAttempt:y,onSplitElement:p,onSelectElement:v,theme:b,sessionEpoch:w=0}={}){var gt;const{onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onBlockedEditAttempt:N,onSplitElement:_,onRazorSplitAll:I,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:H,onMoveKeyframe:$}=lBe({onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:m,onBlockedEditAttempt:y,onSplitElement:p}),G=x.useMemo(()=>({...qj,...b}),[b]),q=jBe();fEe();const Y=ce(Gt=>Gt.elements),J=xS(),ie=uEe(),te=ce(Gt=>Gt.duration),ne=ce(Gt=>Gt.timeDisplayMode),W=ce(Gt=>Gt.timelineReady),F=ce(Gt=>Gt.selectedElementId),U=ce(Gt=>Gt.selectedElementIds),Q=ce(Gt=>Gt.focusedEaseSegment),K=ce(Gt=>Gt.gsapAnimations),ee=x.useMemo(()=>CBe(K,J),[K,J]),se=ee?Vo+sv:sv+q3e,z=ee?sv:0,V=ce(Gt=>Gt.setSelectedElementId),ae=ce(Gt=>Gt.currentTime),{zoomMode:he,manualZoomPercent:ge,setZoomMode:ye,setManualZoomPercent:fe}=foe(),me=x.useRef(null),Te=x.useRef(null),ve=x.useRef(null),xe=ce(Gt=>Gt.activeTool),[we,ke]=x.useState(null),Me=x.useRef(!1),Qe=PBe(),[qe,Ge]=x.useState(!1),[Ye,st]=x.useState(null),[nt,yt]=x.useState(null),dt=x.useCallback(Gt=>{Te.current=Gt},[]),zt=x.useRef(0),Kt=x.useMemo(()=>Pde(te,Y),[te,Y]),dn=ce(Gt=>Gt.keyframeCache);rBe(K);const{tracks:en,trackStyles:et,trackOrder:Ot,trackOrderRef:St,laneCounts:Je,rowGeometry:Be,rowGeometryRef:We,groups:Ke,trackGroupOf:Xt}=bje(J,K,F,U),Pe=x.useRef(J);Pe.current=J;const De=x.useRef(100),ze=x.useRef(Kt);ze.current=Kt;const at=x.useRef(100),{pinZoomBeforeEdit:Wt,setRangeSelectionRef:cn,pinnedOnMoveElement:Jt,pinnedOnMoveElements:Pn,pinnedOnResizeElement:Cr,pinnedOnResizeElements:mt,pinnedOnFileDrop:pn,pinnedOnAssetDrop:un,pinnedOnBlockDrop:Cn,pinnedOnCompositionDrop:Ln}=$$e({ppsRef:De,fitPpsRef:at,onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l}),{readClipZIndex:tt,applyStackingPatches:Yn,zSyncEnabled:Pt}=eBe({expandedElementsRef:Pe}),{gapMenuModel:mn,gapHighlight:Ht,setHoveredGapAction:gn,openGapMenu:tr,dismissGapMenu:_n,closeTrackGap:br,closeAllTrackGaps:nr}=pBe({tracks:en,expandedElementsRef:Pe,trackOrderRef:St,onMoveElement:Jt,onMoveElements:Pn}),{draggedClip:bt,setDraggedClip:or,resizingClip:wn,setResizingClip:Rn,blockedClipRef:wt,suppressClickRef:Zt}=T$e({scrollRef:ve,ppsRef:De,durationRef:ze,trackOrderRef:St,rowGeometryRef:We,onMoveElement:Jt,onMoveElements:Pn,onResizeElement:Cr,onResizeElements:mt,onBlockedEditAttempt:N,setShowPopover:Ge,setRangeSelectionRef:cn,readZIndex:Pt?tt:void 0,onStackingPatches:Pt?Yn:void 0,refreshAfterLaneMove:q,sessionEpoch:w}),Ct=oTe({scrollRef:ve,ppsRef:De,durationRef:ze,trackOrderRef:St,rowGeometryRef:We,contentOrigin:se,onFileDrop:pn,onAssetDrop:un,onBlockDrop:Cn,onCompositionDrop:Ln,sessionEpoch:w}),fr=Sje(bt,Ot,Be),Nt=((gt=wn==null?void 0:wn.groupPreview)==null?void 0:gt.map(Gt=>Gt.key))??(wn?[Zn(wn.element)]:void 0),{recordTimelineScroll:kt}=OBe({totalClipCount:J.length,totalRowCount:fr.displayTrackOrder.length,zoomMode:he}),{viewport:xn,showShortcutHint:Rt,setScrollRef:sn,syncScrollViewport:ds}=oBe(ve,[W,J.length,fr.totalH]),{pps:Fn,fitPps:ri,displayContentWidth:fn,displayDuration:En,zoomModeRef:rr,manualZoomPercentRef:Ti}=tBe({viewportWidth:xn.clientWidth,effectiveDuration:Kt,zoomMode:he,manualZoomPercent:ge,ppsRef:De,fitPpsRef:at,draggedClip:bt,resizingClip:wn,expandedElements:J,isDragging:Me,scrollRef:ve,lastScrollLeftRef:zt,contentOrigin:se}),Jr=lVe({scrollRef:ve,tracks:en,layout:fr,laneCounts:Je,selectedElementId:F,selectedElementIds:U,groups:Ke,trackGroupOf:Xt,gsapAnimations:K,elements:J,pixelsPerSecond:Fn,contentOrigin:se,allowHorizontal:he==="manual",viewport:xn,sessionEpoch:w,draggedRowKey:bt!=null&&bt.started?bt.previewTrack:void 0,resizingElementIds:Nt,clipContextMenuRowKey:nt==null?void 0:nt.element.track,keyframeContextMenuRowKey:Ye==null?void 0:Ye.element.track,lastScrollLeftRef:zt,syncScrollViewport:ds}),$i=ce(Gt=>Gt.selectedKeyframes),ps=ce(Gt=>Gt.toggleSelectedKeyframe),{onClickKeyframe:Dr,onSelectSegment:Za,onShiftClickKeyframe:bi,onContextMenuKeyframe:Oa}=MPe({expandedElements:J,keyframeCache:dn,onSelectElement:v,onSeek:e,setSelectedElementId:V,setKfContextMenu:st,toggleSelectedKeyframe:ps}),{clipIndex:ft,renderTimeRange:Ae,visibleTimeRange:_e,pinnedClipIdentities:lt}=RBe({tracks:en,viewport:xn,pixelsPerSecond:Fn,contentOrigin:se,duration:En,selectedElementId:F??void 0,draggedElementId:bt?Zn(bt.element):void 0,resizingElementIds:Nt,focusedElementId:Jr.pinnedElementId,focusedEaseElementId:Q==null?void 0:Q.elementId,clipContextMenuElementId:nt?Zn(nt.element):void 0,keyframeContextMenuElementId:Ye?Zn(Ye.element):void 0});NFe({scrollRef:ve,currentTime:ae,clipStateVersion:Ae,elementStateVersion:J});const At=xBe({gapHighlight:Ht,tracks:en,selectedElementId:F,selectedElementIds:U,expandedElements:J,dragActive:(bt==null?void 0:bt.started)===!0||wn!=null,displayDuration:En}),{seekFromX:tn,autoScrollDuringDrag:Mn,dragScrollRaf:Vr}=U5e({playheadRef:me,scrollRef:ve,ppsRef:De,durationRef:ze,isDragging:Me,currentTime:ae,zoomMode:he,zoomModeRef:rr,manualZoomPercentRef:Ti,fitPps:ri,fitPpsRef:at,effectiveDuration:Kt,pps:Fn,timelineReady:W,elementsLength:J.length,setZoomMode:ye,setManualZoomPercent:fe,onSeek:e,contentOrigin:se}),{razorGuideX:lr,updateRazorGuide:vi,clearRazorGuide:ms,splitAllAtPointer:ec}=bBe({active:xe==="razor",scrollRef:ve,contentOrigin:se,pixelsPerSecond:Fn,onSplitAll:I}),{rangeSelection:Hr,setRangeSelection:Ss,shiftClickClipRef:Zc,marqueeRect:Vu,isScrubbing:ka,handlePointerDown:Ca,handlePointerMove:Gc,handlePointerUp:Hu,handlePointerCancel:tc}=G5e({scrollRef:ve,ppsRef:De,effectiveDuration:Kt,pps:Fn,onSeek:e,seekFromX:tn,autoScrollDuringDrag:Mn,dragScrollRaf:Vr,isDragging:Me,setShowPopover:Ge,elementsRef:Pe,clipIndex:ft,rowGeometryRef:We,onSelectElement:v,contentOrigin:se,sessionEpoch:w});cn.current=Ss,TBe(J,F,Ge,()=>Ss(null));const{major:nc,minor:js,majorTickInterval:Qu}=MBe(En,Fn,ne,Jr.rowVirtualizationActive?Ae:void 0),hl=x.useCallback(Gt=>EBe(Gt,wn),[wn]);return!W||J.length===0?d.jsx(lTe,{isDragOver:Ct.isDragOver,onFileDrop:!!s,onDragOver:Ct.handleAssetDragOver,onDragLeave:Ct.handleAssetDragLeave,onDrop:Ct.handleAssetDrop}):d.jsxs("div",{ref:dt,"aria-label":"Timeline","data-timeline-element-count":J.length,className:`relative border-t select-none h-full overflow-hidden ${Ct.isDragOver?"ring-1 ring-inset ring-studio-accent/60":""} ${xe==="razor"||Qe?"cursor-crosshair":"cursor-default"}`,onMouseMove:vi,onMouseLeave:ms,style:{touchAction:"pan-x pan-y",background:G.shellBackground,borderColor:G.shellBorder},children:[d.jsxs("div",{ref:sn,"data-timeline-scroll-viewport":!0,"data-timeline-auto-scroll-left-inset":ee?Vo:0,tabIndex:-1,className:`${he==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full outline-none`,onScroll:Gt=>{zt.current=Gt.currentTarget.scrollLeft,kt(Gt.currentTarget),ds(Gt.currentTarget,!0)},...Jr.timelineFocusProps,onDragOver:Ct.handleAssetDragOver,onDragLeave:Ct.handleAssetDragLeave,onDrop:Ct.handleAssetDrop,onPointerDown:Gt=>{Gt.target instanceof Element&&Gt.target.closest("button, input, select, a")||ec(Gt)||Ca(Gt)},onPointerMove:Gc,onPointerUp:Hu,onPointerCancel:tc,onLostPointerCapture:tc,children:[d.jsx(u$e,{major:nc,minor:js,pps:Fn,contentOrigin:se,contentGutter:z,trackContentWidth:fn,totalH:fr.totalH,effectiveDuration:Kt,majorTickInterval:Qu,rangeSelection:Hr,marqueeRect:Vu,laneGapStrips:At,theme:G,displayTrackOrder:fr.displayTrackOrder,rowHeights:fr.displayRowHeights,rowGeometry:fr.rowGeometry,virtualRows:Jr.virtualRows,logicalRows:Jr.logicalRows,focusedTargetId:Jr.focusedTargetId,rowsVirtualized:Jr.rowVirtualizationActive,clipIndex:ft,renderTimeRange:Ae,visibleTimeRange:_e,pinnedClipIdentities:lt,trackOrder:Ot,tracks:en,trackStyles:et,groups:Ke,laneCounts:Je,selectedElementId:F,selectedElementIds:U,hoveredClip:we,draggedClip:bt,resizingClip:wn,isScrubbing:ka,blockedClipRef:wt,suppressClickRef:Zt,scrollRef:ve,renderClipContent:Jr.rowVirtualizationActive&&xn.isScrolling?void 0:r,renderClipOverlay:i,playheadRef:me,onDrillDown:n,onSelectElement:v,setHoveredClip:ke,setShowPopover:Ge,setRangeSelection:Ss,setResizingClip:Rn,setDraggedClip:or,setSelectedElementId:V,shiftClickClipRef:Zc,getPreviewElement:hl,getTrackStyle:ohe,keyframeCache:dn,gsapAnimations:K,selectedKeyframes:$i,currentTime:ae,onSeek:e,beatAnalysis:ie,onSelectSegment:Za,onClickKeyframe:Dr,onShiftClickKeyframe:bi,onMoveKeyframe:$,onContextMenuKeyframe:Oa,onContextMenuClip:(Gt,gr)=>{Gt.preventDefault(),V(gr.key??gr.id),v==null||v(gr),_n(),yt({x:Gt.clientX,y:Gt.clientY,element:gr,sessionEpoch:ce.getState().timelineSessionEpoch})},onContextMenuLane:(Gt,gr,ws)=>{bt!=null&&bt.started||wn||(yt(null),tr({x:Gt.clientX,y:Gt.clientY,track:gr,time:ws}))}}),xe==="razor"&&lr!==null&&d.jsx(vBe,{x:lr})]}),d.jsx(F$e,{elements:J,elementsRef:Pe,theme:G,showShortcutHint:Rt,showPopover:qe,rangeSelection:Hr,setShowPopover:Ge,setRangeSelection:Ss,kfContextMenu:Ye,setKfContextMenu:st,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:H,clipContextMenu:nt,setClipContextMenu:yt,currentTime:ae,onSplitElement:_,pinZoomBeforeEdit:Wt,onDeleteElement:c,gapContextMenu:mn,onDismissGapContextMenu:_n,onCloseTrackGap:br,onCloseAllTrackGaps:nr,onHoverGapAction:gn})]})}),uVe={overscan:0,visible:1,interaction:2},$W=Object.freeze({status:"idle"});function fVe(t){return t==="video"?"video":t==="composition"?"composition":"general"}function hVe(t){return t instanceof Error?t:new Error(String(t))}function BS(t){return Object.entries(t).filter(e=>e[1]!==void 0).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(n))}`).join("&")}function eR(t){return BS({project:t.projectId,session:t.sessionEpoch,request:t.key,kind:t.kind,rich:t.rich?1:0})}class dVe{constructor(e=il,n=Date.now){vt(this,"entries",new Map);vt(this,"budgets");vt(this,"nextLeaseId",1);vt(this,"nextSequence",1);vt(this,"scrolling",!1);vt(this,"cacheBytes",0);vt(this,"waveformCacheBytes",0);vt(this,"activeByBucket",{video:0,composition:0,general:0});vt(this,"activeByKind",{video:0,image:0,composition:0,waveform:0});vt(this,"now");this.budgets=e,this.now=n}acquire(e,n){const r=eR(e);let i=this.entries.get(r);(i==null?void 0:i.state)==="error"&&i.failedAt!==void 0&&this.now()-i.failedAt>=this.budgets.metadataFailureTtlMs&&(this.deleteEntry(r,i),i=this.entries.get(r)),i||(i={request:e,scopedKey:r,state:"queued",leases:new Map,listeners:new Map,controller:null,weight:0,disposed:!1,cached:!1,lastAccess:this.nextSequence++,snapshot:Object.freeze({status:"queued"})},this.entries.set(r,i));const s=this.nextLeaseId++;i.leases.set(s,e.priority),i.listeners.set(s,n),i.lastAccess=this.nextSequence++,this.pump();let a=!1;return{updatePriority:o=>{const l=this.entries.get(r);!l||!l.leases.has(s)||(l.leases.set(s,o),l.lastAccess=this.nextSequence++,this.pump())},release:()=>{var l;if(a)return;a=!0;const o=this.entries.get(r);o&&(o.leases.delete(s),o.listeners.delete(s),o.leases.size===0&&(o.state==="queued"?this.deleteEntry(r,o):o.state==="loading"?((l=o.controller)==null||l.abort(),this.deleteEntry(r,o)):o.state==="ready"&&!o.cached&&this.deleteEntry(r,o)),this.evict())}}}getSnapshot(e){const n=this.entries.get(eR(e));return n?n.snapshot:$W}setScrolling(e){this.scrolling!==e&&(this.scrolling=e,e||this.pump())}invalidateProject(e){var n;for(const[r,i]of this.entries)i.request.projectId===e&&(i.leases.size>0||((n=i.controller)==null||n.abort(),this.deleteEntry(r,i)))}getDiagnostics(){let e=0,n=0,r=0,i=0,s=0;for(const a of this.entries.values())a.state==="queued"&&e++,a.state==="loading"&&n++,a.cached&&(a.request.kind==="waveform"?s++:i++),r+=a.leases.size;return{queued:e,active:n,leases:r,cacheEntries:i,cacheBytes:this.cacheBytes,waveformCacheEntries:s,waveformCacheBytes:this.waveformCacheBytes,activeByKind:{...this.activeByKind}}}pump(){const e=Array.from(this.entries.values()).filter(n=>n.state==="queued"&&n.leases.size>0).sort((n,r)=>this.entryPriority(r)-this.entryPriority(n)||n.lastAccess-r.lastAccess);for(const n of e){if(this.scrolling&&n.request.rich)continue;const r=fVe(n.request.kind);this.activeByBucket[r]>=this.bucketLimit(r)||this.start(n,r)}}start(e,n){e.state="loading",e.snapshot=Object.freeze({status:"loading"});const r=new AbortController;e.controller=r,this.activeByBucket[n]++,this.activeByKind[e.request.kind]++,this.notify(e),this.loadWithTimeout(e,r).then(s=>this.acceptResult(e,r,s)).catch(s=>{if(this.entries.get(e.scopedKey)===e){if(r.signal.aborted&&e.leases.size===0){this.deleteEntry(e.scopedKey,e);return}e.state="error",e.error=hVe(s),e.failedAt=this.now(),e.snapshot=Object.freeze({status:"error",error:e.error}),this.notify(e),this.evictFailures()}}).finally(()=>{e.controller===r&&(e.controller=null),this.activeByBucket[n]--,this.activeByKind[e.request.kind]--,this.pump()})}acceptResult(e,n,r){if(n.signal.aborted||this.entries.get(e.scopedKey)!==e){this.safeDispose(r.dispose);return}this.validateResult(r),e.state="ready",e.value=r.value,e.weight=r.weight,e.dispose=r.dispose,this.cacheResult(e),e.snapshot=Object.freeze({status:"ready",value:r.value}),this.notify(e),this.evict(),!e.cached&&e.leases.size===0&&this.deleteEntry(e.scopedKey,e)}validateResult(e){if(!(Number.isFinite(e.weight)&&e.weight>=0))throw this.safeDispose(e.dispose),new RangeError("Thumbnail result weight must be finite and non-negative")}cacheResult(e){const n=e.request.kind==="waveform",r=n?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes;e.cached=e.weight<=r,e.cached&&(n?this.waveformCacheBytes+=e.weight:this.cacheBytes+=e.weight)}entryPriority(e){let n=-1;for(const r of e.leases.values())n=Math.max(n,uVe[r]);return n}bucketLimit(e){return e==="video"?this.budgets.concurrentVideoDecodes:e==="composition"?this.budgets.concurrentCompositionFetches:this.budgets.concurrentMetadataJobs}evict(){this.evictPartition(!1),this.evictPartition(!0)}evictPartition(e){const n=Array.from(this.entries.values()).filter(s=>s.cached&&s.request.kind==="waveform"===e),r=new Map;for(const s of n)r.set(s.request.projectId,(r.get(s.request.projectId)??0)+1);n.sort((s,a)=>s.lastAccess-a.lastAccess);let i=n.length;for(const s of n){const a=r.get(s.request.projectId)??0;this.isCacheOverBudget(e,i,a)&&(this.uncache(s),i--,r.set(s.request.projectId,a-1),s.leases.size===0&&this.deleteEntry(s.scopedKey,s))}}isCacheOverBudget(e,n,r){const i=e?this.budgets.waveformCacheEntries:this.budgets.thumbnailCacheEntries,s=e?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes,a=e?this.waveformCacheBytes:this.cacheBytes,o=!e&&r>this.budgets.thumbnailCacheEntriesPerProject;return n>i||a>s||o}uncache(e){e.cached=!1,e.request.kind==="waveform"?this.waveformCacheBytes-=e.weight:this.cacheBytes-=e.weight}notify(e){for(const n of new Set(e.listeners.values()))n()}loadWithTimeout(e,n){let r;try{r=e.request.load(n.signal)}catch(i){r=Promise.reject(i)}return new Promise((i,s)=>{let a=!1;const o=setTimeout(()=>{a||(a=!0,n.abort(),s(new Error(`Thumbnail load timed out after ${this.budgets.thumbnailLoadTimeoutMs}ms`)))},this.budgets.thumbnailLoadTimeoutMs);r.then(l=>{if(a){this.safeDispose(l.dispose);return}a=!0,clearTimeout(o),i(l)},l=>{a||(a=!0,clearTimeout(o),s(l))})})}deleteEntry(e,n){this.entries.get(e)===n&&(this.entries.delete(e),n.snapshot=$W,this.notify(n),n.cached&&(n.cached=!1,n.request.kind==="waveform"?this.waveformCacheBytes-=n.weight:this.cacheBytes-=n.weight),n.disposed||(n.disposed=!0,this.safeDispose(n.dispose)),n.listeners.clear(),n.leases.clear())}evictFailures(){const e=Array.from(this.entries.values()).filter(r=>r.state==="error"&&r.leases.size===0).sort((r,i)=>r.lastAccess-i.lastAccess),n=e.length-this.budgets.thumbnailCacheEntries;for(const r of e.slice(0,Math.max(0,n)))this.deleteEntry(r.scopedKey,r)}safeDispose(e){try{e==null||e()}catch{}}}const pVe=new dVe,BW=Object.freeze({status:"idle"});function v3(t,e=pVe){const n=x.useRef(t);n.current=t;const r=x.useRef(null),i=t?eR(t):null,s=t==null?void 0:t.priority,a=x.useCallback(l=>{const c=n.current;if(!c||i===null)return()=>{};const u=e.acquire(c,l);return r.current=u,()=>{r.current===u&&(r.current=null),u.release()}},[i,e]),o=x.useCallback(()=>{const l=n.current;return l&&i!==null?e.getSnapshot(l):BW},[i,e]);return x.useLayoutEffect(()=>{var l;s&&((l=r.current)==null||l.updatePriority(s))},[s]),x.useSyncExternalStore(a,o,()=>BW)}function mVe(t,e,n){const r=Math.max(0,Number.isFinite(t)?t:0),i=Math.max(0,Number.isFinite(e)?e:0),s=Math.max(1,Number.isFinite(n)?Math.floor(n):1);return s===1?[r+i/2]:Array.from({length:s},(a,o)=>r+i*o/(s-1))}async function gVe(t){return t instanceof HTMLCanvasElement?new Promise((e,n)=>{t.toBlob(r=>r?e(r):n(new Error("Video thumbnail encode failed")),"image/jpeg",.72)}):t.convertToBlob({type:"image/jpeg",quality:.72})}function B1(t){if(t.aborted)throw new DOMException("Aborted","AbortError")}function Dde(t){for(const e of t.urls.splice(0))URL.revokeObjectURL(e);for(const e of t.canvases)e.width=0,e.height=0;t.canvases.clear()}function yVe(t,e){const n=Math.max(1,Math.min(e.posterMaxPhysicalWidth,Math.round(e.posterMaxPhysicalHeight*t)));return{width:n,height:Math.max(1,Math.min(e.posterMaxPhysicalHeight,Math.round(n/t)))}}async function xVe(t,e,n,r){for await(const i of t.canvasesAtTimestamps(e)){if(B1(n),!i)continue;r.canvases.add(i.canvas);const s=await gVe(i.canvas);B1(n),r.urls.push(URL.createObjectURL(s))}}function bVe(t,e,n,r){const i=t.urls[0];if(!i)throw new Error("Video source returned no thumbnail frames");return{value:t.urls.length===1?{kind:"image",url:i,aspect:e}:{kind:"filmstrip",urls:[...t.urls],aspect:e},weight:n*r*4*t.urls.length,dispose:()=>Dde(t)}}async function vVe(t,e,n=il){const r=await Sy(()=>import("./index-DRWtJgb8.js"),[]);B1(e);const i=new r.Input({source:new r.UrlSource(t.source),formats:r.ALL_FORMATS}),s={urls:[],canvases:new Set};try{const a=await i.getPrimaryVideoTrack();if(B1(e),!a)throw new Error("Video source has no decodable video track");const[o,l]=await Promise.all([a.getDisplayWidth(),a.getDisplayHeight()]);if(B1(e),!(o>0&&l>0))throw new Error("Video source has invalid dimensions");const c=await a.getDurationFromMetadata({skipLiveWait:!0});B1(e);const u=Math.max(0,c??t.sourceRangeDuration??0),f=Math.min(Math.max(0,t.sourceStart??0),u),h=t.sourceRangeDuration??Math.max(0,u-f),m=Math.min(Math.max(0,h),Math.max(0,u-f)),y=mVe(f,m,Math.min(t.frameCount,n.richPreviewFrameCount)),p=o/l,v=yVe(p,n),b=new r.CanvasSink(a,{width:v.width,height:v.height,fit:t.fit??"cover",poolSize:1});return await xVe(b,y,e,s),bVe(s,p,v.width,v.height)}catch(a){throw Dde(s),a}finally{i.dispose()}}const Ide=66;function _de(t,e,n=!1){return new Promise((r,i)=>{const s=new Image,a=()=>{s.onload=null,s.onerror=null,e.removeEventListener("abort",o)},o=()=>{a(),s.src="",i(new DOMException("Aborted","AbortError"))};if(e.aborted){o();return}s.onload=()=>{a(),r(s.naturalWidth>0&&s.naturalHeight>0?s.naturalWidth/s.naturalHeight:16/9)},s.onerror=()=>{a(),n&&/\.svg($|\?)/i.test(t)?r(16/9):i(new Error("Image thumbnail failed to load"))},e.addEventListener("abort",o,{once:!0}),s.src=t})}function zF(t,e,n=Ide,r=1){const i=Number.isFinite(e)&&e>0?e:1.7777777777777777,s=Math.max(r,Math.round(n*i)),a=t>0?Math.max(1,Math.ceil(t/s)):1;return{frameW:s,frameCount:a}}function EA(t){return t.split("/").map(encodeURIComponent).join("/")}function _y(t,e,n){if(!t||/^(?:data:|blob:)/i.test(t))return t;let r=t,i="";if(/^https?:/i.test(t)){let s;try{s=new URL(t)}catch{return t}if(!n||s.origin!==n)return t;const a=new URL(`/api/projects/${e}/preview/`,n).pathname;if(s.pathname.startsWith(a)||s.pathname.startsWith("/api/"))return t;try{r=s.pathname.replace(/^\/+/,"").split("/").map(decodeURIComponent).join("/")}catch{return t}i=`${s.search}${s.hash}`}return`/api/projects/${e}/preview/${EA(r.replace(/^\/+/,""))}${i}`}const AVe=x.memo(function({videoSrc:e,label:n,labelColor:r,duration:i=5,sourceStart:s,sourceRangeDuration:a,projectId:o=e,sessionEpoch:l=0,priority:c="visible",rich:u=!1}){const[f,h]=x.useState(0),m=x.useRef(null),y=x.useMemo(()=>({key:BS({kind:"video",source:e,start:s,duration:a??i,frames:u?6:1}),projectId:o,sessionEpoch:l,kind:"video",priority:c,rich:u,load:M=>vVe({source:e,sourceStart:s,sourceRangeDuration:a??i,frameCount:u?6:1,fit:"cover"},M)}),[i,c,o,u,l,a,s,e]),p=v3(y),v=p.status==="ready"?p.value:null,b=(v==null?void 0:v.kind)==="filmstrip"?v.urls:(v==null?void 0:v.kind)==="image"?[v.url]:[],w=(v==null?void 0:v.kind)==="image"||(v==null?void 0:v.kind)==="filmstrip"?v.aspect:16/9,{frameW:O,frameCount:C}=zF(f,w,Ide),E=x.useCallback(M=>{var _;if((_=m.current)==null||_.disconnect(),!M)return;const N=M.parentElement??M;h(N.clientWidth),m.current=new ResizeObserver(([I])=>h(I.contentRect.width)),m.current.observe(N)},[]);return kr(()=>()=>{var M;return(M=m.current)==null?void 0:M.disconnect()}),d.jsxs("div",{ref:E,className:"absolute inset-0 overflow-hidden",children:[b.length>0&&d.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:C},(M,N)=>{const _=b[N%b.length];return d.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden bg-neutral-900",style:{width:O},children:d.jsx("img",{src:_,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover"})},N)})}),p.status==="loading"&&b.length===0&&d.jsx("div",{className:"absolute inset-0 animate-pulse motion-reduce:animate-none",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),p.status==="error"&&d.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-neutral-900/60",children:d.jsx("span",{className:"rounded bg-black/50 px-1 text-[8px] text-neutral-500",children:"no preview"})}),n&&d.jsx("div",{className:"absolute inset-x-0 bottom-0 z-10 px-1.5 pb-0.5 pt-3",style:{background:"linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%)"},children:d.jsx("span",{className:"block truncate text-[9px] font-semibold leading-tight",style:{color:r,textShadow:"0 1px 2px rgba(0,0,0,0.9)"},children:n})})]})}),SVe=66,wVe="v3";function ZF({previewUrl:t,seekTime:e=2,duration:n=5,selector:r,selectorIndex:i,origin:s,output:a,contentRevision:o=0}){const l=t.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),c=new URL(l,s);return c.searchParams.set("t",(e+n/2).toFixed(2)),c.searchParams.set("v",wVe),c.searchParams.set("revision",String(o)),a&&c.searchParams.set("output",a),r&&(c.searchParams.set("selector",r),i!=null&&i>0&&c.searchParams.set("selectorIndex",String(i))),c.toString()}async function OVe(t,e){const n=await fetch(t,{signal:e});if(!n.ok)throw new Error(`Composition thumbnail failed (${n.status})`);const r=await n.blob();if(e.aborted)throw new DOMException("Aborted","AbortError");const i=URL.createObjectURL(r);try{const s=await _de(i,e);return{value:{kind:"image",url:i,aspect:s},weight:il.posterMaxPhysicalWidth*il.posterMaxPhysicalHeight*4,dispose:()=>URL.revokeObjectURL(i)}}catch(s){throw URL.revokeObjectURL(i),s}}const FM=x.memo(function({previewUrl:e,label:n,labelColor:r,selector:i,selectorIndex:s,seekTime:a=2,duration:o=5,projectId:l=e,sessionEpoch:c=0,contentRevision:u=0,priority:f="visible"}){const[h,m]=x.useState(0),y=x.useRef(null),p=ZF({previewUrl:e,seekTime:a,duration:o,selector:i,selectorIndex:s,origin:window.location.origin,contentRevision:u}),v=x.useMemo(()=>({key:BS({kind:"composition",url:p}),projectId:l,sessionEpoch:c,kind:"composition",priority:f,rich:!0,load:M=>OVe(p,M)}),[f,l,c,p]),b=v3(v),w=b.status==="ready"&&b.value.kind==="image"?b.value:null,{frameW:O,frameCount:C}=zF(h,(w==null?void 0:w.aspect)??16/9,SVe,48),E=x.useCallback(M=>{var _;if((_=y.current)==null||_.disconnect(),!M)return;const N=M.parentElement??M;m(N.clientWidth),y.current=new ResizeObserver(([I])=>m(I.contentRect.width)),y.current.observe(N)},[]);return kr(()=>()=>{var M;return(M=y.current)==null?void 0:M.disconnect()}),d.jsxs("div",{ref:E,className:"absolute inset-0 overflow-hidden",children:[w&&d.jsx("div",{className:"absolute inset-0 flex",style:{animation:"hf-thumb-fade 200ms ease-out",mixBlendMode:"lighten"},children:Array.from({length:C},(M,N)=>d.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:O},children:d.jsx("img",{src:w.url,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover",style:{opacity:.7}})},N))}),b.status==="loading"&&d.jsx("div",{className:"absolute inset-0 animate-pulse bg-white/[0.035]"}),n&&d.jsx("div",{className:"absolute inset-y-0 left-3 z-10 flex items-center",children:d.jsx("span",{className:"block max-w-full truncate text-[10px] font-semibold leading-none",style:{color:r,textShadow:w?"0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6)":"none"},children:n})})]})});let VW=0;const kVe=800,HW={isEditMode:!1,dismissed:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null,syncError:null,retrySave:null,past:[],future:[]};let pv=null,$M=0;function Jc(t,e){if(!t.model)return{};const n=Date.now();return pv===e&&n-$M<kVe?($M=n,{future:[]}):(pv=e,$M=n,{past:[...t.past,t.model].slice(-50),future:[]})}const Sn=AE((t,e)=>({...HW,setEditMode:n=>t({isEditMode:n}),setDismissed:n=>t({dismissed:n}),setModel:n=>t({model:n}),setSourceFilePath:n=>t({sourceFilePath:n}),setSyncError:n=>t({syncError:n}),setRetrySave:n=>t({retrySave:n}),undo:()=>{const{model:n,past:r,future:i}=e(),s=r[r.length-1];return!s||!n?null:(pv=null,t({model:s,past:r.slice(0,-1),future:[...i,n]}),s)},redo:()=>{const{model:n,past:r,future:i}=e(),s=i[i.length-1];return!s||!n?null:(pv=null,t({model:s,past:[...r,n].slice(-50),future:i.slice(0,-1)}),s)},selectSegment:(n,r=!1)=>t(i=>{if(r){const s=new Set(i.selectedSegmentIds);return s.has(n)?s.delete(n):s.add(n),{selectedSegmentIds:s,selectedGroupId:null}}return{selectedSegmentIds:new Set([n]),selectedGroupId:null}}),selectGroup:n=>{var i;const r=(i=e().model)==null?void 0:i.groups.get(n);r&&t({selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:n})},selectAll:()=>t(n=>n.model?{selectedSegmentIds:new Set(n.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>{const{selectedSegmentIds:n,selectedGroupId:r}=e();n.size===0&&r===null||t({selectedSegmentIds:new Set,selectedGroupId:null})},updateSegmentStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,style:{...s.style,...r}}),{...Jc(i,`seg-style:${n}`),model:{...i.model,segments:a}}}),updateSegmentText:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,text:r}),{...Jc(i,`seg-text:${n}`),model:{...i.model,segments:a}}}),updateSegmentTiming:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.segments.get(n);if(!a)return{};const o=new Map(s.model.segments);return o.set(n,{...a,start:r,end:i}),{...Jc(s,`seg-timing:${n}`),model:{...s.model,segments:o}}}),updateGroupStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,style:{...s.style,...r}}),{...Jc(i,`group-style:${n}`),model:{...i.model,groups:a}}}),updateGroupContainer:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,containerStyle:{...s.containerStyle,...r}}),{...Jc(i,`group-container:${n}`),model:{...i.model,groups:a}}}),updateGroupAnimation:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.groups.get(n);if(!a)return{};const o=new Map(s.model.groups),l=a.animation[r],c=l!==null?{...l,...i}:i;return o.set(n,{...a,animation:{...a.animation,[r]:c}}),{...Jc(s,`group-anim:${n}:${r}`),model:{...s.model,groups:o}}}),splitGroup:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=s.segmentIds.indexOf(r);if(a<=0)return{};const o=s.segmentIds.slice(0,a),l=s.segmentIds.slice(a),c=`group-split-${VW++}`,u=new Map(i.model.groups);u.set(n,{...s,segmentIds:o}),u.set(c,{...s,id:c,segmentIds:l});const f=i.model.groupOrder.indexOf(n),h=[...i.model.groupOrder];h.splice(f+1,0,c);const m=new Map(i.model.segments);return l.forEach((y,p)=>{const v=m.get(y);v&&m.set(y,{...v,groupIndex:p})}),{...Jc(i,`split:${n}:${r}:${VW}`),model:{...i.model,groups:u,segments:m,groupOrder:h}}}),mergeGroups:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n),a=i.model.groups.get(r);if(!s||!a)return{};const o=[...s.segmentIds,...a.segmentIds],l=new Map(i.model.groups);l.set(n,{...s,segmentIds:o}),l.delete(r);const c=i.model.groupOrder.filter(h=>h!==r),u=new Map(i.model.segments);a.segmentIds.forEach((h,m)=>{const y=u.get(h);y&&u.set(h,{...y,groupIndex:s.segmentIds.length+m})});const f=i.selectedGroupId===r?null:i.selectedGroupId;return{...Jc(i,`merge:${n}:${r}`),model:{...i.model,groups:l,segments:u,groupOrder:c},selectedGroupId:f}}),updateSelectedStyle:n=>t(r=>{if(!r.model||r.selectedSegmentIds.size===0)return{};const i=new Map(r.model.segments);for(const s of r.selectedSegmentIds){const a=i.get(s);a&&i.set(s,{...a,style:{...a.style,...n}})}return{...Jc(r,`sel-style:${[...r.selectedSegmentIds].join(",")}`),model:{...r.model,segments:i}}}),applyAnimationToAll:n=>t(r=>{if(!r.model)return{};const i=new Map(r.model.groups);for(const[s,a]of i)i.set(s,{...a,animation:n});return{...Jc(r,"apply-anim-all"),model:{...r.model,groups:i}}}),reset:()=>{pv=null,t(n=>({...HW,retrySave:n.retrySave,selectedSegmentIds:new Set,past:[],future:[]}))}})),CVe=new Set(["ArrowLeft","ArrowRight"]),EVe=["button","a[href]","[role='button']","[role='checkbox']","[role='combobox']","[role='menuitem']","[role='radio']","[role='slider']","[role='spinbutton']","[role='switch']","[role='textbox']"].join(",");function TVe(t){if(Yf(t))return!0;if(!t||typeof t!="object")return!1;const e=t;return typeof e.closest!="function"?!1:e.closest.call(t,EVe)!==null}function PVe(t,e={isCaptionEditMode:!1,selectedCaptionSegmentCount:0}){return t.metaKey||t.ctrlKey||t.altKey||TVe(t.target)?!0:CVe.has(t.code)&&e.isCaptionEditMode&&e.selectedCaptionSegmentCount>0}const QW=[1,2,4];let tR=0;function MVe(){tR+=1;let t=!1;return()=>{t||(t=!0,tR-=1)}}function NVe(){return tR>0}function DVe({iframeRef:t,shuttleDirectionRef:e,shuttleSpeedIndexRef:n,iframeShortcutCleanupRef:r,getAdapter:i,play:s,playBackward:a,pause:o,seek:l}){const c=x.useRef(new Set),u=x.useRef(()=>{}),f=x.useRef(()=>{}),h=x.useCallback(w=>{const O=i(),C=(O==null?void 0:O.getTime())??ce.getState().currentTime;l(Ake(C,w,Wd))},[i,l]),m=x.useCallback(w=>{e.current===w?n.current=Math.min(n.current+1,QW.length-1):n.current=0;const O=QW[n.current];ce.getState().setPlaybackRate(O),w==="forward"?s():a(O)},[s,a,e,n]),y=x.useCallback(()=>{ce.getState().isPlaying?o():s()},[s,o]),p=x.useCallback(w=>{var M,N,_;if(w.defaultPrevented)return;const O=Sn.getState();if(PVe(w,{isCaptionEditMode:O.isEditMode,selectedCaptionSegmentCount:O.selectedSegmentIds.size}))return;const C=w.key.toLowerCase();if(c.current.add(C),w.code==="Space"){w.preventDefault(),y();return}if(!((w.code==="ArrowLeft"||w.code==="ArrowRight")&&NVe())){if(w.code==="ArrowLeft"){w.preventDefault(),h(w.shiftKey?-10:-1);return}if(w.code==="ArrowRight"){w.preventDefault(),h(w.shiftKey?10:1);return}if(!w.repeat){if(C==="m"){w.preventDefault();const I=ce.getState();I.setAudioMuted(!I.audioMuted);return}if(C==="l"&&w.shiftKey){w.preventDefault();const I=ce.getState();I.setLoopEnabled(!I.loopEnabled);return}if(C==="k"){w.preventDefault(),o();return}if(C==="j"){if(w.preventDefault(),c.current.has("k")){h(-1);return}m("backward");return}if(C==="l"){if(w.preventDefault(),c.current.has("k")){h(1);return}m("forward");return}if(C==="i"){w.preventDefault();const I=((M=i())==null?void 0:M.getTime())??ce.getState().currentTime;ce.getState().setInPoint(w.shiftKey?null:I);return}if(C==="o"){w.preventDefault();const I=((N=i())==null?void 0:N.getTime())??ce.getState().currentTime;ce.getState().setOutPoint(w.shiftKey?null:I);return}if(C==="a"){w.preventDefault(),l(ce.getState().inPoint??0,{keepPlaying:!0});return}if(C==="e"){w.preventDefault();const{outPoint:I}=ce.getState();l(I??((_=i())==null?void 0:_.getDuration())??ce.getState().duration,{keepPlaying:!0});return}}}},[o,m,h,y,i,l]),v=x.useCallback(w=>{c.current.delete(w.key.toLowerCase())},[]);u.current=p,f.current=v;const b=x.useCallback(()=>{var M,N,_;(M=r.current)==null||M.call(r),r.current=null;let w=null,O=null;try{w=((N=t.current)==null?void 0:N.contentWindow)??null,O=((_=t.current)==null?void 0:_.contentDocument)??null}catch{return}if(!w&&!O)return;const C=I=>u.current(I),E=I=>f.current(I);try{w==null||w.addEventListener("keydown",C,!0),w==null||w.addEventListener("keyup",E,!0)}catch{}O==null||O.addEventListener("keydown",C,!0),O==null||O.addEventListener("keyup",E,!0),r.current=()=>{try{w==null||w.removeEventListener("keydown",C,!0),w==null||w.removeEventListener("keyup",E,!0)}catch{}O==null||O.removeEventListener("keydown",C,!0),O==null||O.removeEventListener("keyup",E,!0)}},[t,r]);return{playbackKeyDownRef:u,playbackKeyUpRef:f,attachIframeShortcutListeners:b,togglePlay:y}}function nR(t){return Number.isFinite(t)&&t>0&&t<7200?t:0}function IVe(t){const e=t.getAttribute(Wo);if(!e)return{};const n=RE(t.ownerDocument,e);return{audioGroup:e,audioGroupLabel:n.label,audioGroupVolume:n.volume,audioGroupHidden:n.hidden,...n.fxChain?{audioGroupFxChain:n.fxChain}:{},...n.automation?{audioGroupAutomation:n.automation}:{}}}function _Ve(t){const e=new Map,n=t==null?void 0:t.__clipTree;if(!n)return e;const r=i=>{for(const s of i)s.id&&s.parentId&&e.set(s.id,s.parentId),s.children.length>0&&r(s.children)};return r(n.roots),e}function rR(t,e,n,r,i){for(const s of Array.from(e.children)){if(!s.id){rR(t,s,n,r,i);continue}const a=s.hasAttribute("data-hf-group");i.push({id:s.id,parentId:n,hostId:t,label:a&&s.getAttribute("data-hf-group")||s.id,stackingContextId:Gj(s),...IVe(s)}),r.set(s.id,n),a&&rR(t,s,s.id,r,i)}}function RVe(t,e,n){const r=[];if(!t)return r;for(const i of e){if(i.kind!=="composition"||!i.id)continue;const s=t.getElementById(i.id);if(!s)continue;const a=s.querySelector("[data-hf-inner-root]")??s;rR(i.id,a,i.id,n,r)}return r}function jVe(t){const e={};t.hasAttribute("data-hidden")&&(e.hidden=!0),t.hasAttribute("data-timeline-locked")&&(e.timelineLocked=!0);const n=t.getAttribute("data-timeline-role");n&&(e.timelineRole=n);const r=t.getAttribute("data-fx-chain");r&&(e.fxChain=r);const i=t.getAttribute("data-automation");return i&&(e.automation=i),Object.keys(e).length>0?e:null}function LVe(t,e){const n=new Map;if(!t)return n;for(const r of e){if(r.kind!=="composition"||!r.id)continue;const i=t.getElementById(r.id);if(i)for(const s of Array.from(i.querySelectorAll("[id]"))){const a=jVe(s);a&&n.set(s.id,a)}}return n}function Rde(t){try{return(t==null?void 0:t.contentDocument)??null}catch{return null}}function FVe(t,e){const n=new Set;return t.map((r,i)=>{const s=e?eCe(e,r,i,n):null;return s&&n.add(s),Qae({clip:r,fallbackIndex:i,doc:e,hostEl:s})})}function $Ve(t,e,n){const r=BVe(t,n);return!e||n<=0?r:[...r,...zae(e,n,r)]}function BVe(t,e){return e<=0?[...t]:t.filter(n=>n.start<e).map(n=>({...n,duration:Math.min(n.duration,e-n.start)})).filter(n=>n.duration>0)}function VVe(t){const e=t.pendingSeek??t.requestedSeek??t.storeCurrentTime;return!Number.isFinite(e)||e<=0?0:!Number.isFinite(t.duration)||t.duration<=0?e:Math.min(e,t.duration)}function jde(t,e){const n=Number.isFinite(e)&&e>0?e:0;t.seek(n>.001?Math.max(0,n-.001):.001),t.seek(n)}function HVe(t,e){const n=ce.getState().requestedSeekTime,r=VVe({pendingSeek:e.current,requestedSeek:n,storeCurrentTime:ce.getState().currentTime,duration:t.getDuration()});return e.current=null,n!=null&&ce.getState().clearSeekRequest(),jde(t,r),r}function QVe(t,e){const n=nR(t.getDuration());n>0&&n!==ce.getState().duration&&e(n)}function zVe(t,e,n,r){const i=Zae(t,n);if(i.length>0){r(i);return}const s=t.querySelector("[data-composition-id]");if(!s||n<=0)return;const a=g3e({compositionId:s.getAttribute("data-composition-id")||"composition",tagName:s.tagName||"div",rootDuration:n,iframeSrc:(e==null?void 0:e.src)||"",selector:S0(s)});a&&r([a])}function ZVe(t,e){return!t.source||!e?!0:t.source===e.contentWindow}function GVe(t,e){if(!ZVe(t,e))return!1;const n=t.data;return(n==null?void 0:n.source)!=="hf-preview"||(n==null?void 0:n.type)!=="state"&&(n==null?void 0:n.type)!=="timeline"?!1:Uj(n).status!=="unsupported"}function UVe(t,e,n){!t||!e||(YEe(t,e),KEe(t),n())}function XVe(t,e){const n=t==null?void 0:t.__clipManifest;n&&n.clips.length>0&&e(n)}function WVe(t){const{iframe:e,adapter:n,syncTimelineElements:r}=t;try{const i=Rde(e),s=(e==null?void 0:e.contentWindow)??null;UVe(i,s,t.attachIframeShortcutListeners),XVe(s,t.processTimelineMessage),t.enrichMissingCompositions(),t.applyPreviewAudioState(),i&&ce.getState().elements.length===0&&zVe(i,e,n.getDuration(),r)}catch{}}function zW(t){t&&t.style.visibility==="hidden"&&(t.style.visibility="")}function qVe(t){return Math.max(nR(t.manifestDurationSeconds),nR(t.authoredRootDurationSeconds))}function YVe({iframeRef:t,probeIntervalRef:e,pendingSeekRef:n,isRefreshingRef:r,getAdapter:i,syncTimelineElements:s,setDuration:a,setCurrentTime:o,setTimelineReady:l,setIsPlaying:c,attachIframeShortcutListeners:u,applyPreviewAudioState:f}){const h=x.useCallback(w=>{var I;if(!w.clips||w.clips.length===0)return;ce.getState().setClipManifest(w.clips);const O=new Set(w.clips.map(j=>j.compositionId).filter(Boolean)),C=w.clips.filter(j=>!j.parentCompositionId||!O.has(j.parentCompositionId)),E=Rde(t.current);try{const j=_Ve(((I=t.current)==null?void 0:I.contentWindow)??null),L=RVe(E,w.clips,j);ce.getState().setClipParentMap(j),ce.getState().setDomClipChildren(L),ce.getState().setSubCompositionHostState(LVe(E,w.clips))}catch{}const M=FVe(C,E),N=qVe({manifestDurationSeconds:w.durationInFrames/qEe(w),authoredRootDurationSeconds:fae(E)}),_=$Ve(M,E,N>0?N:ce.getState().duration);_.length>0&&s(_,N>0?N:void 0)},[t,s]),m=x.useCallback(()=>{try{const w=t.current,O=w==null?void 0:w.contentDocument,C=w==null?void 0:w.contentWindow;if(!O||!C)return;const E=ce.getState().elements,M=ce.getState().duration,{missing:N,updatedEls:_,patched:I}=d3e(O,C,E,M);if(N.length>0||I){const j=new Set(_.map(H=>H.id)),L=N.filter(H=>!j.has(H.id));s([..._,...L])}}catch{}},[t,s]),y=x.useCallback(()=>{const w=i();if(!w||w.getDuration()<=0)return!1;w.pause();const O=HVe(w,n);return zW(t.current),ba.notify(O),QVe(w,a),o(O),r.current||l(!0),r.current=!1,c(!1),WVe({iframe:t.current,adapter:w,processTimelineMessage:h,enrichMissingCompositions:m,applyPreviewAudioState:f,attachIframeShortcutListeners:u,syncTimelineElements:s}),!0},[i,a,o,l,c,h,m,s,u,f,t,r,n]),p=x.useCallback(()=>{if(f(),e.current&&clearInterval(e.current),y())return;const w=t.current;let O=!1;const C=()=>{O||y()&&(O=!0,window.removeEventListener("message",E),e.current&&clearInterval(e.current))},E=M=>{GVe(M,w)&&C()};window.addEventListener("message",E),e.current=setTimeout(()=>{O||C(),window.removeEventListener("message",E),zW(t.current)},5e3)},[y,t,e,f]);return{processTimelineMessage:h,processTimelineMessageRef:{current:h},enrichMissingCompositions:m,enrichMissingCompositionsRef:{current:m},initializeAdapter:y,onIframeLoad:p}}function KVe({rafRef:t,reverseRafRef:e,getAdapter:n,setCurrentTime:r,setIsPlaying:i}){const s=x.useCallback(()=>{cancelAnimationFrame(e.current)},[e]),a=x.useCallback(()=>{const l=()=>{const c=n();if(c){const u=c.getTime(),f=c.getDuration(),h=f>0?Math.min(u,f):u;ba.notify(h);const{inPoint:m,outPoint:y}=ce.getState(),p=y!==null?Math.min(y,f):f,v=m!==null?m:0,b=v<p?p:f,w=v<p?v:0;if(h>=b){if(ce.getState().loopEnabled&&f>0){c.seek(w,{keepPlaying:!0}),ba.notify(w),c.play(),i(!0),t.current=requestAnimationFrame(l);return}c.isPlaying()&&c.pause(),r(h),i(!1),cancelAnimationFrame(t.current);return}}t.current=requestAnimationFrame(l)};t.current=requestAnimationFrame(l)},[t,n,r,i]),o=x.useCallback(()=>{cancelAnimationFrame(t.current)},[t]);return{startRAFLoop:a,stopRAFLoop:o,stopReverseLoop:s}}function nm(t){let e=null;return(n,r={})=>{if(e===null)try{e=localStorage.getItem(`hf-${t}-debug`)==="1"}catch{e=!1}if(!e)return;const i=typeof r=="function"?r():r;i&&console.log(`[hf-${t}] ${JSON.stringify({stage:n,t:Math.round(performance.now()),...i})}`)}}const P2=nm("reload");function JVe(t,e){const n=ce.getState(),r=O0(n.elements).musicElement;if(!r||n.audioMuted)return;const i=e-r.start,s=i>=0&&i<=r.duration?(r.playbackStart??0)+i:null;a3e(t,s,r.domId??r.id,n.audioVolume)}const M2=1e3;let Lde=!1;const ZW=Object.freeze({"dense-short":{duration:120,clipDuration:1.5},"long-overlap":{duration:7200,clipDuration:120},"keyframe-heavy-expanded":{duration:600,clipDuration:8},"composition-heavy":{duration:900,clipDuration:12},"remote-unsupported":{duration:900,clipDuration:12}});function eHe(t){Lde=t}function Fde(){return Lde}function tHe(t){if(t.elementCount!==1e3&&t.elementCount!==5e4)throw new RangeError("Timeline performance fixture elementCount must be 1000 or 50000");if(!Object.hasOwn(ZW,t.profile))throw new RangeError(`Unknown timeline performance fixture profile: ${t.profile}`);return ZW[t.profile]}function nHe(t,e){if(t<M2)return t;if(e.profile!=="dense-short")return t%M2;const n=Math.ceil((e.elementCount-M2)/127);return(t-M2)%Math.max(1,n)}function rHe(t,e,n,r){const i=Math.max(0,n-r);return e==="dense-short"?t%128*.5:e==="long-overlap"?t*37%Math.max(1,i):t*17%Math.max(1,i)}function iHe(){return{format:"percentage",keyframes:[0,33,66,100].map(t=>({percentage:t,propertyGroup:"position",properties:{x:t},ease:"power2.inOut"}))}}function sHe(t,e,n){return{id:`animation-${t}`,targetSelector:`#${t}`,method:"to",position:e,resolvedStart:e,duration:n,propertyGroup:"position",fromProperties:{x:0},properties:{x:100},ease:"power2.inOut"}}function aHe(t){const e=tHe(t),n=[],r=new Map,i=new Map,s=new Set;for(let a=0;a<t.elementCount;a+=1){const o=`perf-${t.profile}-${t.elementCount}-${a}`,l=rHe(a,t.profile,e.duration,e.clipDuration),c=nHe(a,t),u={id:o,key:o,domId:o,selector:`#${o}`,label:`Fixture ${a+1}`,tag:t.profile==="remote-unsupported"&&a%2===0?"video":"div",start:l,duration:e.clipDuration,track:c,authoredTrack:c};t.profile==="composition-heavy"?u.compositionSrc=`compositions/perf-${a%32}.html`:t.profile==="remote-unsupported"&&(u.src=a%2===0?`https://media.invalid/perf-${a%32}.mp4`:`assets/perf-${a%32}.unsupported`),t.profile==="keyframe-heavy-expanded"&&(r.set(o,iHe()),i.set(o,[sHe(o,l,e.clipDuration)]),s.add(o)),n.push(u)}return{summary:Object.freeze({...t,duration:e.duration,trackCount:M2,keyframedElementCount:r.size,expandedElementCount:s.size}),elements:n,keyframeCache:r,gsapAnimations:i,expandedClipIds:s}}const mv=new Map,iR=new Map,ug=new Map;let Ek=0,BM=0,sR=0;const $de=[];let s1=null;async function oHe(){if(s1===!1)return null;if(s1)return s1;try{return s1=await Sy(()=>import("./index-DRWtJgb8.js"),[]),s1}catch{return s1=!1,null}}function GF(t){try{return new URL(t,window.location.href).href}catch{return t}}async function lHe(t){const e=await oHe();if(!e)return null;const n=new e.Input({source:new e.UrlSource(t),formats:e.ALL_FORMATS});try{const r=await n.getDurationFromMetadata();if(r==null||!Number.isFinite(r)||r<=0)return null;const i=await n.getPrimaryVideoTrack(),s=await n.getAudioTracks();return{duration:r,width:i==null?void 0:i.displayWidth,height:i==null?void 0:i.displayHeight,hasVideo:i!=null,hasAudio:s.length>0}}catch{return null}finally{n.dispose()}}function UF(t){const e=mv.get(GF(t));return e&&(e.lastAccess=++Ek),e==null?void 0:e.result}function Bde(t,e){return e?_y(t,e,window.location.origin):t}function cHe(){const t=mv.size+ug.size-il.metadataRegistryEntries;if(t<=0)return;const e=[...Array.from(mv,([n,r])=>({key:n,at:r.lastAccess,failed:!1})),...Array.from(ug,([n,r])=>({key:n,at:r.lastAccess,failed:!0}))].sort((n,r)=>n.at-r.at);for(const n of e.slice(0,t))n.failed?ug.delete(n.key):mv.delete(n.key)}function uHe(t,e){return t.map(n=>{const r=n.tag.toLowerCase();if(!n.src||n.sourceDuration!=null||r!=="audio"&&r!=="video")return n;const i=UF(Bde(n.src,e));return i!=null&&i.duration&&i.duration>0?{...n,sourceDuration:i.duration}:n})}async function fHe(t,e,n){const r=t.flatMap(i=>{if(!i.src||i.sourceDuration!=null||!["video","audio"].includes(i.tag.toLowerCase()))return[];const s=Bde(i.src,e);return!UF(s)&&!Vde(GF(s))?[{el:i,source:s}]:[]});r.length!==0&&await Promise.allSettled(r.map(async({el:i,source:s})=>{const a=await hHe(s);a&&n(i.key??i.id,a.duration)}))}function Vde(t){const e=ug.get(t);return e===void 0?!1:Date.now()-e.failedAt<il.metadataFailureTtlMs?(e.lastAccess=++Ek,!0):(ug.delete(t),!1)}async function hHe(t){const e=GF(t),n=UF(e);if(n)return n;if(Vde(e))return null;let r=iR.get(e);return r||(r=new Promise(i=>{$de.push({key:e,epoch:sR,resolve:i}),Hde()}),iR.set(e,r),r)}function Hde(){for(;BM<il.concurrentMetadataJobs;){const t=$de.shift();if(!t)return;if(t.epoch!==sR){t.resolve(null);continue}BM++,lHe(t.key).then(e=>t.epoch!==sR?null:(iR.delete(t.key),e?mv.set(t.key,{result:e,lastAccess:++Ek}):ug.set(t.key,{failedAt:Date.now(),lastAccess:++Ek}),cHe(),e)).then(t.resolve).finally(()=>{BM--,Hde()})}}function dHe(t){return t.keepPlaying&&!t.wasReverseShuttle&&t.storeWasPlaying&&(t.duration<=0||t.nextTime<t.duration)}function pHe(t){return!t.keepPlaying||t.wasReverseShuttle}function mHe(t,e){return!!(t.source&&e&&t.source!==e.contentWindow)}function gHe(t,e){if(Fde()||mHe(t,e))return null;const n=t.data;return(n==null?void 0:n.source)!=="hf-preview"?null:jE(n)?n:null}function yHe(t,e){var n;try{if(ce.getState().elements.length===0){const r=(n=e==null?void 0:e.contentWindow)==null?void 0:n.__clipManifest;r&&r.clips.length>0&&t.processTimelineMessageRef.current(r)}Date.now()-t.lastTimelineMessageRef.current>500&&t.enrichMissingCompositionsRef.current()}catch{}}function xHe(t,e,n){if(t.lastTimelineMessageRef.current=Date.now(),t.processTimelineMessageRef.current(n),t.enrichMissingCompositionsRef.current(),!(ce.getState().elements.length>0))try{const r=e==null?void 0:e.contentDocument,i=t.getAdapter();if(!r||!i)return;const s=Zae(r,i.getDuration());s.length>0&&t.syncTimelineElements(s)}catch{}}function bHe(t){return e=>{const n=t.iframeRef.current,r=gHe(e,n);if(r){if(r.type==="state")return yHe(t,n);r.type==="timeline"&&Array.isArray(r.clips)&&xHe(t,n,r)}}}function vHe(t,e){return e.length!==t.length?!0:e.some((n,r)=>{const i=t[r];return!i||n.id!==i.id||n.start!==i.start||n.duration!==i.duration||n.track!==i.track||n.sourceDuration!==i.sourceDuration})}function AHe(){const t=x.useRef(null),e=x.useRef(0),n=x.useRef(void 0),r=x.useRef(null),i=x.useRef(!1),s=x.useRef(0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(!1),{setIsPlaying:h,setCurrentTime:m,setDuration:y,setTimelineReady:p,setElements:v}=ce.getState(),b=x.useCallback((U,Q)=>{if(Fde())return;const K=ce.getState(),ee=Q??K.duration,se=cde(uHe(p3e(K.elements,U,K.duration,ee),K.timelineProjectId));vHe(K.elements,se)&&v(se),Number.isFinite(Q)&&(Q??0)>0&&Q!==K.duration&&y(Q??0),K.timelineReady||p(!0),fHe(se,K.timelineProjectId,(z,V)=>{ce.setState(ae=>{const he=ae.elements.findIndex(ye=>(ye.key??ye.id)===z);if(he===-1||ae.elements[he].sourceDuration!=null)return{};const ge=ae.elements.slice();return ge[he]={...ae.elements[he],sourceDuration:V},{elements:ge}})})},[v,p,y]),w=x.useCallback(()=>{var U,Q;try{const K=t.current,ee=K==null?void 0:K.contentWindow;if(!K||!ee)return null;const se=ee.__player&&typeof ee.__player.play=="function"?ee.__player:null,z=fae(K.contentDocument),V=$4(se);if(V>0&&z<=V)return WO(u,f),se;let ae=null;if(ee.__timeline){const ye=FG(ee.__timeline),fe=$4(ye);if(fe>0&&z<=fe)return WO(u,f),ye;fe>0&&(ae??(ae=ye))}if(ee.__timelines){const ye=Object.keys(ee.__timelines);if(ye.length>0){const fe=(Q=(U=K==null?void 0:K.contentDocument)==null?void 0:U.querySelector("[data-composition-id]"))==null?void 0:Q.getAttribute("data-composition-id"),me=fe&&fe in ee.__timelines?fe:ye[ye.length-1],Te=FG(ee.__timelines[me]),ve=$4(Te);if(ve>0&&z<=ve)return WO(u,f),Te;ve>0&&(ae??(ae=Te))}}const he=se??ae,ge=Math.max(ce.getState().duration,z,V);return he&&ge>0&&("renderSeek"in he||typeof he.seek=="function")?Cke({cache:u,warned:f,bestAdapter:he,effectiveDuration:ge,docDuration:z,clock:Oke(ee),getPlaybackRate:()=>ce.getState().playbackRate}):he}catch{return null}},[]),{startRAFLoop:O,stopRAFLoop:C,stopReverseLoop:E}=KVe({rafRef:e,reverseRafRef:s,getAdapter:w,setCurrentTime:m,setIsPlaying:h}),M=x.useCallback(U=>{const Q=t.current;if(Q){n3e(Q,U);try{const K=Q.contentWindow;if(K!=null&&K.__timelines)for(const ee of Object.values(K.__timelines))ee&&typeof ee.timeScale=="function"&&ee.timeScale(U)}catch{}}},[]),N=x.useCallback(()=>{const{audioMuted:U,audioVolume:Q}=ce.getState();t3e(t.current,U,Q)},[]),_=x.useCallback(()=>{C(),E(),lA();const U=w();U&&(U.getTime()>=U.getDuration()&&U.seek(ce.getState().inPoint??0),M(ce.getState().playbackRate),N(),U.play(),a.current="forward",h(!0),O())},[w,h,O,M,N,C,E]),I=x.useCallback(U=>{C(),E();const Q=w();if(!Q)return;const K=Math.max(0,Q.getDuration()),ee=Q.getTime()<=0&&K>0?K:Q.getTime();Q.pause(),ee!==Q.getTime()&&Q.seek(ee);const se=Math.max(.1,Math.min(4,U));M(se),N();let z=ee,V=performance.now();const ae=he=>{const ge=(he-V)/1e3*se;let ye=z-ge;const{inPoint:fe,outPoint:me}=ce.getState(),Te=me!==null?Math.min(me,K):K,ve=fe!==null?fe:0,xe=ve<Te?Te:K,we=ve<Te?ve:0;if(ye<=we)if(ce.getState().loopEnabled&&K>0)z=xe,V=he,ye=xe;else{Q.seek(we),ba.notify(we),m(we),h(!1),a.current=null,s.current=0;return}Q.seek(Math.max(0,ye)),ba.notify(Math.max(0,ye)),h(!0),s.current=requestAnimationFrame(ae)};h(!0),a.current="backward",s.current=requestAnimationFrame(ae)},[w,m,h,M,N,C,E]),j=x.useCallback(()=>{E();const U=w();U&&(U.pause(),m(U.getTime()),h(!1),a.current=null,o.current=0,C())},[w,m,h,C,E]),L=x.useCallback((U,Q)=>{const K=a.current==="backward";E();const ee=w();if(!ee)return r.current=Math.max(0,U),!1;const se=Math.max(0,ee.getDuration()),z=Math.max(0,se>0?Math.min(se,U):U),V=(Q==null?void 0:Q.keepPlaying)===!0,ae=dHe({keepPlaying:V,wasReverseShuttle:K,storeWasPlaying:ce.getState().isPlaying,duration:se,nextTime:z});return ee.seek(z,Q),ba.notify(z),m(z),!ae&&!V&&JVe(t.current,z),ae?(C(),M(ce.getState().playbackRate),N(),ee.play(),h(!0),a.current="forward",o.current=0,O()):pHe({keepPlaying:V,wasReverseShuttle:K})&&(C(),ce.getState().isPlaying&&h(!1),a.current=null,o.current=0),!0},[w,r,m,h,O,C,E,M,N,a,o]);x.useEffect(()=>ce.subscribe((U,Q)=>{var ee;U.requestedSeekTime!==null&&U.requestedSeekTime!==Q.requestedSeekTime&&(L(U.requestedSeekTime),ce.getState().clearSeekRequest());const K=U.playbackRequest;K&&K.nonce!==((ee=Q.playbackRequest)==null?void 0:ee.nonce)&&(K.playing?_():(j(),K.returnTo!==null&&L(K.returnTo)),ce.getState().clearPlaybackRequest())}),[L,_,j]);const{playbackKeyDownRef:H,playbackKeyUpRef:$,attachIframeShortcutListeners:G,togglePlay:q}=DVe({iframeRef:t,shuttleDirectionRef:a,shuttleSpeedIndexRef:o,iframeShortcutCleanupRef:l,getAdapter:w,play:_,playBackward:I,pause:j,seek:L}),{processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,onIframeLoad:ie}=YVe({iframeRef:t,probeIntervalRef:n,pendingSeekRef:r,isRefreshingRef:i,getAdapter:w,syncTimelineElements:b,setDuration:y,setCurrentTime:m,setTimelineReady:p,setIsPlaying:h,attachIframeShortcutListeners:G,applyPreviewAudioState:N}),te=x.useCallback(()=>{if(!(i.current&&r.current!=null)){const Q=w();Q?r.current=Q.getTime():r.current==null&&(r.current=ce.getState().currentTime??0)}i.current=!0,C(),E(),h(!1)},[w,C,h,E]),ne=x.useCallback(()=>{const U=t.current;if(!U)return;P2("refreshPlayer",()=>({stack:new Error("refreshPlayer").stack})),te(),U.style.visibility="hidden";const Q=U.src,K=new URL(Q,window.location.origin);K.searchParams.set("_t",String(Date.now())),jie(K),U.src=K.toString()},[te]),W=x.useRef(w);W.current=w,kr(()=>{const U=se=>H.current(se),Q=se=>$.current(se),K=bHe({iframeRef:t,processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,lastTimelineMessageRef:c,getAdapter:w,syncTimelineElements:b}),ee=()=>{var se;if(document.hidden&&ce.getState().isPlaying){const z=(se=W.current)==null?void 0:se.call(W);z&&(z.pause(),h(!1),C())}};return window.addEventListener("keydown",U,!0),window.addEventListener("keyup",Q,!0),window.addEventListener("message",K),document.addEventListener("visibilitychange",ee),()=>{var se;window.removeEventListener("keydown",U,!0),window.removeEventListener("keyup",Q,!0),(se=l.current)==null||se.call(l),l.current=null,window.removeEventListener("message",K),document.removeEventListener("visibilitychange",ee),C(),E(),lA(),WO(u,f),n.current&&clearInterval(n.current)}});const F=x.useCallback(()=>{C(),E(),n.current&&clearInterval(n.current),ce.getState().reset()},[C,E]);return x.useEffect(()=>ce.subscribe((U,Q)=>{const K=U.playbackRate!==Q.playbackRate,ee=U.audioMuted!==Q.audioMuted,se=U.audioVolume!==Q.audioVolume;!K&&!ee&&!se||(K&&M(U.playbackRate),N())}),[M,N]),{iframeRef:t,play:_,pause:j,togglePlay:q,seek:L,onIframeLoad:ie,refreshPlayer:ne,saveSeekPosition:te,resetPlayer:F}}const GW='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])';function VS({open:t,onClose:e,containerRef:n,canClose:r}){const i=x.useRef(null),s=x.useRef(r);s.current=r;const a=x.useRef(e);a.current=e;const o=x.useCallback(()=>{const l=s.current;l&&!l()||a.current()},[]);return x.useEffect(()=>{var h;const l=document.activeElement;i.current=l instanceof HTMLElement?l:null;const c=n.current;(h=(c==null?void 0:c.querySelector(GW))??c)==null||h.focus();const f=m=>{if(m.key==="Escape"){m.stopPropagation(),o();return}if(m.key!=="Tab")return;const y=n.current;if(!y)return;const p=Array.from(y.querySelectorAll(GW));if(p.length===0)return;const v=p[0],b=p[p.length-1],w=document.activeElement;m.shiftKey&&(w===v||!y.contains(w))?(m.preventDefault(),b.focus()):!m.shiftKey&&(w===b||!y.contains(w))&&(m.preventDefault(),v.focus())};return document.addEventListener("keydown",f,!0),()=>{var m;document.removeEventListener("keydown",f,!0),(m=i.current)==null||m.focus(),i.current=null}},[t,n,o]),{requestClose:o}}function UW({findings:t,projectId:e,projectDir:n,title:r="HyperFrame Lint Results",promptIntro:i="Fix these HyperFrames lint issues",onClose:s}){const a=t.filter(v=>v.severity==="error"),o=t.filter(v=>v.severity==="warning"),l=t.length>0,[c,u]=x.useState(!1),[f,h]=x.useState(!1),m=x.useRef(null),{requestClose:y}=VS({open:!0,onClose:s,containerRef:m}),p=async()=>{const v=t.map(C=>{let E=`[${C.severity}] ${C.message}`;return C.file&&(E+=`
204
+ `)})}function ide(t,e,n,r,i={priority:"visible",rich:!1}){return d.jsxs(d.Fragment,{children:[r==null?void 0:r(t),!n&&d.jsx(EFe,{element:t}),n&&d.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{borderRadius:"inherit"},children:n(t,e,i)})]})}function sde(t,e){return Number.isFinite(e)&&!t.hidden&&Number.isFinite(t.start)&&Number.isFinite(t.end)&&e>=t.start&&e<=t.end}function ade(t,e){return sde({start:t.start,end:t.start+Math.max(0,t.duration),hidden:t.hidden===!0},e)}function bW(t){if(t===void 0||t.trim()==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}function TFe(t){if(!(t instanceof HTMLElement))return null;const e=t.dataset.elId,n=bW(t.dataset.clipStart),r=bW(t.dataset.clipEnd);return!e||n===null||r===null?null:{id:e,start:n,end:r,hidden:t.dataset.clipHidden==="true",element:t}}function PFe(t){return[...t.querySelectorAll('[data-clip="true"]')].map(TFe).filter(e=>e!==null)}function MFe(t,e){return new Set(t.filter(n=>sde(n,e)).map(n=>n.id))}function vW(t,e,n,r=!1){const i=MFe(t,n);for(const s of t){const a=i.has(s.id);(r||e.has(s.id)!==a)&&s.element.toggleAttribute("data-active",a)}e.clear();for(const s of i)e.add(s)}function NFe({scrollRef:t,currentTime:e,clipStateVersion:n,elementStateVersion:r}){const i=x.useRef([]),s=x.useRef(new Set),a=x.useCallback(o=>{const l=t.current;if(!l){i.current=[],s.current.clear();return}i.current=PFe(l),vW(i.current,s.current,o,!0)},[t]);x.useLayoutEffect(()=>{a(e)},[n,e,r,a]),kr(()=>ba.subscribe(o=>{vW(i.current,s.current,o)}))}const DFe=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function IFe(t){return DFe.has(t)}function cg(t){return t.key??t.id}function _Fe(t,e){return[...e].sort((n,r)=>n.start-r.start||n.start+n.duration-(r.start+r.duration)||cg(n).localeCompare(cg(r))).map(n=>{const r=cg(n);return{id:OS(r),kind:"clip",rowId:t,elementId:r,time:n.start+n.duration/2}})}function RFe(t,e,n,r,i){const s=yF(t,e,n,r),a=s?cg(s):null,o=s?qL(i.get(cg(s))??[],s.start,s.duration):[];return{activeClip:s,activeId:a,lanes:o}}function jFe(t){return{percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId,collidingAnimationTargets:t.collidingAnimationTargets}}function LFe(t,e,n){var o;const r=cg(e),i=new Map;for(const l of n){const c=jFe(l),u=Nf(r,c);i.has(u)||i.set(u,{target:c,time:e.start+l.percentage/100*e.duration})}const s=[...i.entries()].sort(([l,c],[u,f])=>c.time-f.time||l.localeCompare(u)),a=[];for(let l=0;l<s.length;l+=1){const[,c]=s[l],u=(o=s[l-1])==null?void 0:o[1];u&&c.time>u.time&&c.target.animationId!==void 0&&a.push({id:Coe(r,c.target),kind:"ease",rowId:t,elementId:r,time:u.time+(c.time-u.time)/2,keyframeTarget:c.target}),a.push({id:koe(r,c.target),kind:"keyframe",rowId:t,elementId:r,time:c.time,keyframeTarget:c.target})}return a}function FFe(t,e,n){return t===null?!1:e.has(t)||n.has(t)}function $Fe(t,e,n,r,i,s,a){const o=lv(n,i.group);return{id:o,kind:"row",physicalTrackKey:t,logicalIndex:e,level:s,parentId:a,elementId:n,expandable:!1,expanded:!1,propertyGroup:i.group,items:LFe(o,r,i.keyframes)}}function BFe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,collapsedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){const f=new Map(t),h=new Map(l.map(v=>[v.anchorKey,v])),m=[];function y(v,b,w){const O=f.get(v)??[],C=PTe(v),{activeClip:E,activeId:M,lanes:N}=RFe(O,n,r,i,u),_=zFe(O,N.length),I=FFe(M,s,o)&&_;if(m.push({id:C,kind:"row",physicalTrackKey:v,logicalIndex:m.length,level:b,parentId:w,elementId:M,expandable:_,expanded:I,items:_Fe(C,O)}),!(!I||!E||!M))for(const j of N)m.push($Fe(v,m.length,M,E,j,b===1?2:3,C))}function p(v){const b=MTe(v.id),w=!a.has(v.id);if(m.push({id:b,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:m.length,level:1,parentId:null,elementId:null,groupId:v.id,expandable:v.memberTracks.length>0,expanded:w,items:[]}),o.has(v.id))for(const O of qf(v.memberElements))m.push({id:`${b}::${O.key}`,kind:"row",physicalTrackKey:v.anchorKey,logicalIndex:m.length,level:2,parentId:b,elementId:null,expandable:!1,expanded:!1,items:[]});if(w)for(const O of v.memberTracks)y(O,2,b)}for(const v of e){const b=h.get(v);if(b){p(b);continue}c.has(v)||y(v,1,null)}return m}function Nl(t,e){for(let n=0;n<t.length;n+=1){const r=t[n];if(r.id===e)return{row:r,rowIndex:n,itemIndex:-1,target:r};const i=r.items.findIndex(s=>s.id===e);if(i>=0)return{row:r,rowIndex:n,itemIndex:i,target:r.items[i]}}return null}function VFe(t,e){return[...t.items].sort((n,r)=>Math.abs(n.time-e)-Math.abs(r.time-e)||n.time-r.time||n.id.localeCompare(r.id))[0]??t}function HFe(t,e,n,r={}){var p;const i=Nl(t,e);if(!i)return null;const{row:s,rowIndex:a,itemIndex:o,target:l}=i;if(n==="Home"||n==="End"){const v=r.timelineBoundary?n==="Home"?t[0]:t.at(-1):s;return v?r.timelineBoundary||n==="Home"?v:v.items.at(-1)??v:l}if(n==="ArrowLeft")return o<0?s.parentId?((p=Nl(t,s.parentId))==null?void 0:p.target)??s:s:o===0?s:s.items[o-1];if(n==="ArrowRight")return o<0?s.items[0]??s:s.items[o+1]??l;const c=n==="ArrowUp"||n==="PageUp"?-1:1,u=n==="PageUp"||n==="PageDown",f=r.pageSize;if(u&&(f===void 0||!Number.isFinite(f)||f<1))return l;const h=u?Math.floor(f):1,m=Math.max(0,Math.min(t.length-1,a+c*h)),y=t[m];return!y||m===a?l:l.kind==="row"?y:VFe(y,l.time)}function QFe(t,e,n){const r=Nl(e,n);if(r)return r.target;const i=Nl(t,n);if(!i)return null;if(i.itemIndex>=0){for(let a=i.itemIndex-1;a>=0;a-=1){const o=Nl(e,i.row.items[a].id);if(o)return o.target}for(let a=i.itemIndex+1;a<i.row.items.length;a+=1){const o=Nl(e,i.row.items[a].id);if(o)return o.target}}const s=Nl(e,i.row.id);if(s)return s.target;if(i.row.parentId){const a=Nl(e,i.row.parentId);if(a)return a.target}return e[i.rowIndex]??e[i.rowIndex-1]??null}function zFe(t,e){return e>0||qf(t).length>0}function AW(t){if(!(t.target instanceof Element))return null;const e=t.target.closest("button, input, select, textarea, a[href], [contenteditable], [data-timeline-focus-id]");return e!=null&&e.dataset.timelineFocusId&&t.currentTarget.contains(e)?e:null}function ZFe(t,e,n,r){if(!r||t.size===0)return 1;const i=n.getRowIndex(e),s=Math.max(0,i>=0?i:Math.floor(n.getRowFromY(r.scrollTop))),a=i>=0?n.getRowTop(i):r.scrollTop,o=Math.min(n.rowKeys.length-1,Math.floor(n.getRowFromY(a+Math.max(0,r.clientHeight-.001))));let l=0;for(let c=s;c<=o;c+=1)l+=t.get(n.rowKeys[c])??0;return Math.max(1,l)}function GFe(t){const e=t.getBoundingClientRect();t.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.left+e.width/2,clientY:e.top+e.height/2}))}function UFe({logicalRows:t,focusedTargetId:e,rowGeometry:n,scrollRef:r,onToggleRow:i}){var c,u;const s=(e&&((c=Nl(t,e))==null?void 0:c.target.id))??((u=t[0])==null?void 0:u.id)??null,a=x.useMemo(()=>{const f=new Map;for(const h of t)f.set(h.physicalTrackKey,(f.get(h.physicalTrackKey)??0)+1);return f},[t]),o=x.useCallback(f=>{var m;const h=(m=AW(f))==null?void 0:m.dataset.timelineFocusId;h&&h!==e&&ce.getState().requestTimelineFocus(h)},[e]),l=x.useCallback(f=>{const h=AW(f),m=h==null?void 0:h.dataset.timelineFocusId;if(!h||!m)return;const y=Nl(t,m);if(y){if(IFe(f.key)){if(y.target.kind==="row"&&(f.key==="ArrowRight"&&y.target.expandable&&!y.target.expanded||f.key==="ArrowLeft"&&y.target.expandable&&y.target.expanded)){f.preventDefault(),i(y.target);return}const p=HFe(t,m,f.key,{pageSize:ZFe(a,y.row.physicalTrackKey,n,r.current),timelineBoundary:f.ctrlKey||f.metaKey});f.preventDefault(),p&&p.id!==m&&ce.getState().requestTimelineFocus(p.id);return}if(f.key==="ContextMenu"||f.key==="F10"&&f.shiftKey){f.preventDefault(),GFe(h);return}f.key!=="Enter"&&f.key!==" "||y.target.kind!=="row"||!y.target.expandable||(f.preventDefault(),i(y.target))}},[a,t,i,n,r]);return{rovingTargetId:s,onFocus:o,onKeyDown:l}}function XFe({pps:t,contentOrigin:e,contentGutter:n,trackContentWidth:r,theme:i,displayTrackOrder:s,rowGeometry:a,virtualRows:o,logicalRows:l,focusedTargetId:c,rowsVirtualized:u,clipIndex:f,renderTimeRange:h,visibleTimeRange:m,pinnedClipIdentities:y,trackOrder:p,tracks:v,trackStyles:b,groups:w,laneCounts:O,selectedElementId:C,selectedElementIds:E,hoveredClip:M,draggedClip:N,draggedElement:_,multiDragPreview:I,blockedClipRef:j,suppressClickRef:L,scrollRef:H,renderClipContent:$,renderClipOverlay:G,onDrillDown:q,onSelectElement:Y,setHoveredClip:J,setShowPopover:ie,setRangeSelection:te,setResizingClip:ne,setDraggedClip:W,setSelectedElementId:F,shiftClickClipRef:U,getPreviewElement:Q,getTrackStyle:K,keyframeCache:ee,gsapAnimations:se,selectedKeyframes:z,currentTime:V,onSeek:ae,onSelectSegment:he,onClickKeyframe:ge,onShiftClickKeyframe:ye,onContextMenuKeyframe:fe,onMoveKeyframe:me,onContextMenuClip:Te,onContextMenuLane:ve,beatAnalysis:xe,onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onResizeElement:Me,onMoveElement:Qe,onRazorSplit:qe,onRazorSplitAll:Ge}){const Ye=`timeline-lanes${x.useId().replaceAll(":","")}`,st=ce(Ke=>Ke.expandedClipIds),{collapsedGroupIds:nt,expandedLaneOwnerIds:yt,toggleGroupExpanded:dt,toggleLaneOwnerExpanded:zt}=rje(),Kt=f_e(),dn=ce(Ke=>Ke.duration);O_e({lanes:Kt});const{logicalRowsByTrack:en,groupByAnchor:et}=ije(l,w),Ot=x.useMemo(()=>new Set(w.flatMap(Ke=>Ke.memberTracks)),[w]),{toggleRowExpanded:St,toggleClipExpanded:Je}=sje(),Be=kje(I,u,h),We=UFe({logicalRows:l,focusedTargetId:c,rowGeometry:a,scrollRef:H,onToggleRow:Ke=>{Ke.elementId&&Je(Ke.elementId)}});return d.jsx("div",{role:"treegrid","aria-label":"Timeline tracks","aria-rowcount":l.length,"aria-colcount":2,onFocus:We.onFocus,onKeyDown:We.onKeyDown,className:u?"absolute inset-0":void 0,children:o.map(({index:Ke,rowKey:Xt})=>{var nr,bt,or,wn,Rn;const Pe=s[Ke];if(Pe===void 0)return null;const De=et.get(Pe);if(De){const wt=(nr=en.get(Pe))==null?void 0:nr[0];return wt?d.jsx(nje,{index:Ke,rowKey:Xt,group:De,logicalRow:wt,top:a.getRowTop(Ke),height:a.getRowHeight(Ke),virtualized:u,contentOrigin:e,theme:i,rovingTargetId:We.rovingTargetId,collapsedGroupIds:nt,expandedLaneOwnerIds:yt,toggleGroupExpanded:dt,toggleLaneOwnerExpanded:zt,lanes:Kt,pps:t,currentTime:V,compositionDuration:dn,beatTimes:xe==null?void 0:xe.beatTimes,contentGutter:n,trackContentWidth:r},Xt):null}const ze=Ufe(s,Pe),at=en.get(Pe)??[],Wt=at[0];if(!Wt)return null;const cn=a.getRowHeight(Ke),Jt=((bt=v.find(([wt])=>wt===Pe))==null?void 0:bt[1])??[],Pn=u?coe(f,Pe,h,y,Be):Jt,Cr=b.get(Pe)??K(""),mt=(N==null?void 0:N.started)===!0&&!p.includes(Pe)&&Jt.length===0,pn=i.rowBackground,un=hje(Jt,xe==null?void 0:xe.beatTimes,{selectedElementId:C,isMusicTrack:ky}),Cn=Jt.length>0&&Jt.every(wt=>wt.hidden===!0),Ln=Jt.length>0&&Jt.some(nl),tt=yF(Jt,O,C,E),Yn=(tt==null?void 0:tt.key)??(tt==null?void 0:tt.id),Pt=mje(Jt,st),mn=Pt?Xi-2*da:void 0,Ht=Jt.map(Q),gn=`${Ye}-track-${Ke}`,tr=`${gn}-automation`,_n=tt&&Yn?Kt.bind(tt,C===Yn||E.has(Yn)):null,br=_n&&!_n.readOnly?wt=>_n.onCommit({version:1,lanes:_n.lanes.filter(Zt=>Zt.target!==wt)}):void 0;return d.jsxs(she,{index:Ke,rowKey:Xt,logicalRow:Wt,propertyRows:at.slice(1),lanesId:gn,headerLanesId:`${gn} ${tr}`,top:a.getRowTop(Ke),height:cn,virtualized:u,background:pn,borderColor:i.rowBorder,rovingTargetId:We.rovingTargetId,children:[d.jsx(Y7e,{trackNumber:Pe,trackDisplayNumber:ze,trackLabel:((or=Jt[0])==null?void 0:or.label)??((wn=Jt[0])==null?void 0:wn.domId)??((Rn=Jt[0])==null?void 0:Rn.id)??`Track${u3(ze)}`,lanesId:`${gn} ${tr}`,contentOrigin:e,keyframeClip:tt,trackElements:Jt,clipCount:Jt.length,isExpanded:Pt,animations:Yn?se.get(Yn)??[]:[],currentTime:V,isTrackHidden:Cn,isAudioTrack:Ln,isGroupMember:Ot.has(Pe),theme:i,onToggleClipExpanded:()=>{const wt=Jt.map(Zn);wt.length>0&&St(wt)},onToggleTrackHidden:we,onTogglePropertyGroupKeyframe:ke,onRemoveAutomationLane:br,onSeek:ae,rovingTargetId:We.rovingTargetId}),d.jsxs("div",{role:"gridcell","aria-colindex":2,style:{width:r,marginLeft:n,opacity:Cn?.35:1,transition:"opacity 120ms ease"},className:"relative",onContextMenu:wt=>{if(wt.defaultPrevented||!ve)return;const Zt=wt.currentTarget.getBoundingClientRect(),Ct=(wt.clientX-Zt.left)/t;Ct<0||(wt.preventDefault(),ve(wt,Pe,Ct))},children:[d.jsx(CTe,{beatTimes:xe==null?void 0:xe.beatTimes,beatStrengths:xe==null?void 0:xe.beatStrengths,pps:t,highlightTime:N!=null&&N.started&&N.snapType==="beat"?N.snapTime:null,renderTimeRange:u?h:void 0}),un&&d.jsx(ETe,{beatTimes:xe==null?void 0:xe.beatTimes,beatStrengths:xe==null?void 0:xe.beatStrengths,pps:t,renderTimeRange:u?h:void 0}),mt&&d.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:Cr.label,fontSize:11,letterSpacing:"0.06em",textTransform:"uppercase",opacity:.5},children:"New track"}),Pn.map(wt=>{const Zt=K(wt.tag),Ct=Zn(wt),fr=Ct===Yn,Nt=fr&&Pt,kt=vS(wt),xn=C===Ct||E.has(Ct),Rt=!!wt.compositionSrc,sn=Ct;if((N==null?void 0:N.started)===!0&&_!=null&&Zn(_)===Ct)return null;const Fn=Q(wt),ri=CFe(Fn,m,xn||M===sn||y.has(sn)),fn=I!=null&&che(sn,I),En=fn?wje(sn,t,I):0,rr=kFe(wt,Ct,Fn,kt,{pps:t,onResizeElement:Me,onMoveElement:Qe,onRazorSplit:qe,onRazorSplitAll:Ge,blockedClipRef:j,shiftClickClipRef:U,suppressClickRef:L,scrollRef:H,setShowPopover:ie,setRangeSelection:te,setResizingClip:ne,setDraggedClip:W,setSelectedElementId:F,onSelectElement:Y}),Ti=d.jsx(Eoe,{onContextMenu:Dr=>{Dr.preventDefault(),Te==null||Te(Dr,wt)},el:Fn,pps:t,clipY:da,clipHeight:mn,isSelected:xn,isHovered:M===sn,isDragging:!1,isActive:ade(Fn,V),hasCustomContent:!!$,capabilities:kt,theme:i,isComposition:Rt,tabIndex:We.rovingTargetId===OS(Ct)?0:-1,onHoverStart:()=>J(sn),onHoverEnd:()=>J(null),onResizeStart:rr.onResizeStart,onPointerDown:rr.onPointerDown,onClick:rr.onClick,onDoubleClick:Dr=>{Dr.stopPropagation(),!L.current&&Rt&&q&&q(wt)},children:ide(Fn,Zt,$,G,ri)},sn),Jr=ee==null?void 0:ee.get(Ct),$i=!Nt&&Jr&&d.jsx(RPe,{element:Fn,elementId:Ct,keyframesData:Jr,pixelsPerSecond:t,rowHeight:cn,beatsActive:un,accentColor:Zt.accent,isSelected:xn,currentTime:V,selectedKeyframes:z,rovingTargetId:We.rovingTargetId,onClickKeyframe:ge,onShiftClickKeyframe:ye,onContextMenuKeyframe:fe,onMoveKeyframe:me,onSelectSegment:he,suppressClickRef:L},`${sn}-diamonds`),ps=fr&&d.jsx(oIe,{id:gn,animations:Nt?se.get(Ct)??[]:[],clipStart:Yce(Fn),clipDuration:Fn.duration,clipLeftPx:Fn.start*t,clipWidthPx:Math.max(Fn.duration*t,4),accentColor:Zt.accent,isSelected:xn,currentPercentage:Fn.duration>0?(V-Fn.start)/Fn.duration*100:0,elementId:Ct,selectedKeyframes:z,rovingTargetId:We.rovingTargetId,onSelectSegment:Dr=>he==null?void 0:he(Ct,Dr),onClickKeyframe:Dr=>ge==null?void 0:ge(Fn,Dr),onShiftClickKeyframe:Dr=>ye==null?void 0:ye(Ct,Dr),onContextMenuKeyframe:(Dr,Za)=>fe==null?void 0:fe(Dr,Ct,Za),onMoveKeyframe:(Dr,Za)=>(me==null?void 0:me(Ct,Dr,Za))??Promise.resolve(!1),suppressClickRef:L},`${sn}-property-lanes`);return fn?d.jsxs("div",{className:"absolute inset-0",style:{transform:`translateX(${En}px)`,opacity:.85,zIndex:20,pointerEvents:"none"},children:[Ti,$i,ps]},sn):d.jsxs(x.Fragment,{children:[Ti,$i,ps]},sn)}),d.jsx("div",{id:tr,children:Pt?d.jsx(due,{elements:Ht,isSelected:wt=>{const Zt=Zn(wt);return C===Zt||E.has(Zt)},lanes:Kt,pps:t,laneCount:Yn?O.get(Yn)??0:0,accentColor:K((tt==null?void 0:tt.tag)??"").accent,currentTime:V,beatTimes:xe==null?void 0:xe.beatTimes}):null})]})]},Xt)})})}const ode=8,vk={playhead:0,"clip-edge":1,beat:2};function WFe(t){const e=new Map,n=(r,i)=>{if(!Number.isFinite(r)||r<0)return;const s=Math.round(r*1e3)/1e3,a=e.get(s);(!a||vk[i]<vk[a.type])&&e.set(s,{time:s,type:i})};for(const r of t.beatTimes)n(r,"beat");for(const r of t.elements)t.excludeElementKey!=null&&(r.key??r.id)===t.excludeElementKey||(n(r.start,"clip-edge"),n(r.start+r.duration,"clip-edge"));return t.playheadTime!=null&&n(t.playheadTime,"playhead"),Array.from(e.values()).sort((r,i)=>r.time-i.time)}function Ak(t,e,n){let r=null,i=n;for(const s of e){const a=Math.abs(s.time-t);(a<i||a===i&&r&&vk[s.type]<vk[r.type])&&(i=a,r=s)}return r?{time:r.time,target:r}:{time:t,target:null}}function qFe(t,e,n,r,i){if(n.length===0)return{start:t,snapTime:null,snapType:null};const s=ode/Math.max(r,1),a=Ak(t,n,s),o=Ak(t+e,n,s),l=a.target!==null,c=o.target!==null;let u=t,f=null;l&&(!c||Math.abs(a.time-t)<=Math.abs(o.time-(t+e)))?(u=a.time,f=a.target):c&&(u=o.time-e,f=o.target);const h=Math.max(0,i-e),m=Math.round(u*1e3)/1e3,y=Math.max(0,Math.min(h,m));return f&&Math.abs(y-m)>1e-6&&(f=null),{start:y,snapTime:(f==null?void 0:f.time)??null,snapType:(f==null?void 0:f.type)??null}}function YFe(t,e,n,r){if(n<0)return t;const i=e.indexOf(t);return i<0?t:r?i>=n?t:e[n]??t:i<n?t:e[n-1]??t}function SW(t,e,n){return e<0?!0:n?t>=e:t<=e}function KFe(t,e,n,r){if(e.length===0)return n<0?0:n;const i=t.indexOf(e[0]),s=t.indexOf(e[e.length-1])+1;return r<Math.min(...e)?i:s}function JFe(t){var b;const{order:e,audioTracks:n,elements:r,desiredTrack:i,deliberateInsertRow:s}=t,{start:a,duration:o,dragKey:l,isAudio:c,preferInsertAbove:u}=t,f=e.findIndex(w=>n.has(w));if(s!==null&&SW(s,f,c))return{track:i,insertRow:s};const h=YFe(i,e,f,c),m=e.filter(w=>n.has(w)===c),y=t$e({elements:r,desiredTrack:h,start:a,duration:o,trackOrder:m,excludeKey:l}),p=(b=r.find(w=>(w.key??w.id)===l))==null?void 0:b.track,v=p!=null&&h!==p&&y.track===p;if(y.needsInsert||v){const w=e.indexOf(h);if(w<0)return{track:h,insertRow:KFe(e,m,f,h)};const O=p==null?-1:e.indexOf(p),E=(v?O>w:u&&SW(w,f,c))?w:w+1;return{track:h,insertRow:E}}return{track:y.track,insertRow:null}}function e$e(t,e,n=W3e){if(e===0||t<=0)return 0;if(t>=e)return e;const r=Math.floor(t),i=t-r;return i<n?r:i>1-n?r+1:null}function lde(t,e,n,r){return t<r&&n<e}function W4(t,e,n,r,i){return!t.some(s=>(s.key??s.id)!==i&&s.track===e&&lde(n,r,s.start,s.start+s.duration))}function t$e({elements:t,desiredTrack:e,start:n,duration:r,trackOrder:i,excludeKey:s}){const a=n+r,o=i.indexOf(e);if(o===-1)return{track:e,needsInsert:!0};if(W4(t,e,n,a,s))return{track:e,needsInsert:!1};for(let l=o-1;l>=0;l--)if(W4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};for(let l=o+1;l<i.length;l++)if(W4(t,i[l],n,a,s))return{track:i[l],needsInsert:!1};return{track:e,needsInsert:!0}}function n$e(t,e){if(!t.started||!e)return null;const n=e.getBoundingClientRect();return{left:t.pointerClientX-n.left+e.scrollLeft-t.pointerOffsetX,top:t.pointerClientY-n.top+e.scrollTop-t.pointerOffsetY}}function r$e(t,e,n){return Math.max(n,t&&e>0?t.scrollWidth/e:n)}function i$e(t,e,n,r,i){if(i.size<=1||!i.has(n))return t;const s=r.filter(o=>i.has(o.key??o.id)).map(o=>o.start),a=Oje(t-e.start,s);return e.start+a}function s$e(t,e,n,r,i){const{scroll:s,trackOrder:a,rowHeights:o,elements:l}=i,c=s?J3e(e-s.getBoundingClientRect().top+s.scrollTop,o):{rowFloat:0,fraction:0,rowHeight:eoe(0,o)},u=e$e(c.rowFloat,a.length,e5e(c.rowHeight)),f=c.fraction<.5,h=i.audioTracks??new Set(l.filter(nl).map(m=>m.track));return JFe({order:a,audioTracks:h,elements:l,desiredTrack:r,deliberateInsertRow:u,start:n,duration:t.element.duration,dragKey:t.element.key??t.element.id,isAudio:nl(t.element),preferInsertAbove:f})}function a$e(t,e,n,r){const{scroll:i,pps:s,duration:a,trackOrder:o,elements:l,selectedKeys:c,buildSnapTargets:u}=r,f=r$e(i,s,a),h=(i==null?void 0:i.scrollTop)??t.originScrollTop,m=(i==null?void 0:i.getBoundingClientRect().top)??0,y=x_(t.originClientY-m+t.originScrollTop,r.rowHeights),p=x_(n-m+h,r.rowHeights),v=S5e({start:t.element.start,track:t.element.track,duration:t.element.duration,originClientX:t.originClientX,originRow:y,originScrollLeft:t.originScrollLeft,currentScrollLeft:(i==null?void 0:i.scrollLeft)??t.originScrollLeft,pixelsPerSecond:s,maxStart:f,trackOrder:o},e,p),b=u(t.element.key??t.element.id,!ky(t.element)),w=qFe(v.start,t.element.duration,b,s,f+t.element.duration),O=t.element.key??t.element.id,C=i$e(w.start,t.element,O,l,c),{track:E,insertRow:M}=s$e(t,n,C,v.track,r);return{...t,started:!0,pointerClientX:e,pointerClientY:n,previewStart:C,previewTrack:E,desiredTrack:v.track,insertRow:M,snapTime:w.snapTime,snapType:w.snapType}}function o$e(t,e,n){const{scroll:r,pps:i,buildSnapTargets:s}=n,a=t.originScrollLeft??(r==null?void 0:r.scrollLeft)??0,o=e+(((r==null?void 0:r.scrollLeft)??a)-a),l=t.element.sourceDuration!=null?Math.max(0,(t.element.sourceDuration-(t.element.playbackStart??0))/Math.max(t.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,c=t.element.tag.toLowerCase(),u=t.element.kind==="composition"||c==="audio"||c==="video",f=Math.max(t.element.playbackRate??1,.1),h=t.element.start+l;let m=w5e({start:t.element.start,duration:t.element.duration,originClientX:t.originClientX,pixelsPerSecond:i,minStart:0,maxEnd:h,playbackStart:t.edge==="start"&&u?t.element.playbackStart??0:t.element.playbackStart,playbackRate:t.element.playbackRate},t.edge,o);const y=s(t.element.key??t.element.id,!ky(t.element));if(y.length>0){const p=ode/Math.max(i,1);if(t.edge==="end"){const v=m.start+m.duration,b=Ak(v,y,p).time,w=Math.round((b-m.start)*1e3)/1e3;b!==v&&b<=h+1e-6&&w>=.05&&(m={...m,duration:w})}else{const v=Ak(m.start,y,p).time,b=m.start-v,w=m.playbackStart!=null?m.playbackStart/f:Number.POSITIVE_INFINITY,O=Math.round((m.duration+b)*1e3)/1e3;v!==m.start&&v>=0&&b<=w+1e-6&&O>=.05&&(m={...m,start:v,duration:O,playbackStart:m.playbackStart!=null?Math.round(Math.max(0,m.playbackStart-b*f)*1e3)/1e3:void 0})}}return{originScrollLeft:a,previewStart:m.start,previewDuration:m.duration,previewPlaybackStart:m.playbackStart}}function l$e(t,e,n){const r=A5e(t,e);n({originScrollLeft:e.originScrollLeft,previewStart:(r==null?void 0:r.start)??e.previewStart,previewDuration:(r==null?void 0:r.duration)??e.previewDuration,previewPlaybackStart:(r==null?void 0:r.playbackStart)??e.previewPlaybackStart,groupPreview:t.changes})}const c$e=x.memo(function({drag:e,scrollRef:n,pixelsPerSecond:r,rowHeight:i,selectedElementId:s,currentTime:a,theme:o,getTrackStyle:l,renderClipContent:c,renderClipOverlay:u}){const f=(e==null?void 0:e.started)===!0?D3e({element:e.element,draggedElementId:e.element.key??e.element.id,previewStart:e.previewStart,previewTrack:e.previewTrack}):null,h=e?n$e(e,n.current):null;return d.jsx("div",{"data-timeline-gesture-overlay":!0,className:"absolute inset-0 pointer-events-none",children:f&&h&&d.jsx("div",{"data-timeline-gesture-actor":f.key??f.id,className:"absolute",style:{top:h.top,left:h.left,width:Math.max(f.duration*r,4),height:i,zIndex:40},children:d.jsx(Eoe,{el:{...f,start:0},pps:r,clipY:0,isSelected:s===(f.key??f.id),isHovered:!1,isDragging:!0,isGestureActor:!0,isActive:ade(f,a),hasCustomContent:!!c,capabilities:vS(f),theme:o,isComposition:!!f.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:ide(f,l(f.tag),c,u,{priority:"interaction",rich:!0})})})})}),u$e=x.memo(function(e){const{draggedClip:n,scrollRef:r,selectedElementIds:i,displayTrackOrder:s}=e,a=(n==null?void 0:n.started)===!0?s.indexOf(n.previewTrack):-1,o=eoe(a,e.rowHeights),l=Math.min(o,Xi)-da*2,{onResizeElement:c,onMoveElement:u,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onRazorSplit:m,onRazorSplitAll:y}=wS(),p=ce(O=>O.beatDragging),v=(n==null?void 0:n.element)??null,b=v?Zn(v):null,w=(n==null?void 0:n.started)===!0&&v&&b?{dragStarted:!0,draggedKey:b,draggedOriginStart:v.start,draggedPreviewStart:n.previewStart,selectedKeys:i}:null;return d.jsxs("div",{className:"relative",style:{height:e.totalH,width:e.contentOrigin+e.trackContentWidth},children:[d.jsx(mTe,{major:e.major,minor:e.minor,pps:e.pps,trackContentWidth:e.trackContentWidth,totalH:e.totalH,effectiveDuration:e.effectiveDuration,majorTickInterval:e.majorTickInterval,theme:e.theme,beatAnalysis:e.beatAnalysis,contentOrigin:e.contentOrigin,renderTimeRange:e.rowsVirtualized?e.renderTimeRange:void 0}),d.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:u0}}),d.jsx(XFe,{...e,draggedElement:v,multiDragPreview:w,onToggleTrackHidden:f,onTogglePropertyGroupKeyframe:h,onResizeElement:c,onMoveElement:u,onRazorSplit:m,onRazorSplitAll:y}),d.jsx("div",{"aria-hidden":"true",style:{height:e.rowsVirtualized?0:Jae}}),e.laneGapStrips.map(O=>{const C=s.indexOf(O.track);if(C<0)return null;const E=O.kind==="hover";return(e.rowsVirtualized?O.intervals.filter(N=>N.start<e.renderTimeRange.end&&N.end>e.renderTimeRange.start):O.intervals).map(N=>d.jsx("div",{className:"pointer-events-none absolute",style:{top:nM(C,e.rowHeights)+da,left:e.contentOrigin+N.start*e.pps,width:Math.max((N.end-N.start)*e.pps,2),height:Xi-da*2,background:E?"rgba(60,230,172,0.18)":"rgba(60,230,172,0.055)",borderRadius:4,zIndex:25}},`gap-${O.kind}-${O.track}-${N.start}`))}),(n==null?void 0:n.started)&&n.insertRow==null&&a>=0&&d.jsx("div",{className:"absolute pointer-events-none",style:{top:nM(a,e.rowHeights)+da,left:e.contentOrigin+n.previewStart*e.pps,width:Math.max(n.element.duration*e.pps,4),height:l,border:"1px solid rgba(60,230,172,0.55)",background:"rgba(60,230,172,0.12)",borderRadius:4,zIndex:30}}),(n==null?void 0:n.started)&&n.insertRow!=null&&d.jsx("div",{className:"absolute pointer-events-none",style:{top:nM(n.insertRow,e.rowHeights)-.5,left:e.contentOrigin,width:e.trackContentWidth,height:1,background:"#3CE6AC",boxShadow:"0 0 3px rgba(60,230,172,0.5)",zIndex:55}}),(n==null?void 0:n.started)&&n.snapTime!=null&&n.snapType!=="beat"&&d.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+n.snapTime*e.pps,top:La,bottom:0,width:1,background:n.snapType==="playhead"?"#3CE6AC":"rgba(255,255,255,0.6)",boxShadow:n.snapType==="playhead"?"0 0 6px rgba(60,230,172,0.5)":"0 0 6px rgba(255,255,255,0.4)",zIndex:60}}),d.jsx(c$e,{drag:n,scrollRef:r,pixelsPerSecond:e.pps,rowHeight:l,selectedElementId:e.selectedElementId,currentTime:e.currentTime,theme:e.theme,getTrackStyle:e.getTrackStyle,renderClipContent:e.renderClipContent,renderClipOverlay:e.renderClipOverlay}),e.marqueeRect&&d.jsx("div",{"aria-hidden":"true",className:"absolute pointer-events-none",style:{left:e.marqueeRect.left,top:e.marqueeRect.top,width:e.marqueeRect.width,height:e.marqueeRect.height,background:"rgba(60,230,172,0.10)",border:"1px dashed rgba(60,230,172,0.7)",borderRadius:2,zIndex:70}}),e.rangeSelection&&d.jsx("div",{className:"absolute pointer-events-none",style:{left:e.contentOrigin+Math.min(e.rangeSelection.start,e.rangeSelection.end)*e.pps,width:Math.abs(e.rangeSelection.end-e.rangeSelection.start)*e.pps,top:La,bottom:0,backgroundColor:"rgba(59, 130, 246, 0.12)",borderLeft:"1px solid rgba(59, 130, 246, 0.4)",borderRight:"1px solid rgba(59, 130, 246, 0.4)",zIndex:50}}),d.jsx("div",{ref:e.playheadRef,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${b_(0,0,e.contentOrigin)}px`,width:Q6,zIndex:100,display:p?"none":void 0},children:d.jsx(gTe,{scrubbing:e.isScrubbing})})]})});function Ec(t){return nl(t)?"audio":"visual"}const Sk=t=>t.key??t.id,wW=1e-6;function f$e(t,e){return t.start<e.start+e.duration-wW&&e.start<t.start+t.duration-wW}function h$e(t,e){const n=Sk(t),r=Sk(e);return n<r?-1:n>r?1:0}function d$e(t,e,n){const r=[...t].sort(h$e),i=[];for(const s of r){let a=i.findIndex(o=>o.every(l=>!f$e(l,s)));a===-1&&(a=i.length,i.push([])),i[a].push(s),n.set(Sk(s),e+a)}return Math.max(1,i.length)}function OW(t,e,n){const r=new Map;for(const s of t){const a=r.get(s.track);a?a.push(s):r.set(s.track,[s])}let i=0;for(const s of[...r.keys()].sort((a,o)=>a-o))i+=d$e(r.get(s),e+i,n);return i}function cde(t){if(t.length===0)return t;const e=new Map,n=[],r=[];for(const o of t)(Ec(o)==="audio"?r:n).push(o);let i=0;i+=OW(n,i,e),OW(r,i,e);let s=!1;const a=t.map(o=>{const l=e.get(Sk(o));return l==null||l===o.track?o:(s=!0,{...o,track:l,authoredTrack:o.authoredTrack??o.track})});return s?a:t}const kW=1e-6,wk=t=>JSON.stringify([t.sourceFile??null,t.stackingContextId??null]);function jF(t,e){return wk(t)===wk(e)}function p$e(t,e){return t.start<e.start+e.duration-kW&&e.start<t.start+t.duration-kW}function U_(t,e){return t.track<e.track}function Gg(t,e){return t.zIndex!==e.zIndex?t.zIndex>e.zIndex:t.domIndex!=null&&e.domIndex!=null?t.domIndex>e.domIndex:!1}function X_(t,e){return t.length>0?e(t.map(n=>n.zIndex)):null}function m$e(t,e,n,r){const i=e.filter(h=>!h.isAudio);if(i.length===0)return!1;const s=i.filter(h=>U_(t,h)),a=i.filter(h=>U_(h,t));if(s.every(h=>Gg(t,h))&&a.every(h=>Gg(h,t)))return!1;const l=X_(s,h=>Math.max(...h)),c=x$e(t,s,a);if(c!=null)return c!==t.zIndex&&r(t,c),c!==t.zIndex;const u=l!=null?l+1:0,f=Math.max(0,u);return f!==t.zIndex&&r(t,f),b$e(t,n,r),!0}function g$e(t,e,n){if(e-t>=2){const r=Math.floor((t+e)/2);return r>t&&r<e?r:null}return n(e)?e:null}function y$e(t,e){const n=t-1;return n>=0?n:e(t)?t:null}function x$e(t,e,n){const r=X_(e,a=>Math.max(...a)),i=X_(n,a=>Math.min(...a)),s=a=>{const o={...t,zIndex:a};return e.every(l=>Gg(o,l))&&n.every(l=>Gg(l,o))};return r!=null&&i!=null?g$e(r,i,s):r!=null?r+1:i!=null?y$e(i,s):null}function b$e(t,e,n){const r=[t],i=(s,a)=>{Gg(s,a)||(n(s,a.zIndex+1),r.push(s))};for(;r.length>0;){const s=r.shift();for(const a of e(s))U_(a,s)&&!Gg(a,s)&&i(a,s)}}function v$e(t,e){const n=new Set(e);if(n.size===0)return[];const r=t.filter(y=>Number.isFinite(y.zIndex)),i=new Set(r.filter(y=>n.has(y.key)).map(wk)),s=r.filter(y=>i.has(wk(y))),a=new Map(s.map(y=>[y.key,{...y}])),o=s.filter(y=>n.has(y.key)&&!y.isAudio).map(y=>a.get(y.key)).sort((y,p)=>p.track-y.track),l=new Map,c=(y,p)=>{y.zIndex=p,l.set(y.key,p)},u=[...a.values()],f=y=>u.filter(p=>p.key!==y.key&&!p.isAudio&&jF(y,p)&&p$e(y,p));for(const y of o)m$e(y,f(y),f,c);const h=new Set,m=[];for(const y of o)l.has(y.key)&&!h.has(y.key)&&(m.push({key:y.key,zIndex:l.get(y.key)}),h.add(y.key));for(const[y,p]of l)h.has(y)||(m.push({key:y,zIndex:p}),h.add(y));return m}function dv(t){return vS({tag:t.tag,kind:t.kind,duration:t.duration,domId:t.domId,selector:t.selector,compositionSrc:t.compositionSrc,playbackStart:t.playbackStart,playbackStartAttr:t.playbackStartAttr,sourceDuration:t.sourceDuration,timingSource:t.timingSource,timelineLocked:t.timelineLocked}).canMove}function A$e(t,e){const n=e.selectedKeys;if(!n)return null;const r=new Set(n),i=e.elements.includes(t.element)?e.elements:[...e.elements,t.element];for(const u of i){const f=u.expandedHostKey,h=Zn(u);f&&r.has(f)&&r.has(h)&&r.delete(h)}const s=t.element.expandedHostKey,a=Zn(t.element);if(!s||r.has(a))return r.size===n.size?null:{drag:t,selectedKeys:r};const o=e.elements.find(u=>Zn(u)===s);if(!o||!dv(o))return null;const l=t.previewStart-t.element.start,c=u=>u===t.element.track?o.track:u;return{drag:{...t,element:o,previewStart:Math.max(0,Math.round((o.start+l)*1e3)/1e3),previewTrack:c(t.previewTrack)??o.track,desiredTrack:c(t.desiredTrack)},selectedKeys:r}}const W_=new WeakMap;function g3(t,e){let n=W_.get(t);n||(n=new Map,W_.set(t,n));const r=new Map;for(const i of e){const s=(n.get(i)??0)+1;n.set(i,s),r.set(i,s)}return r}function Ok(t,e,n){var r;return((r=W_.get(t))==null?void 0:r.get(n))===e.get(n)}function q_(t,e,n){for(const r of n)Ok(t,e,r.key)&&t(r.key,r.updates)}let p8=null;function LF(t){const e=p8;let n;if(e)n=e.then(t,t);else try{n=Promise.resolve(t())}catch(i){n=Promise.reject(i)}const r=n.then(()=>{},()=>{});return p8=r,r.then(()=>{p8===r&&(p8=null)}),n}function ude(t){return LF(async()=>{const n=await t.commitZ();return n&&!n.durable?!1:t.mirror()})}function fde(t){return LF(async()=>await t.commitLane()?(await t.commitZ(),!0):!1)}function Ug(t,e){return t.then(n=>{var r;return n&&((r=e.refreshAfterLaneMove)==null||r.call(e)),n})}const CW=t=>t.key??t.id,FF=(t,e)=>(t.sourceFile??null)===(e.sourceFile??null);function $F(t,e,n){const r=CW(n),i=e.filter(o=>CW(o)!==r&&FF(o,n)),s=i.find(o=>o.track===t);if(s)return s.authoredTrack??s.track;let a=null;for(const o of i)(!a||Math.abs(o.track-t)<Math.abs(a.track-t))&&(a=o);return a?Math.round((a.authoredTrack??a.track)+(t-a.track)):t}const Gr=t=>t.key??t.id,S$e=t=>Math.round(t*1e3)/1e3;let hde=0;function wd(t,e,n,r="timing",i){if(t.length===0)return Promise.resolve(!0);const{updateElement:s,onMoveElement:a,onMoveElements:o}=e;o||console.warn(a?`[Timeline] persistMoveEdits: only single-clip onMoveElement wired — this ${t.length}-clip move degrades to a per-clip persist race (no atomic single-undo)`:`[Timeline] persistMoveEdits: no move persist handler wired — ${t.length} edit(s) applied to the store only, not saved`);const l=t.map(m=>({key:Gr(m.element),start:m.element.start,track:m.element.track,authoredTrack:m.element.authoredTrack})),c=g3(s,t.map(m=>Gr(m.element))),u=m=>{const y=m.persistTrack??(m.updates.track!==m.element.track?m.updates.track:void 0);s(Gr(m.element),y==null?m.updates:{...m.updates,authoredTrack:y})};for(const m of t)u(m);const f=t.map(m=>m.persistTrack==null||m.persistTrack===m.updates.track?m:{element:m.element,updates:{...m.updates,track:m.persistTrack}}),h=o?o(f,n,r,i):Promise.all(f.map(m=>Promise.resolve(a==null?void 0:a(m.element,m.updates))));return Promise.resolve(h).then(()=>{for(const m of t){const y=Gr(m.element);Ok(s,c,y)&&u(m)}return!0},m=>{for(const y of l)Ok(s,c,y.key)&&s(y.key,{start:y.start,track:y.track,authoredTrack:y.authoredTrack});return console.error("[Timeline] Failed to persist clip edits",m),!1})}function EW(t,e){return t.length===0?0:e<=0?t[0]-.5:e>=t.length?t[t.length-1]+.5:(t[e-1]+t[e])/2}function w$e(t,e){const{elements:n,selectedKeys:r}=e,i=Gr(t.element);if(!r||r.size<=1||!r.has(i))return null;const s=new Set([...r].filter(l=>{const c=n.find(u=>Gr(u)===l);return c?dv(c):!1})),a=t.previewStart-t.element.start;return{keys:s,movedStart:l=>Gr(l)===i?t.previewStart:Math.max(0,S$e(l.start+a))}}function dde(t,e){const n=A$e(t,e);if(n){dde(n.drag,{...e,selectedKeys:n.selectedKeys});return}const{elements:r,updateElement:i,onMoveElement:s}=e,a=Gr(t.element),o=t.insertRow!=null,l=t.previewTrack!==t.element.track,c=t.desiredTrack??t.previewTrack,u=o||c!==t.element.track,f=w$e(t,e);if(!o&&!l){if(t.previewStart-t.element.start===0)return;if(f){const E=r.filter(M=>f.keys.has(Gr(M))).map(M=>({element:M,updates:{start:f.movedStart(M),track:M.track}})).filter(M=>M.updates.start!==M.element.start);wd(E,e);return}const w={start:t.previewStart,track:t.element.track},O={start:t.element.start,track:t.element.track},C=g3(i,[a]);i(a,w),Promise.resolve(s==null?void 0:s(t.element,w)).catch(E=>{Ok(i,C,a)&&i(a,O),console.error("[Timeline] Failed to persist clip edit",E)});return}if(o){O$e(t,e,f);return}const h={element:t.element,updates:{start:t.previewStart,track:t.previewTrack},persistTrack:$F(t.previewTrack,r,t.element)},m=u?`clip-lane-move:${hde++}`:void 0,y=[h];if(f)for(const b of r){if(Gr(b)===a||!f.keys.has(Gr(b)))continue;const w=f.movedStart(b);w!==b.start&&y.push({element:b,updates:{start:w,track:b.track}})}const p=r.map(b=>Gr(b)===a?{...b,start:t.previewStart,track:t.previewTrack}:f!=null&&f.keys.has(Gr(b))?{...b,start:f.movedStart(b)}:b),v=f?f.keys:null;if(!u||!e.readZIndex||!e.onStackingPatches){Ug(wd(y,e,m,"lane-reorder"),e);return}Ug(fde({commitLane:()=>wd(y,e,m,"lane-reorder"),commitZ:()=>mde(p,a,t.element.track,t.previewTrack,v,e,m)}),e).catch(()=>{})}function pde(t,e,n,r,i){const{elements:s,trackOrder:a}=i,o=Gr(t);if(t.expandedParentStart!=null)return null;const l=EW(a,n),c=s.map(w=>Gr(w)===o?{...w,start:e,track:l}:r!=null&&r.keys.has(Gr(w))?{...w,start:r.movedStart(w)}:w),u=Ec(t),f=w=>FF(w,t)&&Ec(w)===u&&w.expandedParentStart==null,h=[...new Set(s.filter(f).map(w=>w.track))].sort((w,O)=>w-O),m=h.filter(w=>w<l).length,y=EW(h,m),p=cde(s.filter(f).map(w=>Gr(w)===o?{...w,start:e,track:y}:r!=null&&r.keys.has(Gr(w))?{...w,start:r.movedStart(w)}:w)),v=new Map(s.map(w=>[Gr(w),w]));for(const w of p){const O=v.get(Gr(w));if(O&&f(O)&&!dv(O)&&w.track!==(O.authoredTrack??O.track))return console.warn(`[Timeline] Track insert refused: locked clip ${Gr(O)} would need renumbering`),null}const b=[];if(r)for(const w of s){const O=Gr(w);O!==o&&r.keys.has(O)&&!f(w)&&dv(w)&&b.push({element:w,updates:{start:r.movedStart(w),track:w.track},persistTrack:w.authoredTrack})}for(const w of p){const O=v.get(Gr(w));if(!O||!dv(O))continue;const C=Gr(w)===o||r!=null&&r.keys.has(Gr(w))?(r==null?void 0:r.movedStart(O))??e:O.start;b.push({element:O,updates:{start:C,track:w.track}})}return{candidate:c,edits:b}}function O$e(t,e,n){const r=Gr(t.element),i=pde(t.element,t.previewStart,t.insertRow,n,e);if(!i)return;const{candidate:s,edits:a}=i;if(a.length===0)return;const o=`clip-lane-move:${hde++}`;if(!e.readZIndex||!e.onStackingPatches){Ug(wd(a,e,o,"track-insert"),e);return}Ug(fde({commitLane:()=>wd(a,e,o,"track-insert"),commitZ:()=>mde(s,r,t.element.track,t.insertRow,n?n.keys:null,e,o)}),e).catch(()=>{})}function k$e(t,e,n,r,i){if(e.kind==="move"){const a={element:t,updates:{start:t.start,track:e.displayTrack},persistTrack:e.persistTrack};return Ug(wd([a],n,r,"lane-reorder",i),n)}const s=pde(t,t.start,e.insertRow,null,n);return!s||s.edits.length===0?Promise.resolve(!1):Ug(wd(s.edits,n,r,"track-insert",i),n)}function mde(t,e,n,r,i,s,a){const{readZIndex:o,onStackingPatches:l}=s;if(!o||!l||r===n)return Promise.resolve();const c=t.map((h,m)=>({key:Gr(h),start:h.start,duration:h.duration,track:h.track,zIndex:o(h),isAudio:Ec(h)==="audio",sourceFile:h.sourceFile,domIndex:m,stackingContextId:h.stackingContextId??null})),u=[e];if(i)for(const h of i)h!==e&&u.push(h);const f=v$e(c,u);return f.length===0?Promise.resolve():Promise.resolve(l(f,a)).then(()=>{})}function C$e(t,e,n){if(!t.hasChanged)return;const r=t.changes,i=g3(e,r.map(a=>a.key));for(const a of r)e(a.key,{start:a.start,duration:a.duration,playbackStart:a.playbackStart});if(!n){q_(e,i,t.members.map(a=>({key:a.key,updates:a})));return}const s=`clip-group-resize:${r.map(a=>a.key).join(":")}`;Promise.resolve(n(r.map(a=>({element:a.element,start:a.start,duration:a.duration,playbackStart:a.playbackStart})),{coalesceKey:s})).catch(a=>{q_(e,i,t.members.map(o=>({key:o.key,updates:o}))),console.error("[Timeline] Failed to persist group clip resize",a)})}function E$e({lifecycleRef:t,sessionEpochRef:e,cancelGestureRef:n,scrollRef:r,draggedClipRef:i,resizingClipRef:s,blockedClipRef:a,groupResizeRef:o,suppressClickRef:l,gestureSelectedKeysRef:c,elementsRef:u,trackOrderRef:f,setDraggedClipState:h,setResizingClipState:m,setShowPopover:y,setRangeSelectionRef:p,applyResizePointerRef:v,syncClipDragAutoScrollRef:b,stopClipDragAutoScrollRef:w,updateDraggedClipPreviewRef:O,publishDraggedClip:C,updateElement:E,onMoveElementRef:M,onMoveElementsRef:N,onResizeElementRef:_,onResizeElementsRef:I,onBlockedEditAttemptRef:j,readZIndexRef:L,onStackingPatchesRef:H,refreshAfterLaneMoveRef:$}){const G=()=>{requestAnimationFrame(()=>{l.current=!1})},q=fe=>{const me=t.current.pointerId;return me===null||fe.pointerId===me},Y=fe=>{if(fe===null)return;const me=r.current;try{me!=null&&me.hasPointerCapture(fe)&&me.releasePointerCapture(fe)}catch{}},J=fe=>{var me;if(fe!==null)try{(me=r.current)==null||me.setPointerCapture(fe)}catch{}},ie=fe=>{i.current=null,s.current=null,o.current=null,fe&&(h(null),m(null))},te=({updateReact:fe=!0,suppressClick:me=!1}={})=>{const Te=t.current;return Te.phase!=="active"?!1:(Te.phase="cancelled",w.current(),ie(fe),Y(Te.pointerId),me&&(l.current=!0),Te.kind=null,Te.pointerId=null,Te.phase="complete",!0)};n.current=te;const ne=(fe,me)=>{var ve;const Te=Math.abs(fe.clientX-me.originClientX);!me.started&&Te<2||(me.started||J(me.pointerId),y(!1),(ve=p.current)==null||ve.call(p,null),v.current(me,fe.clientX),b.current(fe.clientX,fe.clientY))},W=(fe,me)=>{var xe,we;const Te=Math.hypot(fe.clientX-me.originClientX,fe.clientY-me.originClientY),ve=me.intent==="move"?4:2;!me.started&&Te<ve||me.started||(me.started=!0,a.current=me,J(me.pointerId),l.current=!0,y(!1),(xe=p.current)==null||xe.call(p,null),(we=j.current)==null||we.call(j,me.element,me.intent))},F=(fe,me)=>{var ve;const Te=Math.hypot(fe.clientX-me.originClientX,fe.clientY-me.originClientY);!me.started&&Te<4||(me.started||J(me.pointerId),y(!1),(ve=p.current)==null||ve.call(p,null),C(O.current(me,fe.clientX,fe.clientY)),b.current(fe.clientX,fe.clientY))},U=fe=>{const me=s.current;if(me)return q(fe)?ne(fe,me):void 0;const Te=a.current;if(Te)return Te.pointerId!==fe.pointerId?void 0:W(fe,Te);const ve=i.current;ve&&q(fe)&&F(fe,ve)},Q=(fe,me)=>{var we;if(!fe.started)return;if(l.current=!0,G(),me){C$e(me,E,I.current);return}if(!(fe.previewStart!==fe.element.start||fe.previewDuration!==fe.element.duration||fe.previewPlaybackStart!==fe.element.playbackStart))return;const ve=fe.element.key??fe.element.id,xe=g3(E,[ve]);E(ve,{start:fe.previewStart,duration:fe.previewDuration,playbackStart:fe.previewPlaybackStart}),Promise.resolve((we=_.current)==null?void 0:we.call(_,fe.element,{start:fe.previewStart,duration:fe.previewDuration,playbackStart:fe.previewPlaybackStart})).catch(ke=>{q_(E,xe,[{key:ve,updates:{start:fe.element.start,duration:fe.element.duration,playbackStart:fe.element.playbackStart}}]),console.error("[Timeline] Failed to persist clip resize",ke)})},K=fe=>{a.current=null,fe.started&&G()},ee=fe=>{fe.started&&(l.current=!0,G(),dde(fe,{elements:u.current,trackOrder:f.current,updateElement:E,onMoveElement:M.current,onMoveElements:N.current,selectedKeys:c.current,readZIndex:L.current,onStackingPatches:H.current,refreshAfterLaneMove:$.current}))},se=()=>{var Te,ve,xe;const fe=((Te=o.current)==null?void 0:Te.members.map(we=>we.element))??[((ve=s.current)==null?void 0:ve.element)??((xe=i.current)==null?void 0:xe.element)],me=new Set(u.current.map(we=>we.key??we.id));return fe.every(we=>we===void 0||me.has(we.key??we.id))},z=fe=>{const me=t.current;if(me.phase!=="active")return null;if(!q(fe))return"ignored";if(me.sessionEpoch!==e.current||!se())return te(),"ignored";me.phase="committing";const Te=me.kind?{kind:me.kind,drag:i.current,resize:s.current,groupResize:o.current}:"ignored";return w.current(),ie(!0),Y(me.pointerId),Te==="ignored"&&(me.phase="complete"),Te},V=fe=>{try{fe.kind==="resize"&&fe.resize?Q(fe.resize,fe.groupResize):fe.kind==="drag"&&fe.drag&&ee(fe.drag)}finally{const me=t.current;me.kind=null,me.pointerId=null,me.phase="complete"}},ae=fe=>{const me=z(fe);if(me==="ignored")return;if(me){V(me);return}const Te=a.current;if(Te)return Te.pointerId!==fe.pointerId?void 0:K(Te);l.current&&G()},he=fe=>{t.current.phase==="active"&&q(fe)&&te({suppressClick:!0})&&G();const me=a.current;me&&me.pointerId!==fe.pointerId||(a.current=null,l.current&&G())},ge=fe=>{t.current.phase==="active"&&q(fe)&&te({suppressClick:!0})&&G()},ye=fe=>{const me=E5e({key:fe.key,drag:i.current,resize:s.current,blocked:a.current});me.cancel&&(fe.preventDefault(),a.current=null,te({suppressClick:me.suppressClick}))};return window.addEventListener("pointermove",U),window.addEventListener("pointerup",ae),window.addEventListener("pointercancel",he),window.addEventListener("lostpointercapture",ge),window.addEventListener("keydown",ye),()=>{te({updateReact:!1}),n.current=()=>!1,window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",ae),window.removeEventListener("pointercancel",he),window.removeEventListener("lostpointercapture",ge),window.removeEventListener("keydown",ye)}}const m8=[];function T$e({scrollRef:t,ppsRef:e,durationRef:n,trackOrderRef:r,rowGeometryRef:i,onMoveElement:s,onMoveElements:a,onResizeElement:o,onResizeElements:l,onBlockedEditAttempt:c,setShowPopover:u,setRangeSelectionRef:f,readZIndex:h,onStackingPatches:m,refreshAfterLaneMove:y,sessionEpoch:p=0}){const v=ce(et=>et.updateElement),b=ce(et=>{var Ot;return((Ot=et.beatAnalysis)==null?void 0:Ot.beatTimes)??m8}),w=ce(et=>{var Ot;return((Ot=et.beatAnalysis)==null?void 0:Ot.beatStrengths)??m8}),O=ce(et=>et.beatEdits),C=ce(et=>O0(et.elements).musicElement),E=(C==null?void 0:C.start)??0,M=(C==null?void 0:C.playbackStart)??0,N=(C==null?void 0:C.duration)??0,_=(C==null?void 0:C.src)??null,I=x.useMemo(()=>{if(b===m8||N===0)return m8;const et=zj(b,w,O,_),Ot=M+N,St=E-M;return et.times.filter(Je=>Je>=M&&Je<=Ot).map(Je=>Math.round((Je+St)*1e3)/1e3)},[b,w,O,_,E,M,N]),j=ce(et=>et.elements),L=ce(et=>et.timelineSnapEnabled),H=x.useRef({beatTimes:[],enabled:!0});H.current={beatTimes:I,enabled:L};const $=x.useRef(j);$.current=j;const G=x.useRef(new Map),q=x.useRef(null),Y=x.useCallback((et,Ot)=>{if(!H.current.enabled)return[];const St=`${et??""}|${Ot?1:0}`,Je=G.current.get(St);if(Je)return Je;const Be=WFe({elements:$.current,playheadTime:ce.getState().currentTime,beatTimes:Ot?H.current.beatTimes:[],excludeElementKey:et});return G.current.set(St,Be),Be},[]),[J,ie]=x.useState(null),te=x.useRef(null),ne=x.useCallback(et=>{te.current=et,ie(et)},[]),[W,F]=x.useState(null),U=x.useRef(null),Q=x.useCallback(et=>{U.current=et,F(et)},[]),K=x.useRef({kind:null,phase:"complete",pointerId:null,sessionEpoch:p}),ee=x.useRef(p);ee.current=p;const se=x.useRef(new Set),z=x.useRef(()=>!1),V=x.useCallback((et,Ot)=>{K.current.phase==="active"&&z.current(),K.current={kind:et,phase:"active",pointerId:Ot,sessionEpoch:ee.current},se.current=new Set(ce.getState().selectedElementIds)},[]),ae=x.useCallback(et=>{if(!et){z.current();return}V("drag",et.pointerId),ne(et)},[V,ne]),he=x.useCallback(et=>{if(!et){z.current();return}V("resize",et.pointerId),Q(et)},[V,Q]),ge=x.useRef(null),ye=x.useRef(!1),fe=x.useRef(null),me=x.useRef(s);me.current=s;const Te=x.useRef(a);Te.current=a;const ve=x.useRef(c);ve.current=c;const xe=x.useRef(o);xe.current=o;const we=x.useRef(l);we.current=l;const ke=x.useRef(h);ke.current=h;const Me=x.useRef(m);Me.current=m;const Qe=x.useRef(y);Qe.current=y;const qe=x.useRef(0),Ge=x.useRef(null),Ye=x.useCallback((et,Ot,St)=>(q.current||(q.current=O0($.current).audioTracks),a$e(et,Ot,St,{scroll:t.current,pps:e.current,duration:n.current,trackOrder:r.current,rowHeights:i==null?void 0:i.current.rowHeights,elements:$.current,selectedKeys:se.current,buildSnapTargets:Y,audioTracks:q.current})),[t,e,n,r,i,Y]),st=x.useCallback((et,Ot)=>{const St=o$e(et,Ot,{scroll:t.current,pps:e.current,buildSnapTargets:Y}),Je=Ke=>Q(U.current?{...U.current,started:!0,...Ke}:null),Be=et.element.key??et.element.id;let We=fe.current;if(!We||We.grabbedKey!==Be||We.edge!==et.edge){const Ke=b5e($.current,se.current,Be,et.edge);We=Ke?{grabbedKey:Be,edge:et.edge,members:Ke,changes:[],hasChanged:!1}:null,fe.current=We}if(!We){Je(St);return}l$e(We,St,Je)},[t,e,Y,Q]),nt=x.useRef(st);nt.current=st;const yt=x.useCallback(()=>{Ge.current=null,qe.current&&(cancelAnimationFrame(qe.current),qe.current=0),G.current.clear(),q.current=null},[]),dt=x.useCallback(()=>{qe.current=0;const et=te.current,Ot=U.current,St=Ge.current,Je=t.current;!et&&!Ot||!St||!Je||BE(Je,St.clientX,St.clientY)&&(et?ne(Ye(et,St.clientX,St.clientY)):Ot&&nt.current(Ot,St.clientX),qe.current=requestAnimationFrame(dt))},[ne,t,Ye]),zt=x.useCallback((et,Ot)=>{Ge.current={clientX:et,clientY:Ot};const St=AS(t.current,et,Ot,qe.current!==0);St==="stop"?(cancelAnimationFrame(qe.current),qe.current=0):St==="start"&&(qe.current=requestAnimationFrame(dt))},[t,dt]),Kt=x.useRef(Ye);Kt.current=Ye;const dn=x.useRef(zt);dn.current=zt;const en=x.useRef(yt);return en.current=yt,kr(()=>E$e({onStackingPatchesRef:Me,refreshAfterLaneMoveRef:Qe,readZIndexRef:ke,onBlockedEditAttemptRef:ve,onResizeElementsRef:we,onResizeElementRef:xe,onMoveElementsRef:Te,onMoveElementRef:me,updateElement:v,publishDraggedClip:ne,updateDraggedClipPreviewRef:Kt,stopClipDragAutoScrollRef:en,syncClipDragAutoScrollRef:dn,applyResizePointerRef:nt,setRangeSelectionRef:f,setShowPopover:u,setResizingClipState:F,setDraggedClipState:ie,trackOrderRef:r,elementsRef:$,gestureSelectedKeysRef:se,suppressClickRef:ye,groupResizeRef:fe,blockedClipRef:ge,resizingClipRef:U,draggedClipRef:te,scrollRef:t,cancelGestureRef:z,sessionEpochRef:ee,lifecycleRef:K})),x.useEffect(()=>{z.current()},[p]),{draggedClip:J,setDraggedClip:ae,resizingClip:W,setResizingClip:he,blockedClipRef:ge,suppressClickRef:ye,stopClipDragAutoScroll:yt}}function TW(t){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.border="0",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length);try{return document.execCommand("copy")}catch{return!1}finally{e.remove()}}function P$e(){if(typeof navigator>"u")return!1;const t=navigator.userAgent;return/Safari/i.test(t)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(t)}async function Jf(t){const e=P$e();if(e&&TW(t))return!0;const n=typeof navigator<"u"?navigator.clipboard:void 0;if(n!=null&&n.writeText)try{return await n.writeText(t),!0}catch{}return!e&&TW(t)}function M$e(t,e){return`hf-edit-draft:${t.toFixed(2)}:${e.toFixed(2)}`}function N$e(t){try{return sessionStorage.getItem(t)??""}catch{return""}}function PW(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function D$e({rangeStart:t,rangeEnd:e,anchorX:n,anchorY:r,onClose:i}){const s=ce(I=>I.elements),a=Math.min(t,e),o=Math.max(t,e),l=M$e(a,o),[c,u]=x.useState(()=>N$e(l)),f=I=>{u(I),PW(l,I)},[h,m]=x.useState(!1),[y,p]=x.useState(!1),[v,b]=x.useState(!1),w=x.useRef(null),O=x.useRef(null),C=x.useMemo(()=>s.filter(I=>{const j=I.start+I.duration;return I.start<o&&j>a}),[s,a,o]);kr(()=>{setTimeout(()=>{var I;return(I=O.current)==null?void 0:I.focus()},50)}),kr(()=>{const I=j=>{j.key==="Escape"&&i()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)}),kr(()=>{const I=j=>{w.current&&!w.current.contains(j.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",I),100),()=>window.removeEventListener("mousedown",I)});const E=x.useCallback(()=>C5e({rangeStart:a,rangeEnd:o,elements:C,prompt:c}),[a,o,C,c]),M=x.useCallback(async()=>{if(!await Jf(E())){b(!0);return}b(!1),PW(l,""),m(!0),setTimeout(()=>{m(!1),i()},800)},[E,i,l]),N=x.useCallback(async()=>{const I=lU(c);if(!I)return;if(!await Jf(I)){b(!0);return}b(!1),p(!0),setTimeout(()=>{p(!1)},800)},[c]),_={position:"fixed",left:Math.max(8,Math.min(n-160,window.innerWidth-336)),top:Math.max(8,r-280),zIndex:200};return d.jsx("div",{ref:w,style:_,children:d.jsxs("div",{className:"w-80 bg-neutral-900 border border-neutral-700/60 rounded-xl shadow-2xl shadow-black/40 overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-neutral-800/60",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-studio-accent"}),d.jsxs("span",{className:"text-[11px] font-medium text-neutral-300",children:[os(a)," — ",os(o)]})]}),d.jsxs("span",{className:"text-[10px] text-neutral-600",children:[C.length," element",C.length!==1?"s":""]})]}),C.length>0&&d.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:C.map(I=>d.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[d.jsxs("span",{className:"text-[10px] font-mono text-studio-accent/80",children:["#",I.id]}),d.jsx("span",{className:"text-[10px] text-neutral-600",children:I.tag})]},I.id))}),d.jsx("div",{className:"p-3",children:d.jsx("textarea",{ref:O,value:c,onChange:I=>f(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),M())},placeholder:"What should change?",rows:2,className:"w-full px-3 py-2 text-xs bg-neutral-800/60 border border-neutral-700/40 rounded-lg text-neutral-200 placeholder:text-neutral-600 resize-none focus:outline-none focus:border-studio-accent/40 transition-colors"})}),v&&d.jsx("p",{className:"px-3 pb-2 text-[10px] text-red-400",role:"alert",children:"Copy failed — check clipboard permissions and try again."}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 px-3 pb-3",children:[d.jsx("button",{onClick:N,disabled:!lU(c),className:`py-1.5 text-[11px] font-medium rounded-lg transition-all border ${y?"bg-green-500/20 text-green-400 border-green-500/30":"bg-neutral-800/70 text-neutral-200 border-neutral-700/50 hover:bg-neutral-800"} disabled:opacity-50 disabled:cursor-not-allowed`,children:y?"Prompt Copied!":"Copy Prompt"}),d.jsxs("button",{onClick:M,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${h?"bg-green-500/20 text-green-400 border border-green-500/30":"bg-studio-accent/15 text-studio-accent border border-studio-accent/25 hover:bg-studio-accent/25"}`,children:[h?"Copied!":"Copy to Agent",!h&&d.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}function gde(t){x.useEffect(()=>{var s;const e=t.current;if(!e)return;const n=document.activeElement,r=()=>Array.from(e.querySelectorAll('[role="menuitem"]')).filter(a=>!a.disabled);(s=r()[0])==null||s.focus();const i=a=>{var u;if(a.key!=="ArrowDown"&&a.key!=="ArrowUp"&&a.key!=="Home"&&a.key!=="End")return;const o=r();if(o.length===0)return;a.preventDefault();const l=o.findIndex(f=>f===document.activeElement);let c;a.key==="ArrowDown"?c=l<0?0:(l+1)%o.length:a.key==="ArrowUp"?c=l<0?o.length-1:(l-1+o.length)%o.length:a.key==="Home"?c=0:c=o.length-1,(u=o[c])==null||u.focus()};return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i),n instanceof HTMLElement&&document.contains(n)&&n.focus()}},[t])}const _M="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-200 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",I$e="w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left";function yde({state:t,onClose:e,onDelete:n,onDeleteAll:r,onEditEase:i,onCopyProperties:s,onMoveToPlayhead:a}){const o=X0(e),l={percentage:t.percentage,tweenPercentage:t.tweenPercentage,propertyGroup:t.propertyGroup,animationId:t.animationId};gde(o);const[c,u]=x.useState("idle"),f=async()=>{if(!s)return;if(await s(t.elementId,l)===!1){u("failed"),setTimeout(()=>u("idle"),1500);return}u("copied"),setTimeout(e,700)},h=200,y=10+(1+(a?1:0)+(i?1:0)+(s?1:0)+(n?1:0))*30+9,p=t.y+y-window.innerHeight,v=t.x+h>window.innerWidth?t.x-h:t.x,b=Math.max(8,p>0?t.y-p-8:t.y);return Zl.createPortal(d.jsxs("div",{ref:o,role:"menu","aria-label":"Keyframe actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px] overflow-y-auto",style:{left:v,top:b,maxHeight:`calc(100vh - ${b+8}px)`},children:[a&&d.jsx("button",{type:"button",role:"menuitem",className:_M,onClick:()=>{a(t.element,l),e()},children:"Move to Playhead"}),i&&d.jsxs("button",{type:"button",role:"menuitem",className:`${_M} justify-between`,onClick:()=>{i(t.elementId,l),e()},children:[d.jsx("span",{children:"Edit Ease…"}),d.jsx("span",{className:"text-[10px] text-neutral-500",children:t.currentEase??"default"})]}),s&&d.jsx("button",{type:"button",role:"menuitem",className:_M,onClick:()=>{f()},children:c==="copied"?"Copied!":c==="failed"?"Copy failed — check permissions":"Copy Properties"}),n&&d.jsx("button",{type:"button",role:"menuitem",className:I$e,onClick:()=>{n(t.elementId,l),e()},children:"Delete Keyframe"}),d.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),d.jsx("div",{className:"my-1 border-t border-neutral-700/60",role:"separator"}),d.jsx("button",{type:"button",role:"menuitem",className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-red-950/40 focus-visible:bg-red-950/40 outline-none cursor-pointer text-left",onClick:()=>{r(t.element,t.animationId),e()},children:"Delete All Keyframes"})]}),document.body)}const _$e=x.memo(function({x:e,y:n,element:r,currentTime:i,onClose:s,onSplit:a,onDelete:o}){const l=X0(s);gde(l);const c=200,f=n+80-window.innerHeight,h=e+c>window.innerWidth?e-c:e,m=f>0?n-f-8:n,y=m3(r)&&["video","audio","img"].includes(r.tag),p=y&&i>r.start&&i<r.start+r.duration,v=y?p?`Split at ${i.toFixed(2)}s`:"Split (move playhead inside clip)":null;return Zl.createPortal(d.jsxs("div",{ref:l,role:"menu","aria-label":"Clip actions",className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:h,top:m},children:[v&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",role:"menuitem",className:`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left outline-none focus-visible:bg-neutral-800 ${p?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,disabled:!p,onClick:()=>{p&&(a(r,i),s())},children:[d.jsx("span",{children:v}),d.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"S"})]}),d.jsx("div",{className:"my-1 border-t border-neutral-700/60"})]}),d.jsxs("button",{type:"button",role:"menuitem",className:"w-full flex items-center justify-between px-3 py-1.5 text-xs text-red-400 hover:bg-neutral-800 focus-visible:bg-neutral-800 outline-none cursor-pointer text-left",onClick:()=>{o(r),s()},children:[d.jsx("span",{children:"Delete"}),d.jsx("span",{className:"text-neutral-500 text-[10px] ml-3",children:"⌫"})]})]}),document.body)}),R$e=x.memo(function({x:e,y:n,gapWidth:r,canCloseGap:i,canCloseAllGaps:s,hasAnyGaps:a,onClose:o,onCloseGap:l,onCloseAllGaps:c,onHoverAction:u}){const f=X0(o),h=200,y=n+68-window.innerHeight,p=e+h>window.innerWidth?e-h:e,v=y>0?n-y-8:n,b=C=>`w-full flex items-center justify-between px-3 py-1.5 text-xs text-left ${C?"text-neutral-300 hover:bg-neutral-800 cursor-pointer":"text-neutral-600 cursor-not-allowed"}`,w=i?void 0:r==null?"No gap here":"A clip on this track can't be moved",O=s?void 0:a?"A clip on this track can't be moved":"No gaps on this track";return Zl.createPortal(d.jsxs("div",{ref:f,className:"fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",style:{left:p,top:v},onPointerLeave:()=>u(null),children:[d.jsxs("button",{type:"button",className:b(i),disabled:!i,title:w,onPointerEnter:()=>u(i?"close-gap":null),onClick:()=>{i&&(l(),o())},children:[d.jsx("span",{children:"Close gap"}),r!=null&&d.jsxs("span",{className:"text-neutral-500 text-[10px] ml-3",children:[r.toFixed(2),"s"]})]}),d.jsx("button",{type:"button",className:b(s),disabled:!s,title:O,onPointerEnter:()=>u(s?"close-all":null),onClick:()=>{s&&(c(),o())},children:d.jsx("span",{children:"Close all gaps"})})]}),document.body)});function j$e({theme:t}){return d.jsx("div",{className:"absolute bottom-2 right-3 pointer-events-none z-20",children:d.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-md border",style:{background:"rgba(17,23,35,0.84)",borderColor:t.gutterBorder},children:[d.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:t.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),d.jsx("span",{className:"text-[9px]",style:{color:t.textSecondary},children:"+ drag/click to edit range"})]})})}function Y_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:n,selectedElementId:r,elements:i}){const s=t.key??t.id;return e!==n||r!==s?null:i.find(a=>(a.key??a.id)===s)??null}function L$e(t,e,n){const r=ce.getState();return Y_({capturedElement:t,targetSessionEpoch:e,sessionEpoch:r.timelineSessionEpoch,selectedElementId:r.selectedElementId,elements:n})}function F$e({elements:t,elementsRef:e,theme:n,showShortcutHint:r,showPopover:i,rangeSelection:s,setShowPopover:a,setRangeSelection:o,kfContextMenu:l,setKfContextMenu:c,onDeleteKeyframe:u,onDeleteAllKeyframes:f,onMoveKeyframeToPlayhead:h,clipContextMenu:m,setClipContextMenu:y,currentTime:p,onSplitElement:v,pinZoomBeforeEdit:b,onDeleteElement:w,gapContextMenu:O,onDismissGapContextMenu:C,onCloseTrackGap:E,onCloseAllTrackGaps:M,onHoverGapAction:N}){const _=ce(q=>q.selectedElementId),I=ce(q=>q.timelineSessionEpoch),j=l==null?void 0:l.sessionEpoch,L=m==null?void 0:m.sessionEpoch,H=l?Y_({capturedElement:l.element,targetSessionEpoch:j,sessionEpoch:I,selectedElementId:_,elements:t}):null,$=m?Y_({capturedElement:m.element,targetSessionEpoch:L,sessionEpoch:I,selectedElementId:_,elements:t}):null,G=(q,Y)=>L$e(q,Y,e.current);return x.useEffect(()=>{l&&!H&&c(null)},[H,l,c]),x.useEffect(()=>{m&&!$&&y(null)},[m,$,y]),d.jsxs(d.Fragment,{children:[r&&!i&&!s&&d.jsx(j$e,{theme:n}),i&&s&&d.jsx(D$e,{rangeStart:s.start,rangeEnd:s.end,anchorX:s.anchorX,anchorY:s.anchorY,onClose:()=>{a(!1),o(null)}}),l&&H&&d.jsx(yde,{state:{...l,element:H},onClose:()=>c(null),onDelete:(...q)=>{G(H,j)&&(u==null||u(...q))},onDeleteAll:(q,Y)=>{const J=G(H,j);J&&(f==null||f(J,Y))},onMoveToPlayhead:h?(q,...Y)=>{const J=G(H,j);J&&h(J,...Y)}:void 0,onEditEase:l.animationId!==void 0&&l.tweenPercentage!==void 0?(q,Y)=>{Y.animationId===void 0||Y.tweenPercentage===void 0||(ce.getState().setFocusedEaseSegment({animationId:Y.animationId,collidingAnimationTargets:Y.collidingAnimationTargets,tweenPercentage:Y.tweenPercentage,elementId:q}),dj({action:"open"}))}:void 0,onCopyProperties:(q,Y)=>{const J=ce.getState().keyframeCache.get(q),ie=J==null?void 0:J.keyframes.find(te=>Math.abs(te.percentage-Y.percentage)<.5);return ie?Jf(JSON.stringify(ie.properties,null,2)):!1}}),m&&$&&d.jsx(_$e,{x:m.x,y:m.y,element:$,currentTime:p,onClose:()=>y(null),onSplit:(q,Y)=>{const J=G($,L);J&&(v==null||v(J,Y))},onDelete:()=>{const q=G($,L);q&&(b(),w==null||w(q))}}),O&&d.jsx(R$e,{x:O.x,y:O.y,gapWidth:O.gapWidth,canCloseGap:O.canCloseGap,canCloseAllGaps:O.canCloseAllGaps,hasAnyGaps:O.hasAnyGaps,onClose:C,onCloseGap:E,onCloseAllGaps:M,onHoverAction:N})]})}function $$e({ppsRef:t,fitPpsRef:e,onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onFileDrop:a,onAssetDrop:o,onBlockDrop:l,onCompositionDrop:c}){const u=ce(E=>E.pinTimelineZoom),f=x.useCallback(()=>{u(t.current,e.current)},[u,t,e]),h=x.useRef(null),m=x.useMemo(()=>n&&((...E)=>(f(),n(...E))),[n,f]),y=x.useMemo(()=>r&&((...E)=>(f(),r(...E))),[r,f]),p=x.useMemo(()=>i&&((...E)=>(f(),i(...E))),[i,f]),v=x.useMemo(()=>s&&((...E)=>(f(),s(...E))),[s,f]),b=x.useMemo(()=>a&&((...E)=>(f(),a(...E))),[a,f]),w=x.useMemo(()=>o&&((...E)=>(f(),o(...E))),[o,f]),O=x.useMemo(()=>l&&((...E)=>(f(),l(...E))),[l,f]),C=x.useMemo(()=>c&&((...E)=>(f(),c(...E))),[c,f]);return{pinZoomBeforeEdit:f,setRangeSelectionRef:h,pinnedOnMoveElement:m,pinnedOnMoveElements:y,pinnedOnResizeElement:p,pinnedOnResizeElements:v,pinnedOnFileDrop:b,pinnedOnAssetDrop:w,pinnedOnBlockDrop:O,pinnedOnCompositionDrop:C}}const BF=Bc("StudioShellContext",null),VF=Bc("StudioPlaybackContext",null);function Yl(){const t=x.useContext(BF);if(!t)throw new Error("useStudioShellContext must be used within StudioShellProvider");return t}function HF(){return x.useContext(BF)}function Iy(){const t=x.useContext(VF);if(!t)throw new Error("useStudioPlaybackContext must be used within StudioPlaybackProvider");return t}function B$e(){return x.useContext(VF)}function V$e({value:t,children:e}){const{projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,writeBlockedReason:l,handleUndo:c,handleRedo:u,renderQueue:f,compositionDimensions:h,waitForPendingDomEditSaves:m,handlePreviewIframeRef:y}=t,p=x.useMemo(()=>({projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:s,previewIframeRef:a,editHistory:o,writeBlockedReason:l,handleUndo:c,handleRedo:u,renderQueue:f,compositionDimensions:h,waitForPendingDomEditSaves:m,handlePreviewIframeRef:y}),[n,r,h,o,f,i,s,a,l,c,u,m,y]);return d.jsx(BF,{value:p,children:e})}function H$e({value:t,children:e}){const{captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}=t,c=x.useMemo(()=>({captionEditMode:n,compositionLoading:r,refreshKey:i,setRefreshKey:s,timelineElements:a,isPlaying:o,refreshPreviewDocumentVersion:l}),[n,r,i,a,o,s,l]);return d.jsx(VF,{value:c,children:e})}function Q$e(t){var e;try{const n=(e=t.ownerDocument)==null?void 0:e.defaultView;if(!n)return!0;const r=n.getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1;const i=Number.parseFloat(r.opacity);return!(Number.isFinite(i)&&i<=.01&&!t.hasAttribute(h3))}catch{return!0}}function MW(t){if(!t||t==="auto")return 0;const e=parseInt(t,10);return Number.isFinite(e)?e:0}function y3(t){var r;const e=$j(t);if(e!=null)return e;const n=t.style.zIndex;if(n&&n!=="auto")return MW(n);try{const i=(r=t.ownerDocument)==null?void 0:r.defaultView;if(i)return MW(i.getComputedStyle(t).zIndex)}catch{}return 0}function xde(t){var n;const e=(n=t.ownerDocument)==null?void 0:n.defaultView;return e&&t instanceof e.HTMLElement?!0:t.nodeType===1}const z$e=new Set(["AUDIO","SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Z$e(t){return xde(t)&&!z$e.has(t.tagName)}function bde(t){const e=t.parentElement;if(!e)return{entries:[],targetIndex:-1};const n=[];let r=-1,i=0;for(const s of Array.from(e.children))s!==t&&!Z$e(s)||xde(s)&&(s===t&&(r=n.length),n.push({element:s,zIndex:y3(s),domIndex:i}),i+=1);return{entries:n,targetIndex:r}}function G$e(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}function U$e(t,e,n){const r=e.filter(a=>a.element===t||n(a.element));let i;try{i=t.getBoundingClientRect()}catch{return r}if(i.width===0&&i.height===0)return r;const s={left:i.left,top:i.top,right:i.right,bottom:i.bottom};return r.filter(a=>{if(a.element===t)return!0;try{const o=a.element.getBoundingClientRect();return G$e(s,{left:o.left,top:o.top,right:o.right,bottom:o.bottom})}catch{return!1}})}function QF(t){return[...t].sort((e,n)=>e.zIndex-n.zIndex||e.domIndex-n.domIndex)}function X$e(t,e){if(t&&e)return e.zIndex-t.zIndex>=2?t.zIndex+1:null;if(t)return t.zIndex+1;if(e){const n=Math.max(0,e.zIndex-1);return n>=e.zIndex?null:n}return null}function vde(t,e,n,r){const i=e.findIndex(l=>l.element===n);if(i===-1)return null;const s=y3(n),a=t.map(l=>l.zIndex);if(!a.some((l,c)=>a.indexOf(l)!==c)){const l=X$e(e[i-1],e[i+1]);if(l!==null)return l===s?null:[{element:n,zIndex:l}]}return W$e(t,e,n,r)}function W$e(t,e,n,r){const i=new Set(e.map(m=>m.element)),s=r.filter(m=>!i.has(m.element)),a=e.length,o=t.map(m=>m.zIndex),l=Math.min(...o),c=Math.max(...o);if(!s.some(m=>m.zIndex>=l&&m.zIndex<=c)){const m=s.filter(w=>w.zIndex<l).map(w=>w.zIndex),y=s.filter(w=>w.zIndex>c).map(w=>w.zIndex),p=m.length>0?Math.max(...m)+1:0,v=y.length>0,b=v?Math.min(...y)-a:Number.POSITIVE_INFINITY;if(p<=b){let w=Math.max(l,p);v&&(w=Math.min(w,b));const O=[];return e.forEach((C,E)=>{C.zIndex!==w+E&&O.push({element:C.element,zIndex:w+E})}),O.length===0?null:O}}const f=q$e(r,e,n),h=[];return f.forEach((m,y)=>{m.zIndex!==y&&h.push({element:m.element,zIndex:y})}),h.length===0?null:h}function q$e(t,e,n){const r=QF(t),i=r.find(f=>f.element===n),s=r.filter(f=>f.element!==n);if(!i)return s;const a=e.findIndex(f=>f.element===n),o=e[a-1],l=e[a+1],c=o?s.findIndex(f=>f.element===o.element):-1,u=l?s.findIndex(f=>f.element===l.element):-1;return c>=0?s.splice(c+1,0,i):u>=0?s.splice(u,0,i):s.unshift(i),s}function Ade(t,e,n){const{entries:r}=bde(t);if(r.length<2)return null;const s=e==="bring-to-front"||e==="send-to-back"?r:U$e(t,r,Q$e);if(s.length<2)return null;const a=QF(s),o=a.findIndex(l=>l.element===t);return o===-1?null:{entries:r,order:a,pos:o}}function Sde(t,e,n){const r=Ade(t,e);if(!r)return null;const{entries:i,order:s,pos:a}=r,o=[...s],[l]=o.splice(a,1);switch(e){case"bring-forward":if(a>=s.length-1)return null;o.splice(a+1,0,l);break;case"send-backward":if(a<=0)return null;o.splice(a-1,0,l);break;case"bring-to-front":if(a>=s.length-1)return null;o.push(l);break;case"send-to-back":if(a<=0)return null;o.unshift(l);break}return vde(s,o,t,i)}function Y$e(t,e){const{entries:n}=bde(t);if(n.length<2)return null;const r=new Map(n.map(a=>[a.element,a])),i=[];for(const a of e){const o=r.get(a);if(!o)return null;i.push(o)}if(i.length<2||!i.some(a=>a.element===t))return null;const s=QF(i);return s.every((a,o)=>a.element===i[o].element)?null:vde(s,i,t,n)}function K$e(t,e,n){if(e!=="bring-forward"&&e!=="send-backward")return null;const r=Ade(t,e);if(!r)return null;const{order:i,pos:s}=r,a=e==="bring-forward"?i[s+1]:i[s-1];return(a==null?void 0:a.element)??null}function J$e(t,e,n){return Sde(t,e)!==null}function eBe({expandedElementsRef:t}){const e=IS(),n=HF(),r=(e==null?void 0:e.previewIframeRef)??null,i=e==null?void 0:e.handleDomZIndexReorderCommit,s=(n==null?void 0:n.activeCompPath)??null,a=x.useCallback(u=>{var h;const f=((h=r==null?void 0:r.current)==null?void 0:h.contentDocument)??null;return f?cs(f,{hfId:u.hfId,id:u.domId??u.id,selector:u.selector,selectorIndex:u.selectorIndex,sourceFile:u.sourceFile??s??"index.html"},s):null},[r,s]),o=x.useCallback(u=>{const f=a(u);return f?y3(f):Number.NaN},[a]),l=x.useCallback((u,f)=>{if(!i)return Promise.resolve();const h=u.flatMap(m=>{const y=t.current.find(v=>(v.key??v.id)===m.key),p=y&&a(y);return!y||!p?[]:[{element:p,zIndex:m.zIndex,id:y.domId??y.id,selector:y.selector,selectorIndex:y.selectorIndex,sourceFile:y.sourceFile??s??"index.html",key:m.key}]});return h.length?i(h,f).then(()=>{}):Promise.resolve()},[i,a,s,t]);return{readClipZIndex:o,applyStackingPatches:l,zSyncEnabled:!!(i&&r)}}function tBe({viewportWidth:t,effectiveDuration:e,zoomMode:n,manualZoomPercent:r,ppsRef:i,fitPpsRef:s,draggedClip:a,resizingClip:o,expandedElements:l,isDragging:c,scrollRef:u,lastScrollLeftRef:f,contentOrigin:h}){const m=n5e(t,e,h),y=cCe(m,n,r);i.current=y;const p=Math.max(0,e*y),v=a!=null&&a.started?(a.previewStart+a.element.duration)*y+nU:0,b=o!=null&&o.started?(o.previewStart+o.previewDuration)*y+nU:0,w=r5e({trackContentWidth:p,viewportWidth:t,contentOrigin:h,pps:y,dragGhostEndPx:v,resizeGhostEndPx:b}),O=y>0?w/y:e,C=x.useRef(n);C.current=n;const E=x.useRef(r);return E.current=r,s.current=m,x.useEffect(()=>{if(n!=="manual"||c.current)return;const M=u.current,N=f.current;if(!M||N<=0)return;const _=requestAnimationFrame(()=>{const I=Math.max(0,M.scrollWidth-M.clientWidth),j=Math.min(N,I);Math.abs(M.scrollLeft-j)>.5&&(M.scrollLeft=j)});return()=>cancelAnimationFrame(_)},[l,n]),x.useEffect(()=>{ce.getState().setTimelineScale(y,m)},[y,m]),{pps:y,fitPps:m,displayContentWidth:w,displayDuration:O,clipStateVersion:l,zoomModeRef:C,manualZoomPercentRef:E}}function nBe(t,e){for(const r of e)t.has(r)||e.delete(r);const n=[];for(const[r,i]of t)e.has(r)||i.some(nue)&&n.push(r);return n}function rBe(t){var i;const e=ce(s=>s.expandClips),n=((i=HF())==null?void 0:i.projectId)??null,r=x.useRef({projectId:n,source:t,clips:new Set});x.useEffect(()=>{if(r.current.projectId!==n){const a=r.current.source!==t;if(r.current={projectId:n,source:t,clips:new Set},!a)return}else r.current.source=t;const s=nBe(t,r.current.clips);if(s.length!==0){for(const a of s)r.current.clips.add(a);e(s)}},[t,e,n])}const iBe=!0,sBe=Object.freeze({scrollLeft:0,scrollTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,isScrolling:!1});function aBe(t,e){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,isScrolling:e}}function oBe(t,e){const[n,r]=x.useState(sBe),[i,s]=x.useState(!0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(0),c=x.useRef(null),u=x.useRef(!1),f=x.useCallback((p,v=!1)=>{u.current=v;const b=()=>{l.current=0,r(aBe(p,u.current))};if(v)l.current||(l.current=requestAnimationFrame(b));else{l.current&&cancelAnimationFrame(l.current),b();return}c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,u.current=!1,l.current&&cancelAnimationFrame(l.current),b()},100)},[]),h=x.useCallback(()=>{const p=t.current;s(p?o5e(p.scrollHeight,p.clientHeight):!0)},[t]),m=x.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{o.current=0,h()})},[h]),y=x.useCallback(p=>{if(a.current&&(a.current.disconnect(),a.current=null),t.current=p,!p){c.current&&clearTimeout(c.current),c.current=null,u.current=!1;return}const v=()=>{f(p,u.current),m()};v(),a.current=new ResizeObserver(v),a.current.observe(p)},[t,m,f]);return kr(()=>()=>{var p;(p=a.current)==null||p.disconnect(),o.current&&cancelAnimationFrame(o.current),l.current&&cancelAnimationFrame(l.current),c.current&&clearTimeout(c.current)}),x.useEffect(()=>{h()},[h,...e]),{viewport:n,showShortcutHint:i,setScrollRef:y,syncScrollViewport:f}}function lBe(t){const e=wS(),{onMoveElement:n,onMoveElements:r,onResizeElement:i,onResizeElements:s,onBlockedEditAttempt:a,onSplitElement:o}=t;return x.useMemo(()=>({...e,onMoveElement:n??e.onMoveElement,onMoveElements:r??e.onMoveElements,onResizeElement:i??e.onResizeElement,onResizeElements:s??e.onResizeElements,onBlockedEditAttempt:a??e.onBlockedEditAttempt,onSplitElement:o??e.onSplitElement}),[e,n,r,i,s,a,o])}const x3=.001,Xg=t=>t.key??t.id;function CA(t){return Math.max(0,...t.map(e=>e.expandedParentStart??0))}const wde=t=>Math.round(t*1e3)/1e3,kk=t=>t.start+t.duration;function b3(t){return[...t].sort((e,n)=>e.start-n.start||Xg(e).localeCompare(Xg(n)))}function K_(t,e,n=x3,r=0){const i=b3(t);if(i.some(c=>e>=c.start-n&&e<kk(c)-n))return null;const a=i.filter(c=>c.start>e-n);if(a.length===0)return null;const o=a[0].start,l=Math.max(r,...i.filter(c=>c.start<=e-n).map(c=>kk(c)));return o-l<=n?null:{gapStart:l,gapEnd:o,followingKeys:a.map(Xg)}}function Ode(t,e=x3,n=0){const r=[];let i=n;for(const s of b3(t))s.start-i>e&&r.push({start:i,end:s.start}),i=Math.max(i,kk(s));return r}function kde(t,e=x3,n=0){const r=[];let i=n;for(const s of b3(t)){const a=wde(i);Math.abs(a-s.start)>e&&r.push({key:Xg(s),newStart:a}),i+=s.duration}return r}function cBe(t,e,n=x3,r=0){const i=Ode(t,n,r),s=Math.max(r,...t.map(kk));return e-s>n&&i.push({start:s,end:e}),i}function Cde(t,e){const n=e.gapEnd-e.gapStart,r=new Set(e.followingKeys);return b3(t).filter(i=>r.has(Xg(i))).map(i=>({key:Xg(i),newStart:Math.max(e.gapStart,wde(i.start-n))}))}const Ede=t=>t.key??t.id;let uBe=0;function J_(t,e){const n=new Map(t.map(r=>[Ede(r),r]));return e.every(r=>{const i=n.get(r.key);return i!=null&&vS(i).canMove})}function fBe(t,e){if(e.length===0||!J_(t,e))return null;const n=new Map(t.map(r=>[Ede(r),r]));return e.map(r=>{const i=n.get(r.key);return{element:i,updates:{start:r.newStart,track:i.track}}})}function Tde(t,e,n){const r=fBe(t,e);return r?(wd(r,n,`track-gap-close:${uBe++}`),!0):!1}function hBe(t,e,n){const r=K_(t,e,void 0,CA(t));return r?Tde(t,Cde(t,r),n):!1}function dBe(t,e){return Tde(t,kde(t,void 0,CA(t)),e)}function pBe({tracks:t,expandedElementsRef:e,trackOrderRef:n,onMoveElement:r,onMoveElements:i}){const s=ce(w=>w.updateElement),a=ce(w=>w.timelineSessionEpoch),[o,l]=x.useState(null),[c,u]=x.useState(null),f=x.useMemo(()=>{var w;return(o==null?void 0:o.sessionEpoch)===a?((w=t.find(([O])=>O===o.track))==null?void 0:w[1])??[]:null},[o,a,t]),h=x.useMemo(()=>{if(!o||!f)return null;const w=CA(f),O=K_(f,o.time,void 0,w),C=kde(f,void 0,w);return{x:o.x,y:o.y,gapWidth:O?O.gapEnd-O.gapStart:null,canCloseGap:O!=null&&J_(f,Cde(f,O)),hasAnyGaps:C.length>0,canCloseAllGaps:C.length>0&&J_(f,C)}},[o,f]),m=x.useMemo(()=>{if(!o||!f||!c)return null;const w=CA(f);if(c==="close-gap"){const C=K_(f,o.time,void 0,w);return C?{track:o.track,intervals:[{start:C.gapStart,end:C.gapEnd}]}:null}const O=Ode(f,void 0,w);return O.length>0?{track:o.track,intervals:O}:null},[o,f,c]),y=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ce.getState().timelineSessionEpoch||hBe(f,o.time,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),p=x.useCallback(()=>{!o||!f||o.sessionEpoch!==ce.getState().timelineSessionEpoch||dBe(f,{elements:e.current,trackOrder:n.current,updateElement:s,onMoveElement:r,onMoveElements:i})},[o,f,e,n,s,r,i]),v=x.useCallback(w=>{u(null),l({...w,sessionEpoch:ce.getState().timelineSessionEpoch})},[]),b=x.useCallback(()=>{u(null),l(null)},[]);return x.useEffect(()=>{o&&o.sessionEpoch!==a&&b()},[b,o,a]),{gapMenuModel:h,gapHighlight:m,setHoveredGapAction:u,openGapMenu:v,dismissGapMenu:b,closeTrackGap:y,closeAllTrackGaps:p}}function mBe(t,e){return e.size===0||e.size===1&&e.has(t)}function gBe(t){var c;const{selectedElementId:e,selectedElementIds:n,expandedElements:r,tracks:i,gapHighlight:s}=t;if(!e||!mBe(e,n))return null;const a=r.find(u=>(u.key??u.id)===e);if(!a||a.track===(s==null?void 0:s.track))return null;const o=((c=i.find(([u])=>u===a.track))==null?void 0:c[1])??[],l=cBe(o,t.displayDuration,void 0,CA(o));return l.length>0?{track:a.track,intervals:l,kind:"selected"}:null}function yBe(t){if(t.dragActive)return[];const e=[];t.gapHighlight&&t.gapHighlight.intervals.length>0&&e.push({...t.gapHighlight,kind:"hover"});const n=gBe(t);return n&&e.push(n),e}function xBe(t){const{gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}=t;return x.useMemo(()=>yBe({gapHighlight:e,tracks:n,selectedElementId:r,selectedElementIds:i,expandedElements:s,dragActive:a,displayDuration:o}),[e,n,r,i,s,a,o])}function bBe({active:t,scrollRef:e,contentOrigin:n,pixelsPerSecond:r,onSplitAll:i}){const[s,a]=x.useState(null),o=x.useCallback(u=>{const f=e.current;if(!t||!f)return;const h=f.getBoundingClientRect();a(u.clientX-h.left+f.scrollLeft)},[t,e]),l=x.useCallback(()=>a(null),[]),c=x.useCallback(u=>{const f=e.current;if(!t||!u.shiftKey||u.button!==0||!f)return!1;const h=f.getBoundingClientRect(),m=FE({clientX:u.clientX,rectLeft:h.left,scrollLeft:f.scrollLeft,contentOrigin:n});return i==null||i(Math.max(0,m/r)),!0},[t,n,i,r,e]);return{razorGuideX:s,updateRazorGuide:o,clearRazorGuide:l,splitAllAtPointer:c}}function vBe({x:t}){return d.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none z-10",style:{left:t,width:1,background:"rgba(239,68,68,0.7)"}})}const ABe=400,SBe=6e4;function NW(t,e){if(t.length===0)return;const n=[...t].sort((i,s)=>i-s),r=Math.min(n.length-1,Math.ceil(n.length*e)-1);return Number(n[Math.max(0,r)].toFixed(2))}function wBe(t,e,n,r){const i=NW(n,.95);if(i===void 0)return null;const s=NW(r,.95);return{total_clip_count:e.totalClipCount,mounted_clip_count:t.querySelectorAll('[data-clip="true"]').length,total_row_count:e.totalRowCount,timeline_dom_node_count:t.querySelectorAll("*").length,viewport_width:t.clientWidth,viewport_height:t.clientHeight,zoom_mode:e.zoomMode,scroll_sample_count:n.length,scroll_frame_latency_p95_ms:i,scroll_frame_latency_max_ms:Number(Math.max(...n).toFixed(2)),...s===void 0?{}:{frame_interval_p95_ms:s}}}function DW(t){t.previousFrameAt=null,t.frameLatencies=[],t.frameIntervals=[]}function OBe(t){const e=x.useRef({frameRequest:0,idleTimer:null,pendingScrollStartedAt:0,previousFrameAt:null,frameLatencies:[],frameIntervals:[],lastEmittedAt:Number.NEGATIVE_INFINITY}),n=r=>{const i=e.current,s=performance.now();i.frameRequest===0&&(i.pendingScrollStartedAt=s,i.frameRequest=requestAnimationFrame(a=>{i.frameRequest=0,i.frameLatencies.push(performance.now()-i.pendingScrollStartedAt),i.previousFrameAt!==null&&i.frameIntervals.push(a-i.previousFrameAt),i.previousFrameAt=a})),i.idleTimer!==null&&clearTimeout(i.idleTimer),i.idleTimer=setTimeout(()=>{if(i.idleTimer=null,i.frameRequest!==0){cancelAnimationFrame(i.frameRequest),i.frameRequest=0,DW(i);return}const a=performance.now();if(a-i.lastEmittedAt>=SBe){const o=wBe(r,t,i.frameLatencies,i.frameIntervals);o&&(V8e(o),i.lastEmittedAt=a)}DW(i)},ABe)};return kr(()=>()=>{const r=e.current;r.frameRequest!==0&&cancelAnimationFrame(r.frameRequest),r.idleTimer!==null&&clearTimeout(r.idleTimer)}),{recordTimelineScroll:n}}function kBe(t){return Array.from(t.values()).some(e=>e.some(nue))}function CBe(t,e){return kBe(t)||e.some(n=>!!n.audioGroup)}function Pde(t,e){const n=Number.isFinite(t)?t:0;if(e.length===0)return n;const r=Math.max(n,...e.map(i=>i.start+i.duration));return Number.isFinite(r)?r:n}function EBe(t,e){var i;const n=Zn(t),r=(i=e==null?void 0:e.groupPreview)==null?void 0:i.find(s=>s.key===n);return r?{...t,...r}:e&&Zn(e.element)===n?{...t,start:e.previewStart,duration:e.previewDuration,playbackStart:e.previewPlaybackStart}:t}function TBe(t,e,n,r){const i=x.useMemo(()=>t.find(o=>Zn(o)===e)??null,[t,e]),s=x.useRef(i);s.current=i;const a=x.useRef(s.current);x.useEffect(()=>{const o=a.current,l=s.current;a.current=l,o&&!l&&(n(!1),r())})}function PBe(){const[t,e]=x.useState(!1);return kr(()=>{const n=i=>i.key==="Shift"&&e(i.type==="keydown"),r=()=>e(!1);return window.addEventListener("keydown",n),window.addEventListener("keyup",n),window.addEventListener("blur",r),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",n),window.removeEventListener("blur",r)}}),t}function MBe(t,e,n,r){const i=n==="frame"?Wd:void 0;return{...x.useMemo(()=>dTe(t,e,i,r),[t,i,e,r]),majorTickInterval:yoe(t,e,i)}}const RM=1024*1024,NBe=1440*60*1e3,il=Object.freeze({directScrollSafetyPx:8e6,rowOverscanPerSide:2,timeOverscanViewportRatio:.25,maxMountedRows:64,maxMountedClipRoots:512,maxMountedClipRootsPerRow:128,maxMountedTimelineDescendants:5e3,posterMaxPhysicalWidth:240,posterMaxPhysicalHeight:135,posterDprCap:1.5,richPreviewFrameCount:6,concurrentVideoDecodes:2,concurrentMetadataJobs:4,concurrentCompositionFetches:2,concurrentServerPages:1,thumbnailLoadTimeoutMs:3e4,thumbnailCacheBytes:64*RM,thumbnailCacheEntries:256,thumbnailCacheEntriesPerProject:96,metadataRegistryEntries:512,metadataFailureTtlMs:3e4,waveformCacheBytes:16*RM,waveformCacheEntries:256,compositionDiskCacheBytes:512*RM,compositionDiskCacheMaxAgeMs:14*NBe,interactionP95Ms:50,frameIntervalP95Ms:33.3,constrainedInteractionP95Ms:75,constrainedFrameIntervalP95Ms:75,longTaskLimitMs:50,constrainedLongTaskLimitMs:300,memoryReturnToleranceRatio:.15,posterColdP95Ms:750,posterCachedP95Ms:250,constrainedPosterColdP95Ms:1200,constrainedPosterCachedP95Ms:400,posterCoverageRatio:.9,posterCoverageSettleMs:1500,constrainedPosterCoverageSettleMs:2500,richPreviewP95Ms:750,constrainedRichPreviewP95Ms:1200,supportedFixtureFallbackRatio:.02,scrollSamplesPerRun:21,warmupRuns:3,measuredRuns:5,requiredPassingRuns:4});function DBe(t,e,n,r){if(!(e>0)||!(r>0)||!(t.clientWidth>0))return{start:0,end:0};const i=t.clientWidth*il.timeOverscanViewportRatio,s=t.scrollLeft-n-i,a=t.scrollLeft+t.clientWidth-n+i;return{start:Math.min(r,Math.max(0,s/e)),end:Math.min(r,Math.max(0,a/e))}}function IBe(t,e,n,r){if(!(e>0)||!(r>0))return{start:0,end:0};const i=Math.max(0,(t.scrollLeft-n)/e),s=Math.min(r,Math.max(i,(t.scrollLeft+t.clientWidth-n)/e));return{start:Math.min(i,r),end:s}}function _Be(t,e,n){const r=t.getRowPositionFromY(n+La);if(r.row<0||r.row>=t.rowKeys.length)return n;const i=t.rowKeys[r.row];if(i===void 0)return n;const s=e.getRowIndex(i);return s<0?n:Math.max(0,n+e.getRowTop(s)-t.getRowTop(r.row))}function RBe({tracks:t,viewport:e,pixelsPerSecond:n,contentOrigin:r,duration:i,selectedElementId:s,draggedElementId:a,resizingElementIds:o,focusedElementId:l,focusedEaseElementId:c,clipContextMenuElementId:u,keyframeContextMenuElementId:f}){const h=x.useMemo(()=>N5e(t),[t]),m=x.useMemo(()=>DBe(e,n,r,i),[r,i,n,e]),y=x.useMemo(()=>IBe(e,n,r,i),[r,i,n,e]),p=x.useMemo(()=>new Set([s,a,...o??[],l,c,u,f].filter(v=>v!==void 0)),[u,a,c,l,f,o,s]);return{clipIndex:h,renderTimeRange:m,visibleTimeRange:y,pinnedClipIdentities:p}}function jBe(){var e;const t=(e=B$e())==null?void 0:e.setRefreshKey;return x.useCallback(()=>t==null?void 0:t(n=>n+1),[t])}const g8=12;function IW(t,e,n,r,i){const s=t+n+g8,a=t+e-g8,o=a-s;return o<=0||r>=s&&i<=a?null:i-r>o||r<s?Math.max(0,r-n-g8):Math.max(0,i-e+g8)}function LBe(t){return{left:t.allowHorizontal?IW(t.scrollLeft,t.viewportWidth,t.stickyLeft,t.clipLeft,t.clipRight):null,top:IW(t.scrollTop,t.viewportHeight,t.stickyTop,t.clipTop,t.clipBottom)}}function _W(t,e,n){return t!==null&&t.projectId===e&&t.sessionEpoch===n}function FBe(t,e){const n=t.querySelector(`[data-timeline-focus-id=${CSS.escape(e)}]`);return n?n.ownerDocument.activeElement===n?!0:(n.setAttribute("data-reveal-highlight","true"),n.focus({preventScroll:!0}),n.ownerDocument.activeElement!==n?(n.removeAttribute("data-reveal-highlight"),!1):(n.addEventListener("blur",()=>n.removeAttribute("data-reveal-highlight"),{once:!0}),!0)):!1}function $Be(t,e,n,r,i,s,a){const o=r.getRowIndex(e.row.physicalTrackKey);if(o<0)return!1;const l=e.target.kind==="row"?e.row.elementId:e.target.elementId,c=l?n.find(p=>(p.key??p.id)===l):void 0,u=e.target.kind==="row"?null:e.target.time,f=c&&e.target.kind==="clip"?c.start:u,h=c&&e.target.kind==="clip"?c.start+c.duration:u,m=r.getRowTop(o),y=LBe({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,viewportWidth:t.clientWidth,viewportHeight:t.clientHeight,clipLeft:s+(f??0)*i,clipRight:s+(h??0)*i,clipTop:m+da,clipBottom:m+r.getRowHeight(o)-da,stickyLeft:s,stickyTop:La,allowHorizontal:a&&f!==null});return y.left!==null&&(t.scrollLeft=y.left),y.top!==null&&(t.scrollTop=y.top),y.left!==null||y.top!==null}function BBe({scrollRef:t,logicalRows:e,elements:n,rowGeometry:r,pixelsPerSecond:i,contentOrigin:s,allowHorizontal:a,viewportVersion:o,projectId:l,sessionEpoch:c,syncScrollViewport:u}){const f=ce(b=>b.timelineFocus),h=x.useRef(e),m=x.useRef(null),y=x.useRef(null),p=x.useMemo(()=>{var b;if(_W(f,l,c)){((b=m.current)==null?void 0:b.nonce)!==f.nonce&&(m.current={nonce:f.nonce,id:f.id});const w=m.current.id;let O=Nl(e,w);if(!O){const C=QFe(h.current,e,w);C&&(m.current={nonce:f.nonce,id:C.id},O=Nl(e,C.id))}return O?{target:O.target,row:O.row}:null}return m.current=null,null},[e,l,f,c]);x.useLayoutEffect(()=>{h.current=e},[e]),x.useEffect(()=>{var w;if(!_W(f,l,c))return;if(!p){ce.getState().clearTimelineFocus(f.nonce);return}if(p.target.id!==f.id){ce.getState().requestTimelineFocus(p.target.id);return}if(((w=y.current)==null?void 0:w.nonce)===f.nonce&&y.current.id===p.target.id)return;const b=t.current;b&&($Be(b,p,n,r,i,s,a)&&u(b),FBe(b,p.target.id)&&(y.current={nonce:f.nonce,id:p.target.id}))},[a,s,n,i,l,f,p,r,t,c,u,o]);const v=p?p.target.kind==="row"?p.row.elementId??void 0:p.target.elementId:void 0;return{focusedTargetId:(p==null?void 0:p.target.id)??null,focusedRowKey:p==null?void 0:p.row.physicalTrackKey,pinnedElementId:v}}function VBe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,collapsedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}){return x.useMemo(()=>BFe({tracks:t,displayTrackOrder:e,laneCounts:n,selectedElementId:r,selectedElementIds:i,expandedClipIds:s,collapsedGroupIds:a,expandedLaneOwnerIds:o,groups:l,trackGroupOf:c,gsapAnimations:u}),[e,s,a,o,l,c,u,n,r,i,t])}function RW(t,e){if(!e)return null;const n=O0(t).byKey.get(e);return n?{elementId:e,rowKey:n.track}:null}function HBe(t,e,n){const r=new Array(t);return new Proxy(r,{get(i,s,a){if(typeof s=="string"){const o=s.charCodeAt(0);if(o>=48&&o<=57){const l=+s;if(Number.isInteger(l)&&l>=0&&l<t){let c=i[l];if(!c){const u=e[l*2];c=i[l]={index:l,key:n(l),start:u,size:e[l*2+1],end:u+e[l*2+1],lane:0}}return c}}if(s==="length")return t}return Reflect.get(i,s,a)}})}function i1(t,e,n){let r=n.initialDeps??[],i,s=!0;function a(){const o=t();return(o.length!==r.length||o.some((c,u)=>r[u]!==c))&&(r=o,i=e(...o),n!=null&&n.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1),i}return a.updateDeps=o=>{r=o},a}function jW(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const QBe=(t,e)=>Math.abs(t-e)<1.01,zBe=(t,e,n)=>{let r;return function(...i){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,i),n)}};let ub;const jM=()=>{if(ub!==void 0)return ub;if(typeof navigator>"u")return ub=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return ub=!0;const t=navigator.maxTouchPoints;return ub=navigator.platform==="MacIntel"&&t!==void 0&&t>0},LW=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},ZBe=t=>t,Mde=t=>{const e=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1)-e+1,i=new Array(r);for(let s=0;s<r;s++)i[s]=e+s;return i},GBe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const i=a=>{const{width:o,height:l}=a;e({width:Math.round(o),height:Math.round(l)})};if(i(LW(n)),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(LW(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},Ck={passive:!0},UBe=typeof window>"u"?!0:"onscrollend"in window,XBe=(t,e,n)=>{const r=t.scrollElement;if(!r)return;const i=t.targetWindow;if(!i)return;const s=t.options.useScrollendEvent&&UBe;let a=0;const o=s?null:zBe(i,()=>e(a,!1),t.options.isScrollingResetDelay),l=f=>()=>{a=n(r),o==null||o(),e(a,f)},c=l(!0),u=l(!1);return r.addEventListener("scroll",c,Ck),s&&r.addEventListener("scrollend",u,Ck),()=>{r.removeEventListener("scroll",c),s&&r.removeEventListener("scrollend",u)}},WBe=(t,e)=>XBe(t,e,n=>{const{horizontal:r,isRtl:i}=t.options;return r?n.scrollLeft*(i&&-1||1):n.scrollTop}),qBe=(t,e,n)=>{if(n.options.useCachedMeasurements){const r=n.indexFromElement(t),i=n.options.getItemKey(r);return n.itemSizeCache.get(i)??n.options.estimateSize(r)}if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}if(!e){const r=n.indexFromElement(t),i=n.options.getItemKey(r),s=n.itemSizeCache.get(i);if(s!==void 0)return s}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},YBe=(t,{adjustments:e=0,behavior:n},r)=>{var i,s;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:t+e,behavior:n})},KBe=YBe;class JBe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,r,i;return((i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const a=()=>{const o=s.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[c,u]of this.elementsCache)if(u===o){this.elementsCache.delete(c);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,s,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{var r,i;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ZBe,rangeExtractor:Mde,onChange:()=>{},measureElement:qBe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in n){const m=n[h];m!==void 0&&(s[h]=m)}const a=this.options;let o=null,l=null,c=!1;if(a!==void 0&&a.enabled&&s.enabled&&s.anchorTo==="end"&&this.scrollElement!==null){const h=a.count,m=s.count,y=this.getMeasurements(),p=h>0?((r=y[0])==null?void 0:r.key)??a.getItemKey(0):null,v=h>0?((i=y[h-1])==null?void 0:i.key)??a.getItemKey(h-1):null;if(m!==h||h>0&&m>0&&(s.getItemKey(0)!==p||s.getItemKey(m-1)!==v)){c=!0;const O=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??y[0]:null;O&&(o=[O.key,this.getScrollOffset()-O.start]);const C=s.followOnAppend===!0?"auto":s.followOnAppend||null;C&&m>h&&this.isAtEnd(a.scrollEndThreshold)&&(h===0||s.getItemKey(m-1)!==v)&&(l=C)}}this.options=s,c&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,f=0;if(o&&this.scrollOffset!==null){const[h,m]=o,y=this.getMeasurements(),{count:p,getItemKey:v}=this.options;let b=0;for(;b<p&&v(b)!==h;)b++;if(b<p){const w=y[b];if(w){const O=w.start+m;O!==this.scrollOffset&&(f=O-this.scrollOffset,this.scrollOffset=O,u=!0)}}}(u||l)&&(this.pendingScrollAnchor=[u?o[0]:null,u?o[1]:0,l,f])},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=i1(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{if(a&&this._intendedScrollOffset===null&&s===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(s-this._intendedScrollOffset)<1.5&&(s=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===s?this.scrollDirection:o<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const s=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!jM()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};s.addEventListener("touchstart",a,Ck),s.addEventListener("touchend",o,Ck),this.unsubs.push(()=>{s.removeEventListener("touchstart",a),s.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[s,a,o,l]=i;s!==null&&!o&&(jM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),r=this.getMaxScrollOffset();if(n<0||n>r)return;const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=i1(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,r,i,s,a,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c}),{key:!1}),this.getMeasurements=i1(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:a,lanes:o,laneAssignmentMode:l,gap:c},u)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),o===1){const b=n*2;let w=this._flatMeasurements;if(!w||w.length<b){const E=new Float64Array(b);w&&h>0&&E.set(w.subarray(0,h*2)),w=E,this._flatMeasurements=w}let O;if(h===0)O=r+i;else{const E=h-1;O=w[E*2]+w[E*2+1]+c}for(let E=h;E<n;E++){const M=s(E),N=f.get(M),_=typeof N=="number"?N:this.options.estimateSize(E);w[E*2]=O,w[E*2+1]=_,O+=_+c}const C=HBe(n,w,s);return this.measurementsCache=C,C}const m=this.measurementsCache.slice(0,h),y=new Array(o).fill(void 0),p=new Float64Array(o);let v=0;for(let b=0;b<h;b++){const w=m[b];w&&(y[w.lane]===void 0&&v++,y[w.lane]=b,p[w.lane]=w.end)}for(let b=h;b<n;b++){const w=s(b),O=this.laneAssignments.get(b);let C,E;const M=l==="estimate"||f.has(w);if(O!==void 0&&this.options.lanes>1){C=O;const j=y[C],L=j!==void 0?m[j]:void 0;E=L?L.end+c:r+i}else if(v===o){let j=0,L=p[0],H=y[0];for(let $=1;$<o;$++){const G=p[$];(G<L||G===L&&y[$]<H)&&(j=$,L=G,H=y[$])}C=j,E=L+c,M&&this.laneAssignments.set(b,C)}else C=b%this.options.lanes,E=r+i,M&&this.laneAssignments.set(b,C);const N=f.get(w),_=typeof N=="number"?N:this.options.estimateSize(b),I=E+_;m[b]={index:b,start:E,size:_,end:I,key:w,lane:C},y[C]===void 0&&v++,y[C]=b,p[C]=I}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i1(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,i,s)=>n.length===0||r===0?(this.range=null,null):(this.range=tVe(n,r,i,s,s===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i1(()=>{let n=null,r=null;const i=this.calculateRange();return i&&(n=i.startIndex,r=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,i,s,a)=>s===null||a===null?[]:n({startIndex:s,endIndex:a,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,i=n.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(i!==void 0&&this.range){const s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-s),o=Math.min(this.options.count-1,i+s);return n>=a&&n<=o}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(n),i=this.options.getItemKey(r),s=this.elementsCache.get(i);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(i,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var i,s;if(n<0||n>=this.options.count)return;let a,o,l;const c=this._flatMeasurements;if(this.options.lanes===1&&c!==null)l=this.options.getItemKey(n),o=c[n*2],a=c[n*2+1];else{const h=this.measurementsCache[n];if(!h)return;l=h.key,o=h.start,a=h.size}const u=this.itemSizeCache.get(l)??a,f=r-u;if(f!==0){const h=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=h?this.getTotalSize():0,y=((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:l,start:o,size:a,end:o+a,lane:0},f,this):o<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(l)||this.scrollDirection!=="backward"));(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(l,r),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-m):y&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=i1(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const i=[];for(let s=0,a=n.length;s<a;s++){const o=n[s],l=r[o];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length===0)return;const i=this._flatMeasurements,s=this.options.lanes===1&&i!=null,a=Nde(0,r.length-1,s?o=>i[o*2]:o=>jW(r[o]).start,n);return jW(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,r,i=0)=>{if(!this.scrollElement)return 0;const s=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=n>=a+s?"end":"start"),r==="center"?n+=(i-s)/2:r==="end"&&(n-=s);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.getSize(),s=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(r==="auto")if(a.end>=s+i-this.options.scrollPaddingEnd)r="end";else if(a.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:i="auto"}={})=>{const s=this.getOffsetForAlignment(n,r),a=this.now();this.scrollState={index:null,align:r,behavior:i,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:i="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getOffsetForIndex(n,r);if(!s)return;const[a,o]=s,l=this.now();this.scrollState={index:n,align:o,behavior:i,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const i=this.getScrollOffset()+n,s=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:s,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let i;if(r.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const s=r.length-1,a=this._flatMeasurements;a!=null?i=a[s*2]+a[s*2+1]:i=((n=r[s])==null?void 0:n.end)??0}else{const s=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&s.some(o=>o===null);){const o=r[a];s[o.lane]===null&&(s[o.lane]=o.end),a--}i=Math.max(...s.filter(o=>o!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const r=this.getMeasurements();for(const i of r)i&&this.itemSizeCache.has(i.key)&&n.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return n},this._scrollToOffset=(n,{adjustments:r,behavior:i})=>{this._intendedScrollOffset=n+(r??0),this.options.scrollToFn(n,{behavior:i,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,n){e!==0&&(jM()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=r?r[0]:this.scrollState.lastTargetOffset,s=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&QBe(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=s){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(i-this.getScrollOffset()),c=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=i,c||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:c?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Nde=(t,e,n,r)=>{for(;t<=e;){const i=(t+e)/2|0,s=n(i);if(s<r)t=i+1;else if(s>r)e=i-1;else return i}return t>0?t-1:0};function eVe(t,e,n){let r=0;for(;r<=e;){const i=(r+e)/2|0,s=t[i*2];if(s<n)r=i+1;else if(s>n)e=i-1;else return i}return r>0?r-1:0}function tVe(t,e,n,r,i){const s=t.length-1;if(t.length<=r)return{startIndex:0,endIndex:s};if(r===1&&i!==null){const c=eVe(i,s,n);let u=c;const f=n+e;for(;u<s&&i[u*2]+i[u*2+1]<f;)u++;return{startIndex:c,endIndex:u}}let o=Nde(0,s,c=>t[c].start,n),l=o;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const c=Array(r).fill(0);for(;l<s&&c.some(f=>f<n+e);){const f=t[l];c[f.lane]=f.end,l++}const u=Array(r).fill(n+e);for(;o>=0&&u.some(f=>f>=n);){const f=t[o];u[f.lane]=f.start,o--}o=Math.max(0,o-o%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const LM=typeof document<"u"?x.useLayoutEffect:x.useEffect;function nVe({useFlushSync:t=!0,directDomUpdates:e=!1,directDomUpdatesMode:n="transform",...r}){const i=x.useReducer(c=>c+1,0)[1],s=x.useRef({enabled:e,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});s.current.enabled=e,s.current.mode=n;const a=c=>{const u=s.current;if(!u.enabled||!u.container)return;const f=c.getTotalSize();if(f!==u.lastSize){u.lastSize=f;const b=c.options.horizontal?"width":"height";u.container.style[b]=`${f}px`}const h=!!c.options.horizontal,m=u.mode==="transform",y=h?"left":"top",p=c.options.scrollMargin,v=c.getVirtualItems();for(const b of v){const w=b.start-p,O=c.elementsCache.get(b.key);O&&u.lastPositions.get(O)!==w&&(u.lastPositions.set(O,w),m?O.style.transform=h?`translate3d(${w}px, 0, 0)`:`translate3d(0, ${w}px, 0)`:O.style[y]=`${w}px`)}},o={...r,onChange:(c,u)=>{var f;const h=s.current;let m=!0;if(h.enabled){a(c);const y=c.range,p=h.prevRange;m=!p||p.isScrolling!==c.isScrolling||p.startIndex!==(y==null?void 0:y.startIndex)||p.endIndex!==(y==null?void 0:y.endIndex),m&&(h.prevRange=y?{startIndex:y.startIndex,endIndex:y.endIndex,isScrolling:c.isScrolling}:null)}m&&(t&&u?Zl.flushSync(i):i()),(f=r.onChange)==null||f.call(r,c,u)}},[l]=x.useState(()=>{const c=new JBe(o);return Object.assign(c,{containerRef:u=>{const f=s.current;if(f.container=u,f.lastSize=null,u&&f.enabled){const h=c.getTotalSize();f.lastSize=h;const m=c.options.horizontal?"width":"height";u.style[m]=`${h}px`}}})});return l.setOptions(o),LM(()=>l._didMount(),[]),LM(()=>l._willUpdate()),LM(()=>{a(l)}),l}function rVe(t){return nVe({observeElementRect:GBe,observeElementOffset:WBe,scrollToFn:KBe,...t})}function iVe(t,e){const n=new Set(Mde(t));for(const r of e)r>=0&&r<t.count&&n.add(r);return[...n].sort((r,i)=>r-i)}function sVe(t,e){const n=Math.min(t,il.rowOverscanPerSide*2+1),r=new Set(Array.from({length:n},(i,s)=>s));for(const i of e)i>=0&&i<t&&r.add(i);return[...r].sort((i,s)=>i-s)}function aVe({enabled:t,scrollRef:e,viewport:n,rowGeometry:r,sessionEpoch:i,pinnedRowKeys:s,focusedRowKey:a}){const o=n.clientWidth>0&&n.clientHeight>0,l=x.useMemo(()=>[...new Set([...s,...a===void 0?[]:[a]].map(b=>r.getRowIndex(b)))],[a,s,r]),c=x.useCallback(b=>r.getRowHeight(b),[r]),u=x.useCallback(b=>r.rowKeys[b]??b,[r]),f=x.useCallback(b=>iVe(b,l),[l]),h=x.useCallback(()=>n.scrollTop,[n.scrollTop]),m=rVe({enabled:o,useFlushSync:!1,count:r.rowKeys.length,getScrollElement:()=>e.current,estimateSize:c,getItemKey:u,overscan:il.rowOverscanPerSide,rangeExtractor:f,scrollMargin:La+u0,initialRect:{width:n.clientWidth,height:n.clientHeight},initialOffset:h});x.useEffect(()=>{var b;o&&(m.measure(),(b=e.current)==null||b.dispatchEvent(new Event("scroll")))},[t,e,i,o,m]);const y=a===void 0?-1:r.getRowIndex(a),p=y<0?0:r.getRowHeight(y);x.useEffect(()=>{o&&y>=0&&m.resizeItem(y,p)},[t,p,y,i,o,m]);const v=x.useMemo(()=>null,[t,r]);return v||(o?m.getVirtualItems().map(({index:b})=>({index:b,rowKey:r.rowKeys[b]??b})):sVe(r.rowKeys.length,l).map(b=>({index:b,rowKey:r.rowKeys[b]??b})))}function FW(t){var r;if(!(t instanceof Element))return;const e=(r=t.closest("[data-timeline-row-key]"))==null?void 0:r.dataset.timelineRowKey;if(e===void 0)return;const n=Number(e);return Number.isFinite(n)?n:void 0}function oVe({scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,elements:i,selectedElementId:s,focusedRowKey:a,draggedRowKey:o,resizingElementIds:l,clipContextMenuRowKey:c,keyframeContextMenuRowKey:u,lastScrollLeftRef:f,syncScrollViewport:h}){const m=iBe,[y,p]=x.useState(),v=x.useCallback(_=>{p(FW(_.target))},[]),b=x.useCallback(_=>{p(FW(_.relatedTarget))},[]),w=x.useMemo(()=>RW(i,s),[i,s]),O=x.useMemo(()=>(l==null?void 0:l.map(_=>{var I;return(I=RW(i,_))==null?void 0:I.rowKey}).filter(_=>_!==void 0))??[],[i,l]),C=x.useMemo(()=>[o,...O,w==null?void 0:w.rowKey,a,c,u].filter(_=>_!==void 0),[c,o,a,u,O,w]),E=aVe({enabled:m,scrollRef:t,viewport:e,rowGeometry:n,sessionEpoch:r,pinnedRowKeys:C,focusedRowKey:y??a}),M=x.useRef(n),N=x.useRef(r);return x.useLayoutEffect(()=>{const _=t.current,I=M.current;if(N.current!==r)N.current=r,f.current=0,_&&(_.scrollLeft=0,_.scrollTop=0,h(_));else if(_&&I!==n){const j=_Be(I,n,_.scrollTop);j!==_.scrollTop&&(_.scrollTop=j,h(_))}M.current=n},[f,n,t,r,h]),{enabled:m,virtualRows:E,timelineFocusProps:{onFocus:v,onBlur:b}}}function lVe(t){const e=ce(l=>l.expandedClipIds),n=ce(l=>l.collapsedGroupIds),r=ce(l=>l.expandedLaneOwnerIds),i=ce(l=>l.timelineProjectId),s=VBe({tracks:t.tracks,displayTrackOrder:t.layout.displayTrackOrder,laneCounts:t.laneCounts,selectedElementId:t.selectedElementId,selectedElementIds:t.selectedElementIds,expandedClipIds:e,collapsedGroupIds:n,expandedLaneOwnerIds:r,groups:t.groups,trackGroupOf:t.trackGroupOf,gsapAnimations:t.gsapAnimations}),a=BBe({scrollRef:t.scrollRef,logicalRows:s,elements:t.elements,rowGeometry:t.layout.rowGeometry,pixelsPerSecond:t.pixelsPerSecond,contentOrigin:t.contentOrigin,allowHorizontal:t.allowHorizontal,viewportVersion:t.viewport,projectId:i,sessionEpoch:t.sessionEpoch,syncScrollViewport:t.syncScrollViewport}),o=oVe({scrollRef:t.scrollRef,viewport:t.viewport,rowGeometry:t.layout.rowGeometry,sessionEpoch:t.sessionEpoch,elements:t.elements,selectedElementId:t.selectedElementId,focusedRowKey:a.focusedRowKey,draggedRowKey:t.draggedRowKey,resizingElementIds:t.resizingElementIds,clipContextMenuRowKey:t.clipContextMenuRowKey,keyframeContextMenuRowKey:t.keyframeContextMenuRowKey,lastScrollLeftRef:t.lastScrollLeftRef,syncScrollViewport:t.syncScrollViewport});return{logicalRows:s,...a,rowVirtualizationActive:o.enabled,virtualRows:o.virtualRows,timelineFocusProps:o.timelineFocusProps}}const cVe=x.memo(function({onSeek:e,onDrillDown:n,renderClipContent:r,renderClipOverlay:i,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l,onDeleteElement:c,onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:m,onBlockedEditAttempt:y,onSplitElement:p,onSelectElement:v,theme:b,sessionEpoch:w=0}={}){var gt;const{onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onBlockedEditAttempt:N,onSplitElement:_,onRazorSplitAll:I,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:H,onMoveKeyframe:$}=lBe({onMoveElement:u,onMoveElements:f,onResizeElement:h,onResizeElements:m,onBlockedEditAttempt:y,onSplitElement:p}),G=x.useMemo(()=>({...qj,...b}),[b]),q=jBe();fEe();const Y=ce(Gt=>Gt.elements),J=xS(),ie=uEe(),te=ce(Gt=>Gt.duration),ne=ce(Gt=>Gt.timeDisplayMode),W=ce(Gt=>Gt.timelineReady),F=ce(Gt=>Gt.selectedElementId),U=ce(Gt=>Gt.selectedElementIds),Q=ce(Gt=>Gt.focusedEaseSegment),K=ce(Gt=>Gt.gsapAnimations),ee=x.useMemo(()=>CBe(K,J),[K,J]),se=ee?Vo+sv:sv+q3e,z=ee?sv:0,V=ce(Gt=>Gt.setSelectedElementId),ae=ce(Gt=>Gt.currentTime),{zoomMode:he,manualZoomPercent:ge,setZoomMode:ye,setManualZoomPercent:fe}=foe(),me=x.useRef(null),Te=x.useRef(null),ve=x.useRef(null),xe=ce(Gt=>Gt.activeTool),[we,ke]=x.useState(null),Me=x.useRef(!1),Qe=PBe(),[qe,Ge]=x.useState(!1),[Ye,st]=x.useState(null),[nt,yt]=x.useState(null),dt=x.useCallback(Gt=>{Te.current=Gt},[]),zt=x.useRef(0),Kt=x.useMemo(()=>Pde(te,Y),[te,Y]),dn=ce(Gt=>Gt.keyframeCache);rBe(K);const{tracks:en,trackStyles:et,trackOrder:Ot,trackOrderRef:St,laneCounts:Je,rowGeometry:Be,rowGeometryRef:We,groups:Ke,trackGroupOf:Xt}=bje(J,K,F,U),Pe=x.useRef(J);Pe.current=J;const De=x.useRef(100),ze=x.useRef(Kt);ze.current=Kt;const at=x.useRef(100),{pinZoomBeforeEdit:Wt,setRangeSelectionRef:cn,pinnedOnMoveElement:Jt,pinnedOnMoveElements:Pn,pinnedOnResizeElement:Cr,pinnedOnResizeElements:mt,pinnedOnFileDrop:pn,pinnedOnAssetDrop:un,pinnedOnBlockDrop:Cn,pinnedOnCompositionDrop:Ln}=$$e({ppsRef:De,fitPpsRef:at,onMoveElement:O,onMoveElements:C,onResizeElement:E,onResizeElements:M,onFileDrop:s,onAssetDrop:a,onBlockDrop:o,onCompositionDrop:l}),{readClipZIndex:tt,applyStackingPatches:Yn,zSyncEnabled:Pt}=eBe({expandedElementsRef:Pe}),{gapMenuModel:mn,gapHighlight:Ht,setHoveredGapAction:gn,openGapMenu:tr,dismissGapMenu:_n,closeTrackGap:br,closeAllTrackGaps:nr}=pBe({tracks:en,expandedElementsRef:Pe,trackOrderRef:St,onMoveElement:Jt,onMoveElements:Pn}),{draggedClip:bt,setDraggedClip:or,resizingClip:wn,setResizingClip:Rn,blockedClipRef:wt,suppressClickRef:Zt}=T$e({scrollRef:ve,ppsRef:De,durationRef:ze,trackOrderRef:St,rowGeometryRef:We,onMoveElement:Jt,onMoveElements:Pn,onResizeElement:Cr,onResizeElements:mt,onBlockedEditAttempt:N,setShowPopover:Ge,setRangeSelectionRef:cn,readZIndex:Pt?tt:void 0,onStackingPatches:Pt?Yn:void 0,refreshAfterLaneMove:q,sessionEpoch:w}),Ct=oTe({scrollRef:ve,ppsRef:De,durationRef:ze,trackOrderRef:St,rowGeometryRef:We,contentOrigin:se,onFileDrop:pn,onAssetDrop:un,onBlockDrop:Cn,onCompositionDrop:Ln,sessionEpoch:w}),fr=Sje(bt,Ot,Be),Nt=((gt=wn==null?void 0:wn.groupPreview)==null?void 0:gt.map(Gt=>Gt.key))??(wn?[Zn(wn.element)]:void 0),{recordTimelineScroll:kt}=OBe({totalClipCount:J.length,totalRowCount:fr.displayTrackOrder.length,zoomMode:he}),{viewport:xn,showShortcutHint:Rt,setScrollRef:sn,syncScrollViewport:ds}=oBe(ve,[W,J.length,fr.totalH]),{pps:Fn,fitPps:ri,displayContentWidth:fn,displayDuration:En,zoomModeRef:rr,manualZoomPercentRef:Ti}=tBe({viewportWidth:xn.clientWidth,effectiveDuration:Kt,zoomMode:he,manualZoomPercent:ge,ppsRef:De,fitPpsRef:at,draggedClip:bt,resizingClip:wn,expandedElements:J,isDragging:Me,scrollRef:ve,lastScrollLeftRef:zt,contentOrigin:se}),Jr=lVe({scrollRef:ve,tracks:en,layout:fr,laneCounts:Je,selectedElementId:F,selectedElementIds:U,groups:Ke,trackGroupOf:Xt,gsapAnimations:K,elements:J,pixelsPerSecond:Fn,contentOrigin:se,allowHorizontal:he==="manual",viewport:xn,sessionEpoch:w,draggedRowKey:bt!=null&&bt.started?bt.previewTrack:void 0,resizingElementIds:Nt,clipContextMenuRowKey:nt==null?void 0:nt.element.track,keyframeContextMenuRowKey:Ye==null?void 0:Ye.element.track,lastScrollLeftRef:zt,syncScrollViewport:ds}),$i=ce(Gt=>Gt.selectedKeyframes),ps=ce(Gt=>Gt.toggleSelectedKeyframe),{onClickKeyframe:Dr,onSelectSegment:Za,onShiftClickKeyframe:bi,onContextMenuKeyframe:Oa}=MPe({expandedElements:J,keyframeCache:dn,onSelectElement:v,onSeek:e,setSelectedElementId:V,setKfContextMenu:st,toggleSelectedKeyframe:ps}),{clipIndex:ft,renderTimeRange:Ae,visibleTimeRange:_e,pinnedClipIdentities:lt}=RBe({tracks:en,viewport:xn,pixelsPerSecond:Fn,contentOrigin:se,duration:En,selectedElementId:F??void 0,draggedElementId:bt?Zn(bt.element):void 0,resizingElementIds:Nt,focusedElementId:Jr.pinnedElementId,focusedEaseElementId:Q==null?void 0:Q.elementId,clipContextMenuElementId:nt?Zn(nt.element):void 0,keyframeContextMenuElementId:Ye?Zn(Ye.element):void 0});NFe({scrollRef:ve,currentTime:ae,clipStateVersion:Ae,elementStateVersion:J});const At=xBe({gapHighlight:Ht,tracks:en,selectedElementId:F,selectedElementIds:U,expandedElements:J,dragActive:(bt==null?void 0:bt.started)===!0||wn!=null,displayDuration:En}),{seekFromX:tn,autoScrollDuringDrag:Mn,dragScrollRaf:Vr}=U5e({playheadRef:me,scrollRef:ve,ppsRef:De,durationRef:ze,isDragging:Me,currentTime:ae,zoomMode:he,zoomModeRef:rr,manualZoomPercentRef:Ti,fitPps:ri,fitPpsRef:at,effectiveDuration:Kt,pps:Fn,timelineReady:W,elementsLength:J.length,setZoomMode:ye,setManualZoomPercent:fe,onSeek:e,contentOrigin:se}),{razorGuideX:lr,updateRazorGuide:vi,clearRazorGuide:ms,splitAllAtPointer:ec}=bBe({active:xe==="razor",scrollRef:ve,contentOrigin:se,pixelsPerSecond:Fn,onSplitAll:I}),{rangeSelection:Hr,setRangeSelection:Ss,shiftClickClipRef:Zc,marqueeRect:Vu,isScrubbing:ka,handlePointerDown:Ca,handlePointerMove:Gc,handlePointerUp:Hu,handlePointerCancel:tc}=G5e({scrollRef:ve,ppsRef:De,effectiveDuration:Kt,pps:Fn,onSeek:e,seekFromX:tn,autoScrollDuringDrag:Mn,dragScrollRaf:Vr,isDragging:Me,setShowPopover:Ge,elementsRef:Pe,clipIndex:ft,rowGeometryRef:We,onSelectElement:v,contentOrigin:se,sessionEpoch:w});cn.current=Ss,TBe(J,F,Ge,()=>Ss(null));const{major:nc,minor:js,majorTickInterval:Qu}=MBe(En,Fn,ne,Jr.rowVirtualizationActive?Ae:void 0),hl=x.useCallback(Gt=>EBe(Gt,wn),[wn]);return!W||J.length===0?d.jsx(lTe,{isDragOver:Ct.isDragOver,onFileDrop:!!s,onDragOver:Ct.handleAssetDragOver,onDragLeave:Ct.handleAssetDragLeave,onDrop:Ct.handleAssetDrop}):d.jsxs("div",{ref:dt,"aria-label":"Timeline","data-timeline-element-count":J.length,className:`relative border-t select-none h-full overflow-hidden ${Ct.isDragOver?"ring-1 ring-inset ring-studio-accent/60":""} ${xe==="razor"||Qe?"cursor-crosshair":"cursor-default"}`,onMouseMove:vi,onMouseLeave:ms,style:{touchAction:"pan-x pan-y",background:G.shellBackground,borderColor:G.shellBorder},children:[d.jsxs("div",{ref:sn,"data-timeline-scroll-viewport":!0,"data-timeline-auto-scroll-left-inset":ee?Vo:0,tabIndex:-1,className:`${he==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full outline-none`,onScroll:Gt=>{zt.current=Gt.currentTarget.scrollLeft,kt(Gt.currentTarget),ds(Gt.currentTarget,!0)},...Jr.timelineFocusProps,onDragOver:Ct.handleAssetDragOver,onDragLeave:Ct.handleAssetDragLeave,onDrop:Ct.handleAssetDrop,onPointerDown:Gt=>{Gt.target instanceof Element&&Gt.target.closest("button, input, select, a")||ec(Gt)||Ca(Gt)},onPointerMove:Gc,onPointerUp:Hu,onPointerCancel:tc,onLostPointerCapture:tc,children:[d.jsx(u$e,{major:nc,minor:js,pps:Fn,contentOrigin:se,contentGutter:z,trackContentWidth:fn,totalH:fr.totalH,effectiveDuration:Kt,majorTickInterval:Qu,rangeSelection:Hr,marqueeRect:Vu,laneGapStrips:At,theme:G,displayTrackOrder:fr.displayTrackOrder,rowHeights:fr.displayRowHeights,rowGeometry:fr.rowGeometry,virtualRows:Jr.virtualRows,logicalRows:Jr.logicalRows,focusedTargetId:Jr.focusedTargetId,rowsVirtualized:Jr.rowVirtualizationActive,clipIndex:ft,renderTimeRange:Ae,visibleTimeRange:_e,pinnedClipIdentities:lt,trackOrder:Ot,tracks:en,trackStyles:et,groups:Ke,laneCounts:Je,selectedElementId:F,selectedElementIds:U,hoveredClip:we,draggedClip:bt,resizingClip:wn,isScrubbing:ka,blockedClipRef:wt,suppressClickRef:Zt,scrollRef:ve,renderClipContent:Jr.rowVirtualizationActive&&xn.isScrolling?void 0:r,renderClipOverlay:i,playheadRef:me,onDrillDown:n,onSelectElement:v,setHoveredClip:ke,setShowPopover:Ge,setRangeSelection:Ss,setResizingClip:Rn,setDraggedClip:or,setSelectedElementId:V,shiftClickClipRef:Zc,getPreviewElement:hl,getTrackStyle:ohe,keyframeCache:dn,gsapAnimations:K,selectedKeyframes:$i,currentTime:ae,onSeek:e,beatAnalysis:ie,onSelectSegment:Za,onClickKeyframe:Dr,onShiftClickKeyframe:bi,onMoveKeyframe:$,onContextMenuKeyframe:Oa,onContextMenuClip:(Gt,gr)=>{Gt.preventDefault(),V(gr.key??gr.id),v==null||v(gr),_n(),yt({x:Gt.clientX,y:Gt.clientY,element:gr,sessionEpoch:ce.getState().timelineSessionEpoch})},onContextMenuLane:(Gt,gr,ws)=>{bt!=null&&bt.started||wn||(yt(null),tr({x:Gt.clientX,y:Gt.clientY,track:gr,time:ws}))}}),xe==="razor"&&lr!==null&&d.jsx(vBe,{x:lr})]}),d.jsx(F$e,{elements:J,elementsRef:Pe,theme:G,showShortcutHint:Rt,showPopover:qe,rangeSelection:Hr,setShowPopover:Ge,setRangeSelection:Ss,kfContextMenu:Ye,setKfContextMenu:st,onDeleteKeyframe:j,onDeleteAllKeyframes:L,onMoveKeyframeToPlayhead:H,clipContextMenu:nt,setClipContextMenu:yt,currentTime:ae,onSplitElement:_,pinZoomBeforeEdit:Wt,onDeleteElement:c,gapContextMenu:mn,onDismissGapContextMenu:_n,onCloseTrackGap:br,onCloseAllTrackGaps:nr,onHoverGapAction:gn})]})}),uVe={overscan:0,visible:1,interaction:2},$W=Object.freeze({status:"idle"});function fVe(t){return t==="video"?"video":t==="composition"?"composition":"general"}function hVe(t){return t instanceof Error?t:new Error(String(t))}function BS(t){return Object.entries(t).filter(e=>e[1]!==void 0).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(n))}`).join("&")}function eR(t){return BS({project:t.projectId,session:t.sessionEpoch,request:t.key,kind:t.kind,rich:t.rich?1:0})}class dVe{constructor(e=il,n=Date.now){vt(this,"entries",new Map);vt(this,"budgets");vt(this,"nextLeaseId",1);vt(this,"nextSequence",1);vt(this,"scrolling",!1);vt(this,"cacheBytes",0);vt(this,"waveformCacheBytes",0);vt(this,"activeByBucket",{video:0,composition:0,general:0});vt(this,"activeByKind",{video:0,image:0,composition:0,waveform:0});vt(this,"now");this.budgets=e,this.now=n}acquire(e,n){const r=eR(e);let i=this.entries.get(r);(i==null?void 0:i.state)==="error"&&i.failedAt!==void 0&&this.now()-i.failedAt>=this.budgets.metadataFailureTtlMs&&(this.deleteEntry(r,i),i=this.entries.get(r)),i||(i={request:e,scopedKey:r,state:"queued",leases:new Map,listeners:new Map,controller:null,weight:0,disposed:!1,cached:!1,lastAccess:this.nextSequence++,snapshot:Object.freeze({status:"queued"})},this.entries.set(r,i));const s=this.nextLeaseId++;i.leases.set(s,e.priority),i.listeners.set(s,n),i.lastAccess=this.nextSequence++,this.pump();let a=!1;return{updatePriority:o=>{const l=this.entries.get(r);!l||!l.leases.has(s)||(l.leases.set(s,o),l.lastAccess=this.nextSequence++,this.pump())},release:()=>{var l;if(a)return;a=!0;const o=this.entries.get(r);o&&(o.leases.delete(s),o.listeners.delete(s),o.leases.size===0&&(o.state==="queued"?this.deleteEntry(r,o):o.state==="loading"?((l=o.controller)==null||l.abort(),this.deleteEntry(r,o)):o.state==="ready"&&!o.cached&&this.deleteEntry(r,o)),this.evict())}}}getSnapshot(e){const n=this.entries.get(eR(e));return n?n.snapshot:$W}setScrolling(e){this.scrolling!==e&&(this.scrolling=e,e||this.pump())}invalidateProject(e){var n;for(const[r,i]of this.entries)i.request.projectId===e&&(i.leases.size>0||((n=i.controller)==null||n.abort(),this.deleteEntry(r,i)))}getDiagnostics(){let e=0,n=0,r=0,i=0,s=0;for(const a of this.entries.values())a.state==="queued"&&e++,a.state==="loading"&&n++,a.cached&&(a.request.kind==="waveform"?s++:i++),r+=a.leases.size;return{queued:e,active:n,leases:r,cacheEntries:i,cacheBytes:this.cacheBytes,waveformCacheEntries:s,waveformCacheBytes:this.waveformCacheBytes,activeByKind:{...this.activeByKind}}}pump(){const e=Array.from(this.entries.values()).filter(n=>n.state==="queued"&&n.leases.size>0).sort((n,r)=>this.entryPriority(r)-this.entryPriority(n)||n.lastAccess-r.lastAccess);for(const n of e){if(this.scrolling&&n.request.rich)continue;const r=fVe(n.request.kind);this.activeByBucket[r]>=this.bucketLimit(r)||this.start(n,r)}}start(e,n){e.state="loading",e.snapshot=Object.freeze({status:"loading"});const r=new AbortController;e.controller=r,this.activeByBucket[n]++,this.activeByKind[e.request.kind]++,this.notify(e),this.loadWithTimeout(e,r).then(s=>this.acceptResult(e,r,s)).catch(s=>{if(this.entries.get(e.scopedKey)===e){if(r.signal.aborted&&e.leases.size===0){this.deleteEntry(e.scopedKey,e);return}e.state="error",e.error=hVe(s),e.failedAt=this.now(),e.snapshot=Object.freeze({status:"error",error:e.error}),this.notify(e),this.evictFailures()}}).finally(()=>{e.controller===r&&(e.controller=null),this.activeByBucket[n]--,this.activeByKind[e.request.kind]--,this.pump()})}acceptResult(e,n,r){if(n.signal.aborted||this.entries.get(e.scopedKey)!==e){this.safeDispose(r.dispose);return}this.validateResult(r),e.state="ready",e.value=r.value,e.weight=r.weight,e.dispose=r.dispose,this.cacheResult(e),e.snapshot=Object.freeze({status:"ready",value:r.value}),this.notify(e),this.evict(),!e.cached&&e.leases.size===0&&this.deleteEntry(e.scopedKey,e)}validateResult(e){if(!(Number.isFinite(e.weight)&&e.weight>=0))throw this.safeDispose(e.dispose),new RangeError("Thumbnail result weight must be finite and non-negative")}cacheResult(e){const n=e.request.kind==="waveform",r=n?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes;e.cached=e.weight<=r,e.cached&&(n?this.waveformCacheBytes+=e.weight:this.cacheBytes+=e.weight)}entryPriority(e){let n=-1;for(const r of e.leases.values())n=Math.max(n,uVe[r]);return n}bucketLimit(e){return e==="video"?this.budgets.concurrentVideoDecodes:e==="composition"?this.budgets.concurrentCompositionFetches:this.budgets.concurrentMetadataJobs}evict(){this.evictPartition(!1),this.evictPartition(!0)}evictPartition(e){const n=Array.from(this.entries.values()).filter(s=>s.cached&&s.request.kind==="waveform"===e),r=new Map;for(const s of n)r.set(s.request.projectId,(r.get(s.request.projectId)??0)+1);n.sort((s,a)=>s.lastAccess-a.lastAccess);let i=n.length;for(const s of n){const a=r.get(s.request.projectId)??0;this.isCacheOverBudget(e,i,a)&&(this.uncache(s),i--,r.set(s.request.projectId,a-1),s.leases.size===0&&this.deleteEntry(s.scopedKey,s))}}isCacheOverBudget(e,n,r){const i=e?this.budgets.waveformCacheEntries:this.budgets.thumbnailCacheEntries,s=e?this.budgets.waveformCacheBytes:this.budgets.thumbnailCacheBytes,a=e?this.waveformCacheBytes:this.cacheBytes,o=!e&&r>this.budgets.thumbnailCacheEntriesPerProject;return n>i||a>s||o}uncache(e){e.cached=!1,e.request.kind==="waveform"?this.waveformCacheBytes-=e.weight:this.cacheBytes-=e.weight}notify(e){for(const n of new Set(e.listeners.values()))n()}loadWithTimeout(e,n){let r;try{r=e.request.load(n.signal)}catch(i){r=Promise.reject(i)}return new Promise((i,s)=>{let a=!1;const o=setTimeout(()=>{a||(a=!0,n.abort(),s(new Error(`Thumbnail load timed out after ${this.budgets.thumbnailLoadTimeoutMs}ms`)))},this.budgets.thumbnailLoadTimeoutMs);r.then(l=>{if(a){this.safeDispose(l.dispose);return}a=!0,clearTimeout(o),i(l)},l=>{a||(a=!0,clearTimeout(o),s(l))})})}deleteEntry(e,n){this.entries.get(e)===n&&(this.entries.delete(e),n.snapshot=$W,this.notify(n),n.cached&&(n.cached=!1,n.request.kind==="waveform"?this.waveformCacheBytes-=n.weight:this.cacheBytes-=n.weight),n.disposed||(n.disposed=!0,this.safeDispose(n.dispose)),n.listeners.clear(),n.leases.clear())}evictFailures(){const e=Array.from(this.entries.values()).filter(r=>r.state==="error"&&r.leases.size===0).sort((r,i)=>r.lastAccess-i.lastAccess),n=e.length-this.budgets.thumbnailCacheEntries;for(const r of e.slice(0,Math.max(0,n)))this.deleteEntry(r.scopedKey,r)}safeDispose(e){try{e==null||e()}catch{}}}const pVe=new dVe,BW=Object.freeze({status:"idle"});function v3(t,e=pVe){const n=x.useRef(t);n.current=t;const r=x.useRef(null),i=t?eR(t):null,s=t==null?void 0:t.priority,a=x.useCallback(l=>{const c=n.current;if(!c||i===null)return()=>{};const u=e.acquire(c,l);return r.current=u,()=>{r.current===u&&(r.current=null),u.release()}},[i,e]),o=x.useCallback(()=>{const l=n.current;return l&&i!==null?e.getSnapshot(l):BW},[i,e]);return x.useLayoutEffect(()=>{var l;s&&((l=r.current)==null||l.updatePriority(s))},[s]),x.useSyncExternalStore(a,o,()=>BW)}function mVe(t,e,n){const r=Math.max(0,Number.isFinite(t)?t:0),i=Math.max(0,Number.isFinite(e)?e:0),s=Math.max(1,Number.isFinite(n)?Math.floor(n):1);return s===1?[r+i/2]:Array.from({length:s},(a,o)=>r+i*o/(s-1))}async function gVe(t){return t instanceof HTMLCanvasElement?new Promise((e,n)=>{t.toBlob(r=>r?e(r):n(new Error("Video thumbnail encode failed")),"image/jpeg",.72)}):t.convertToBlob({type:"image/jpeg",quality:.72})}function B1(t){if(t.aborted)throw new DOMException("Aborted","AbortError")}function Dde(t){for(const e of t.urls.splice(0))URL.revokeObjectURL(e);for(const e of t.canvases)e.width=0,e.height=0;t.canvases.clear()}function yVe(t,e){const n=Math.max(1,Math.min(e.posterMaxPhysicalWidth,Math.round(e.posterMaxPhysicalHeight*t)));return{width:n,height:Math.max(1,Math.min(e.posterMaxPhysicalHeight,Math.round(n/t)))}}async function xVe(t,e,n,r){for await(const i of t.canvasesAtTimestamps(e)){if(B1(n),!i)continue;r.canvases.add(i.canvas);const s=await gVe(i.canvas);B1(n),r.urls.push(URL.createObjectURL(s))}}function bVe(t,e,n,r){const i=t.urls[0];if(!i)throw new Error("Video source returned no thumbnail frames");return{value:t.urls.length===1?{kind:"image",url:i,aspect:e}:{kind:"filmstrip",urls:[...t.urls],aspect:e},weight:n*r*4*t.urls.length,dispose:()=>Dde(t)}}async function vVe(t,e,n=il){const r=await Sy(()=>import("./index-DdTv4TqQ.js"),[]);B1(e);const i=new r.Input({source:new r.UrlSource(t.source),formats:r.ALL_FORMATS}),s={urls:[],canvases:new Set};try{const a=await i.getPrimaryVideoTrack();if(B1(e),!a)throw new Error("Video source has no decodable video track");const[o,l]=await Promise.all([a.getDisplayWidth(),a.getDisplayHeight()]);if(B1(e),!(o>0&&l>0))throw new Error("Video source has invalid dimensions");const c=await a.getDurationFromMetadata({skipLiveWait:!0});B1(e);const u=Math.max(0,c??t.sourceRangeDuration??0),f=Math.min(Math.max(0,t.sourceStart??0),u),h=t.sourceRangeDuration??Math.max(0,u-f),m=Math.min(Math.max(0,h),Math.max(0,u-f)),y=mVe(f,m,Math.min(t.frameCount,n.richPreviewFrameCount)),p=o/l,v=yVe(p,n),b=new r.CanvasSink(a,{width:v.width,height:v.height,fit:t.fit??"cover",poolSize:1});return await xVe(b,y,e,s),bVe(s,p,v.width,v.height)}catch(a){throw Dde(s),a}finally{i.dispose()}}const Ide=66;function _de(t,e,n=!1){return new Promise((r,i)=>{const s=new Image,a=()=>{s.onload=null,s.onerror=null,e.removeEventListener("abort",o)},o=()=>{a(),s.src="",i(new DOMException("Aborted","AbortError"))};if(e.aborted){o();return}s.onload=()=>{a(),r(s.naturalWidth>0&&s.naturalHeight>0?s.naturalWidth/s.naturalHeight:16/9)},s.onerror=()=>{a(),n&&/\.svg($|\?)/i.test(t)?r(16/9):i(new Error("Image thumbnail failed to load"))},e.addEventListener("abort",o,{once:!0}),s.src=t})}function zF(t,e,n=Ide,r=1){const i=Number.isFinite(e)&&e>0?e:1.7777777777777777,s=Math.max(r,Math.round(n*i)),a=t>0?Math.max(1,Math.ceil(t/s)):1;return{frameW:s,frameCount:a}}function EA(t){return t.split("/").map(encodeURIComponent).join("/")}function _y(t,e,n){if(!t||/^(?:data:|blob:)/i.test(t))return t;let r=t,i="";if(/^https?:/i.test(t)){let s;try{s=new URL(t)}catch{return t}if(!n||s.origin!==n)return t;const a=new URL(`/api/projects/${e}/preview/`,n).pathname;if(s.pathname.startsWith(a)||s.pathname.startsWith("/api/"))return t;try{r=s.pathname.replace(/^\/+/,"").split("/").map(decodeURIComponent).join("/")}catch{return t}i=`${s.search}${s.hash}`}return`/api/projects/${e}/preview/${EA(r.replace(/^\/+/,""))}${i}`}const AVe=x.memo(function({videoSrc:e,label:n,labelColor:r,duration:i=5,sourceStart:s,sourceRangeDuration:a,projectId:o=e,sessionEpoch:l=0,priority:c="visible",rich:u=!1}){const[f,h]=x.useState(0),m=x.useRef(null),y=x.useMemo(()=>({key:BS({kind:"video",source:e,start:s,duration:a??i,frames:u?6:1}),projectId:o,sessionEpoch:l,kind:"video",priority:c,rich:u,load:M=>vVe({source:e,sourceStart:s,sourceRangeDuration:a??i,frameCount:u?6:1,fit:"cover"},M)}),[i,c,o,u,l,a,s,e]),p=v3(y),v=p.status==="ready"?p.value:null,b=(v==null?void 0:v.kind)==="filmstrip"?v.urls:(v==null?void 0:v.kind)==="image"?[v.url]:[],w=(v==null?void 0:v.kind)==="image"||(v==null?void 0:v.kind)==="filmstrip"?v.aspect:16/9,{frameW:O,frameCount:C}=zF(f,w,Ide),E=x.useCallback(M=>{var _;if((_=m.current)==null||_.disconnect(),!M)return;const N=M.parentElement??M;h(N.clientWidth),m.current=new ResizeObserver(([I])=>h(I.contentRect.width)),m.current.observe(N)},[]);return kr(()=>()=>{var M;return(M=m.current)==null?void 0:M.disconnect()}),d.jsxs("div",{ref:E,className:"absolute inset-0 overflow-hidden",children:[b.length>0&&d.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:C},(M,N)=>{const _=b[N%b.length];return d.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden bg-neutral-900",style:{width:O},children:d.jsx("img",{src:_,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover"})},N)})}),p.status==="loading"&&b.length===0&&d.jsx("div",{className:"absolute inset-0 animate-pulse motion-reduce:animate-none",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),p.status==="error"&&d.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-neutral-900/60",children:d.jsx("span",{className:"rounded bg-black/50 px-1 text-[8px] text-neutral-500",children:"no preview"})}),n&&d.jsx("div",{className:"absolute inset-x-0 bottom-0 z-10 px-1.5 pb-0.5 pt-3",style:{background:"linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%)"},children:d.jsx("span",{className:"block truncate text-[9px] font-semibold leading-tight",style:{color:r,textShadow:"0 1px 2px rgba(0,0,0,0.9)"},children:n})})]})}),SVe=66,wVe="v3";function ZF({previewUrl:t,seekTime:e=2,duration:n=5,selector:r,selectorIndex:i,origin:s,output:a,contentRevision:o=0}){const l=t.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),c=new URL(l,s);return c.searchParams.set("t",(e+n/2).toFixed(2)),c.searchParams.set("v",wVe),c.searchParams.set("revision",String(o)),a&&c.searchParams.set("output",a),r&&(c.searchParams.set("selector",r),i!=null&&i>0&&c.searchParams.set("selectorIndex",String(i))),c.toString()}async function OVe(t,e){const n=await fetch(t,{signal:e});if(!n.ok)throw new Error(`Composition thumbnail failed (${n.status})`);const r=await n.blob();if(e.aborted)throw new DOMException("Aborted","AbortError");const i=URL.createObjectURL(r);try{const s=await _de(i,e);return{value:{kind:"image",url:i,aspect:s},weight:il.posterMaxPhysicalWidth*il.posterMaxPhysicalHeight*4,dispose:()=>URL.revokeObjectURL(i)}}catch(s){throw URL.revokeObjectURL(i),s}}const FM=x.memo(function({previewUrl:e,label:n,labelColor:r,selector:i,selectorIndex:s,seekTime:a=2,duration:o=5,projectId:l=e,sessionEpoch:c=0,contentRevision:u=0,priority:f="visible"}){const[h,m]=x.useState(0),y=x.useRef(null),p=ZF({previewUrl:e,seekTime:a,duration:o,selector:i,selectorIndex:s,origin:window.location.origin,contentRevision:u}),v=x.useMemo(()=>({key:BS({kind:"composition",url:p}),projectId:l,sessionEpoch:c,kind:"composition",priority:f,rich:!0,load:M=>OVe(p,M)}),[f,l,c,p]),b=v3(v),w=b.status==="ready"&&b.value.kind==="image"?b.value:null,{frameW:O,frameCount:C}=zF(h,(w==null?void 0:w.aspect)??16/9,SVe,48),E=x.useCallback(M=>{var _;if((_=y.current)==null||_.disconnect(),!M)return;const N=M.parentElement??M;m(N.clientWidth),y.current=new ResizeObserver(([I])=>m(I.contentRect.width)),y.current.observe(N)},[]);return kr(()=>()=>{var M;return(M=y.current)==null?void 0:M.disconnect()}),d.jsxs("div",{ref:E,className:"absolute inset-0 overflow-hidden",children:[w&&d.jsx("div",{className:"absolute inset-0 flex",style:{animation:"hf-thumb-fade 200ms ease-out",mixBlendMode:"lighten"},children:Array.from({length:C},(M,N)=>d.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:O},children:d.jsx("img",{src:w.url,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover",style:{opacity:.7}})},N))}),b.status==="loading"&&d.jsx("div",{className:"absolute inset-0 animate-pulse bg-white/[0.035]"}),n&&d.jsx("div",{className:"absolute inset-y-0 left-3 z-10 flex items-center",children:d.jsx("span",{className:"block max-w-full truncate text-[10px] font-semibold leading-none",style:{color:r,textShadow:w?"0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6)":"none"},children:n})})]})});let VW=0;const kVe=800,HW={isEditMode:!1,dismissed:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null,syncError:null,retrySave:null,past:[],future:[]};let pv=null,$M=0;function Jc(t,e){if(!t.model)return{};const n=Date.now();return pv===e&&n-$M<kVe?($M=n,{future:[]}):(pv=e,$M=n,{past:[...t.past,t.model].slice(-50),future:[]})}const Sn=AE((t,e)=>({...HW,setEditMode:n=>t({isEditMode:n}),setDismissed:n=>t({dismissed:n}),setModel:n=>t({model:n}),setSourceFilePath:n=>t({sourceFilePath:n}),setSyncError:n=>t({syncError:n}),setRetrySave:n=>t({retrySave:n}),undo:()=>{const{model:n,past:r,future:i}=e(),s=r[r.length-1];return!s||!n?null:(pv=null,t({model:s,past:r.slice(0,-1),future:[...i,n]}),s)},redo:()=>{const{model:n,past:r,future:i}=e(),s=i[i.length-1];return!s||!n?null:(pv=null,t({model:s,past:[...r,n].slice(-50),future:i.slice(0,-1)}),s)},selectSegment:(n,r=!1)=>t(i=>{if(r){const s=new Set(i.selectedSegmentIds);return s.has(n)?s.delete(n):s.add(n),{selectedSegmentIds:s,selectedGroupId:null}}return{selectedSegmentIds:new Set([n]),selectedGroupId:null}}),selectGroup:n=>{var i;const r=(i=e().model)==null?void 0:i.groups.get(n);r&&t({selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:n})},selectAll:()=>t(n=>n.model?{selectedSegmentIds:new Set(n.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>{const{selectedSegmentIds:n,selectedGroupId:r}=e();n.size===0&&r===null||t({selectedSegmentIds:new Set,selectedGroupId:null})},updateSegmentStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,style:{...s.style,...r}}),{...Jc(i,`seg-style:${n}`),model:{...i.model,segments:a}}}),updateSegmentText:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.segments.get(n);if(!s)return{};const a=new Map(i.model.segments);return a.set(n,{...s,text:r}),{...Jc(i,`seg-text:${n}`),model:{...i.model,segments:a}}}),updateSegmentTiming:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.segments.get(n);if(!a)return{};const o=new Map(s.model.segments);return o.set(n,{...a,start:r,end:i}),{...Jc(s,`seg-timing:${n}`),model:{...s.model,segments:o}}}),updateGroupStyle:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,style:{...s.style,...r}}),{...Jc(i,`group-style:${n}`),model:{...i.model,groups:a}}}),updateGroupContainer:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=new Map(i.model.groups);return a.set(n,{...s,containerStyle:{...s.containerStyle,...r}}),{...Jc(i,`group-container:${n}`),model:{...i.model,groups:a}}}),updateGroupAnimation:(n,r,i)=>t(s=>{if(!s.model)return{};const a=s.model.groups.get(n);if(!a)return{};const o=new Map(s.model.groups),l=a.animation[r],c=l!==null?{...l,...i}:i;return o.set(n,{...a,animation:{...a.animation,[r]:c}}),{...Jc(s,`group-anim:${n}:${r}`),model:{...s.model,groups:o}}}),splitGroup:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n);if(!s)return{};const a=s.segmentIds.indexOf(r);if(a<=0)return{};const o=s.segmentIds.slice(0,a),l=s.segmentIds.slice(a),c=`group-split-${VW++}`,u=new Map(i.model.groups);u.set(n,{...s,segmentIds:o}),u.set(c,{...s,id:c,segmentIds:l});const f=i.model.groupOrder.indexOf(n),h=[...i.model.groupOrder];h.splice(f+1,0,c);const m=new Map(i.model.segments);return l.forEach((y,p)=>{const v=m.get(y);v&&m.set(y,{...v,groupIndex:p})}),{...Jc(i,`split:${n}:${r}:${VW}`),model:{...i.model,groups:u,segments:m,groupOrder:h}}}),mergeGroups:(n,r)=>t(i=>{if(!i.model)return{};const s=i.model.groups.get(n),a=i.model.groups.get(r);if(!s||!a)return{};const o=[...s.segmentIds,...a.segmentIds],l=new Map(i.model.groups);l.set(n,{...s,segmentIds:o}),l.delete(r);const c=i.model.groupOrder.filter(h=>h!==r),u=new Map(i.model.segments);a.segmentIds.forEach((h,m)=>{const y=u.get(h);y&&u.set(h,{...y,groupIndex:s.segmentIds.length+m})});const f=i.selectedGroupId===r?null:i.selectedGroupId;return{...Jc(i,`merge:${n}:${r}`),model:{...i.model,groups:l,segments:u,groupOrder:c},selectedGroupId:f}}),updateSelectedStyle:n=>t(r=>{if(!r.model||r.selectedSegmentIds.size===0)return{};const i=new Map(r.model.segments);for(const s of r.selectedSegmentIds){const a=i.get(s);a&&i.set(s,{...a,style:{...a.style,...n}})}return{...Jc(r,`sel-style:${[...r.selectedSegmentIds].join(",")}`),model:{...r.model,segments:i}}}),applyAnimationToAll:n=>t(r=>{if(!r.model)return{};const i=new Map(r.model.groups);for(const[s,a]of i)i.set(s,{...a,animation:n});return{...Jc(r,"apply-anim-all"),model:{...r.model,groups:i}}}),reset:()=>{pv=null,t(n=>({...HW,retrySave:n.retrySave,selectedSegmentIds:new Set,past:[],future:[]}))}})),CVe=new Set(["ArrowLeft","ArrowRight"]),EVe=["button","a[href]","[role='button']","[role='checkbox']","[role='combobox']","[role='menuitem']","[role='radio']","[role='slider']","[role='spinbutton']","[role='switch']","[role='textbox']"].join(",");function TVe(t){if(Yf(t))return!0;if(!t||typeof t!="object")return!1;const e=t;return typeof e.closest!="function"?!1:e.closest.call(t,EVe)!==null}function PVe(t,e={isCaptionEditMode:!1,selectedCaptionSegmentCount:0}){return t.metaKey||t.ctrlKey||t.altKey||TVe(t.target)?!0:CVe.has(t.code)&&e.isCaptionEditMode&&e.selectedCaptionSegmentCount>0}const QW=[1,2,4];let tR=0;function MVe(){tR+=1;let t=!1;return()=>{t||(t=!0,tR-=1)}}function NVe(){return tR>0}function DVe({iframeRef:t,shuttleDirectionRef:e,shuttleSpeedIndexRef:n,iframeShortcutCleanupRef:r,getAdapter:i,play:s,playBackward:a,pause:o,seek:l}){const c=x.useRef(new Set),u=x.useRef(()=>{}),f=x.useRef(()=>{}),h=x.useCallback(w=>{const O=i(),C=(O==null?void 0:O.getTime())??ce.getState().currentTime;l(Ake(C,w,Wd))},[i,l]),m=x.useCallback(w=>{e.current===w?n.current=Math.min(n.current+1,QW.length-1):n.current=0;const O=QW[n.current];ce.getState().setPlaybackRate(O),w==="forward"?s():a(O)},[s,a,e,n]),y=x.useCallback(()=>{ce.getState().isPlaying?o():s()},[s,o]),p=x.useCallback(w=>{var M,N,_;if(w.defaultPrevented)return;const O=Sn.getState();if(PVe(w,{isCaptionEditMode:O.isEditMode,selectedCaptionSegmentCount:O.selectedSegmentIds.size}))return;const C=w.key.toLowerCase();if(c.current.add(C),w.code==="Space"){w.preventDefault(),y();return}if(!((w.code==="ArrowLeft"||w.code==="ArrowRight")&&NVe())){if(w.code==="ArrowLeft"){w.preventDefault(),h(w.shiftKey?-10:-1);return}if(w.code==="ArrowRight"){w.preventDefault(),h(w.shiftKey?10:1);return}if(!w.repeat){if(C==="m"){w.preventDefault();const I=ce.getState();I.setAudioMuted(!I.audioMuted);return}if(C==="l"&&w.shiftKey){w.preventDefault();const I=ce.getState();I.setLoopEnabled(!I.loopEnabled);return}if(C==="k"){w.preventDefault(),o();return}if(C==="j"){if(w.preventDefault(),c.current.has("k")){h(-1);return}m("backward");return}if(C==="l"){if(w.preventDefault(),c.current.has("k")){h(1);return}m("forward");return}if(C==="i"){w.preventDefault();const I=((M=i())==null?void 0:M.getTime())??ce.getState().currentTime;ce.getState().setInPoint(w.shiftKey?null:I);return}if(C==="o"){w.preventDefault();const I=((N=i())==null?void 0:N.getTime())??ce.getState().currentTime;ce.getState().setOutPoint(w.shiftKey?null:I);return}if(C==="a"){w.preventDefault(),l(ce.getState().inPoint??0,{keepPlaying:!0});return}if(C==="e"){w.preventDefault();const{outPoint:I}=ce.getState();l(I??((_=i())==null?void 0:_.getDuration())??ce.getState().duration,{keepPlaying:!0});return}}}},[o,m,h,y,i,l]),v=x.useCallback(w=>{c.current.delete(w.key.toLowerCase())},[]);u.current=p,f.current=v;const b=x.useCallback(()=>{var M,N,_;(M=r.current)==null||M.call(r),r.current=null;let w=null,O=null;try{w=((N=t.current)==null?void 0:N.contentWindow)??null,O=((_=t.current)==null?void 0:_.contentDocument)??null}catch{return}if(!w&&!O)return;const C=I=>u.current(I),E=I=>f.current(I);try{w==null||w.addEventListener("keydown",C,!0),w==null||w.addEventListener("keyup",E,!0)}catch{}O==null||O.addEventListener("keydown",C,!0),O==null||O.addEventListener("keyup",E,!0),r.current=()=>{try{w==null||w.removeEventListener("keydown",C,!0),w==null||w.removeEventListener("keyup",E,!0)}catch{}O==null||O.removeEventListener("keydown",C,!0),O==null||O.removeEventListener("keyup",E,!0)}},[t,r]);return{playbackKeyDownRef:u,playbackKeyUpRef:f,attachIframeShortcutListeners:b,togglePlay:y}}function nR(t){return Number.isFinite(t)&&t>0&&t<7200?t:0}function IVe(t){const e=t.getAttribute(Wo);if(!e)return{};const n=RE(t.ownerDocument,e);return{audioGroup:e,audioGroupLabel:n.label,audioGroupVolume:n.volume,audioGroupHidden:n.hidden,...n.fxChain?{audioGroupFxChain:n.fxChain}:{},...n.automation?{audioGroupAutomation:n.automation}:{}}}function _Ve(t){const e=new Map,n=t==null?void 0:t.__clipTree;if(!n)return e;const r=i=>{for(const s of i)s.id&&s.parentId&&e.set(s.id,s.parentId),s.children.length>0&&r(s.children)};return r(n.roots),e}function rR(t,e,n,r,i){for(const s of Array.from(e.children)){if(!s.id){rR(t,s,n,r,i);continue}const a=s.hasAttribute("data-hf-group");i.push({id:s.id,parentId:n,hostId:t,label:a&&s.getAttribute("data-hf-group")||s.id,stackingContextId:Gj(s),...IVe(s)}),r.set(s.id,n),a&&rR(t,s,s.id,r,i)}}function RVe(t,e,n){const r=[];if(!t)return r;for(const i of e){if(i.kind!=="composition"||!i.id)continue;const s=t.getElementById(i.id);if(!s)continue;const a=s.querySelector("[data-hf-inner-root]")??s;rR(i.id,a,i.id,n,r)}return r}function jVe(t){const e={};t.hasAttribute("data-hidden")&&(e.hidden=!0),t.hasAttribute("data-timeline-locked")&&(e.timelineLocked=!0);const n=t.getAttribute("data-timeline-role");n&&(e.timelineRole=n);const r=t.getAttribute("data-fx-chain");r&&(e.fxChain=r);const i=t.getAttribute("data-automation");return i&&(e.automation=i),Object.keys(e).length>0?e:null}function LVe(t,e){const n=new Map;if(!t)return n;for(const r of e){if(r.kind!=="composition"||!r.id)continue;const i=t.getElementById(r.id);if(i)for(const s of Array.from(i.querySelectorAll("[id]"))){const a=jVe(s);a&&n.set(s.id,a)}}return n}function Rde(t){try{return(t==null?void 0:t.contentDocument)??null}catch{return null}}function FVe(t,e){const n=new Set;return t.map((r,i)=>{const s=e?eCe(e,r,i,n):null;return s&&n.add(s),Qae({clip:r,fallbackIndex:i,doc:e,hostEl:s})})}function $Ve(t,e,n){const r=BVe(t,n);return!e||n<=0?r:[...r,...zae(e,n,r)]}function BVe(t,e){return e<=0?[...t]:t.filter(n=>n.start<e).map(n=>({...n,duration:Math.min(n.duration,e-n.start)})).filter(n=>n.duration>0)}function VVe(t){const e=t.pendingSeek??t.requestedSeek??t.storeCurrentTime;return!Number.isFinite(e)||e<=0?0:!Number.isFinite(t.duration)||t.duration<=0?e:Math.min(e,t.duration)}function jde(t,e){const n=Number.isFinite(e)&&e>0?e:0;t.seek(n>.001?Math.max(0,n-.001):.001),t.seek(n)}function HVe(t,e){const n=ce.getState().requestedSeekTime,r=VVe({pendingSeek:e.current,requestedSeek:n,storeCurrentTime:ce.getState().currentTime,duration:t.getDuration()});return e.current=null,n!=null&&ce.getState().clearSeekRequest(),jde(t,r),r}function QVe(t,e){const n=nR(t.getDuration());n>0&&n!==ce.getState().duration&&e(n)}function zVe(t,e,n,r){const i=Zae(t,n);if(i.length>0){r(i);return}const s=t.querySelector("[data-composition-id]");if(!s||n<=0)return;const a=g3e({compositionId:s.getAttribute("data-composition-id")||"composition",tagName:s.tagName||"div",rootDuration:n,iframeSrc:(e==null?void 0:e.src)||"",selector:S0(s)});a&&r([a])}function ZVe(t,e){return!t.source||!e?!0:t.source===e.contentWindow}function GVe(t,e){if(!ZVe(t,e))return!1;const n=t.data;return(n==null?void 0:n.source)!=="hf-preview"||(n==null?void 0:n.type)!=="state"&&(n==null?void 0:n.type)!=="timeline"?!1:Uj(n).status!=="unsupported"}function UVe(t,e,n){!t||!e||(YEe(t,e),KEe(t),n())}function XVe(t,e){const n=t==null?void 0:t.__clipManifest;n&&n.clips.length>0&&e(n)}function WVe(t){const{iframe:e,adapter:n,syncTimelineElements:r}=t;try{const i=Rde(e),s=(e==null?void 0:e.contentWindow)??null;UVe(i,s,t.attachIframeShortcutListeners),XVe(s,t.processTimelineMessage),t.enrichMissingCompositions(),t.applyPreviewAudioState(),i&&ce.getState().elements.length===0&&zVe(i,e,n.getDuration(),r)}catch{}}function zW(t){t&&t.style.visibility==="hidden"&&(t.style.visibility="")}function qVe(t){return Math.max(nR(t.manifestDurationSeconds),nR(t.authoredRootDurationSeconds))}function YVe({iframeRef:t,probeIntervalRef:e,pendingSeekRef:n,isRefreshingRef:r,getAdapter:i,syncTimelineElements:s,setDuration:a,setCurrentTime:o,setTimelineReady:l,setIsPlaying:c,attachIframeShortcutListeners:u,applyPreviewAudioState:f}){const h=x.useCallback(w=>{var I;if(!w.clips||w.clips.length===0)return;ce.getState().setClipManifest(w.clips);const O=new Set(w.clips.map(j=>j.compositionId).filter(Boolean)),C=w.clips.filter(j=>!j.parentCompositionId||!O.has(j.parentCompositionId)),E=Rde(t.current);try{const j=_Ve(((I=t.current)==null?void 0:I.contentWindow)??null),L=RVe(E,w.clips,j);ce.getState().setClipParentMap(j),ce.getState().setDomClipChildren(L),ce.getState().setSubCompositionHostState(LVe(E,w.clips))}catch{}const M=FVe(C,E),N=qVe({manifestDurationSeconds:w.durationInFrames/qEe(w),authoredRootDurationSeconds:fae(E)}),_=$Ve(M,E,N>0?N:ce.getState().duration);_.length>0&&s(_,N>0?N:void 0)},[t,s]),m=x.useCallback(()=>{try{const w=t.current,O=w==null?void 0:w.contentDocument,C=w==null?void 0:w.contentWindow;if(!O||!C)return;const E=ce.getState().elements,M=ce.getState().duration,{missing:N,updatedEls:_,patched:I}=d3e(O,C,E,M);if(N.length>0||I){const j=new Set(_.map(H=>H.id)),L=N.filter(H=>!j.has(H.id));s([..._,...L])}}catch{}},[t,s]),y=x.useCallback(()=>{const w=i();if(!w||w.getDuration()<=0)return!1;w.pause();const O=HVe(w,n);return zW(t.current),ba.notify(O),QVe(w,a),o(O),r.current||l(!0),r.current=!1,c(!1),WVe({iframe:t.current,adapter:w,processTimelineMessage:h,enrichMissingCompositions:m,applyPreviewAudioState:f,attachIframeShortcutListeners:u,syncTimelineElements:s}),!0},[i,a,o,l,c,h,m,s,u,f,t,r,n]),p=x.useCallback(()=>{if(f(),e.current&&clearInterval(e.current),y())return;const w=t.current;let O=!1;const C=()=>{O||y()&&(O=!0,window.removeEventListener("message",E),e.current&&clearInterval(e.current))},E=M=>{GVe(M,w)&&C()};window.addEventListener("message",E),e.current=setTimeout(()=>{O||C(),window.removeEventListener("message",E),zW(t.current)},5e3)},[y,t,e,f]);return{processTimelineMessage:h,processTimelineMessageRef:{current:h},enrichMissingCompositions:m,enrichMissingCompositionsRef:{current:m},initializeAdapter:y,onIframeLoad:p}}function KVe({rafRef:t,reverseRafRef:e,getAdapter:n,setCurrentTime:r,setIsPlaying:i}){const s=x.useCallback(()=>{cancelAnimationFrame(e.current)},[e]),a=x.useCallback(()=>{const l=()=>{const c=n();if(c){const u=c.getTime(),f=c.getDuration(),h=f>0?Math.min(u,f):u;ba.notify(h);const{inPoint:m,outPoint:y}=ce.getState(),p=y!==null?Math.min(y,f):f,v=m!==null?m:0,b=v<p?p:f,w=v<p?v:0;if(h>=b){if(ce.getState().loopEnabled&&f>0){c.seek(w,{keepPlaying:!0}),ba.notify(w),c.play(),i(!0),t.current=requestAnimationFrame(l);return}c.isPlaying()&&c.pause(),r(h),i(!1),cancelAnimationFrame(t.current);return}}t.current=requestAnimationFrame(l)};t.current=requestAnimationFrame(l)},[t,n,r,i]),o=x.useCallback(()=>{cancelAnimationFrame(t.current)},[t]);return{startRAFLoop:a,stopRAFLoop:o,stopReverseLoop:s}}function nm(t){let e=null;return(n,r={})=>{if(e===null)try{e=localStorage.getItem(`hf-${t}-debug`)==="1"}catch{e=!1}if(!e)return;const i=typeof r=="function"?r():r;i&&console.log(`[hf-${t}] ${JSON.stringify({stage:n,t:Math.round(performance.now()),...i})}`)}}const P2=nm("reload");function JVe(t,e){const n=ce.getState(),r=O0(n.elements).musicElement;if(!r||n.audioMuted)return;const i=e-r.start,s=i>=0&&i<=r.duration?(r.playbackStart??0)+i:null;a3e(t,s,r.domId??r.id,n.audioVolume)}const M2=1e3;let Lde=!1;const ZW=Object.freeze({"dense-short":{duration:120,clipDuration:1.5},"long-overlap":{duration:7200,clipDuration:120},"keyframe-heavy-expanded":{duration:600,clipDuration:8},"composition-heavy":{duration:900,clipDuration:12},"remote-unsupported":{duration:900,clipDuration:12}});function eHe(t){Lde=t}function Fde(){return Lde}function tHe(t){if(t.elementCount!==1e3&&t.elementCount!==5e4)throw new RangeError("Timeline performance fixture elementCount must be 1000 or 50000");if(!Object.hasOwn(ZW,t.profile))throw new RangeError(`Unknown timeline performance fixture profile: ${t.profile}`);return ZW[t.profile]}function nHe(t,e){if(t<M2)return t;if(e.profile!=="dense-short")return t%M2;const n=Math.ceil((e.elementCount-M2)/127);return(t-M2)%Math.max(1,n)}function rHe(t,e,n,r){const i=Math.max(0,n-r);return e==="dense-short"?t%128*.5:e==="long-overlap"?t*37%Math.max(1,i):t*17%Math.max(1,i)}function iHe(){return{format:"percentage",keyframes:[0,33,66,100].map(t=>({percentage:t,propertyGroup:"position",properties:{x:t},ease:"power2.inOut"}))}}function sHe(t,e,n){return{id:`animation-${t}`,targetSelector:`#${t}`,method:"to",position:e,resolvedStart:e,duration:n,propertyGroup:"position",fromProperties:{x:0},properties:{x:100},ease:"power2.inOut"}}function aHe(t){const e=tHe(t),n=[],r=new Map,i=new Map,s=new Set;for(let a=0;a<t.elementCount;a+=1){const o=`perf-${t.profile}-${t.elementCount}-${a}`,l=rHe(a,t.profile,e.duration,e.clipDuration),c=nHe(a,t),u={id:o,key:o,domId:o,selector:`#${o}`,label:`Fixture ${a+1}`,tag:t.profile==="remote-unsupported"&&a%2===0?"video":"div",start:l,duration:e.clipDuration,track:c,authoredTrack:c};t.profile==="composition-heavy"?u.compositionSrc=`compositions/perf-${a%32}.html`:t.profile==="remote-unsupported"&&(u.src=a%2===0?`https://media.invalid/perf-${a%32}.mp4`:`assets/perf-${a%32}.unsupported`),t.profile==="keyframe-heavy-expanded"&&(r.set(o,iHe()),i.set(o,[sHe(o,l,e.clipDuration)]),s.add(o)),n.push(u)}return{summary:Object.freeze({...t,duration:e.duration,trackCount:M2,keyframedElementCount:r.size,expandedElementCount:s.size}),elements:n,keyframeCache:r,gsapAnimations:i,expandedClipIds:s}}const mv=new Map,iR=new Map,ug=new Map;let Ek=0,BM=0,sR=0;const $de=[];let s1=null;async function oHe(){if(s1===!1)return null;if(s1)return s1;try{return s1=await Sy(()=>import("./index-DdTv4TqQ.js"),[]),s1}catch{return s1=!1,null}}function GF(t){try{return new URL(t,window.location.href).href}catch{return t}}async function lHe(t){const e=await oHe();if(!e)return null;const n=new e.Input({source:new e.UrlSource(t),formats:e.ALL_FORMATS});try{const r=await n.getDurationFromMetadata();if(r==null||!Number.isFinite(r)||r<=0)return null;const i=await n.getPrimaryVideoTrack(),s=await n.getAudioTracks();return{duration:r,width:i==null?void 0:i.displayWidth,height:i==null?void 0:i.displayHeight,hasVideo:i!=null,hasAudio:s.length>0}}catch{return null}finally{n.dispose()}}function UF(t){const e=mv.get(GF(t));return e&&(e.lastAccess=++Ek),e==null?void 0:e.result}function Bde(t,e){return e?_y(t,e,window.location.origin):t}function cHe(){const t=mv.size+ug.size-il.metadataRegistryEntries;if(t<=0)return;const e=[...Array.from(mv,([n,r])=>({key:n,at:r.lastAccess,failed:!1})),...Array.from(ug,([n,r])=>({key:n,at:r.lastAccess,failed:!0}))].sort((n,r)=>n.at-r.at);for(const n of e.slice(0,t))n.failed?ug.delete(n.key):mv.delete(n.key)}function uHe(t,e){return t.map(n=>{const r=n.tag.toLowerCase();if(!n.src||n.sourceDuration!=null||r!=="audio"&&r!=="video")return n;const i=UF(Bde(n.src,e));return i!=null&&i.duration&&i.duration>0?{...n,sourceDuration:i.duration}:n})}async function fHe(t,e,n){const r=t.flatMap(i=>{if(!i.src||i.sourceDuration!=null||!["video","audio"].includes(i.tag.toLowerCase()))return[];const s=Bde(i.src,e);return!UF(s)&&!Vde(GF(s))?[{el:i,source:s}]:[]});r.length!==0&&await Promise.allSettled(r.map(async({el:i,source:s})=>{const a=await hHe(s);a&&n(i.key??i.id,a.duration)}))}function Vde(t){const e=ug.get(t);return e===void 0?!1:Date.now()-e.failedAt<il.metadataFailureTtlMs?(e.lastAccess=++Ek,!0):(ug.delete(t),!1)}async function hHe(t){const e=GF(t),n=UF(e);if(n)return n;if(Vde(e))return null;let r=iR.get(e);return r||(r=new Promise(i=>{$de.push({key:e,epoch:sR,resolve:i}),Hde()}),iR.set(e,r),r)}function Hde(){for(;BM<il.concurrentMetadataJobs;){const t=$de.shift();if(!t)return;if(t.epoch!==sR){t.resolve(null);continue}BM++,lHe(t.key).then(e=>t.epoch!==sR?null:(iR.delete(t.key),e?mv.set(t.key,{result:e,lastAccess:++Ek}):ug.set(t.key,{failedAt:Date.now(),lastAccess:++Ek}),cHe(),e)).then(t.resolve).finally(()=>{BM--,Hde()})}}function dHe(t){return t.keepPlaying&&!t.wasReverseShuttle&&t.storeWasPlaying&&(t.duration<=0||t.nextTime<t.duration)}function pHe(t){return!t.keepPlaying||t.wasReverseShuttle}function mHe(t,e){return!!(t.source&&e&&t.source!==e.contentWindow)}function gHe(t,e){if(Fde()||mHe(t,e))return null;const n=t.data;return(n==null?void 0:n.source)!=="hf-preview"?null:jE(n)?n:null}function yHe(t,e){var n;try{if(ce.getState().elements.length===0){const r=(n=e==null?void 0:e.contentWindow)==null?void 0:n.__clipManifest;r&&r.clips.length>0&&t.processTimelineMessageRef.current(r)}Date.now()-t.lastTimelineMessageRef.current>500&&t.enrichMissingCompositionsRef.current()}catch{}}function xHe(t,e,n){if(t.lastTimelineMessageRef.current=Date.now(),t.processTimelineMessageRef.current(n),t.enrichMissingCompositionsRef.current(),!(ce.getState().elements.length>0))try{const r=e==null?void 0:e.contentDocument,i=t.getAdapter();if(!r||!i)return;const s=Zae(r,i.getDuration());s.length>0&&t.syncTimelineElements(s)}catch{}}function bHe(t){return e=>{const n=t.iframeRef.current,r=gHe(e,n);if(r){if(r.type==="state")return yHe(t,n);r.type==="timeline"&&Array.isArray(r.clips)&&xHe(t,n,r)}}}function vHe(t,e){return e.length!==t.length?!0:e.some((n,r)=>{const i=t[r];return!i||n.id!==i.id||n.start!==i.start||n.duration!==i.duration||n.track!==i.track||n.sourceDuration!==i.sourceDuration})}function AHe(){const t=x.useRef(null),e=x.useRef(0),n=x.useRef(void 0),r=x.useRef(null),i=x.useRef(!1),s=x.useRef(0),a=x.useRef(null),o=x.useRef(0),l=x.useRef(null),c=x.useRef(0),u=x.useRef(null),f=x.useRef(!1),{setIsPlaying:h,setCurrentTime:m,setDuration:y,setTimelineReady:p,setElements:v}=ce.getState(),b=x.useCallback((U,Q)=>{if(Fde())return;const K=ce.getState(),ee=Q??K.duration,se=cde(uHe(p3e(K.elements,U,K.duration,ee),K.timelineProjectId));vHe(K.elements,se)&&v(se),Number.isFinite(Q)&&(Q??0)>0&&Q!==K.duration&&y(Q??0),K.timelineReady||p(!0),fHe(se,K.timelineProjectId,(z,V)=>{ce.setState(ae=>{const he=ae.elements.findIndex(ye=>(ye.key??ye.id)===z);if(he===-1||ae.elements[he].sourceDuration!=null)return{};const ge=ae.elements.slice();return ge[he]={...ae.elements[he],sourceDuration:V},{elements:ge}})})},[v,p,y]),w=x.useCallback(()=>{var U,Q;try{const K=t.current,ee=K==null?void 0:K.contentWindow;if(!K||!ee)return null;const se=ee.__player&&typeof ee.__player.play=="function"?ee.__player:null,z=fae(K.contentDocument),V=$4(se);if(V>0&&z<=V)return WO(u,f),se;let ae=null;if(ee.__timeline){const ye=FG(ee.__timeline),fe=$4(ye);if(fe>0&&z<=fe)return WO(u,f),ye;fe>0&&(ae??(ae=ye))}if(ee.__timelines){const ye=Object.keys(ee.__timelines);if(ye.length>0){const fe=(Q=(U=K==null?void 0:K.contentDocument)==null?void 0:U.querySelector("[data-composition-id]"))==null?void 0:Q.getAttribute("data-composition-id"),me=fe&&fe in ee.__timelines?fe:ye[ye.length-1],Te=FG(ee.__timelines[me]),ve=$4(Te);if(ve>0&&z<=ve)return WO(u,f),Te;ve>0&&(ae??(ae=Te))}}const he=se??ae,ge=Math.max(ce.getState().duration,z,V);return he&&ge>0&&("renderSeek"in he||typeof he.seek=="function")?Cke({cache:u,warned:f,bestAdapter:he,effectiveDuration:ge,docDuration:z,clock:Oke(ee),getPlaybackRate:()=>ce.getState().playbackRate}):he}catch{return null}},[]),{startRAFLoop:O,stopRAFLoop:C,stopReverseLoop:E}=KVe({rafRef:e,reverseRafRef:s,getAdapter:w,setCurrentTime:m,setIsPlaying:h}),M=x.useCallback(U=>{const Q=t.current;if(Q){n3e(Q,U);try{const K=Q.contentWindow;if(K!=null&&K.__timelines)for(const ee of Object.values(K.__timelines))ee&&typeof ee.timeScale=="function"&&ee.timeScale(U)}catch{}}},[]),N=x.useCallback(()=>{const{audioMuted:U,audioVolume:Q}=ce.getState();t3e(t.current,U,Q)},[]),_=x.useCallback(()=>{C(),E(),lA();const U=w();U&&(U.getTime()>=U.getDuration()&&U.seek(ce.getState().inPoint??0),M(ce.getState().playbackRate),N(),U.play(),a.current="forward",h(!0),O())},[w,h,O,M,N,C,E]),I=x.useCallback(U=>{C(),E();const Q=w();if(!Q)return;const K=Math.max(0,Q.getDuration()),ee=Q.getTime()<=0&&K>0?K:Q.getTime();Q.pause(),ee!==Q.getTime()&&Q.seek(ee);const se=Math.max(.1,Math.min(4,U));M(se),N();let z=ee,V=performance.now();const ae=he=>{const ge=(he-V)/1e3*se;let ye=z-ge;const{inPoint:fe,outPoint:me}=ce.getState(),Te=me!==null?Math.min(me,K):K,ve=fe!==null?fe:0,xe=ve<Te?Te:K,we=ve<Te?ve:0;if(ye<=we)if(ce.getState().loopEnabled&&K>0)z=xe,V=he,ye=xe;else{Q.seek(we),ba.notify(we),m(we),h(!1),a.current=null,s.current=0;return}Q.seek(Math.max(0,ye)),ba.notify(Math.max(0,ye)),h(!0),s.current=requestAnimationFrame(ae)};h(!0),a.current="backward",s.current=requestAnimationFrame(ae)},[w,m,h,M,N,C,E]),j=x.useCallback(()=>{E();const U=w();U&&(U.pause(),m(U.getTime()),h(!1),a.current=null,o.current=0,C())},[w,m,h,C,E]),L=x.useCallback((U,Q)=>{const K=a.current==="backward";E();const ee=w();if(!ee)return r.current=Math.max(0,U),!1;const se=Math.max(0,ee.getDuration()),z=Math.max(0,se>0?Math.min(se,U):U),V=(Q==null?void 0:Q.keepPlaying)===!0,ae=dHe({keepPlaying:V,wasReverseShuttle:K,storeWasPlaying:ce.getState().isPlaying,duration:se,nextTime:z});return ee.seek(z,Q),ba.notify(z),m(z),!ae&&!V&&JVe(t.current,z),ae?(C(),M(ce.getState().playbackRate),N(),ee.play(),h(!0),a.current="forward",o.current=0,O()):pHe({keepPlaying:V,wasReverseShuttle:K})&&(C(),ce.getState().isPlaying&&h(!1),a.current=null,o.current=0),!0},[w,r,m,h,O,C,E,M,N,a,o]);x.useEffect(()=>ce.subscribe((U,Q)=>{var ee;U.requestedSeekTime!==null&&U.requestedSeekTime!==Q.requestedSeekTime&&(L(U.requestedSeekTime),ce.getState().clearSeekRequest());const K=U.playbackRequest;K&&K.nonce!==((ee=Q.playbackRequest)==null?void 0:ee.nonce)&&(K.playing?_():(j(),K.returnTo!==null&&L(K.returnTo)),ce.getState().clearPlaybackRequest())}),[L,_,j]);const{playbackKeyDownRef:H,playbackKeyUpRef:$,attachIframeShortcutListeners:G,togglePlay:q}=DVe({iframeRef:t,shuttleDirectionRef:a,shuttleSpeedIndexRef:o,iframeShortcutCleanupRef:l,getAdapter:w,play:_,playBackward:I,pause:j,seek:L}),{processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,onIframeLoad:ie}=YVe({iframeRef:t,probeIntervalRef:n,pendingSeekRef:r,isRefreshingRef:i,getAdapter:w,syncTimelineElements:b,setDuration:y,setCurrentTime:m,setTimelineReady:p,setIsPlaying:h,attachIframeShortcutListeners:G,applyPreviewAudioState:N}),te=x.useCallback(()=>{if(!(i.current&&r.current!=null)){const Q=w();Q?r.current=Q.getTime():r.current==null&&(r.current=ce.getState().currentTime??0)}i.current=!0,C(),E(),h(!1)},[w,C,h,E]),ne=x.useCallback(()=>{const U=t.current;if(!U)return;P2("refreshPlayer",()=>({stack:new Error("refreshPlayer").stack})),te(),U.style.visibility="hidden";const Q=U.src,K=new URL(Q,window.location.origin);K.searchParams.set("_t",String(Date.now())),jie(K),U.src=K.toString()},[te]),W=x.useRef(w);W.current=w,kr(()=>{const U=se=>H.current(se),Q=se=>$.current(se),K=bHe({iframeRef:t,processTimelineMessageRef:Y,enrichMissingCompositionsRef:J,lastTimelineMessageRef:c,getAdapter:w,syncTimelineElements:b}),ee=()=>{var se;if(document.hidden&&ce.getState().isPlaying){const z=(se=W.current)==null?void 0:se.call(W);z&&(z.pause(),h(!1),C())}};return window.addEventListener("keydown",U,!0),window.addEventListener("keyup",Q,!0),window.addEventListener("message",K),document.addEventListener("visibilitychange",ee),()=>{var se;window.removeEventListener("keydown",U,!0),window.removeEventListener("keyup",Q,!0),(se=l.current)==null||se.call(l),l.current=null,window.removeEventListener("message",K),document.removeEventListener("visibilitychange",ee),C(),E(),lA(),WO(u,f),n.current&&clearInterval(n.current)}});const F=x.useCallback(()=>{C(),E(),n.current&&clearInterval(n.current),ce.getState().reset()},[C,E]);return x.useEffect(()=>ce.subscribe((U,Q)=>{const K=U.playbackRate!==Q.playbackRate,ee=U.audioMuted!==Q.audioMuted,se=U.audioVolume!==Q.audioVolume;!K&&!ee&&!se||(K&&M(U.playbackRate),N())}),[M,N]),{iframeRef:t,play:_,pause:j,togglePlay:q,seek:L,onIframeLoad:ie,refreshPlayer:ne,saveSeekPosition:te,resetPlayer:F}}const GW='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])';function VS({open:t,onClose:e,containerRef:n,canClose:r}){const i=x.useRef(null),s=x.useRef(r);s.current=r;const a=x.useRef(e);a.current=e;const o=x.useCallback(()=>{const l=s.current;l&&!l()||a.current()},[]);return x.useEffect(()=>{var h;const l=document.activeElement;i.current=l instanceof HTMLElement?l:null;const c=n.current;(h=(c==null?void 0:c.querySelector(GW))??c)==null||h.focus();const f=m=>{if(m.key==="Escape"){m.stopPropagation(),o();return}if(m.key!=="Tab")return;const y=n.current;if(!y)return;const p=Array.from(y.querySelectorAll(GW));if(p.length===0)return;const v=p[0],b=p[p.length-1],w=document.activeElement;m.shiftKey&&(w===v||!y.contains(w))?(m.preventDefault(),b.focus()):!m.shiftKey&&(w===b||!y.contains(w))&&(m.preventDefault(),v.focus())};return document.addEventListener("keydown",f,!0),()=>{var m;document.removeEventListener("keydown",f,!0),(m=i.current)==null||m.focus(),i.current=null}},[t,n,o]),{requestClose:o}}function UW({findings:t,projectId:e,projectDir:n,title:r="HyperFrame Lint Results",promptIntro:i="Fix these HyperFrames lint issues",onClose:s}){const a=t.filter(v=>v.severity==="error"),o=t.filter(v=>v.severity==="warning"),l=t.length>0,[c,u]=x.useState(!1),[f,h]=x.useState(!1),m=x.useRef(null),{requestClose:y}=VS({open:!0,onClose:s,containerRef:m}),p=async()=>{const v=t.map(C=>{let E=`[${C.severity}] ${C.message}`;return C.file&&(E+=`
205
205
  File: ${C.file}`),C.fixHint&&(E+=`
206
206
  Fix: ${C.fixHint}`),E}),b=n?`Project path: ${n}
207
207