@hyperframes/producer 0.4.3 → 0.4.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
3
|
"buildId": "dev",
|
|
4
|
-
"sha256": "
|
|
4
|
+
"sha256": "47831285fdc6c965860f1276c49bc4d34803c9bc3d42615a2278c8600203a9d5",
|
|
5
5
|
"artifacts": {
|
|
6
6
|
"iife": "hyperframe.runtime.iife.js",
|
|
7
7
|
"esm": "hyperframe.runtime.mjs"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{function le(e){try{window.parent.postMessage(e,"*")}catch{}}function ht(e){let t=n=>{let
|
|
1
|
+
"use strict";(()=>{function le(e){try{window.parent.postMessage(e,"*")}catch{}}function ht(e){let t=n=>{let o=n.data;if(!o||o.source!=="hf-parent"||o.type!=="control")return;let r=o.action;if(r==="play"){e.onPlay();return}if(r==="pause"){e.onPause();return}if(r==="seek"){e.onSeek(Number(o.frame??0),o.seekMode??"commit");return}if(r==="set-muted"){e.onSetMuted(!!o.muted);return}if(r==="set-media-output-muted"){e.onSetMediaOutputMuted(!!o.muted);return}if(r==="set-playback-rate"){e.onSetPlaybackRate(Number(o.playbackRate??1));return}if(r==="enable-pick-mode"){e.onEnablePickMode();return}if(r==="disable-pick-mode"){e.onDisablePickMode();return}if(r==="flash-elements"){let i=o.selectors,c=o.duration||800;i&&pn(i,c)}};return window.addEventListener("message",t),t}function pn(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`
|
|
2
2
|
.__hf-flash {
|
|
3
3
|
outline: 2px solid rgba(59, 130, 246, 0.6) !important;
|
|
4
4
|
outline-offset: 2px !important;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
0% { outline-color: rgba(59, 130, 246, 0.8); }
|
|
9
9
|
100% { outline-color: transparent; }
|
|
10
10
|
}
|
|
11
|
-
`,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(
|
|
12
|
-
`),document.head.appendChild(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",k,!0),document.addEventListener("click",w,!0),document.addEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function B(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),r&&(r.remove(),r=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",k,!0),document.removeEventListener("click",w,!0),document.removeEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function $(){window.__HF_PICKER_API={enable:V,disable:B,isActive:()=>t,getHovered:()=>o,getSelected:()=>i,getCandidatesAtPoint:(g,m,S)=>Number.isFinite(g)&&Number.isFinite(m)?D(g,m,S):[],pickAtPoint:(g,m,S)=>{if(!Number.isFinite(g)||!Number.isFinite(m))return null;let A=D(g,m,8);if(!A.length)return null;let M=Math.max(0,Math.min(A.length-1,Number(S??0))),E=A[M]??null;return E?(u(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),B(),E):null},pickManyAtPoint:(g,m,S)=>{if(!Number.isFinite(g)||!Number.isFinite(m))return[];let A=D(g,m,8);if(!A.length)return[];let M=[],E=Array.isArray(S)?S:[0];for(let v of E){let _=Math.max(0,Math.min(A.length-1,Math.floor(Number(v)))),I=A[_];if(!I)continue;M.some(L=>L.selector===I.selector&&L.tagName===I.tagName)||M.push(I)}return M.length?(u(M[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:M}),B(),M):[]}},c("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:V,disablePickMode:B,installPickerApi:$}}function kt(e,t){let n=Number.isFinite(t)&&t>0?t:30,r=Number.isFinite(e)&&e>0?e:0;return Math.floor(r*n+1e-9)/n}function Lt(e,t,n){let r=kt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(r,!1):e.seek(r,!1),r}function Tt(e){return{_timeline:null,play:()=>{let t=e.getTimeline();if(!t||e.getIsPlaying())return;let n=Math.max(0,Number(e.getSafeDuration?.()??t.duration()??0)||0);n>0&&Math.max(0,Number(t.time())||0)>=n&&(t.pause(),t.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof t.timeScale=="function"&&t.timeScale(e.getPlaybackRate()),t.play(),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let t=e.getTimeline();if(!t)return;t.pause();let n=Math.max(0,Number(t.time())||0);e.onDeterministicSeek(n),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(n,!1),e.onRenderFrameSeek(n),e.onStatePost(!0)},seek:t=>{let n=e.getTimeline();if(!n)return;let r=Math.max(0,Number(t)||0),o=Lt(n,r,e.getCanonicalFps());e.onDeterministicSeek(o),e.setIsPlaying(!1),e.onSyncMedia(o,!1),e.onRenderFrameSeek(o),e.onStatePost(!0)},renderSeek:t=>{let n=e.getTimeline();if(!n)return;let r=Lt(n,t,e.getCanonicalFps());e.onDeterministicSeek(r),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},getTime:()=>Number(e.getTimeline()?.time()??0),getDuration:()=>Number(e.getTimeline()?.duration()??0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:t=>e.setPlaybackRate(t),getPlaybackRate:()=>e.getPlaybackRate()}}function wt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!1,mediaOutputMuted:!1,mediaAutoplayBlockedPosted:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,timelinePollIntervalId:null,controlBridgeHandler:null,clampDurationLoggedRaw:null,beforeUnloadHandler:null,domReadyHandler:null,injectedCompStyles:[],injectedCompScripts:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,maxTimelineDurationSeconds:1800,nativeVisualWatchdogTick:0}}function Re(e){let t=Number(e);return Number.isFinite(t)?t:null}function gn(e){let t=(e??"").trim();if(!t)return null;let n=Re(t);if(n!=null)return{kind:"absolute",value:n};let r=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!r)return null;let o=(r[1]??"").trim();if(!o)return null;let i=r[2]??"+",c=r[3]??"0",d=Number.parseFloat(c),u=Number.isFinite(d)?Math.max(0,d):0,s=i==="-"?-u:u;return{kind:"reference",refId:o,offset:s}}function Ce(e){let t=e.timelineRegistry??{},n=new WeakMap,r=new WeakMap,o=new Set,i=u=>{let s=document.getElementById(u);return s||(document.querySelector(`[data-composition-id="${CSS.escape(u)}"]`)??null)},c=u=>{let s=r.get(u);if(s!==void 0)return s;let l=null,x=Re(u.getAttribute("data-duration"));if(x!=null&&x>0&&(l=x),l==null||l<=0){let f=Re(u.getAttribute("data-end"));if(f!=null){let C=d(u,0),D=f-C;Number.isFinite(D)&&D>0&&(l=D)}}if((l==null||l<=0)&&u instanceof HTMLMediaElement){let f=Re(u.getAttribute("data-playback-start"))??Re(u.getAttribute("data-media-start"))??0;Number.isFinite(u.duration)&&u.duration>f&&(l=u.duration-f)}if(l==null||l<=0){let f=u.getAttribute("data-composition-id");if(f){let C=t[f]??null;if(C&&typeof C.duration=="function")try{let D=Number(C.duration());Number.isFinite(D)&&D>0&&(l=D)}catch{}}}return l!=null&&Number.isFinite(l)&&l>0?(r.set(u,l),l):(r.set(u,null),null)},d=(u,s)=>{let l=n.get(u);if(l!==void 0)return l??s;if(o.has(u))return s;o.add(u);try{let x=gn(u.getAttribute("data-start"));if(!x){if(u.hasAttribute("data-composition-id")){let w=u.parentElement;if(w&&(w.hasAttribute("data-composition-src")||w.hasAttribute("data-composition-id"))){let j=d(w,s);return n.set(u,j),j}}return n.set(u,s),s}if(x.kind==="absolute"){let w=Math.max(0,x.value);return n.set(u,w),w}let f=i(x.refId);if(!f)return n.set(u,s),s;let C=d(f,0),D=c(f);if(D==null||D<=0){let w=Math.max(0,C+x.offset);return n.set(u,w),w}let k=Math.max(0,C+D+x.offset);return n.set(u,k),k}finally{o.delete(u)}};return{resolveStartForElement:(u,s=0)=>d(u,Math.max(0,s)),resolveDurationForElement:u=>c(u)}}function ce(e){let t=Number(e);return Number.isFinite(t)?t:null}var Bt={composition:0,video:1,image:2,element:3,audio:4};function Sn(e){if(e.length===0)return;let t=new Map;for(let c of e){let d=t.get(c.track)??new Set;d.add(c.kind),t.set(c.track,d)}if(!Array.from(t.values()).some(c=>c.size>1))return;let r=0,o=new Map,i=[...t.keys()].sort((c,d)=>c-d);for(let c of i){let d=t.get(c);if(d.size===1)o.set(`${c}:${[...d][0]}`,r++);else{let u=[...d].sort((s,l)=>(Bt[s]??99)-(Bt[l]??99));for(let s of u)o.set(`${c}:${s}`,r++)}}for(let c of e){let d=`${c.track}:${c.kind}`,u=o.get(d);u!=null&&(c.track=u)}}function Ie(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function Fn(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Ie(t);let n=e.getAttribute("data-composition-src");if(n)return Ie(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?Ie(r.getAttribute("src")):null}function vt(e){let n=window.__timelines??{},r=Ce({timelineRegistry:n}),o=N=>{if(!N)return null;let F=n[N]??null;if(!F||typeof F.duration!="function")return null;try{let T=Number(F.duration());return Number.isFinite(T)&&T>0?T:null}catch{return null}},i=N=>{let F=ce(N.getAttribute("data-duration"));if(F!=null&&F>0)return F;let T=ce(N.getAttribute("data-playback-start"))??ce(N.getAttribute("data-media-start"))??0;return Number.isFinite(N.duration)&&N.duration>T?Math.max(0,N.duration-T):null},c=()=>{let N=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(N.length===0)return null;let F=0;for(let T of N){let W=r.resolveStartForElement(T,0);if(!Number.isFinite(W))continue;let Q=i(T);Q==null||Q<=0||(F=Math.max(F,Math.max(0,W)+Q))}return F>0?F:null},d=N=>{let F=N.trim().toLowerCase();return!(!F||F==="main"||F.includes("caption")||F.includes("ambient"))},u=(N,F)=>{let T=[],W=null,Q=null,R=null,P=N.parentElement;for(;P;){let O=P.getAttribute("data-composition-id");O&&(T.push(O),!R&&P!==F&&(R=O),W==null&&(W=r.resolveStartForElement(P,0)),Q==null&&(Q=ce(P.getAttribute("data-duration"))??o(O)??null)),P=P.parentElement}return{parentCompositionId:R,compositionAncestors:T.reverse(),inheritedStart:W,inheritedDuration:Q}},s=document.querySelector("[data-composition-id]"),l=s?.getAttribute("data-composition-id")??null,x=s?r.resolveStartForElement(s,0):0,f=c(),C=f!=null?Math.max(0,f-Math.max(0,x)):null,D=o(l),k=ce(s?.getAttribute("data-duration")),w=typeof D=="number"&&Number.isFinite(D)&&D>0?D:null,j=typeof k=="number"&&Number.isFinite(k)&&k>0?k:null,V=typeof C=="number"&&Number.isFinite(C)&&C>0?C:null,B=w!=null&&V!=null&&w>V+1,$=j??(B?V:w??V),g=$!=null?Math.min($,e.maxTimelineDurationSeconds):null,S=(g!=null?x+g:null)??(typeof f=="number"&&Number.isFinite(f)&&f>0?f:null),A=(N,F)=>!Number.isFinite(F)||F<=0?0:S==null||!Number.isFinite(S)?F:!Number.isFinite(N)||N>=S?0:Math.max(0,Math.min(F,S-N)),M=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],v=[],_=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),I=0;for(let N=0;N<_.length;N+=1){let F=_[N];if(F===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(F.tagName))continue;let T=u(F,s),W=r.resolveStartForElement(F,T.inheritedStart??0),Q=F.getAttribute("data-composition-id"),R=ce(F.getAttribute("data-duration"));if((R==null||R<=0)&&Q&&Q!==l&&(R=o(Q)),(R==null||R<=0)&&F instanceof HTMLMediaElement){let ue=ce(F.getAttribute("data-playback-start"))??ce(F.getAttribute("data-media-start"))??0;Number.isFinite(F.duration)&&F.duration>0&&(R=Math.max(0,F.duration-ue))}if(R==null||R<=0){let ue=T.inheritedDuration;if(ue!=null&&ue>0){let pe=(T.inheritedStart??0)+ue;R=Math.max(0,pe-W)}}if(R==null||R<=0||(R=A(W,R),R<=0))continue;let P=W+R;I=Math.max(I,P);let O=F.tagName.toLowerCase(),fe=Q&&Q!==l?"composition":O==="video"?"video":O==="audio"?"audio":O==="img"?"image":"element";E.push({id:F.id||Q||`__node__index_${N}`,label:F.getAttribute("data-timeline-label")??F.getAttribute("data-label")??F.getAttribute("aria-label")??Q??F.id??F.className?.split(" ")[0]??fe,start:W,duration:R,track:Number.parseInt(F.getAttribute("data-track-index")??F.getAttribute("data-track")??String(N),10)||0,kind:fe,tagName:O,compositionId:F.getAttribute("data-composition-id"),compositionAncestors:T.compositionAncestors,parentCompositionId:T.parentCompositionId,nodePath:null,compositionSrc:Ie(F.getAttribute("data-composition-src")),assetUrl:Fn(F),timelineRole:F.getAttribute("data-timeline-role"),timelineLabel:F.getAttribute("data-timeline-label"),timelineGroup:F.getAttribute("data-timeline-group"),timelinePriority:ce(F.getAttribute("data-timeline-priority"))})}let X=new Set(E.map(N=>N.id)),L=s?.getAttribute("data-composition-id")??null,U=L?n[L]??null:null;if(U&&s){let N=U;if(typeof N.getChildren=="function")try{let F=N.getChildren(!0,!0,!1)??[],T=new Map;for(let R of s.children){let P=R;if(!P.id)continue;let O=P.tagName.toLowerCase();O==="script"||O==="style"||O==="link"||T.set(P,{id:P.id,start:1/0,end:-1/0})}let W=R=>{let P=R;for(;P;){if(T.has(P))return P;if(P===s)return null;P=P.parentElement}return null};for(let R of F){if(typeof R.targets!="function"||typeof R.startTime!="function"||typeof R.duration!="function")continue;let P=R.startTime(),O=R.parent;for(;O&&typeof O.startTime=="function";)P+=O.startTime(),O=O.parent;let fe=P+R.duration();if(!(!Number.isFinite(P)||!Number.isFinite(fe)))for(let ue of R.targets()){if(!(ue instanceof Element))continue;let Te=W(ue);if(!Te)continue;let pe=T.get(Te);pe&&(pe.start=Math.min(pe.start,P),pe.end=Math.max(pe.end,fe))}}let Q=E.length>0?Math.max(...E.map(R=>R.track))+1:0;for(let[R,P]of T){if(P.start===1/0||P.end===-1/0)continue;let O=R;if(X.has(O.id))continue;let fe=Math.max(0,P.end-P.start);if(fe<=0)continue;let ue=A(P.start,fe);ue<=0||(I=Math.max(I,P.start+ue),E.push({id:O.id,label:O.getAttribute("data-timeline-label")??O.getAttribute("data-label")??O.getAttribute("aria-label")??O.id,start:P.start,duration:ue,track:Number.parseInt(O.getAttribute("data-track-index")??O.getAttribute("data-track")??"",10)||Q,kind:"element",tagName:O.tagName.toLowerCase(),compositionId:O.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:O.getAttribute("data-timeline-role"),timelineLabel:O.getAttribute("data-timeline-label"),timelineGroup:O.getAttribute("data-timeline-group"),timelinePriority:ce(O.getAttribute("data-timeline-priority"))}),X.add(O.id))}}catch{}}if(s&&g!=null&&g>0){let N=E.length>0?Math.max(...E.map(F=>F.track))+1:0;for(let F of s.children){let T=F;if(!T.id||X.has(T.id))continue;let W=T.tagName.toLowerCase();if(W==="script"||W==="style"||W==="link"||W==="meta"||window.getComputedStyle(T).display==="none")continue;let R=A(0,g);R<=0||(I=Math.max(I,R),E.push({id:T.id,label:T.getAttribute("data-timeline-label")??T.getAttribute("data-label")??T.getAttribute("aria-label")??T.id,start:0,duration:R,track:Number.parseInt(T.getAttribute("data-track-index")??T.getAttribute("data-track")??"",10)||N,kind:"element",tagName:W,compositionId:T.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:T.getAttribute("data-timeline-role"),timelineLabel:T.getAttribute("data-timeline-label"),timelineGroup:T.getAttribute("data-timeline-group"),timelinePriority:ce(T.getAttribute("data-timeline-priority"))}),X.add(T.id))}}Sn(E);for(let N of M){if(N===s)continue;let F=N.getAttribute("data-composition-id");if(!F||!d(F))continue;let T=r.resolveStartForElement(N,0),W=ce(N.getAttribute("data-duration")),Q=o(F),R=W&&W>0?W:Q;if(R==null||R<=0)continue;let P=A(T,R);P<=0||v.push({id:F,label:N.getAttribute("data-label")??F,start:T,duration:P,thumbnailUrl:Ie(N.getAttribute("data-thumbnail-url")),avatarName:null})}let te=Math.max(1,Math.min(I||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:B&&j==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(te*Math.max(1,e.canonicalFps))),clips:E,scenes:v,compositionWidth:ce(s?.getAttribute("data-width"))??1920,compositionHeight:ce(s?.getAttribute("data-height"))??1080}}var Nn=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,En=e=>new Promise(t=>{let n=!1,r=Date.now(),o=null,i=c=>{n||(n=!0,o!=null&&window.clearTimeout(o),t({status:c,elapsedMs:Math.max(0,Date.now()-r)}))};e.addEventListener("load",()=>i("load"),{once:!0}),e.addEventListener("error",()=>i("error"),{once:!0}),o=window.setTimeout(()=>i("timeout"),8e3)});function et(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function Rt(e,t){let n=e.trim();if(!n)return e;try{return Nn.test(n)?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}async function tt(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(s=>s.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode;if(e.headStyles)for(let u of e.headStyles){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let r=Array.from(n.querySelectorAll("style"));for(let u of r){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let o=[];if(e.headScripts)for(let u of e.headScripts){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=Rt(l,e.compositionUrl);o.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&o.push({kind:"inline",content:x,type:s})}}let i=Array.from(n.querySelectorAll("script")),c=[...o];for(let u of i){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=Rt(l,e.compositionUrl);c.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&c.push({kind:"inline",content:x,type:s})}u.parentNode?.removeChild(u)}let d=Array.from(n.querySelectorAll("style"));for(let u of d)u.parentNode?.removeChild(u);if(t){let u=document.importNode(t,!0),s=t.getAttribute("data-width"),l=t.getAttribute("data-height"),x=e.parseDimensionPx(s),f=e.parseDimensionPx(l);u.style.position="relative",u.style.width=x||"100%",u.style.height=f||"100%",x&&u.style.setProperty("--comp-width",x),f&&u.style.setProperty("--comp-height",f),s&&e.host.setAttribute("data-width",s),l&&e.host.setAttribute("data-height",l),x&&e.host instanceof HTMLElement&&(e.host.style.width=x),f&&e.host instanceof HTMLElement&&(e.host.style.height=f),e.host.appendChild(u)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let u of c){let s=document.createElement("script");if(u.type&&(s.type=u.type),s.async=!1,u.kind==="external"?s.src=u.src:u.type.toLowerCase()==="module"?s.textContent=u.content:s.textContent=`(function(){${u.content}})();`,document.body.appendChild(s),e.injectedScripts.push(s),u.kind==="external"){let l=await En(s);l.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:u.src,loadStatus:l.status,elapsedMs:l.elapsedMs}})}}}async function It(e){let t=Array.from(document.querySelectorAll("[data-composition-id]:not([data-composition-src])")).filter(n=>{if(n.children.length>0)return!1;let r=n.getAttribute("data-composition-id");return r?!!document.querySelector(`template#${CSS.escape(r)}-template`):!1});if(t.length!==0)for(let n of t){let r=n.getAttribute("data-composition-id"),o=document.querySelector(`template#${CSS.escape(r)}-template`);et(n),await tt({host:n,hostCompositionId:r,hostCompositionSrc:`template#${r}-template`,sourceNode:o.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function Pt(e){let t=Array.from(document.querySelectorAll("[data-composition-src]"));t.length!==0&&await Promise.all(t.map(async n=>{let r=n.getAttribute("data-composition-src");if(!r)return;let o=null;try{o=new URL(r,document.baseURI)}catch{o=null}et(n);try{let i=n.getAttribute("data-composition-id"),c=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(c){await tt({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let d=await fetch(r);if(!d.ok)throw new Error(`HTTP ${d.status}`);let u=await d.text(),l=new DOMParser().parseFromString(u,"text/html"),x=(i?l.querySelector(`template#${CSS.escape(i)}-template`):null)??l.querySelector("template"),f=x?x.content:l.body,C=x?void 0:Array.from(l.head.querySelectorAll("style")),D=x?void 0:Array.from(l.head.querySelectorAll("script"));await tt({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:f,hasTemplate:!!x,fallbackBodyInnerHtml:l.body.innerHTML,compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,headStyles:C,headScripts:D,onDiagnostic:e.onDiagnostic})}catch(i){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:n.getAttribute("data-composition-id"),hostCompositionSrc:r,errorMessage:i instanceof Error?i.message:"unknown_error"}}),et(n)}}))}function nt(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=[],r=document.querySelectorAll(".caption-group");for(let o of r){let i=o.querySelectorAll(":scope > span");for(let c of i)n.push(c)}for(let o of t){let i=null;if(o.wordId&&(i=document.getElementById(o.wordId)),!i&&o.wordIndex!==void 0&&(i=n[o.wordIndex]??null),!i||!(i instanceof HTMLElement))continue;let c={},d={};if(o.x!==void 0&&(c.x=o.x),o.y!==void 0&&(c.y=o.y),o.scale!==void 0&&(c.scale=o.scale),o.rotation!==void 0&&(c.rotation=o.rotation),o.opacity!==void 0&&(d.opacity=o.opacity),o.fontSize!==void 0&&(d.fontSize=`${o.fontSize}px`),o.fontWeight!==void 0&&(d.fontWeight=o.fontWeight),o.fontFamily!==void 0&&(d.fontFamily=o.fontFamily),o.activeColor||o.dimColor){let s=e.getTweensOf(i).filter(x=>x.vars.color!==void 0).sort((x,f)=>x.startTime()-f.startTime()),l=s.length>0?String(s[0].vars.color):"";for(let x of s)String(x.vars.color)===l?o.dimColor&&(x.vars.color=o.dimColor):o.activeColor&&(x.vars.color=o.activeColor);o.dimColor&&e.set(i,{color:o.dimColor})}if(Object.keys(d).length>0&&e.set(i,d),Object.keys(c).length>0){let u=document.createElement("span");u.style.display="inline-block",u.dataset.captionWrapper="true",i.parentNode?.insertBefore(u,i),u.appendChild(i),e.set(u,c)}}}).catch(()=>{})}function Ot(){let e=wt(),t=window,n=null,r=null,o=[],i=new Set,c=null;if(typeof t.__hfRuntimeTeardown=="function")try{t.__hfRuntimeTeardown()}catch{}document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden"),window.__timelines=window.__timelines||{};let d=a=>{o.push(a)},u=(a,p,h)=>{let b=h??`${a}:${JSON.stringify(p)}`;i.has(b)||(i.add(b),le({source:"hf-preview",type:"diagnostic",code:a,details:p}))},s=a=>{let p={scale:1,focusX:960,focusY:540},h=[],b=[],y={time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:a.play,pause:a.pause,seek:a.seek,getTime:a.getTime,getDuration:a.getDuration,isPlaying:a.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>p,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>h,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:a.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>b,getRenderState:()=>({...y,time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying()})}},l=1/60,x=.75,f=.75,C=.35,D=900,k=3,w=2,j=.05,V=100,B=240,$=a=>{if(a instanceof Error)return a.message||String(a);if(typeof a=="string")return a;try{return JSON.stringify(a)}catch{return String(a??"")}},g=a=>{let p=a.toLowerCase();return p.includes("cannot read properties of null")||p.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:p.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:p.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},m=a=>{if(a==null||a.trim()==="")return null;let p=Number.parseFloat(a);return!Number.isFinite(p)||p<=0?null:`${p}px`},S=()=>{let a=document.querySelector('[data-composition-id][data-root="true"]');if(a instanceof HTMLElement)return a;let p=Array.from(document.querySelectorAll("[data-composition-id]"));return p.length===0?null:p.find(h=>!h.parentElement?.closest("[data-composition-id]"))??p[0]??null},A=()=>{let a=S();if(!a)return;let p=m(a.getAttribute("data-width")),h=m(a.getAttribute("data-height"));p&&(a.style.width=p),h&&(a.style.height=h),p&&a.style.setProperty("--comp-width",p),h&&a.style.setProperty("--comp-height",h)},M=()=>{let a=S(),p=Array.from(document.querySelectorAll("[data-composition-id]")).filter(h=>h.hasAttribute("data-duration")||h.hasAttribute("data-end"));for(let h of p)a&&h===a||(h.removeAttribute("data-duration"),h.removeAttribute("data-end"))},E=()=>{let a=S();if(!a)return;a.style.position||(a.style.position="relative"),a.style.overflow="hidden";let p=m(a.getAttribute("data-width")),h=m(a.getAttribute("data-height"));p&&(a.style.width=p),h&&(a.style.height=h);let b=Array.from(a.children);for(let y of b){let Z=y.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!y.hasAttribute("data-start"))continue;let se=(y.style.top==="0px"||y.style.top==="0")&&(y.style.left==="0px"||y.style.left==="0")&&y.style.width==="100%"&&y.style.height==="100%",Ee=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(y.style.transform);if(se&&Ee&&!y.hasAttribute("data-width")&&!y.hasAttribute("data-height")){let de=y.style.top,K=y.style.left,z=y.style.width,J=y.style.height;y.style.top="",y.style.left="",y.style.width="",y.style.height="";let G=window.getComputedStyle(y);G.top!=="auto"||G.bottom!=="auto"||G.left!=="auto"||G.right!=="auto"||G.width!=="0px"||G.height!=="0px"||(y.style.top=de,y.style.left=K,y.style.width=z,y.style.height=J)}let ne=window.getComputedStyle(y),ee=ne.position;if(ee!=="absolute"&&ee!=="fixed"&&(y.style.position="absolute"),!!y.style.top||!!y.style.bottom||ne.top!=="auto"||ne.bottom!=="auto"||(y.style.top="0"),!!y.style.left||!!y.style.right||ne.left!=="auto"||ne.right!=="auto"||(y.style.left="0"),Z!=="audio"){let de=m(y.getAttribute("data-width")),K=m(y.getAttribute("data-height")),z=ne.width!=="0px"&&ne.width!=="auto",J=ne.height!=="0px"&&ne.height!=="auto";de?!y.style.width&&!z&&(y.style.width=de):!y.style.width&&ne.width==="0px"&&(y.style.width="100%"),K?!y.style.height&&!J&&(y.style.height=K):!y.style.height&&ne.height==="0px"&&(y.style.height="100%")}}},v=(a,p=0)=>Ce({timelineRegistry:window.__timelines??{}}).resolveStartForElement(a,p),_=a=>Ce({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(a),I=!!document.querySelector("[data-composition-src]"),X=!1;{let a=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let p of a){let h=p.getAttribute("data-composition-id");if(h&&p.children.length===0&&document.querySelector(`template#${CSS.escape(h)}-template`)){X=!0;break}}}let L=!I&&!X,U=a=>{if(!a||typeof a.duration!="function")return null;try{let p=Number(a.duration());return Number.isFinite(p)?Math.max(0,p):null}catch{return null}},te=a=>typeof a=="number"&&Number.isFinite(a)&&a>l,H=a=>{let p=Number(a.getAttribute("data-duration"));if(Number.isFinite(p)&&p>0)return p;let h=Number(a.getAttribute("data-playback-start")??a.getAttribute("data-media-start")??"0"),b=Number.isFinite(h)?Math.max(0,h):0;return Number.isFinite(a.duration)&&a.duration>b?Math.max(0,a.duration-b):null},q=()=>{let a=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(a.length===0)return null;let p=0;for(let h of a){let b=v(h,0);if(!Number.isFinite(b))continue;let y=H(h);y==null||y<=l||(p=Math.max(p,Math.max(0,b)+y))}return p>l?p:null},N=()=>{let a=q();return typeof a!="number"||!Number.isFinite(a)||a<=l?null:a},F=a=>te(a)?Math.max(l,a*x):l,T=(a,p=0)=>{let h=U(a),b=N(),y=Number.isFinite(p)&&p>l?p:0,Z=0;te(h)?Z=Math.max(h,y):te(b)?Z=Math.max(b,y):Z=y;let se=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,se)):0},W=()=>{let a=window.__timelines??{},p=Ce({timelineRegistry:a}),h=N(),b=F(h),y=K=>{let z=document.querySelector(`[data-composition-id="${CSS.escape(K)}"]`);return z?p.resolveStartForElement(z,0):0},Z=K=>{let z=window.gsap;if(!z||typeof z.timeline!="function")return null;let J=z.timeline({paused:!0});for(let G of K)J.add(G.timeline,y(G.compositionId));return J},se=(K,z)=>{if(!te(K))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let G=J.timeline({paused:!0});if(z)try{G.add(z,0)}catch{}let Y=G;if(typeof Y.to=="function")try{Y.to({},{duration:K})}catch{}return G},Ee=(K,z)=>{let J=K;if(typeof J.getChildren!="function")return[];try{let G=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(G))return[];let Y=[];for(let oe of z)if(!G.some(Ae=>Ae===oe.timeline))try{let Ae=y(oe.compositionId);K.add(oe.timeline,Ae),Y.push(oe.compositionId)}catch{}return Y}catch{return[]}},ne=S(),ee=ne?.getAttribute("data-composition-id")??null;if(!ee)return{timeline:null};let ae=a[ee]??null,ie=(()=>{if(!ne)return[];let K=new Set,z=Array.from(ne.querySelectorAll("[data-composition-id]")),J=[];for(let G of z){let Y=G.getAttribute("data-composition-id");if(!Y||Y===ee||K.has(Y))continue;K.add(Y);let oe=a[Y]??null;if(!oe||typeof oe.play!="function"||typeof oe.pause!="function")continue;let Me=U(oe);J.push({compositionId:Y,timeline:oe,durationSeconds:Me??0})}return J})(),de=K=>{for(let z of K){let J=z.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ie.length>0&&de(ie),ae){let K=ie.length>0?Ee(ae,ie):[];if((ie.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+ee+"'])"))&&(R=!0),K.length>0)try{let G=ae.time();ae.seek(G,!1)}catch{}let z=U(ae);if(!te(z)&&ie.length>0){let G=ie.map(fn=>fn.compositionId),Y=Z(ie),oe=U(Y);if(Y&&te(oe))return{timeline:Y,selectedTimelineIds:G,selectedDurationSeconds:oe,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:b,selectedDurationSeconds:oe,mediaDurationFloorSeconds:h,selectedTimelineIds:G,autoNestedChildren:K}}};let Me=se(h??0,ae),Ae=U(Me);if(Me&&te(Ae))return{timeline:Me,selectedTimelineIds:[ee],selectedDurationSeconds:Ae,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,selectedDurationSeconds:Ae,selectedTimelineIds:[ee],autoNestedChildren:K}}}}if(!te(z)&&ie.length===0){let G=se(h??0,ae),Y=U(G);if(G&&te(Y))return{timeline:G,selectedTimelineIds:[ee],selectedDurationSeconds:Y,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,selectedDurationSeconds:Y,selectedTimelineIds:[ee]}}}}let J=ne?.getAttribute("data-duration");if(J){let G=parseFloat(J);if(te(G)&&te(z)&&G>=z+.5){let Y=ae;if(typeof Y.to=="function")try{Y.to({},{duration:0},G)}catch{}let oe=U(ae);if(te(oe))return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:oe,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:ee,rootDurationSeconds:z,rootDeclaredDur:G,newDur:oe}}}}}return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:z,mediaDurationFloorSeconds:h,diagnostics:K.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:ee,selectedDurationSeconds:z,autoNestedChildren:K}}:void 0}}if(ie.length>0){let K=ie.map(G=>G.compositionId),z=Z(ie),J=U(z);if(z)return{timeline:z,selectedTimelineIds:K,selectedDurationSeconds:J,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:ee,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:b,selectedDurationSeconds:J,mediaDurationFloorSeconds:h,selectedTimelineIds:K}}}}return{timeline:null}},Q=()=>{let a=e.capturedTimeline;if(!a||typeof a.time!="function")return;let p=Number(a.time());Number.isFinite(p)&&(e.currentTime=Math.max(0,p))},R=!1,P=()=>{if(!L)return!1;let a=e.capturedTimeline,p=U(a),h=te(p);if(a&&h&&R)return!1;let b=W();return b.timeline?a&&a===b.timeline?(typeof a.timeScale=="function"&&a.timeScale(e.playbackRate),!1):(e.capturedTimeline=b.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),b.diagnostics&&le({source:"hf-preview",type:"diagnostic",code:b.diagnostics.code,details:b.diagnostics.details}),le({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:b.selectedTimelineIds??[],selectedDurationSeconds:b.selectedDurationSeconds??null,mediaDurationFloorSeconds:b.mediaDurationFloorSeconds??null}}),!0):!1},O=()=>{let a=S();if(!(a instanceof HTMLElement))return;let p=a.getBoundingClientRect(),h=Number(a.getAttribute("data-width")),b=Number(a.getAttribute("data-height")),y=window.getComputedStyle(a),Z=Number.isFinite(h)&&h>0&&Number.isFinite(b)&&b>0,se=p.width<=0||p.height<=0||a.clientWidth<=0||a.clientHeight<=0;!Z||!se||u("root_stage_layout_zero",{compositionId:a.getAttribute("data-composition-id")??null,declaredWidth:h,declaredHeight:b,rectWidth:Math.round(p.width),rectHeight:Math.round(p.height),clientWidth:a.clientWidth,clientHeight:a.clientHeight,display:y.display,visibility:y.visibility,overflow:y.overflow},`root-stage-layout-zero:${a.getAttribute("data-composition-id")??"unknown"}`)},fe=()=>{e.tornDown||(c!=null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{c=null,O()}))},ue=()=>{n=a=>{let p=$(a.error??a.message).slice(0,B);if(!p)return;let h=g(p);le({source:"hf-preview",type:"diagnostic",code:h.code,details:{category:h.category,message:p,filename:a.filename||null,line:Number.isFinite(a.lineno)?a.lineno:null,column:Number.isFinite(a.colno)?a.colno:null}})},r=a=>{let p=$(a.reason).slice(0,B);if(!p)return;let h=g(p);le({source:"hf-preview",type:"diagnostic",code:`${h.code}_unhandled_rejection`,details:{category:`${h.category}-unhandled-rejection`,message:p}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",r)},Te=()=>{let a=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let h of a){let b=()=>{if(!(h instanceof Element))return;let y=h.tagName.toLowerCase(),Z=h.getAttribute("src")??h.getAttribute("href")??h.getAttribute("poster")??null,se=y==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";u(se,{tagName:y,assetUrl:Z,currentSrc:(h instanceof HTMLImageElement||h instanceof HTMLMediaElement)&&h.currentSrc||null,readyState:h instanceof HTMLMediaElement?h.readyState:null,networkState:h instanceof HTMLMediaElement?h.networkState:null},`${se}:${y}:${Z??"unknown"}`)};h.addEventListener("error",b),d(()=>{h.removeEventListener("error",b)})}let p=document.fonts;p&&p.ready.then(()=>{if(e.tornDown)return;let h=Array.from(p).filter(b=>b.status==="error").map(b=>b.family).filter(b=>!!b).slice(0,10);h.length!==0&&u("runtime_font_load_issue",{failedFamilies:h,totalFaces:Array.from(p).length},`runtime-font-load-issue:${h.join("|")}`)}).catch(()=>{})},pe=(a,p)=>{if(!a.timeline)return!1;let h=e.capturedTimeline;if(h&&h===a.timeline)return!1;let b=Math.max(0,e.currentTime||0),y=e.isPlaying;e.capturedTimeline=a.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(b,!1),y&&e.capturedTimeline.play()}catch{}return le({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:p,previousTime:b,selectedTimelineIds:a.selectedTimelineIds??[],selectedDurationSeconds:a.selectedDurationSeconds??null,mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),!0},Ne=null,dt=!1,_e=new Set,We=()=>{e.tornDown||(Ne!=null&&window.clearTimeout(Ne),Ne=window.setTimeout(()=>{if(e.tornDown)return;Ne=null;let a=W();if(!a.timeline||!te(a.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){P()&&(ye(),ge(!0));return}if(dt)return;let h=U(e.capturedTimeline),b=a.selectedDurationSeconds??U(a.timeline);te(b)&&(!te(h)||b>=h+j)&&pe(a,"manual")&&(dt=!0,le({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:h??null,selectedDurationSeconds:b??null,selectedTimelineIds:a.selectedTimelineIds??[],mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),ye(),ge(!0))},V))},dn=()=>{for(let a of _e)a.removeEventListener("loadedmetadata",We),a.removeEventListener("durationchange",We);_e.clear()},Ke=()=>{if(e.tornDown)return;let a=Array.from(document.querySelectorAll("video, audio"));for(let p of a)_e.has(p)||(_e.add(p),p.addEventListener("loadedmetadata",We),p.addEventListener("durationchange",We),p.preload!=="auto"&&(p.preload="auto"),p.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&p.load())},mt=()=>{let a=Mt({resolveStartSeconds:b=>v(b,0)});Ct({clips:a.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate,outputMuted:e.mediaOutputMuted,onAutoplayBlocked:()=>{e.mediaAutoplayBlockedPosted||(e.mediaAutoplayBlockedPosted=!0,le({source:"hf-preview",type:"media-autoplay-blocked"}))}});let p=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,h=Array.from(document.querySelectorAll("[data-start]"));for(let b of h){if(!(b instanceof HTMLElement))continue;let y=b.tagName.toLowerCase();if(y==="script"||y==="style"||y==="link"||y==="meta")continue;if(!b.getAttribute("data-composition-id")){let de=b.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(de&&de!==p)continue}let se=v(b,0),Ee=_(b),ne=Ee!=null&&Ee>0?se+Ee:Number.POSITIVE_INFINITY,ee=ne,ae=b.getAttribute("data-composition-id");if(ae&&!Number.isFinite(ne)){let ie=(window.__timelines??{})[ae];if(ie&&typeof ie.duration=="function"){let de=ie.duration();de>0&&(ee=se+de)}}let Ze=e.currentTime>=se&&(Number.isFinite(ee)?e.currentTime<ee:!0);b.style.visibility=Ze?"visible":"hidden"}},ge=a=>{Q();let p=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),h=Date.now();(a||p!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||h-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=p,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=h,le({source:"hf-preview",type:"state",frame:p,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ye=()=>{M(),A(),E();let a=S();if(a){let h=m(a.getAttribute("data-width")),b=m(a.getAttribute("data-height")),y=h?parseInt(h,10):0,Z=b?parseInt(b,10):0;y>0&&Z>0&&le({source:"hf-preview",type:"stage-size",width:y,height:Z})}P();let p=vt({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=p,le(p),fe()},we=(a,p=0)=>{for(let h of e.deterministicAdapters){try{a==="discover"&&h.discover(),a==="pause"&&h.pause(),a==="play"&&h.play&&h.play()}catch{}if(a==="discover")try{h.seek({time:p})}catch{}}};if(L)nt();else{let a={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:m,onDiagnostic:({code:p,details:h})=>{le({source:"hf-preview",type:"diagnostic",code:p,details:h})}};Pt(a).then(()=>It(a)).finally(()=>{L=!0,we("discover",e.currentTime),Ke(),Te(),nt(),ye(),ge(!0)})}let He=Dt({postMessage:a=>le(a)});He.installPickerApi();let xt=a=>{let p=Number(a);!Number.isFinite(p)||p<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,p)),e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let h=document.querySelectorAll("video, audio");for(let b of h)if(b instanceof HTMLMediaElement)try{b.playbackRate=e.playbackRate}catch{}},re=Tt({getTimeline:()=>e.capturedTimeline,setTimeline:a=>{e.capturedTimeline=a},getIsPlaying:()=>e.isPlaying,setIsPlaying:a=>{e.isPlaying=a},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:xt,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(a,p)=>{e.currentTime=Math.max(0,Number(a)||0),e.isPlaying=p,mt()},onStatePost:ge,onDeterministicSeek:a=>{for(let p of e.deterministicAdapters)try{p.seek({time:Number(a)||0})}catch{}},onDeterministicPause:()=>we("pause"),onDeterministicPlay:()=>we("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>T(e.capturedTimeline,0)});window.__player=s(re),window.__playerReady=!0,window.__renderReady=!0,gt(le),Be("composition_loaded",{duration:re.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=ht({onPlay:()=>{re.play(),Be("composition_played",{time:re.getTime()})},onPause:()=>{re.pause(),Be("composition_paused",{time:re.getTime()})},onSeek:(a,p)=>{let h=Math.max(0,a)/e.canonicalFps;re.seek(h),Be("composition_seeked",{time:h})},onSetMuted:a=>{e.bridgeMuted=a;let p=a||e.mediaOutputMuted,h=document.querySelectorAll("video, audio");for(let b of h)b instanceof HTMLMediaElement&&(b.muted=p)},onSetMediaOutputMuted:a=>{e.mediaOutputMuted=a;let p=a||e.bridgeMuted,h=document.querySelectorAll("video, audio");for(let b of h)b instanceof HTMLMediaElement&&(b.muted=p)},onSetPlaybackRate:a=>xt(a),onEnablePickMode:()=>He.enablePickMode(),onDisablePickMode:()=>He.disablePickMode()}),P(),e.capturedTimeline&&(re._timeline=e.capturedTimeline),L&&setTimeout(()=>{let a=e.capturedTimeline;P()&&e.capturedTimeline!==a&&(re._timeline=e.capturedTimeline),we("discover",e.currentTime),ye(),ge(!0)},0),e.deterministicAdapters=[St({resolveStartSeconds:a=>v(a,0)}),bt(),At(),yt(),Ft({getTimeline:()=>e.capturedTimeline})],ue(),we("discover"),Ke(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let Ve=0,je=null,ft=0,Je=!1,be=0,pt=()=>{ft=Date.now(),Je=!1,be=0};e.timelinePollIntervalId=setInterval(()=>{Ve+=1;let p=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<w?!1:P();if(e.capturedTimeline&&!re._timeline&&(re._timeline=e.capturedTimeline),(p||Ve%20===0)&&ye(),Ve%10===0&&Ke(),Q(),e.isPlaying&&e.capturedTimeline){let h=Math.max(0,e.currentTime||0),b=je,y=T(e.capturedTimeline,0);if(y>0&&h>=y){re.pause(),re.seek(y),je=y,be=0,ge(!0);return}if(b!=null&&b>=f&&h<=C?be+=1:be=0,!Je&&be>=k&&Date.now()-ft>D){let se=W();pe(se,"loop_guard")&&(Je=!0,be=0)}je=Math.max(0,e.currentTime||0)}else je=Math.max(0,e.currentTime||0);e.isPlaying&&mt(),ge(!1)},50),ye(),ge(!0);let mn=re.seek;re.seek=a=>{pt(),mn(a)};let xn=re.renderSeek;re.renderSeek=a=>{pt(),xn(a)};let Qe=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),Ne!=null&&(window.clearTimeout(Ne),Ne=null),c!=null&&(window.cancelAnimationFrame(c),c=null),dn(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),n&&(window.removeEventListener("error",n),n=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),He.disablePickMode();for(let a of e.deterministicAdapters)if(!(!a||typeof a.revert!="function"))try{a.revert()}catch{}e.deterministicAdapters=[];for(let a of o.splice(0))try{a()}catch{}for(let a of e.injectedCompStyles)try{a.remove()}catch{}e.injectedCompStyles=[];for(let a of e.injectedCompScripts)try{a.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===Qe&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=Qe,e.beforeUnloadHandler=Qe,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var _t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],it=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function An(e){if(e<=255)return _t[e];let t=0,n=it.length-1;for(;t<=n;){let r=t+n>>1,o=it[r];if(e<o[0]){n=r-1;continue}if(e>o[1]){t=r+1;continue}return o[2]}return"L"}function yn(e){let t=e.length;if(t===0)return null;let n=new Array(t),r=!1;for(let s=0;s<t;){let l=e.charCodeAt(s),x=l,f=1;if(l>=55296&&l<=56319&&s+1<t){let D=e.charCodeAt(s+1);D>=56320&&D<=57343&&(x=(l-55296<<10)+(D-56320)+65536,f=2)}let C=An(x);(C==="R"||C==="AL"||C==="AN")&&(r=!0);for(let D=0;D<f;D++)n[s+D]=C;s+=f}if(!r)return null;let o=0;for(let s=0;s<t;s++){let l=n[s];if(l==="L"){o=0;break}if(l==="R"||l==="AL"){o=1;break}}let i=new Int8Array(t);for(let s=0;s<t;s++)i[s]=o;let c=o&1?"R":"L",d=c,u=d;for(let s=0;s<t;s++)n[s]==="NSM"?n[s]=u:u=n[s];u=d;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="AL"?"AN":"EN":(l==="R"||l==="L"||l==="AL")&&(u=l)}for(let s=0;s<t;s++)n[s]==="AL"&&(n[s]="R");for(let s=1;s<t-1;s++)n[s]==="ES"&&n[s-1]==="EN"&&n[s+1]==="EN"&&(n[s]="EN"),n[s]==="CS"&&(n[s-1]==="EN"||n[s-1]==="AN")&&n[s+1]===n[s-1]&&(n[s]=n[s-1]);for(let s=0;s<t;s++){if(n[s]!=="EN")continue;let l;for(l=s-1;l>=0&&n[l]==="ET";l--)n[l]="EN";for(l=s+1;l<t&&n[l]==="ET";l++)n[l]="EN"}for(let s=0;s<t;s++){let l=n[s];(l==="WS"||l==="ES"||l==="ET"||l==="CS")&&(n[s]="ON")}u=d;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="L"?"L":"EN":(l==="R"||l==="L")&&(u=l)}for(let s=0;s<t;s++){if(n[s]!=="ON")continue;let l=s+1;for(;l<t&&n[l]==="ON";)l++;let x=s>0?n[s-1]:d,f=l<t?n[l]:d,C=x!=="L"?"R":"L";if(C===(f!=="L"?"R":"L"))for(let k=s;k<l;k++)n[k]=C;s=l-1}for(let s=0;s<t;s++)n[s]==="ON"&&(n[s]=c);for(let s=0;s<t;s++){let l=n[s];(i[s]&1)===0?l==="R"?i[s]++:(l==="AN"||l==="EN")&&(i[s]+=2):(l==="L"||l==="AN"||l==="EN")&&i[s]++}return i}function Wt(e,t){let n=yn(e);if(n===null)return null;let r=new Int8Array(t.length);for(let o=0;o<t.length;o++)r[o]=n[t[o]];return r}var bn=/[ \t\n\r\f]+/g,Mn=/[\t\n\r\f]| {2,}|^ | $/;function Cn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Dn(e){if(!Mn.test(e))return e;let t=e.replace(bn," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function kn(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
|
|
11
|
+
`,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(r=>{r.classList.add("__hf-flash"),setTimeout(()=>r.classList.remove("__hf-flash"),t)})}catch{}}var Ye=null;function gt(e){Ye=e}function Be(e,t){if(Ye)try{Ye({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch{}}function St(e){let t=[];return{name:"css",discover:()=>{t=[];let n=document.querySelectorAll("*");for(let o of n){if(!(o instanceof HTMLElement))continue;let r=window.getComputedStyle(o);!r.animationName||r.animationName==="none"||t.push({el:o,baseDelay:o.style.animationDelay||"",basePlayState:o.style.animationPlayState||""})}},seek:n=>{let o=Number(n.time)||0;for(let r of t){if(!r.el.isConnected)continue;let i=e?.resolveStartSeconds?e.resolveStartSeconds(r.el):Number.parseFloat(r.el.getAttribute("data-start")??"0")||0,c=Math.max(0,o-i);r.el.style.animationPlayState="paused",r.el.style.animationDelay=`-${c.toFixed(3)}s`}},pause:()=>{for(let n of t)n.el.isConnected&&(n.el.style.animationPlayState=n.basePlayState||"paused",n.baseDelay&&(n.el.style.animationDelay=n.baseDelay))},revert:()=>{t=[]}}}function Ft(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let o=Math.max(0,Number(t.time)||0);typeof n.totalTime=="function"?n.totalTime(o,!1):n.seek(o,!1)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function At(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],o=new Set(n);for(let r of t)o.has(r)||n.push(r);window.__hfLottie=n}}}catch{}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let o of n)try{if(Nt(o))o.goToAndStop(t*1e3,!1);else if(Et(o)){if(typeof o.setCurrentRawFrameValue=="function"){let r=o.totalFrames??0,i=o.frameRate??30,c=t*i;r>0&&o.setCurrentRawFrameValue(Math.min(c,r-1))}else if(typeof o.seek=="function"){let r=o.duration??1,i=Math.min(100,t/r*100);o.seek(i)}}}catch{}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(Nt(t)||Et(t))&&t.pause()}catch{}},revert:()=>{}}}function Nt(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function Et(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}function yt(){let e=null,t=0;return{name:"three",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfThreeTime=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch{}},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function bt(){return{name:"waapi",discover:()=>{},seek:e=>{if(!document.getAnimations)return;let t=Math.max(0,(Number(e.time)||0)*1e3);for(let n of document.getAnimations())try{n.pause(),n.currentTime=t}catch{}},pause:()=>{if(document.getAnimations)for(let e of document.getAnimations())try{e.pause()}catch{}}}}function Mt(e){let t=Array.from(document.querySelectorAll("video[data-start], audio[data-start]")),n=[],o=[],r=0;for(let i of t){let c=e?.resolveStartSeconds?e.resolveStartSeconds(i):Number.parseFloat(i.dataset.start??"0");if(!Number.isFinite(c))continue;let d=Number.parseFloat(i.dataset.playbackStart??i.dataset.mediaStart??"0")||0,u=i.defaultPlaybackRate,s=Number.isFinite(u)&&u>0?Math.max(.1,Math.min(5,u)):1,l=i.loop,x=Number.isFinite(i.duration)&&i.duration>0?i.duration:null,h=Number.parseFloat(i.dataset.duration??"");(!Number.isFinite(h)||h<=0)&&x!=null&&(h=Math.max(0,(x-d)/s));let A=Number.isFinite(h)&&h>0?c+h:Number.POSITIVE_INFINITY,D=Number.parseFloat(i.dataset.volume??""),k={el:i,start:c,mediaStart:d,duration:Number.isFinite(h)&&h>0?h:Number.POSITIVE_INFINITY,end:A,volume:Number.isFinite(D)?D:null,playbackRate:s,loop:l,sourceDuration:x};n.push(k),i.tagName==="VIDEO"&&o.push(k),Number.isFinite(A)&&(r=Math.max(r,A))}return{timedMediaEls:t,mediaClips:n,videoClips:o,maxMediaEnd:r}}var Xe=new WeakMap,ve=new WeakSet;function hn(e){if(ve.has(e))return;ve.add(e);let t=()=>ve.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}function Ct(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:o}=n;if(!o.isConnected)continue;let r=(e.timeSeconds-n.start)*n.playbackRate+n.mediaStart;if(e.timeSeconds>=n.start&&e.timeSeconds<n.end&&r>=0){if(n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let A=n.sourceDuration-n.mediaStart;A>0&&r>=n.sourceDuration&&(r=n.mediaStart+(r-n.mediaStart)%A)}n.volume!=null&&(o.volume=n.volume),t&&(o.muted=!0);try{o.playbackRate=n.playbackRate*e.playbackRate}catch{}let c=o.currentTime||0,d=Math.abs(c-r),u=r-c,s=Xe.get(o);Xe.set(o,u);let l=s===void 0,x=!l&&Math.abs(u-s)>.5,h=d>3;if(d>.5&&(l||x||h))try{o.currentTime=r}catch{}e.playing&&o.paused&&!ve.has(o)?(o.preload!=="auto"&&(o.preload="auto"),hn(o),o.play().catch(A=>{ve.delete(o),(A&&typeof A=="object"&&"name"in A?String(A.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!o.paused&&o.pause();continue}Xe.delete(o),o.paused||o.pause()}}function Dt(e){let t=!1,n=null,o=null,r=null,i=null;function c(g,m){try{window.dispatchEvent(new CustomEvent(g,{detail:m}))}catch{}}function d(g){r=g,c("hyperframe:picker:hovered",{elementInfo:r,isPickMode:t,timestamp:Date.now()})}function u(g){i=g,c("hyperframe:picker:selected",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function s(g){if(!g||g===document.body||g===document.documentElement)return!1;let m=g.tagName.toLowerCase();return!(m==="script"||m==="style"||m==="link"||m==="meta"||g.classList.contains("__hf-pick-highlight"))}function l(g){let m=g;if(m.id)return`#${m.id}`;let S=g.getAttribute("data-composition-id");if(S)return`[data-composition-id="${S}"]`;let y=g.getAttribute("data-composition-src");if(y)return`[data-composition-src="${y}"]`;let C=g.getAttribute("data-track-index");if(C)return`[data-track-index="${C}"]`;let E=g.tagName.toLowerCase(),v=g.parentElement;if(!v)return E;let _=v.querySelectorAll(`:scope > ${E}`);if(_.length===1)return E;for(let I=0;I<_.length;I+=1)if(_[I]===g)return`${E}:nth-of-type(${I+1})`;return E}function x(g){let m=g.tagName.toLowerCase(),S=(g.textContent??"").trim().replace(/\s+/g," "),y=(C,E)=>C.length>E?`${C.slice(0,E-1)}\u2026`:C;return m==="h1"||m==="h2"||m==="h3"?"Heading":m==="p"||m==="span"||m==="div"?S.length>0?y(S,56):"Text":m==="img"?"Image":m==="video"?"Video":m==="audio"?"Audio":m==="svg"?"Shape":g.getAttribute("data-composition-src")?"Composition":m==="section"?"Section":`${m.charAt(0).toUpperCase()}${m.slice(1)}`}function h(g,m,S){let y=typeof S=="number"&&S>0?S:8,C=[];if(document.elementsFromPoint)C=document.elementsFromPoint(g,m);else if(document.elementFromPoint){let _=document.elementFromPoint(g,m);C=_?[_]:[]}let E={},v=[];for(let _=0;_<C.length;_+=1){let I=C[_];if(!s(I))continue;let X=`${I.tagName}::${I.id||""}::${_}`;if(!E[X]&&(E[X]=!0,v.push(I),v.length>=y))break}return v}function A(g){let m=g.getBoundingClientRect(),S={};for(let C=0;C<g.attributes.length;C+=1){let E=g.attributes[C];E.name.startsWith("data-")&&(S[E.name]=E.value)}return{id:g.id||null,tagName:g.tagName.toLowerCase(),selector:l(g),label:x(g),boundingBox:{x:m.left,y:m.top,width:m.width,height:m.height},textContent:g.textContent?g.textContent.trim().slice(0,200):null,src:g.getAttribute("src")||g.getAttribute("data-composition-src")||null,dataAttributes:S}}function D(g,m,S){return h(g,m,S).map(A)}function k(g){if(!t)return;let S=h(g.clientX,g.clientY,1)[0]??(g.target instanceof Element?g.target:null);if(!s(S)||n===S)return;n&&n.classList.remove("__hf-pick-highlight"),n=S,S.classList.add("__hf-pick-highlight");let y=A(S);d(y),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:y})}function w(g){if(!t)return;g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();let m=D(g.clientX,g.clientY,8);m.length!==0&&(d(m[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:m,selectedIndex:0,point:{x:g.clientX,y:g.clientY}}))}function j(g){g.key==="Escape"&&(B(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function V(){t||(t=!0,o=document.createElement("style"),o.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
|
|
12
|
+
`),document.head.appendChild(o),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",k,!0),document.addEventListener("click",w,!0),document.addEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function B(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),o&&(o.remove(),o=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",k,!0),document.removeEventListener("click",w,!0),document.removeEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function $(){window.__HF_PICKER_API={enable:V,disable:B,isActive:()=>t,getHovered:()=>r,getSelected:()=>i,getCandidatesAtPoint:(g,m,S)=>Number.isFinite(g)&&Number.isFinite(m)?D(g,m,S):[],pickAtPoint:(g,m,S)=>{if(!Number.isFinite(g)||!Number.isFinite(m))return null;let y=D(g,m,8);if(!y.length)return null;let C=Math.max(0,Math.min(y.length-1,Number(S??0))),E=y[C]??null;return E?(u(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),B(),E):null},pickManyAtPoint:(g,m,S)=>{if(!Number.isFinite(g)||!Number.isFinite(m))return[];let y=D(g,m,8);if(!y.length)return[];let C=[],E=Array.isArray(S)?S:[0];for(let v of E){let _=Math.max(0,Math.min(y.length-1,Math.floor(Number(v)))),I=y[_];if(!I)continue;C.some(L=>L.selector===I.selector&&L.tagName===I.tagName)||C.push(I)}return C.length?(u(C[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:C}),B(),C):[]}},c("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:V,disablePickMode:B,installPickerApi:$}}function kt(e,t){let n=Number.isFinite(t)&&t>0?t:30,o=Number.isFinite(e)&&e>0?e:0;return Math.floor(o*n+1e-9)/n}function Lt(e,t,n){let o=kt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(o,!1):e.seek(o,!1),o}function Tt(e){return{_timeline:null,play:()=>{let t=e.getTimeline();if(!t||e.getIsPlaying())return;let n=Math.max(0,Number(e.getSafeDuration?.()??t.duration()??0)||0);n>0&&Math.max(0,Number(t.time())||0)>=n&&(t.pause(),t.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof t.timeScale=="function"&&t.timeScale(e.getPlaybackRate()),t.play(),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let t=e.getTimeline();if(!t)return;t.pause();let n=Math.max(0,Number(t.time())||0);e.onDeterministicSeek(n),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(n,!1),e.onRenderFrameSeek(n),e.onStatePost(!0)},seek:t=>{let n=e.getTimeline();if(!n)return;let o=Math.max(0,Number(t)||0),r=Lt(n,o,e.getCanonicalFps());e.onDeterministicSeek(r),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},renderSeek:t=>{let n=e.getTimeline();if(!n)return;let o=Lt(n,t,e.getCanonicalFps());e.onDeterministicSeek(o),e.setIsPlaying(!1),e.onSyncMedia(o,!1),e.onRenderFrameSeek(o),e.onStatePost(!0)},getTime:()=>Number(e.getTimeline()?.time()??0),getDuration:()=>Number(e.getTimeline()?.duration()??0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:t=>e.setPlaybackRate(t),getPlaybackRate:()=>e.getPlaybackRate()}}function wt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!1,mediaOutputMuted:!1,mediaAutoplayBlockedPosted:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,timelinePollIntervalId:null,controlBridgeHandler:null,clampDurationLoggedRaw:null,beforeUnloadHandler:null,domReadyHandler:null,injectedCompStyles:[],injectedCompScripts:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,maxTimelineDurationSeconds:1800,nativeVisualWatchdogTick:0}}function Re(e){let t=Number(e);return Number.isFinite(t)?t:null}function gn(e){let t=(e??"").trim();if(!t)return null;let n=Re(t);if(n!=null)return{kind:"absolute",value:n};let o=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!o)return null;let r=(o[1]??"").trim();if(!r)return null;let i=o[2]??"+",c=o[3]??"0",d=Number.parseFloat(c),u=Number.isFinite(d)?Math.max(0,d):0,s=i==="-"?-u:u;return{kind:"reference",refId:r,offset:s}}function Ce(e){let t=e.timelineRegistry??{},n=new WeakMap,o=new WeakMap,r=new Set,i=u=>{let s=document.getElementById(u);return s||(document.querySelector(`[data-composition-id="${CSS.escape(u)}"]`)??null)},c=u=>{let s=o.get(u);if(s!==void 0)return s;let l=null,x=Re(u.getAttribute("data-duration"));if(x!=null&&x>0&&(l=x),l==null||l<=0){let h=Re(u.getAttribute("data-end"));if(h!=null){let A=d(u,0),D=h-A;Number.isFinite(D)&&D>0&&(l=D)}}if((l==null||l<=0)&&u instanceof HTMLMediaElement){let h=Re(u.getAttribute("data-playback-start"))??Re(u.getAttribute("data-media-start"))??0;Number.isFinite(u.duration)&&u.duration>h&&(l=u.duration-h)}if(l==null||l<=0){let h=u.getAttribute("data-composition-id");if(h){let A=t[h]??null;if(A&&typeof A.duration=="function")try{let D=Number(A.duration());Number.isFinite(D)&&D>0&&(l=D)}catch{}}}return l!=null&&Number.isFinite(l)&&l>0?(o.set(u,l),l):(o.set(u,null),null)},d=(u,s)=>{let l=n.get(u);if(l!==void 0)return l??s;if(r.has(u))return s;r.add(u);try{let x=gn(u.getAttribute("data-start"));if(!x){if(u.hasAttribute("data-composition-id")){let w=u.parentElement;if(w&&(w.hasAttribute("data-composition-src")||w.hasAttribute("data-composition-id"))){let j=d(w,s);return n.set(u,j),j}}return n.set(u,s),s}if(x.kind==="absolute"){let w=Math.max(0,x.value);return n.set(u,w),w}let h=i(x.refId);if(!h)return n.set(u,s),s;let A=d(h,0),D=c(h);if(D==null||D<=0){let w=Math.max(0,A+x.offset);return n.set(u,w),w}let k=Math.max(0,A+D+x.offset);return n.set(u,k),k}finally{r.delete(u)}};return{resolveStartForElement:(u,s=0)=>d(u,Math.max(0,s)),resolveDurationForElement:u=>c(u)}}function ce(e){let t=Number(e);return Number.isFinite(t)?t:null}var Bt={composition:0,video:1,image:2,element:3,audio:4};function Sn(e){if(e.length===0)return;let t=new Map;for(let c of e){let d=t.get(c.track)??new Set;d.add(c.kind),t.set(c.track,d)}if(!Array.from(t.values()).some(c=>c.size>1))return;let o=0,r=new Map,i=[...t.keys()].sort((c,d)=>c-d);for(let c of i){let d=t.get(c);if(d.size===1)r.set(`${c}:${[...d][0]}`,o++);else{let u=[...d].sort((s,l)=>(Bt[s]??99)-(Bt[l]??99));for(let s of u)r.set(`${c}:${s}`,o++)}}for(let c of e){let d=`${c.track}:${c.kind}`,u=r.get(d);u!=null&&(c.track=u)}}function Ie(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function Fn(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Ie(t);let n=e.getAttribute("data-composition-src");if(n)return Ie(n);let o=e.querySelector("img[src], video[src], audio[src], source[src]");return o?Ie(o.getAttribute("src")):null}function vt(e){let n=window.__timelines??{},o=Ce({timelineRegistry:n}),r=N=>{if(!N)return null;let F=n[N]??null;if(!F||typeof F.duration!="function")return null;try{let T=Number(F.duration());return Number.isFinite(T)&&T>0?T:null}catch{return null}},i=N=>{let F=ce(N.getAttribute("data-duration"));if(F!=null&&F>0)return F;let T=ce(N.getAttribute("data-playback-start"))??ce(N.getAttribute("data-media-start"))??0;return Number.isFinite(N.duration)&&N.duration>T?Math.max(0,N.duration-T):null},c=()=>{let N=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(N.length===0)return null;let F=0;for(let T of N){let W=o.resolveStartForElement(T,0);if(!Number.isFinite(W))continue;let Q=i(T);Q==null||Q<=0||(F=Math.max(F,Math.max(0,W)+Q))}return F>0?F:null},d=N=>{let F=N.trim().toLowerCase();return!(!F||F==="main"||F.includes("caption")||F.includes("ambient"))},u=(N,F)=>{let T=[],W=null,Q=null,R=null,P=N.parentElement;for(;P;){let O=P.getAttribute("data-composition-id");O&&(T.push(O),!R&&P!==F&&(R=O),W==null&&(W=o.resolveStartForElement(P,0)),Q==null&&(Q=ce(P.getAttribute("data-duration"))??r(O)??null)),P=P.parentElement}return{parentCompositionId:R,compositionAncestors:T.reverse(),inheritedStart:W,inheritedDuration:Q}},s=document.querySelector("[data-composition-id]"),l=s?.getAttribute("data-composition-id")??null,x=s?o.resolveStartForElement(s,0):0,h=c(),A=h!=null?Math.max(0,h-Math.max(0,x)):null,D=r(l),k=ce(s?.getAttribute("data-duration")),w=typeof D=="number"&&Number.isFinite(D)&&D>0?D:null,j=typeof k=="number"&&Number.isFinite(k)&&k>0?k:null,V=typeof A=="number"&&Number.isFinite(A)&&A>0?A:null,B=w!=null&&V!=null&&w>V+1,$=j??(B?V:w??V),g=$!=null?Math.min($,e.maxTimelineDurationSeconds):null,S=(g!=null?x+g:null)??(typeof h=="number"&&Number.isFinite(h)&&h>0?h:null),y=(N,F)=>!Number.isFinite(F)||F<=0?0:S==null||!Number.isFinite(S)?F:!Number.isFinite(N)||N>=S?0:Math.max(0,Math.min(F,S-N)),C=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],v=[],_=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),I=0;for(let N=0;N<_.length;N+=1){let F=_[N];if(F===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(F.tagName))continue;let T=u(F,s),W=o.resolveStartForElement(F,T.inheritedStart??0),Q=F.getAttribute("data-composition-id"),R=ce(F.getAttribute("data-duration"));if((R==null||R<=0)&&Q&&Q!==l&&(R=r(Q)),(R==null||R<=0)&&F instanceof HTMLMediaElement){let ue=ce(F.getAttribute("data-playback-start"))??ce(F.getAttribute("data-media-start"))??0;Number.isFinite(F.duration)&&F.duration>0&&(R=Math.max(0,F.duration-ue))}if(R==null||R<=0){let ue=T.inheritedDuration;if(ue!=null&&ue>0){let pe=(T.inheritedStart??0)+ue;R=Math.max(0,pe-W)}}if(R==null||R<=0||(R=y(W,R),R<=0))continue;let P=W+R;I=Math.max(I,P);let O=F.tagName.toLowerCase(),fe=Q&&Q!==l?"composition":O==="video"?"video":O==="audio"?"audio":O==="img"?"image":"element";E.push({id:F.id||Q||`__node__index_${N}`,label:F.getAttribute("data-timeline-label")??F.getAttribute("data-label")??F.getAttribute("aria-label")??Q??F.id??F.className?.split(" ")[0]??fe,start:W,duration:R,track:Number.parseInt(F.getAttribute("data-track-index")??F.getAttribute("data-track")??String(N),10)||0,kind:fe,tagName:O,compositionId:F.getAttribute("data-composition-id"),compositionAncestors:T.compositionAncestors,parentCompositionId:T.parentCompositionId,nodePath:null,compositionSrc:Ie(F.getAttribute("data-composition-src")),assetUrl:Fn(F),timelineRole:F.getAttribute("data-timeline-role"),timelineLabel:F.getAttribute("data-timeline-label"),timelineGroup:F.getAttribute("data-timeline-group"),timelinePriority:ce(F.getAttribute("data-timeline-priority"))})}let X=new Set(E.map(N=>N.id)),L=s?.getAttribute("data-composition-id")??null,U=L?n[L]??null:null;if(U&&s){let N=U;if(typeof N.getChildren=="function")try{let F=N.getChildren(!0,!0,!1)??[],T=new Map;for(let R of s.children){let P=R;if(!P.id)continue;let O=P.tagName.toLowerCase();O==="script"||O==="style"||O==="link"||T.set(P,{id:P.id,start:1/0,end:-1/0})}let W=R=>{let P=R;for(;P;){if(T.has(P))return P;if(P===s)return null;P=P.parentElement}return null};for(let R of F){if(typeof R.targets!="function"||typeof R.startTime!="function"||typeof R.duration!="function")continue;let P=R.startTime(),O=R.parent;for(;O&&typeof O.startTime=="function";)P+=O.startTime(),O=O.parent;let fe=P+R.duration();if(!(!Number.isFinite(P)||!Number.isFinite(fe)))for(let ue of R.targets()){if(!(ue instanceof Element))continue;let Te=W(ue);if(!Te)continue;let pe=T.get(Te);pe&&(pe.start=Math.min(pe.start,P),pe.end=Math.max(pe.end,fe))}}let Q=E.length>0?Math.max(...E.map(R=>R.track))+1:0;for(let[R,P]of T){if(P.start===1/0||P.end===-1/0)continue;let O=R;if(X.has(O.id))continue;let fe=Math.max(0,P.end-P.start);if(fe<=0)continue;let ue=y(P.start,fe);ue<=0||(I=Math.max(I,P.start+ue),E.push({id:O.id,label:O.getAttribute("data-timeline-label")??O.getAttribute("data-label")??O.getAttribute("aria-label")??O.id,start:P.start,duration:ue,track:Number.parseInt(O.getAttribute("data-track-index")??O.getAttribute("data-track")??"",10)||Q,kind:"element",tagName:O.tagName.toLowerCase(),compositionId:O.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:O.getAttribute("data-timeline-role"),timelineLabel:O.getAttribute("data-timeline-label"),timelineGroup:O.getAttribute("data-timeline-group"),timelinePriority:ce(O.getAttribute("data-timeline-priority"))}),X.add(O.id))}}catch{}}if(s&&g!=null&&g>0){let N=E.length>0?Math.max(...E.map(F=>F.track))+1:0;for(let F of s.children){let T=F;if(!T.id||X.has(T.id))continue;let W=T.tagName.toLowerCase();if(W==="script"||W==="style"||W==="link"||W==="meta"||window.getComputedStyle(T).display==="none")continue;let R=y(0,g);R<=0||(I=Math.max(I,R),E.push({id:T.id,label:T.getAttribute("data-timeline-label")??T.getAttribute("data-label")??T.getAttribute("aria-label")??T.id,start:0,duration:R,track:Number.parseInt(T.getAttribute("data-track-index")??T.getAttribute("data-track")??"",10)||N,kind:"element",tagName:W,compositionId:T.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:T.getAttribute("data-timeline-role"),timelineLabel:T.getAttribute("data-timeline-label"),timelineGroup:T.getAttribute("data-timeline-group"),timelinePriority:ce(T.getAttribute("data-timeline-priority"))}),X.add(T.id))}}Sn(E);for(let N of C){if(N===s)continue;let F=N.getAttribute("data-composition-id");if(!F||!d(F))continue;let T=o.resolveStartForElement(N,0),W=ce(N.getAttribute("data-duration")),Q=r(F),R=W&&W>0?W:Q;if(R==null||R<=0)continue;let P=y(T,R);P<=0||v.push({id:F,label:N.getAttribute("data-label")??F,start:T,duration:P,thumbnailUrl:Ie(N.getAttribute("data-thumbnail-url")),avatarName:null})}let te=Math.max(1,Math.min(I||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:B&&j==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(te*Math.max(1,e.canonicalFps))),clips:E,scenes:v,compositionWidth:ce(s?.getAttribute("data-width"))??1920,compositionHeight:ce(s?.getAttribute("data-height"))??1080}}var Nn=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,En=e=>new Promise(t=>{let n=!1,o=Date.now(),r=null,i=c=>{n||(n=!0,r!=null&&window.clearTimeout(r),t({status:c,elapsedMs:Math.max(0,Date.now()-o)}))};e.addEventListener("load",()=>i("load"),{once:!0}),e.addEventListener("error",()=>i("error"),{once:!0}),r=window.setTimeout(()=>i("timeout"),8e3)});function et(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function Rt(e,t){let n=e.trim();if(!n)return e;try{return Nn.test(n)?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}async function tt(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(s=>s.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode;if(e.headStyles)for(let u of e.headStyles){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let o=Array.from(n.querySelectorAll("style"));for(let u of o){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let r=[];if(e.headScripts)for(let u of e.headScripts){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=Rt(l,e.compositionUrl);r.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&r.push({kind:"inline",content:x,type:s})}}let i=Array.from(n.querySelectorAll("script")),c=[...r];for(let u of i){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=Rt(l,e.compositionUrl);c.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&c.push({kind:"inline",content:x,type:s})}u.parentNode?.removeChild(u)}let d=Array.from(n.querySelectorAll("style"));for(let u of d)u.parentNode?.removeChild(u);if(t){let u=document.importNode(t,!0),s=t.getAttribute("data-width"),l=t.getAttribute("data-height"),x=e.parseDimensionPx(s),h=e.parseDimensionPx(l);u.style.position="relative",u.style.width=x||"100%",u.style.height=h||"100%",x&&u.style.setProperty("--comp-width",x),h&&u.style.setProperty("--comp-height",h),s&&e.host.setAttribute("data-width",s),l&&e.host.setAttribute("data-height",l),x&&e.host instanceof HTMLElement&&(e.host.style.width=x),h&&e.host instanceof HTMLElement&&(e.host.style.height=h),e.host.appendChild(u)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let u of c){let s=document.createElement("script");if(u.type&&(s.type=u.type),s.async=!1,u.kind==="external"?s.src=u.src:u.type.toLowerCase()==="module"?s.textContent=u.content:s.textContent=`(function(){${u.content}})();`,document.body.appendChild(s),e.injectedScripts.push(s),u.kind==="external"){let l=await En(s);l.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:u.src,loadStatus:l.status,elapsedMs:l.elapsedMs}})}}}async function It(e){let t=Array.from(document.querySelectorAll("[data-composition-id]:not([data-composition-src])")).filter(n=>{if(n.children.length>0)return!1;let o=n.getAttribute("data-composition-id");return o?!!document.querySelector(`template#${CSS.escape(o)}-template`):!1});if(t.length!==0)for(let n of t){let o=n.getAttribute("data-composition-id"),r=document.querySelector(`template#${CSS.escape(o)}-template`);et(n),await tt({host:n,hostCompositionId:o,hostCompositionSrc:`template#${o}-template`,sourceNode:r.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function Pt(e){let t=Array.from(document.querySelectorAll("[data-composition-src]"));t.length!==0&&await Promise.all(t.map(async n=>{let o=n.getAttribute("data-composition-src");if(!o)return;let r=null;try{r=new URL(o,document.baseURI)}catch{r=null}et(n);try{let i=n.getAttribute("data-composition-id"),c=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(c){await tt({host:n,hostCompositionId:i,hostCompositionSrc:o,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:r,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let d=await fetch(o);if(!d.ok)throw new Error(`HTTP ${d.status}`);let u=await d.text(),l=new DOMParser().parseFromString(u,"text/html"),x=(i?l.querySelector(`template#${CSS.escape(i)}-template`):null)??l.querySelector("template"),h=x?x.content:l.body,A=x?void 0:Array.from(l.head.querySelectorAll("style")),D=x?void 0:Array.from(l.head.querySelectorAll("script"));await tt({host:n,hostCompositionId:i,hostCompositionSrc:o,sourceNode:h,hasTemplate:!!x,fallbackBodyInnerHtml:l.body.innerHTML,compositionUrl:r,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,headStyles:A,headScripts:D,onDiagnostic:e.onDiagnostic})}catch(i){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:n.getAttribute("data-composition-id"),hostCompositionSrc:o,errorMessage:i instanceof Error?i.message:"unknown_error"}}),et(n)}}))}function nt(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=[],o=document.querySelectorAll(".caption-group");for(let r of o){let i=r.querySelectorAll(":scope > span");for(let c of i)n.push(c)}for(let r of t){let i=null;if(r.wordId&&(i=document.getElementById(r.wordId)),!i&&r.wordIndex!==void 0&&(i=n[r.wordIndex]??null),!i||!(i instanceof HTMLElement))continue;let c={},d={};if(r.x!==void 0&&(c.x=r.x),r.y!==void 0&&(c.y=r.y),r.scale!==void 0&&(c.scale=r.scale),r.rotation!==void 0&&(c.rotation=r.rotation),r.opacity!==void 0&&(d.opacity=r.opacity),r.fontSize!==void 0&&(d.fontSize=`${r.fontSize}px`),r.fontWeight!==void 0&&(d.fontWeight=r.fontWeight),r.fontFamily!==void 0&&(d.fontFamily=r.fontFamily),r.activeColor||r.dimColor){let s=e.getTweensOf(i).filter(x=>x.vars.color!==void 0).sort((x,h)=>x.startTime()-h.startTime()),l=s.length>0?String(s[0].vars.color):"";for(let x of s)String(x.vars.color)===l?r.dimColor&&(x.vars.color=r.dimColor):r.activeColor&&(x.vars.color=r.activeColor);r.dimColor&&e.set(i,{color:r.dimColor})}if(Object.keys(d).length>0&&e.set(i,d),Object.keys(c).length>0){let u=document.createElement("span");u.style.display="inline-block",u.dataset.captionWrapper="true",i.parentNode?.insertBefore(u,i),u.appendChild(i),e.set(u,c)}}}).catch(()=>{})}function Ot(){let e=wt(),t=window,n=null,o=null,r=[],i=new Set,c=null;if(typeof t.__hfRuntimeTeardown=="function")try{t.__hfRuntimeTeardown()}catch{}document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden"),window.__timelines=window.__timelines||{};let d=a=>{r.push(a)},u=(a,f,p)=>{let M=p??`${a}:${JSON.stringify(f)}`;i.has(M)||(i.add(M),le({source:"hf-preview",type:"diagnostic",code:a,details:f}))},s=a=>{let f={scale:1,focusX:960,focusY:540},p=[],M=[],b={time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:a.play,pause:a.pause,seek:a.seek,getTime:a.getTime,getDuration:a.getDuration,isPlaying:a.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>f,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>p,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:a.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>M,getRenderState:()=>({...b,time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying()})}},l=1/60,x=.75,h=.75,A=.35,D=900,k=3,w=2,j=.05,V=100,B=240,$=a=>{if(a instanceof Error)return a.message||String(a);if(typeof a=="string")return a;try{return JSON.stringify(a)}catch{return String(a??"")}},g=a=>{let f=a.toLowerCase();return f.includes("cannot read properties of null")||f.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:f.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:f.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},m=a=>{if(a==null||a.trim()==="")return null;let f=Number.parseFloat(a);return!Number.isFinite(f)||f<=0?null:`${f}px`},S=()=>{let a=document.querySelector('[data-composition-id][data-root="true"]');if(a instanceof HTMLElement)return a;let f=Array.from(document.querySelectorAll("[data-composition-id]"));return f.length===0?null:f.find(p=>!p.parentElement?.closest("[data-composition-id]"))??f[0]??null},y=()=>{let a=S();if(!a)return;let f=m(a.getAttribute("data-width")),p=m(a.getAttribute("data-height"));f&&(a.style.width=f),p&&(a.style.height=p),f&&a.style.setProperty("--comp-width",f),p&&a.style.setProperty("--comp-height",p)},C=()=>{let a=S(),f=Array.from(document.querySelectorAll("[data-composition-id]")).filter(p=>p.hasAttribute("data-duration")||p.hasAttribute("data-end"));for(let p of f)a&&p===a||(p.removeAttribute("data-duration"),p.removeAttribute("data-end"))},E=()=>{let a=S();if(!a)return;a.style.position||(a.style.position="relative"),a.style.overflow="hidden";let f=m(a.getAttribute("data-width")),p=m(a.getAttribute("data-height"));f&&(a.style.width=f),p&&(a.style.height=p);let M=Array.from(a.children);for(let b of M){let Z=b.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!b.hasAttribute("data-start"))continue;let se=(b.style.top==="0px"||b.style.top==="0")&&(b.style.left==="0px"||b.style.left==="0")&&b.style.width==="100%"&&b.style.height==="100%",Ee=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(b.style.transform);if(se&&Ee&&!b.hasAttribute("data-width")&&!b.hasAttribute("data-height")){let de=b.style.top,K=b.style.left,z=b.style.width,J=b.style.height;b.style.top="",b.style.left="",b.style.width="",b.style.height="";let G=window.getComputedStyle(b);G.top!=="auto"||G.bottom!=="auto"||G.left!=="auto"||G.right!=="auto"||G.width!=="0px"||G.height!=="0px"||(b.style.top=de,b.style.left=K,b.style.width=z,b.style.height=J)}let ne=window.getComputedStyle(b),ee=ne.position;if(ee!=="absolute"&&ee!=="fixed"&&(b.style.position="absolute"),!!b.style.top||!!b.style.bottom||ne.top!=="auto"||ne.bottom!=="auto"||(b.style.top="0"),!!b.style.left||!!b.style.right||ne.left!=="auto"||ne.right!=="auto"||(b.style.left="0"),Z!=="audio"){let de=m(b.getAttribute("data-width")),K=m(b.getAttribute("data-height")),z=ne.width!=="0px"&&ne.width!=="auto",J=ne.height!=="0px"&&ne.height!=="auto";de?!b.style.width&&!z&&(b.style.width=de):!b.style.width&&ne.width==="0px"&&(b.style.width="100%"),K?!b.style.height&&!J&&(b.style.height=K):!b.style.height&&ne.height==="0px"&&(b.style.height="100%")}}},v=(a,f=0)=>Ce({timelineRegistry:window.__timelines??{}}).resolveStartForElement(a,f),_=a=>Ce({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(a),I=!!document.querySelector("[data-composition-src]"),X=!1;{let a=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let f of a){let p=f.getAttribute("data-composition-id");if(p&&f.children.length===0&&document.querySelector(`template#${CSS.escape(p)}-template`)){X=!0;break}}}let L=!I&&!X,U=a=>{if(!a||typeof a.duration!="function")return null;try{let f=Number(a.duration());return Number.isFinite(f)?Math.max(0,f):null}catch{return null}},te=a=>typeof a=="number"&&Number.isFinite(a)&&a>l,H=a=>{let f=Number(a.getAttribute("data-duration"));if(Number.isFinite(f)&&f>0)return f;let p=Number(a.getAttribute("data-playback-start")??a.getAttribute("data-media-start")??"0"),M=Number.isFinite(p)?Math.max(0,p):0;return Number.isFinite(a.duration)&&a.duration>M?Math.max(0,a.duration-M):null},q=()=>{let a=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(a.length===0)return null;let f=0;for(let p of a){let M=v(p,0);if(!Number.isFinite(M))continue;let b=H(p);b==null||b<=l||(f=Math.max(f,Math.max(0,M)+b))}return f>l?f:null},N=()=>{let a=q();return typeof a!="number"||!Number.isFinite(a)||a<=l?null:a},F=a=>te(a)?Math.max(l,a*x):l,T=(a,f=0)=>{let p=U(a),M=N(),b=Number.isFinite(f)&&f>l?f:0,Z=0;te(p)?Z=Math.max(p,b):te(M)?Z=Math.max(M,b):Z=b;let se=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,se)):0},W=()=>{let a=window.__timelines??{},f=Ce({timelineRegistry:a}),p=N(),M=F(p),b=K=>{let z=document.querySelector(`[data-composition-id="${CSS.escape(K)}"]`);return z?f.resolveStartForElement(z,0):0},Z=K=>{let z=window.gsap;if(!z||typeof z.timeline!="function")return null;let J=z.timeline({paused:!0});for(let G of K)J.add(G.timeline,b(G.compositionId));return J},se=(K,z)=>{if(!te(K))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let G=J.timeline({paused:!0});if(z)try{G.add(z,0)}catch{}let Y=G;if(typeof Y.to=="function")try{Y.to({},{duration:K})}catch{}return G},Ee=(K,z)=>{let J=K;if(typeof J.getChildren!="function")return[];try{let G=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(G))return[];let Y=[];for(let oe of z)if(!G.some(Ae=>Ae===oe.timeline))try{let Ae=b(oe.compositionId);K.add(oe.timeline,Ae),Y.push(oe.compositionId)}catch{}return Y}catch{return[]}},ne=S(),ee=ne?.getAttribute("data-composition-id")??null;if(!ee)return{timeline:null};let ae=a[ee]??null,ie=(()=>{if(!ne)return[];let K=new Set,z=Array.from(ne.querySelectorAll("[data-composition-id]")),J=[];for(let G of z){let Y=G.getAttribute("data-composition-id");if(!Y||Y===ee||K.has(Y))continue;K.add(Y);let oe=a[Y]??null;if(!oe||typeof oe.play!="function"||typeof oe.pause!="function")continue;let Me=U(oe);J.push({compositionId:Y,timeline:oe,durationSeconds:Me??0})}return J})(),de=K=>{for(let z of K){let J=z.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ie.length>0&&de(ie),ae){let K=ie.length>0?Ee(ae,ie):[];if((ie.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+ee+"'])"))&&(R=!0),K.length>0)try{let G=ae.time();ae.seek(G,!1)}catch{}let z=U(ae);if(!te(z)&&ie.length>0){let G=ie.map(fn=>fn.compositionId),Y=Z(ie),oe=U(Y);if(Y&&te(oe))return{timeline:Y,selectedTimelineIds:G,selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:M,selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,selectedTimelineIds:G,autoNestedChildren:K}}};let Me=se(p??0,ae),Ae=U(Me);if(Me&&te(Ae))return{timeline:Me,selectedTimelineIds:[ee],selectedDurationSeconds:Ae,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:p,selectedDurationSeconds:Ae,selectedTimelineIds:[ee],autoNestedChildren:K}}}}if(!te(z)&&ie.length===0){let G=se(p??0,ae),Y=U(G);if(G&&te(Y))return{timeline:G,selectedTimelineIds:[ee],selectedDurationSeconds:Y,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:p,selectedDurationSeconds:Y,selectedTimelineIds:[ee]}}}}let J=ne?.getAttribute("data-duration");if(J){let G=parseFloat(J);if(te(G)&&te(z)&&G>=z+.5){let Y=ae;if(typeof Y.to=="function")try{Y.to({},{duration:0},G)}catch{}let oe=U(ae);if(te(oe))return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:ee,rootDurationSeconds:z,rootDeclaredDur:G,newDur:oe}}}}}return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:z,mediaDurationFloorSeconds:p,diagnostics:K.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:ee,selectedDurationSeconds:z,autoNestedChildren:K}}:void 0}}if(ie.length>0){let K=ie.map(G=>G.compositionId),z=Z(ie),J=U(z);if(z)return{timeline:z,selectedTimelineIds:K,selectedDurationSeconds:J,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:ee,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:M,selectedDurationSeconds:J,mediaDurationFloorSeconds:p,selectedTimelineIds:K}}}}return{timeline:null}},Q=()=>{let a=e.capturedTimeline;if(!a||typeof a.time!="function")return;let f=Number(a.time());Number.isFinite(f)&&(e.currentTime=Math.max(0,f))},R=!1,P=()=>{if(!L)return!1;let a=e.capturedTimeline,f=U(a),p=te(f);if(a&&p&&R)return!1;let M=W();return M.timeline?a&&a===M.timeline?(typeof a.timeScale=="function"&&a.timeScale(e.playbackRate),!1):(e.capturedTimeline=M.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),M.diagnostics&&le({source:"hf-preview",type:"diagnostic",code:M.diagnostics.code,details:M.diagnostics.details}),le({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:M.selectedTimelineIds??[],selectedDurationSeconds:M.selectedDurationSeconds??null,mediaDurationFloorSeconds:M.mediaDurationFloorSeconds??null}}),!0):!1},O=()=>{let a=S();if(!(a instanceof HTMLElement))return;let f=a.getBoundingClientRect(),p=Number(a.getAttribute("data-width")),M=Number(a.getAttribute("data-height")),b=window.getComputedStyle(a),Z=Number.isFinite(p)&&p>0&&Number.isFinite(M)&&M>0,se=f.width<=0||f.height<=0||a.clientWidth<=0||a.clientHeight<=0;!Z||!se||u("root_stage_layout_zero",{compositionId:a.getAttribute("data-composition-id")??null,declaredWidth:p,declaredHeight:M,rectWidth:Math.round(f.width),rectHeight:Math.round(f.height),clientWidth:a.clientWidth,clientHeight:a.clientHeight,display:b.display,visibility:b.visibility,overflow:b.overflow},`root-stage-layout-zero:${a.getAttribute("data-composition-id")??"unknown"}`)},fe=()=>{e.tornDown||(c!=null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{c=null,O()}))},ue=()=>{n=a=>{let f=$(a.error??a.message).slice(0,B);if(!f)return;let p=g(f);le({source:"hf-preview",type:"diagnostic",code:p.code,details:{category:p.category,message:f,filename:a.filename||null,line:Number.isFinite(a.lineno)?a.lineno:null,column:Number.isFinite(a.colno)?a.colno:null}})},o=a=>{let f=$(a.reason).slice(0,B);if(!f)return;let p=g(f);le({source:"hf-preview",type:"diagnostic",code:`${p.code}_unhandled_rejection`,details:{category:`${p.category}-unhandled-rejection`,message:f}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",o)},Te=()=>{let a=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let p of a){let M=()=>{if(!(p instanceof Element))return;let b=p.tagName.toLowerCase(),Z=p.getAttribute("src")??p.getAttribute("href")??p.getAttribute("poster")??null,se=b==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";u(se,{tagName:b,assetUrl:Z,currentSrc:(p instanceof HTMLImageElement||p instanceof HTMLMediaElement)&&p.currentSrc||null,readyState:p instanceof HTMLMediaElement?p.readyState:null,networkState:p instanceof HTMLMediaElement?p.networkState:null},`${se}:${b}:${Z??"unknown"}`)};p.addEventListener("error",M),d(()=>{p.removeEventListener("error",M)})}let f=document.fonts;f&&f.ready.then(()=>{if(e.tornDown)return;let p=Array.from(f).filter(M=>M.status==="error").map(M=>M.family).filter(M=>!!M).slice(0,10);p.length!==0&&u("runtime_font_load_issue",{failedFamilies:p,totalFaces:Array.from(f).length},`runtime-font-load-issue:${p.join("|")}`)}).catch(()=>{})},pe=(a,f)=>{if(!a.timeline)return!1;let p=e.capturedTimeline;if(p&&p===a.timeline)return!1;let M=Math.max(0,e.currentTime||0),b=e.isPlaying;e.capturedTimeline=a.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(M,!1),b&&e.capturedTimeline.play()}catch{}return le({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:f,previousTime:M,selectedTimelineIds:a.selectedTimelineIds??[],selectedDurationSeconds:a.selectedDurationSeconds??null,mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),!0},Ne=null,dt=!1,_e=new Set,We=()=>{e.tornDown||(Ne!=null&&window.clearTimeout(Ne),Ne=window.setTimeout(()=>{if(e.tornDown)return;Ne=null;let a=W();if(!a.timeline||!te(a.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){P()&&(ye(),ge(!0));return}if(dt)return;let p=U(e.capturedTimeline),M=a.selectedDurationSeconds??U(a.timeline);te(M)&&(!te(p)||M>=p+j)&&pe(a,"manual")&&(dt=!0,le({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:p??null,selectedDurationSeconds:M??null,selectedTimelineIds:a.selectedTimelineIds??[],mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),ye(),ge(!0))},V))},dn=()=>{for(let a of _e)a.removeEventListener("loadedmetadata",We),a.removeEventListener("durationchange",We);_e.clear()},Ke=()=>{if(e.tornDown)return;let a=Array.from(document.querySelectorAll("video, audio"));for(let f of a)_e.has(f)||(_e.add(f),f.addEventListener("loadedmetadata",We),f.addEventListener("durationchange",We),f.preload!=="auto"&&(f.preload="auto"),f.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&f.load())},mt=()=>{let a=Mt({resolveStartSeconds:M=>v(M,0)});Ct({clips:a.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate,outputMuted:e.mediaOutputMuted,userMuted:e.bridgeMuted,onAutoplayBlocked:()=>{e.mediaAutoplayBlockedPosted||(e.mediaAutoplayBlockedPosted=!0,le({source:"hf-preview",type:"media-autoplay-blocked"}))}});let f=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,p=Array.from(document.querySelectorAll("[data-start]"));for(let M of p){if(!(M instanceof HTMLElement))continue;let b=M.tagName.toLowerCase();if(b==="script"||b==="style"||b==="link"||b==="meta")continue;if(!M.getAttribute("data-composition-id")){let de=M.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(de&&de!==f)continue}let se=v(M,0),Ee=_(M),ne=Ee!=null&&Ee>0?se+Ee:Number.POSITIVE_INFINITY,ee=ne,ae=M.getAttribute("data-composition-id");if(ae&&!Number.isFinite(ne)){let ie=(window.__timelines??{})[ae];if(ie&&typeof ie.duration=="function"){let de=ie.duration();de>0&&(ee=se+de)}}let Ze=e.currentTime>=se&&(Number.isFinite(ee)?e.currentTime<ee:!0);M.style.visibility=Ze?"visible":"hidden"}},ge=a=>{Q();let f=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),p=Date.now();(a||f!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||p-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=f,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=p,le({source:"hf-preview",type:"state",frame:f,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ye=()=>{C(),y(),E();let a=S();if(a){let p=m(a.getAttribute("data-width")),M=m(a.getAttribute("data-height")),b=p?parseInt(p,10):0,Z=M?parseInt(M,10):0;b>0&&Z>0&&le({source:"hf-preview",type:"stage-size",width:b,height:Z})}P();let f=vt({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=f,le(f),fe()},we=(a,f=0)=>{for(let p of e.deterministicAdapters){try{a==="discover"&&p.discover(),a==="pause"&&p.pause(),a==="play"&&p.play&&p.play()}catch{}if(a==="discover")try{p.seek({time:f})}catch{}}};if(L)nt();else{let a={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:m,onDiagnostic:({code:f,details:p})=>{le({source:"hf-preview",type:"diagnostic",code:f,details:p})}};Pt(a).then(()=>It(a)).finally(()=>{L=!0,we("discover",e.currentTime),Ke(),Te(),nt(),ye(),ge(!0)})}let He=Dt({postMessage:a=>le(a)});He.installPickerApi();let xt=a=>{let f=Number(a);!Number.isFinite(f)||f<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,f)),e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let p=document.querySelectorAll("video, audio");for(let M of p)if(M instanceof HTMLMediaElement)try{M.playbackRate=e.playbackRate}catch{}},re=Tt({getTimeline:()=>e.capturedTimeline,setTimeline:a=>{e.capturedTimeline=a},getIsPlaying:()=>e.isPlaying,setIsPlaying:a=>{e.isPlaying=a},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:xt,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(a,f)=>{e.currentTime=Math.max(0,Number(a)||0),e.isPlaying=f,mt()},onStatePost:ge,onDeterministicSeek:a=>{for(let f of e.deterministicAdapters)try{f.seek({time:Number(a)||0})}catch{}},onDeterministicPause:()=>we("pause"),onDeterministicPlay:()=>we("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>T(e.capturedTimeline,0)});window.__player=s(re),window.__playerReady=!0,window.__renderReady=!0,gt(le),Be("composition_loaded",{duration:re.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=ht({onPlay:()=>{re.play(),Be("composition_played",{time:re.getTime()})},onPause:()=>{re.pause(),Be("composition_paused",{time:re.getTime()})},onSeek:(a,f)=>{let p=Math.max(0,a)/e.canonicalFps;re.seek(p),Be("composition_seeked",{time:p})},onSetMuted:a=>{e.bridgeMuted=a;let f=a||e.mediaOutputMuted,p=document.querySelectorAll("video, audio");for(let M of p)M instanceof HTMLMediaElement&&(M.muted=f)},onSetMediaOutputMuted:a=>{e.mediaOutputMuted=a;let f=a||e.bridgeMuted,p=document.querySelectorAll("video, audio");for(let M of p)M instanceof HTMLMediaElement&&(M.muted=f)},onSetPlaybackRate:a=>xt(a),onEnablePickMode:()=>He.enablePickMode(),onDisablePickMode:()=>He.disablePickMode()}),P(),e.capturedTimeline&&(re._timeline=e.capturedTimeline),L&&setTimeout(()=>{let a=e.capturedTimeline;P()&&e.capturedTimeline!==a&&(re._timeline=e.capturedTimeline),we("discover",e.currentTime),ye(),ge(!0)},0),e.deterministicAdapters=[St({resolveStartSeconds:a=>v(a,0)}),bt(),At(),yt(),Ft({getTimeline:()=>e.capturedTimeline})],ue(),we("discover"),Ke(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let Ve=0,je=null,ft=0,Je=!1,be=0,pt=()=>{ft=Date.now(),Je=!1,be=0};e.timelinePollIntervalId=setInterval(()=>{Ve+=1;let f=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<w?!1:P();if(e.capturedTimeline&&!re._timeline&&(re._timeline=e.capturedTimeline),(f||Ve%20===0)&&ye(),Ve%10===0&&Ke(),Q(),e.isPlaying&&e.capturedTimeline){let p=Math.max(0,e.currentTime||0),M=je,b=T(e.capturedTimeline,0);if(b>0&&p>=b){re.pause(),re.seek(b),je=b,be=0,ge(!0);return}if(M!=null&&M>=h&&p<=A?be+=1:be=0,!Je&&be>=k&&Date.now()-ft>D){let se=W();pe(se,"loop_guard")&&(Je=!0,be=0)}je=Math.max(0,e.currentTime||0)}else je=Math.max(0,e.currentTime||0);e.isPlaying&&mt(),ge(!1)},50),ye(),ge(!0);let mn=re.seek;re.seek=a=>{pt(),mn(a)};let xn=re.renderSeek;re.renderSeek=a=>{pt(),xn(a)};let Qe=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),Ne!=null&&(window.clearTimeout(Ne),Ne=null),c!=null&&(window.cancelAnimationFrame(c),c=null),dn(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),n&&(window.removeEventListener("error",n),n=null),o&&(window.removeEventListener("unhandledrejection",o),o=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),He.disablePickMode();for(let a of e.deterministicAdapters)if(!(!a||typeof a.revert!="function"))try{a.revert()}catch{}e.deterministicAdapters=[];for(let a of r.splice(0))try{a()}catch{}for(let a of e.injectedCompStyles)try{a.remove()}catch{}e.injectedCompStyles=[];for(let a of e.injectedCompScripts)try{a.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===Qe&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=Qe,e.beforeUnloadHandler=Qe,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var _t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],it=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function An(e){if(e<=255)return _t[e];let t=0,n=it.length-1;for(;t<=n;){let o=t+n>>1,r=it[o];if(e<r[0]){n=o-1;continue}if(e>r[1]){t=o+1;continue}return r[2]}return"L"}function yn(e){let t=e.length;if(t===0)return null;let n=new Array(t),o=!1;for(let s=0;s<t;){let l=e.charCodeAt(s),x=l,h=1;if(l>=55296&&l<=56319&&s+1<t){let D=e.charCodeAt(s+1);D>=56320&&D<=57343&&(x=(l-55296<<10)+(D-56320)+65536,h=2)}let A=An(x);(A==="R"||A==="AL"||A==="AN")&&(o=!0);for(let D=0;D<h;D++)n[s+D]=A;s+=h}if(!o)return null;let r=0;for(let s=0;s<t;s++){let l=n[s];if(l==="L"){r=0;break}if(l==="R"||l==="AL"){r=1;break}}let i=new Int8Array(t);for(let s=0;s<t;s++)i[s]=r;let c=r&1?"R":"L",d=c,u=d;for(let s=0;s<t;s++)n[s]==="NSM"?n[s]=u:u=n[s];u=d;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="AL"?"AN":"EN":(l==="R"||l==="L"||l==="AL")&&(u=l)}for(let s=0;s<t;s++)n[s]==="AL"&&(n[s]="R");for(let s=1;s<t-1;s++)n[s]==="ES"&&n[s-1]==="EN"&&n[s+1]==="EN"&&(n[s]="EN"),n[s]==="CS"&&(n[s-1]==="EN"||n[s-1]==="AN")&&n[s+1]===n[s-1]&&(n[s]=n[s-1]);for(let s=0;s<t;s++){if(n[s]!=="EN")continue;let l;for(l=s-1;l>=0&&n[l]==="ET";l--)n[l]="EN";for(l=s+1;l<t&&n[l]==="ET";l++)n[l]="EN"}for(let s=0;s<t;s++){let l=n[s];(l==="WS"||l==="ES"||l==="ET"||l==="CS")&&(n[s]="ON")}u=d;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="L"?"L":"EN":(l==="R"||l==="L")&&(u=l)}for(let s=0;s<t;s++){if(n[s]!=="ON")continue;let l=s+1;for(;l<t&&n[l]==="ON";)l++;let x=s>0?n[s-1]:d,h=l<t?n[l]:d,A=x!=="L"?"R":"L";if(A===(h!=="L"?"R":"L"))for(let k=s;k<l;k++)n[k]=A;s=l-1}for(let s=0;s<t;s++)n[s]==="ON"&&(n[s]=c);for(let s=0;s<t;s++){let l=n[s];(i[s]&1)===0?l==="R"?i[s]++:(l==="AN"||l==="EN")&&(i[s]+=2):(l==="L"||l==="AN"||l==="EN")&&i[s]++}return i}function Wt(e,t){let n=yn(e);if(n===null)return null;let o=new Int8Array(t.length);for(let r=0;r<t.length;r++)o[r]=n[t[r]];return o}var bn=/[ \t\n\r\f]+/g,Mn=/[\t\n\r\f]| {2,}|^ | $/;function Cn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Dn(e){if(!Mn.test(e))return e;let t=e.replace(bn," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function kn(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
|
|
13
13
|
`).replace(/[\r\f]/g,`
|
|
14
14
|
`):e.replace(/\r\n/g,`
|
|
15
|
-
`)}var ot=null,Ln;function Tn(){return ot===null&&(ot=new Intl.Segmenter(Ln,{granularity:"word"})),ot}var wn=/\p{Script=Arabic}/u,ze=/\p{M}/u,Kt=/\p{Nd}/u;function Ht(e){return wn.test(e)}function jt(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function xe(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let
|
|
16
|
-
`)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}var Kn=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function me(e){return e.length===1?e[0]:e.join("")}function Vn(e,t){let n=[];for(let r=e.length-1;r>=0;r--)n.push(e[r]);return n.push(t),me(n)}function Jn(e,t,n,r){if(!Kn.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let o=[],i=null,c=[],d=n,u=!1,s=0;for(let l of e){let x=$n(l,r),f=x==="text"&&t;if(i!==null&&x===i&&f===u){c.push(l),s+=l.length;continue}i!==null&&o.push({text:me(c),isWordLike:u,kind:i,start:d}),i=x,c=[l],d=n+s,u=f,s+=l.length}return i!==null&&o.push({text:me(c),isWordLike:u,kind:i,start:d}),o}function rt(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Qn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Zn(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Qn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Yn(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Xn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let c=0;c<e.len;c++){if(r[c]!=="text"||!Zn(e,c))continue;let d=[t[c]],u=c+1;for(;u<e.len&&!rt(r[u]);){d.push(t[u]),n[c]=!0;let s=t[u].includes("?");if(r[u]="text",t[u]="",u++,s)break}t[c]=me(d)}let i=0;for(let c=0;c<t.length;c++){let d=t[c];d.length!==0&&(i!==c&&(t[i]=d,n[i]=n[c],r[i]=r[c],o[i]=o[c]),i++)}return t.length=i,n.length=i,r.length=i,o.length=i,{len:i,texts:t,isWordLike:n,kinds:r,starts:o}}function ei(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(t.push(c),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i]),!Yn(c))continue;let d=i+1;if(d>=e.len||rt(e.kinds[d]))continue;let u=[],s=e.starts[d],l=d;for(;l<e.len&&!rt(e.kinds[l]);)u.push(e.texts[l]),l++;u.length>0&&(t.push(me(u)),n.push(!0),r.push("text"),o.push(s),i=l-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}var ti=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),Ut=/^[A-Za-z0-9_]+[,:;]*$/,qt=/[,:;]+$/;function Jt(e){for(let t of e)if(Kt.test(t))return!0;return!1}function Pe(e){if(e.length===0)return!1;for(let t of e)if(!(Kt.test(t)||ti.has(t)))return!1;return!0}function ni(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i],d=e.kinds[i];if(d==="text"&&Pe(c)&&Jt(c)){let u=[c],s=i+1;for(;s<e.len&&e.kinds[s]==="text"&&Pe(e.texts[s]);)u.push(e.texts[s]),s++;t.push(me(u)),n.push(!0),r.push("text"),o.push(e.starts[i]),i=s-1;continue}t.push(c),n.push(e.isWordLike[i]),r.push(d),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ii(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i],d=e.kinds[i],u=e.isWordLike[i];if(d==="text"&&u&&Ut.test(c)){let s=[c],l=qt.test(c),x=i+1;for(;l&&x<e.len&&e.kinds[x]==="text"&&e.isWordLike[x]&&Ut.test(e.texts[x]);){let f=e.texts[x];s.push(f),l=qt.test(f),x++}t.push(me(s)),n.push(!0),r.push("text"),o.push(e.starts[i]),i=x-1;continue}t.push(c),n.push(u),r.push(d),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function oi(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(e.kinds[i]==="text"&&c.includes("-")){let d=c.split("-"),u=d.length>1;for(let s=0;s<d.length;s++){let l=d[s];if(!u)break;(l.length===0||!Jt(l)||!Pe(l))&&(u=!1)}if(u){let s=0;for(let l=0;l<d.length;l++){let x=d[l],f=l<d.length-1?`${x}-`:x;t.push(f),n.push(!0),r.push("text"),o.push(e.starts[i]+s),s+=f.length}continue}}t.push(c),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ri(e){let t=[],n=[],r=[],o=[],i=0;for(;i<e.len;){let c=[e.texts[i]],d=e.isWordLike[i],u=e.kinds[i],s=e.starts[i];if(u==="glue"){let l=[c[0]],x=s;for(i++;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let f=me(l);if(i<e.len&&e.kinds[i]==="text")c[0]=f,c.push(e.texts[i]),d=e.isWordLike[i],u="text",s=x,i++;else{t.push(f),n.push(!1),r.push("glue"),o.push(x);continue}}else i++;if(u==="text")for(;i<e.len&&e.kinds[i]==="glue";){let l=[];for(;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let x=me(l);if(i<e.len&&e.kinds[i]==="text"){c.push(x,e.texts[i]),d=d||e.isWordLike[i],i++;continue}c.push(x)}t.push(me(c)),n.push(d),r.push(u),o.push(s)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function si(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let i=0;i<t.length-1;i++){if(r[i]!=="text"||r[i+1]!=="text"||!xe(t[i])||!xe(t[i+1]))continue;let c=zn(t[i]);c!==null&&(t[i]=c.head,t[i+1]=c.tail+t[i+1],o[i+1]=o[i]+c.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function $t(e,t,n){let r=Tn(),o=0,i=[],c=[],d=[],u=[],s=[],l=[],x=[],f=[],C=[],D=[],k=[],w=[];for(let m of r.segment(e))for(let S of Jn(m.segment,m.isWordLike??!1,m.index,n)){let U=function(){l[L]!==null&&(c[L]=[zt(i,l,x,L)],l[L]=null),c[L].push(S.text),d[L]=d[L]||S.isWordLike,f[L]=f[L]||E,C[L]=C[L]||v,D[L]=I,k[L]=X,w[L]=Gt(C[L],_)},A=S.kind==="text",M=Gn(S.text,S.isWordLike,S.kind),E=xe(S.text),v=Ht(S.text),_=qe(S.text),I=$e(S.text),X=Un(S.text),L=o-1;t.carryCJKAfterClosingQuote&&A&&o>0&&u[L]==="text"&&E&&f[L]&&D[L]||A&&o>0&&u[L]==="text"&&Hn(S.text)&&f[L]||A&&o>0&&u[L]==="text"&&k[L]?U():A&&o>0&&u[L]==="text"&&S.isWordLike&&v&&w[L]?(U(),d[L]=!0):M!==null&&o>0&&u[L]==="text"&&l[L]===M?x[L]=(x[L]??1)+1:A&&!S.isWordLike&&o>0&&u[L]==="text"&&(Wn(S.text)||S.text==="-"&&d[L])?U():(i[o]=S.text,c[o]=[S.text],d[o]=S.isWordLike,u[o]=S.kind,s[o]=S.start,l[o]=M,x[o]=M===null?0:1,f[o]=E,C[o]=v,D[o]=I,k[o]=X,w[o]=Gt(v,_),o++)}for(let m=0;m<o;m++){if(l[m]!==null){i[m]=zt(i,l,x,m);continue}i[m]=me(c[m])}for(let m=1;m<o;m++)u[m]==="text"&&!d[m]&&at(i[m])&&u[m-1]==="text"&&(i[m-1]+=i[m],d[m-1]=d[m-1]||d[m],i[m]="");let j=Array.from({length:o},()=>null),V=-1;for(let m=o-1;m>=0;m--){let S=i[m];if(S.length!==0){if(u[m]==="text"&&!d[m]&&jn(S)&&V>=0&&u[V]==="text"){let A=j[V]??[];A.push(S),j[V]=A,s[V]=s[m],i[m]="";continue}V=m}}for(let m=0;m<o;m++){let S=j[m];S!=null&&(i[m]=Vn(S,i[m]))}let B=0;for(let m=0;m<o;m++){let S=i[m];S.length!==0&&(B!==m&&(i[B]=S,d[B]=d[m],u[B]=u[m],s[B]=s[m]),B++)}i.length=B,d.length=B,u.length=B,s.length=B;let $=ri({len:B,texts:i,isWordLike:d,kinds:u,starts:s}),g=si(ii(oi(ni(ei(Xn($))))));for(let m=0;m<g.len-1;m++){let S=qn(g.texts[m]);S!==null&&(g.kinds[m]!=="space"&&g.kinds[m]!=="preserved-space"||g.kinds[m+1]!=="text"||!Ht(g.texts[m+1])||(g.texts[m]=S.space,g.isWordLike[m]=!1,g.kinds[m]=g.kinds[m]==="preserved-space"?"preserved-space":"space",g.texts[m+1]=S.marks+g.texts[m+1],g.starts[m+1]=g.starts[m]+S.space.length))}return g}function ai(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let o=0;o<e.len;o++)e.kinds[o]==="hard-break"&&(n.push({startSegmentIndex:r,endSegmentIndex:o,consumedEndSegmentIndex:o+1}),r=o+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function li(e){if(e.len<=1)return e;let t=[],n=[],r=[],o=[],i=null,c=!1,d=0,u=!1,s=!1;function l(){i!==null&&(t.push(me(i)),n.push(c),r.push("text"),o.push(d),i=null)}for(let x=0;x<e.len;x++){let f=e.texts[x],C=e.kinds[x],D=e.isWordLike[x],k=e.starts[x];if(C==="text"){let w=Rn(f),j=Ge(f);if(i!==null&&u&&s){i.push(f),c=c||D,u=u||w,s=j;continue}l(),i=[f],c=D,d=k,u=w,s=j;continue}l(),t.push(f),n.push(D),r.push(C),o.push(k)}return l(),{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function Qt(e,t,n="normal",r="normal"){let o=Cn(n),i=o.mode==="pre-wrap"?kn(e):Dn(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let c=r==="keep-all"?li($t(i,t,o)):$t(i,t,o);return{normalized:i,chunks:ai(c,o),...c}}var De=null,Zt=new Map,ke=null,ui=96,ci=/\p{Emoji_Presentation}/u,di=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,lt=null,Yt=new Map;function ut(){if(De!==null)return De;if(typeof OffscreenCanvas<"u")return De=new OffscreenCanvas(1,1).getContext("2d"),De;if(typeof document<"u")return De=document.createElement("canvas").getContext("2d"),De;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function mi(e){let t=Zt.get(e);return t||(t=new Map,Zt.set(e,t)),t}function he(e,t){let n=t.get(e);return n===void 0&&(n={width:ut().measureText(e).width,containsCJK:xe(e)},t.set(e,n)),n}function Le(){if(ke!==null)return ke;if(typeof navigator>"u")return ke={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ke;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),r=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return ke={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:r,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},ke}function xi(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function Xt(){return lt===null&&(lt=new Intl.Segmenter(void 0,{granularity:"grapheme"})),lt}function fi(e){return ci.test(e)||e.includes("\uFE0F")}function en(e){return di.test(e)}function pi(e,t){let n=Yt.get(e);if(n!==void 0)return n;let r=ut();r.font=e;let o=r.measureText("\u{1F600}").width;if(n=0,o>t+.5&&typeof document<"u"&&document.body!==null){let i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="\u{1F600}",document.body.appendChild(i);let c=i.getBoundingClientRect().width;document.body.removeChild(i),o-c>.5&&(n=o-c)}return Yt.set(e,n),n}function hi(e){let t=0,n=Xt();for(let r of n.segment(e))fi(r.segment)&&t++;return t}function gi(e,t){return t.emojiCount===void 0&&(t.emojiCount=hi(e)),t.emojiCount}function Fe(e,t,n){return n===0?t.width:t.width-gi(e,t)*n}function tn(e,t,n,r,o){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let i=Xt(),c=[];for(let l of i.segment(e))c.push(l.segment);if(c.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(o==="sum-graphemes"){let l=[];for(let x of c){let f=he(x,n);l.push(Fe(x,f,r))}return t.breakableFitAdvances=l,t.breakableFitAdvances}if(o==="pair-context"||c.length>ui){let l=[],x=null,f=0;for(let C of c){let D=he(C,n),k=Fe(C,D,r);if(x===null)l.push(k);else{let w=x+C,j=he(w,n);l.push(Fe(w,j,r)-f)}x=C,f=k}return t.breakableFitAdvances=l,t.breakableFitAdvances}let d=[],u="",s=0;for(let l of c){u+=l;let x=he(u,n),f=Fe(u,x,r);d.push(f-s),s=f}return t.breakableFitAdvances=d,t.breakableFitAdvances}function nn(e,t){let n=ut();n.font=e;let r=mi(e),o=xi(e),i=t?pi(e,o):0;return{cache:r,fontSize:o,emojiCorrection:i}}function Si(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function Fi(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Ni(e,t,n,r,o){let i=0,c=t;for(;i<e.length;){let d=c+e[i];if((i+1<e.length?d+o:d)>n+r)break;c=d,i++}return{fitCount:i,fittedWidth:c}}function on(e,t){return e.simpleLineWalkFastPath?rn(e,t):sn(e,t)}function rn(e,t,n){let{widths:r,kinds:o,breakableFitAdvances:i}=e;if(r.length===0)return 0;let d=Le().lineFitEpsilon,u=t+d,s=0,l=0,x=!1,f=0,C=0,D=0,k=0,w=-1,j=0;function V(){w=-1,j=0}function B(M=D,E=k,v=l){s++,n?.({startSegmentIndex:f,startGraphemeIndex:C,endSegmentIndex:M,endGraphemeIndex:E,width:v}),l=0,x=!1,V()}function $(M,E){x=!0,f=M,C=0,D=M+1,k=0,l=E}function g(M,E,v){x=!0,f=M,C=E,D=M,k=E+1,l=v}function m(M,E){if(!x){$(M,E);return}l+=E,D=M+1,k=0}function S(M,E){let v=i[M];for(let _=E;_<v.length;_++){let I=v[_];x?l+I>u?(B(),g(M,_,I)):(l+=I,D=M,k=_+1):g(M,_,I)}x&&D===M&&k===v.length&&(D=M+1,k=0)}let A=0;for(;A<r.length&&!(!x&&(A=Si(e,A),A>=r.length));){let M=r[A],E=o[A],v=E==="space"||E==="preserved-space"||E==="tab"||E==="zero-width-break"||E==="soft-hyphen";if(!x){M>t&&i[A]!==null?S(A,0):$(A,M),v&&(w=A+1,j=l-M),A++;continue}if(l+M>u){if(v){m(A,M),B(A+1,0,l-M),A++;continue}if(w>=0){if(D>w||D===w&&k>0){B();continue}B(w,0,j);continue}if(M>t&&i[A]!==null){B(),S(A,0),A++;continue}B();continue}m(A,M),v&&(w=A+1,j=l-M),A++}return x&&B(),s}function sn(e,t,n){if(e.simpleLineWalkFastPath)return rn(e,t,n);let{widths:r,lineEndFitAdvances:o,lineEndPaintAdvances:i,kinds:c,breakableFitAdvances:d,discretionaryHyphenWidth:u,tabStopAdvance:s,chunks:l}=e;if(r.length===0||l.length===0)return 0;let x=Le(),f=x.lineFitEpsilon,C=t+f,D=0,k=0,w=!1,j=0,V=0,B=0,$=0,g=-1,m=0,S=0,A=null;function M(){g=-1,m=0,S=0,A=null}function E(H=B,q=$,N=k){D++,n?.({startSegmentIndex:j,startGraphemeIndex:V,endSegmentIndex:H,endGraphemeIndex:q,width:N}),k=0,w=!1,M()}function v(H,q){w=!0,j=H,V=0,B=H+1,$=0,k=q}function _(H,q,N){w=!0,j=H,V=q,B=H,$=q+1,k=N}function I(H,q){if(!w){v(H,q);return}k+=q,B=H+1,$=0}function X(H,q,N,F){if(!q)return;let T=H==="tab"?0:o[N],W=H==="tab"?F:i[N];g=N+1,m=k-F+T,S=k-F+W,A=H}function L(H,q){let N=d[H];for(let F=q;F<N.length;F++){let T=N[F];w?k+T>C?(E(),_(H,F,T)):(k+=T,B=H,$=F+1):_(H,F,T)}w&&B===H&&$===N.length&&(B=H+1,$=0)}function U(H){if(A!=="soft-hyphen")return!1;let q=d[H];if(q==null)return!1;let{fitCount:N,fittedWidth:F}=Ni(q,k,t,f,u);return N===0?!1:(k=F,B=H,$=N,M(),N===q.length?(B=H+1,$=0,!0):(E(H,N,F+u),L(H,N),!0))}function te(H){D++,n?.({startSegmentIndex:H.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:H.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),M()}for(let H=0;H<l.length;H++){let q=l[H];if(q.startSegmentIndex===q.endSegmentIndex){te(q);continue}w=!1,k=0,j=q.startSegmentIndex,V=0,B=q.startSegmentIndex,$=0,M();let N=q.startSegmentIndex;for(;N<q.endSegmentIndex;){let F=c[N],T=F==="space"||F==="preserved-space"||F==="tab"||F==="zero-width-break"||F==="soft-hyphen",W=F==="tab"?Fi(k,s):r[N];if(F==="soft-hyphen"){w&&(B=N+1,$=0,g=N+1,m=k+u,S=k+u,A=F),N++;continue}if(!w){W>t&&d[N]!==null?L(N,0):v(N,W),X(F,T,N,W),N++;continue}if(k+W>C){let R=k+(F==="tab"?0:o[N]),P=k+(F==="tab"?W:i[N]);if(A==="soft-hyphen"&&x.preferEarlySoftHyphenBreak&&m<=C){E(g,0,S);continue}if(A==="soft-hyphen"&&U(N)){N++;continue}if(T&&R<=C){I(N,W),E(N+1,0,P),N++;continue}if(g>=0&&m<=C){if(B>g||B===g&&$>0){E();continue}let O=g;E(O,0,S),N=O;continue}if(W>t&&d[N]!==null){E(),L(N,0),N++;continue}E();continue}I(N,W),X(F,T,N,W),N++}if(w){let F=g===q.consumedEndSegmentIndex?S:k;E(q.consumedEndSegmentIndex,0,F)}}return D}var ct=null;function Ei(){return ct===null&&(ct=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ct}function Ai(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function yi(e,t){let n=[],r=[],o=0,i=!1,c=!1,d=!1;function u(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(""),start:o}),r=[],i=!1,c=!1,d=!1)}function s(x,f,C){r=[x],o=f,i=C,c=$e(x),d=Oe.has(x)}function l(x,f){r.push(x),i=i||f;let C=$e(x);x.length===1&&Se.has(x)?c=c||C:c=C,d=!1}for(let x of Ei().segment(e)){let f=x.segment,C=xe(f);if(r.length===0){s(f,x.index,C);continue}if(d||Ue.has(f)||Se.has(f)||t.carryCJKAfterClosingQuote&&C&&c){l(f,C);continue}if(!i&&!C){l(f,C);continue}u(),s(f,x.index,C)}return u(),n}function bi(e){if(e.length<=1)return e;let t=[],n=[e[0].text],r=e[0].start,o=xe(e[0].text),i=Ge(e[0].text);function c(){t.push({text:n.length===1?n[0]:n.join(""),start:r})}for(let d=1;d<e.length;d++){let u=e[d],s=xe(u.text),l=Ge(u.text);if(o&&i){n.push(u.text),o=o||s,i=l;continue}c(),n=[u.text],r=u.start,o=s,i=l}return c(),t}function Mi(e,t,n,r){let o=Le(),{cache:i,emojiCorrection:c}=nn(t,en(e.normalized)),d=Fe("-",he("-",i),c),s=Fe(" ",he(" ",i),c)*8;if(e.len===0)return Ai(n);let l=[],x=[],f=[],C=[],D=e.chunks.length<=1,k=n?[]:null,w=[],j=n?[]:null,V=Array.from({length:e.len});function B(S,A,M,E,v,_,I){v!=="text"&&v!=="space"&&v!=="zero-width-break"&&(D=!1),l.push(A),x.push(M),f.push(E),C.push(v),k?.push(_),w.push(I),j!==null&&j.push(S)}function $(S,A,M,E,v){let _=he(S,i),I=Fe(S,_,c),X=A==="space"||A==="preserved-space"||A==="zero-width-break"?0:I,L=A==="space"||A==="zero-width-break"?0:I;if(v&&E&&S.length>1){let U="sum-graphemes";Pe(S)?U="pair-context":o.preferPrefixWidthsForBreakableRuns&&(U="segment-prefixes");let te=tn(S,_,i,c,U);B(S,I,X,L,A,M,te);return}B(S,I,X,L,A,M,null)}for(let S=0;S<e.len;S++){V[S]=l.length;let A=e.texts[S],M=e.isWordLike[S],E=e.kinds[S],v=e.starts[S];if(E==="soft-hyphen"){B(A,0,d,d,E,v,null);continue}if(E==="hard-break"){B(A,0,0,0,E,v,null);continue}if(E==="tab"){B(A,0,0,0,E,v,null);continue}let _=he(A,i);if(E==="text"&&_.containsCJK){let I=yi(A,o),X=r==="keep-all"?bi(I):I;for(let L=0;L<X.length;L++){let U=X[L];$(U.text,"text",v+U.start,M,r==="keep-all"||!xe(U.text))}continue}$(A,E,v,M,!0)}let g=Ci(e.chunks,V,l.length),m=k===null?null:Wt(e.normalized,k);return j!==null?{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:f,kinds:C,simpleLineWalkFastPath:D,segLevels:m,breakableFitAdvances:w,discretionaryHyphenWidth:d,tabStopAdvance:s,chunks:g,segments:j}:{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:f,kinds:C,simpleLineWalkFastPath:D,segLevels:m,breakableFitAdvances:w,discretionaryHyphenWidth:d,tabStopAdvance:s,chunks:g}}function Ci(e,t,n){let r=[];for(let o=0;o<e.length;o++){let i=e[o],c=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n,d=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n,u=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:c,endSegmentIndex:d,consumedEndSegmentIndex:u})}return r}function Di(e,t,n,r){let o=r?.wordBreak??"normal",i=Qt(e,Le(),r?.whiteSpace,o);return Mi(i,t,n,o)}function an(e,t,n){return Di(e,t,!1,n)}function ln(e,t,n){let r=on(e,t);return{lineCount:r,height:r*n}}var ki={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function un(e,t){let n={...ki,...t},r=1.2;for(let o=n.baseFontSize;o>=n.minFontSize;o-=n.step){let i=`${n.fontWeight} ${o}px ${n.fontFamily}`,c=an(e,i),{lineCount:d}=ln(c,n.maxWidth,o*r);if(d<=1)return{fontSize:o,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:un};function cn(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Ot())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",cn,{once:!0}):cn();})();
|
|
15
|
+
`)}var ot=null,Ln;function Tn(){return ot===null&&(ot=new Intl.Segmenter(Ln,{granularity:"word"})),ot}var wn=/\p{Script=Arabic}/u,ze=/\p{M}/u,Kt=/\p{Nd}/u;function Ht(e){return wn.test(e)}function jt(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function xe(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let o=e.charCodeAt(t+1);if(o>=56320&&o<=57343){let r=(n-55296<<10)+(o-56320)+65536;if(jt(r))return!0;t++;continue}}if(jt(n))return!0}}return!1}function Bn(e){let t=qe(e);return t!==null&&(Ue.has(t)||Se.has(t))}var vn=new Set(["\xA0","\u202F","\u2060","\uFEFF"]);function Rn(e){return xe(e)}function In(e){let t=qe(e);return t!==null&&vn.has(t)}function Ge(e){return!Bn(e)&&!In(e)}var Ue=new Set(["\uFF0C","\uFF0E","\uFF01","\uFF1A","\uFF1B","\uFF1F","\u3001","\u3002","\u30FB","\uFF09","\u3015","\u3009","\u300B","\u300D","\u300F","\u3011","\u3017","\u3019","\u301B","\u30FC","\u3005","\u303B","\u309D","\u309E","\u30FD","\u30FE"]),Oe=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),st=new Set(["'","\u2019"]),Se=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),Pn=new Set([":",".","\u060C","\u061B"]),On=new Set(["\u104F"]),_n=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function Wn(e){if(at(e))return!0;let t=!1;for(let n of e){if(Se.has(n)){t=!0;continue}if(!(t&&ze.test(n)))return!1}return t}function Hn(e){for(let t of e)if(!Ue.has(t)&&!Se.has(t))return!1;return e.length>0}function jn(e){if(at(e))return!0;for(let t of e)if(!Oe.has(t)&&!st.has(t)&&!ze.test(t))return!1;return e.length>0}function at(e){let t=!1;for(let n of e)if(!(n==="\\"||ze.test(n))){if(Oe.has(n)||Se.has(n)||st.has(n)){t=!0;continue}return!1}return t}function Vt(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let o=e.charCodeAt(n);if(o<56320||o>57343)return n;let r=n-1;if(r<0)return n;let i=e.charCodeAt(r);return i>=55296&&i<=56319?r:n}function qe(e){if(e.length===0)return null;let t=Vt(e,e.length);return e.slice(t)}function zn(e){let t=Array.from(e),n=t.length;for(;n>0;){let o=t[n-1];if(ze.test(o)){n--;continue}if(Oe.has(o)||st.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Gn(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="\u2014"?e:null}function zt(e,t,n,o){let r=t[o],i=e[o];if(r==null)return i;let c=n[o];if(i.length===c)return i;let d=r.repeat(c);return e[o]=d,d}function Gt(e,t){return e&&t!==null&&Pn.has(t)}function Un(e){let t=qe(e);return t!==null&&On.has(t)}function qn(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function $e(e){let t=e.length;for(;t>0;){let n=Vt(e,t),o=e.slice(n,t);if(_n.has(o))return!0;if(!Se.has(o))return!1;t=n}return!1}function $n(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===`
|
|
16
|
+
`)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}var Kn=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function me(e){return e.length===1?e[0]:e.join("")}function Vn(e,t){let n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),me(n)}function Jn(e,t,n,o){if(!Kn.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let r=[],i=null,c=[],d=n,u=!1,s=0;for(let l of e){let x=$n(l,o),h=x==="text"&&t;if(i!==null&&x===i&&h===u){c.push(l),s+=l.length;continue}i!==null&&r.push({text:me(c),isWordLike:u,kind:i,start:d}),i=x,c=[l],d=n+s,u=h,s+=l.length}return i!==null&&r.push({text:me(c),isWordLike:u,kind:i,start:d}),r}function rt(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Qn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Zn(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Qn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Yn(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Xn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),o=e.kinds.slice(),r=e.starts.slice();for(let c=0;c<e.len;c++){if(o[c]!=="text"||!Zn(e,c))continue;let d=[t[c]],u=c+1;for(;u<e.len&&!rt(o[u]);){d.push(t[u]),n[c]=!0;let s=t[u].includes("?");if(o[u]="text",t[u]="",u++,s)break}t[c]=me(d)}let i=0;for(let c=0;c<t.length;c++){let d=t[c];d.length!==0&&(i!==c&&(t[i]=d,n[i]=n[c],o[i]=o[c],r[i]=r[c]),i++)}return t.length=i,n.length=i,o.length=i,r.length=i,{len:i,texts:t,isWordLike:n,kinds:o,starts:r}}function ei(e){let t=[],n=[],o=[],r=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(t.push(c),n.push(e.isWordLike[i]),o.push(e.kinds[i]),r.push(e.starts[i]),!Yn(c))continue;let d=i+1;if(d>=e.len||rt(e.kinds[d]))continue;let u=[],s=e.starts[d],l=d;for(;l<e.len&&!rt(e.kinds[l]);)u.push(e.texts[l]),l++;u.length>0&&(t.push(me(u)),n.push(!0),o.push("text"),r.push(s),i=l-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}var ti=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),Ut=/^[A-Za-z0-9_]+[,:;]*$/,qt=/[,:;]+$/;function Jt(e){for(let t of e)if(Kt.test(t))return!0;return!1}function Pe(e){if(e.length===0)return!1;for(let t of e)if(!(Kt.test(t)||ti.has(t)))return!1;return!0}function ni(e){let t=[],n=[],o=[],r=[];for(let i=0;i<e.len;i++){let c=e.texts[i],d=e.kinds[i];if(d==="text"&&Pe(c)&&Jt(c)){let u=[c],s=i+1;for(;s<e.len&&e.kinds[s]==="text"&&Pe(e.texts[s]);)u.push(e.texts[s]),s++;t.push(me(u)),n.push(!0),o.push("text"),r.push(e.starts[i]),i=s-1;continue}t.push(c),n.push(e.isWordLike[i]),o.push(d),r.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}function ii(e){let t=[],n=[],o=[],r=[];for(let i=0;i<e.len;i++){let c=e.texts[i],d=e.kinds[i],u=e.isWordLike[i];if(d==="text"&&u&&Ut.test(c)){let s=[c],l=qt.test(c),x=i+1;for(;l&&x<e.len&&e.kinds[x]==="text"&&e.isWordLike[x]&&Ut.test(e.texts[x]);){let h=e.texts[x];s.push(h),l=qt.test(h),x++}t.push(me(s)),n.push(!0),o.push("text"),r.push(e.starts[i]),i=x-1;continue}t.push(c),n.push(u),o.push(d),r.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}function oi(e){let t=[],n=[],o=[],r=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(e.kinds[i]==="text"&&c.includes("-")){let d=c.split("-"),u=d.length>1;for(let s=0;s<d.length;s++){let l=d[s];if(!u)break;(l.length===0||!Jt(l)||!Pe(l))&&(u=!1)}if(u){let s=0;for(let l=0;l<d.length;l++){let x=d[l],h=l<d.length-1?`${x}-`:x;t.push(h),n.push(!0),o.push("text"),r.push(e.starts[i]+s),s+=h.length}continue}}t.push(c),n.push(e.isWordLike[i]),o.push(e.kinds[i]),r.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}function ri(e){let t=[],n=[],o=[],r=[],i=0;for(;i<e.len;){let c=[e.texts[i]],d=e.isWordLike[i],u=e.kinds[i],s=e.starts[i];if(u==="glue"){let l=[c[0]],x=s;for(i++;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let h=me(l);if(i<e.len&&e.kinds[i]==="text")c[0]=h,c.push(e.texts[i]),d=e.isWordLike[i],u="text",s=x,i++;else{t.push(h),n.push(!1),o.push("glue"),r.push(x);continue}}else i++;if(u==="text")for(;i<e.len&&e.kinds[i]==="glue";){let l=[];for(;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let x=me(l);if(i<e.len&&e.kinds[i]==="text"){c.push(x,e.texts[i]),d=d||e.isWordLike[i],i++;continue}c.push(x)}t.push(me(c)),n.push(d),o.push(u),r.push(s)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}function si(e){let t=e.texts.slice(),n=e.isWordLike.slice(),o=e.kinds.slice(),r=e.starts.slice();for(let i=0;i<t.length-1;i++){if(o[i]!=="text"||o[i+1]!=="text"||!xe(t[i])||!xe(t[i+1]))continue;let c=zn(t[i]);c!==null&&(t[i]=c.head,t[i+1]=c.tail+t[i+1],r[i+1]=r[i]+c.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}function $t(e,t,n){let o=Tn(),r=0,i=[],c=[],d=[],u=[],s=[],l=[],x=[],h=[],A=[],D=[],k=[],w=[];for(let m of o.segment(e))for(let S of Jn(m.segment,m.isWordLike??!1,m.index,n)){let U=function(){l[L]!==null&&(c[L]=[zt(i,l,x,L)],l[L]=null),c[L].push(S.text),d[L]=d[L]||S.isWordLike,h[L]=h[L]||E,A[L]=A[L]||v,D[L]=I,k[L]=X,w[L]=Gt(A[L],_)},y=S.kind==="text",C=Gn(S.text,S.isWordLike,S.kind),E=xe(S.text),v=Ht(S.text),_=qe(S.text),I=$e(S.text),X=Un(S.text),L=r-1;t.carryCJKAfterClosingQuote&&y&&r>0&&u[L]==="text"&&E&&h[L]&&D[L]||y&&r>0&&u[L]==="text"&&Hn(S.text)&&h[L]||y&&r>0&&u[L]==="text"&&k[L]?U():y&&r>0&&u[L]==="text"&&S.isWordLike&&v&&w[L]?(U(),d[L]=!0):C!==null&&r>0&&u[L]==="text"&&l[L]===C?x[L]=(x[L]??1)+1:y&&!S.isWordLike&&r>0&&u[L]==="text"&&(Wn(S.text)||S.text==="-"&&d[L])?U():(i[r]=S.text,c[r]=[S.text],d[r]=S.isWordLike,u[r]=S.kind,s[r]=S.start,l[r]=C,x[r]=C===null?0:1,h[r]=E,A[r]=v,D[r]=I,k[r]=X,w[r]=Gt(v,_),r++)}for(let m=0;m<r;m++){if(l[m]!==null){i[m]=zt(i,l,x,m);continue}i[m]=me(c[m])}for(let m=1;m<r;m++)u[m]==="text"&&!d[m]&&at(i[m])&&u[m-1]==="text"&&(i[m-1]+=i[m],d[m-1]=d[m-1]||d[m],i[m]="");let j=Array.from({length:r},()=>null),V=-1;for(let m=r-1;m>=0;m--){let S=i[m];if(S.length!==0){if(u[m]==="text"&&!d[m]&&jn(S)&&V>=0&&u[V]==="text"){let y=j[V]??[];y.push(S),j[V]=y,s[V]=s[m],i[m]="";continue}V=m}}for(let m=0;m<r;m++){let S=j[m];S!=null&&(i[m]=Vn(S,i[m]))}let B=0;for(let m=0;m<r;m++){let S=i[m];S.length!==0&&(B!==m&&(i[B]=S,d[B]=d[m],u[B]=u[m],s[B]=s[m]),B++)}i.length=B,d.length=B,u.length=B,s.length=B;let $=ri({len:B,texts:i,isWordLike:d,kinds:u,starts:s}),g=si(ii(oi(ni(ei(Xn($))))));for(let m=0;m<g.len-1;m++){let S=qn(g.texts[m]);S!==null&&(g.kinds[m]!=="space"&&g.kinds[m]!=="preserved-space"||g.kinds[m+1]!=="text"||!Ht(g.texts[m+1])||(g.texts[m]=S.space,g.isWordLike[m]=!1,g.kinds[m]=g.kinds[m]==="preserved-space"?"preserved-space":"space",g.texts[m+1]=S.marks+g.texts[m+1],g.starts[m+1]=g.starts[m]+S.space.length))}return g}function ai(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],o=0;for(let r=0;r<e.len;r++)e.kinds[r]==="hard-break"&&(n.push({startSegmentIndex:o,endSegmentIndex:r,consumedEndSegmentIndex:r+1}),o=r+1);return o<e.len&&n.push({startSegmentIndex:o,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function li(e){if(e.len<=1)return e;let t=[],n=[],o=[],r=[],i=null,c=!1,d=0,u=!1,s=!1;function l(){i!==null&&(t.push(me(i)),n.push(c),o.push("text"),r.push(d),i=null)}for(let x=0;x<e.len;x++){let h=e.texts[x],A=e.kinds[x],D=e.isWordLike[x],k=e.starts[x];if(A==="text"){let w=Rn(h),j=Ge(h);if(i!==null&&u&&s){i.push(h),c=c||D,u=u||w,s=j;continue}l(),i=[h],c=D,d=k,u=w,s=j;continue}l(),t.push(h),n.push(D),o.push(A),r.push(k)}return l(),{len:t.length,texts:t,isWordLike:n,kinds:o,starts:r}}function Qt(e,t,n="normal",o="normal"){let r=Cn(n),i=r.mode==="pre-wrap"?kn(e):Dn(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let c=o==="keep-all"?li($t(i,t,r)):$t(i,t,r);return{normalized:i,chunks:ai(c,r),...c}}var De=null,Zt=new Map,ke=null,ui=96,ci=/\p{Emoji_Presentation}/u,di=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,lt=null,Yt=new Map;function ut(){if(De!==null)return De;if(typeof OffscreenCanvas<"u")return De=new OffscreenCanvas(1,1).getContext("2d"),De;if(typeof document<"u")return De=document.createElement("canvas").getContext("2d"),De;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function mi(e){let t=Zt.get(e);return t||(t=new Map,Zt.set(e,t)),t}function he(e,t){let n=t.get(e);return n===void 0&&(n={width:ut().measureText(e).width,containsCJK:xe(e)},t.set(e,n)),n}function Le(){if(ke!==null)return ke;if(typeof navigator>"u")return ke={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ke;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return ke={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},ke}function xi(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function Xt(){return lt===null&&(lt=new Intl.Segmenter(void 0,{granularity:"grapheme"})),lt}function fi(e){return ci.test(e)||e.includes("\uFE0F")}function en(e){return di.test(e)}function pi(e,t){let n=Yt.get(e);if(n!==void 0)return n;let o=ut();o.font=e;let r=o.measureText("\u{1F600}").width;if(n=0,r>t+.5&&typeof document<"u"&&document.body!==null){let i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="\u{1F600}",document.body.appendChild(i);let c=i.getBoundingClientRect().width;document.body.removeChild(i),r-c>.5&&(n=r-c)}return Yt.set(e,n),n}function hi(e){let t=0,n=Xt();for(let o of n.segment(e))fi(o.segment)&&t++;return t}function gi(e,t){return t.emojiCount===void 0&&(t.emojiCount=hi(e)),t.emojiCount}function Fe(e,t,n){return n===0?t.width:t.width-gi(e,t)*n}function tn(e,t,n,o,r){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let i=Xt(),c=[];for(let l of i.segment(e))c.push(l.segment);if(c.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(r==="sum-graphemes"){let l=[];for(let x of c){let h=he(x,n);l.push(Fe(x,h,o))}return t.breakableFitAdvances=l,t.breakableFitAdvances}if(r==="pair-context"||c.length>ui){let l=[],x=null,h=0;for(let A of c){let D=he(A,n),k=Fe(A,D,o);if(x===null)l.push(k);else{let w=x+A,j=he(w,n);l.push(Fe(w,j,o)-h)}x=A,h=k}return t.breakableFitAdvances=l,t.breakableFitAdvances}let d=[],u="",s=0;for(let l of c){u+=l;let x=he(u,n),h=Fe(u,x,o);d.push(h-s),s=h}return t.breakableFitAdvances=d,t.breakableFitAdvances}function nn(e,t){let n=ut();n.font=e;let o=mi(e),r=xi(e),i=t?pi(e,r):0;return{cache:o,fontSize:r,emojiCorrection:i}}function Si(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function Fi(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Ni(e,t,n,o,r){let i=0,c=t;for(;i<e.length;){let d=c+e[i];if((i+1<e.length?d+r:d)>n+o)break;c=d,i++}return{fitCount:i,fittedWidth:c}}function on(e,t){return e.simpleLineWalkFastPath?rn(e,t):sn(e,t)}function rn(e,t,n){let{widths:o,kinds:r,breakableFitAdvances:i}=e;if(o.length===0)return 0;let d=Le().lineFitEpsilon,u=t+d,s=0,l=0,x=!1,h=0,A=0,D=0,k=0,w=-1,j=0;function V(){w=-1,j=0}function B(C=D,E=k,v=l){s++,n?.({startSegmentIndex:h,startGraphemeIndex:A,endSegmentIndex:C,endGraphemeIndex:E,width:v}),l=0,x=!1,V()}function $(C,E){x=!0,h=C,A=0,D=C+1,k=0,l=E}function g(C,E,v){x=!0,h=C,A=E,D=C,k=E+1,l=v}function m(C,E){if(!x){$(C,E);return}l+=E,D=C+1,k=0}function S(C,E){let v=i[C];for(let _=E;_<v.length;_++){let I=v[_];x?l+I>u?(B(),g(C,_,I)):(l+=I,D=C,k=_+1):g(C,_,I)}x&&D===C&&k===v.length&&(D=C+1,k=0)}let y=0;for(;y<o.length&&!(!x&&(y=Si(e,y),y>=o.length));){let C=o[y],E=r[y],v=E==="space"||E==="preserved-space"||E==="tab"||E==="zero-width-break"||E==="soft-hyphen";if(!x){C>t&&i[y]!==null?S(y,0):$(y,C),v&&(w=y+1,j=l-C),y++;continue}if(l+C>u){if(v){m(y,C),B(y+1,0,l-C),y++;continue}if(w>=0){if(D>w||D===w&&k>0){B();continue}B(w,0,j);continue}if(C>t&&i[y]!==null){B(),S(y,0),y++;continue}B();continue}m(y,C),v&&(w=y+1,j=l-C),y++}return x&&B(),s}function sn(e,t,n){if(e.simpleLineWalkFastPath)return rn(e,t,n);let{widths:o,lineEndFitAdvances:r,lineEndPaintAdvances:i,kinds:c,breakableFitAdvances:d,discretionaryHyphenWidth:u,tabStopAdvance:s,chunks:l}=e;if(o.length===0||l.length===0)return 0;let x=Le(),h=x.lineFitEpsilon,A=t+h,D=0,k=0,w=!1,j=0,V=0,B=0,$=0,g=-1,m=0,S=0,y=null;function C(){g=-1,m=0,S=0,y=null}function E(H=B,q=$,N=k){D++,n?.({startSegmentIndex:j,startGraphemeIndex:V,endSegmentIndex:H,endGraphemeIndex:q,width:N}),k=0,w=!1,C()}function v(H,q){w=!0,j=H,V=0,B=H+1,$=0,k=q}function _(H,q,N){w=!0,j=H,V=q,B=H,$=q+1,k=N}function I(H,q){if(!w){v(H,q);return}k+=q,B=H+1,$=0}function X(H,q,N,F){if(!q)return;let T=H==="tab"?0:r[N],W=H==="tab"?F:i[N];g=N+1,m=k-F+T,S=k-F+W,y=H}function L(H,q){let N=d[H];for(let F=q;F<N.length;F++){let T=N[F];w?k+T>A?(E(),_(H,F,T)):(k+=T,B=H,$=F+1):_(H,F,T)}w&&B===H&&$===N.length&&(B=H+1,$=0)}function U(H){if(y!=="soft-hyphen")return!1;let q=d[H];if(q==null)return!1;let{fitCount:N,fittedWidth:F}=Ni(q,k,t,h,u);return N===0?!1:(k=F,B=H,$=N,C(),N===q.length?(B=H+1,$=0,!0):(E(H,N,F+u),L(H,N),!0))}function te(H){D++,n?.({startSegmentIndex:H.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:H.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),C()}for(let H=0;H<l.length;H++){let q=l[H];if(q.startSegmentIndex===q.endSegmentIndex){te(q);continue}w=!1,k=0,j=q.startSegmentIndex,V=0,B=q.startSegmentIndex,$=0,C();let N=q.startSegmentIndex;for(;N<q.endSegmentIndex;){let F=c[N],T=F==="space"||F==="preserved-space"||F==="tab"||F==="zero-width-break"||F==="soft-hyphen",W=F==="tab"?Fi(k,s):o[N];if(F==="soft-hyphen"){w&&(B=N+1,$=0,g=N+1,m=k+u,S=k+u,y=F),N++;continue}if(!w){W>t&&d[N]!==null?L(N,0):v(N,W),X(F,T,N,W),N++;continue}if(k+W>A){let R=k+(F==="tab"?0:r[N]),P=k+(F==="tab"?W:i[N]);if(y==="soft-hyphen"&&x.preferEarlySoftHyphenBreak&&m<=A){E(g,0,S);continue}if(y==="soft-hyphen"&&U(N)){N++;continue}if(T&&R<=A){I(N,W),E(N+1,0,P),N++;continue}if(g>=0&&m<=A){if(B>g||B===g&&$>0){E();continue}let O=g;E(O,0,S),N=O;continue}if(W>t&&d[N]!==null){E(),L(N,0),N++;continue}E();continue}I(N,W),X(F,T,N,W),N++}if(w){let F=g===q.consumedEndSegmentIndex?S:k;E(q.consumedEndSegmentIndex,0,F)}}return D}var ct=null;function Ei(){return ct===null&&(ct=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ct}function Ai(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function yi(e,t){let n=[],o=[],r=0,i=!1,c=!1,d=!1;function u(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:r}),o=[],i=!1,c=!1,d=!1)}function s(x,h,A){o=[x],r=h,i=A,c=$e(x),d=Oe.has(x)}function l(x,h){o.push(x),i=i||h;let A=$e(x);x.length===1&&Se.has(x)?c=c||A:c=A,d=!1}for(let x of Ei().segment(e)){let h=x.segment,A=xe(h);if(o.length===0){s(h,x.index,A);continue}if(d||Ue.has(h)||Se.has(h)||t.carryCJKAfterClosingQuote&&A&&c){l(h,A);continue}if(!i&&!A){l(h,A);continue}u(),s(h,x.index,A)}return u(),n}function bi(e){if(e.length<=1)return e;let t=[],n=[e[0].text],o=e[0].start,r=xe(e[0].text),i=Ge(e[0].text);function c(){t.push({text:n.length===1?n[0]:n.join(""),start:o})}for(let d=1;d<e.length;d++){let u=e[d],s=xe(u.text),l=Ge(u.text);if(r&&i){n.push(u.text),r=r||s,i=l;continue}c(),n=[u.text],o=u.start,r=s,i=l}return c(),t}function Mi(e,t,n,o){let r=Le(),{cache:i,emojiCorrection:c}=nn(t,en(e.normalized)),d=Fe("-",he("-",i),c),s=Fe(" ",he(" ",i),c)*8;if(e.len===0)return Ai(n);let l=[],x=[],h=[],A=[],D=e.chunks.length<=1,k=n?[]:null,w=[],j=n?[]:null,V=Array.from({length:e.len});function B(S,y,C,E,v,_,I){v!=="text"&&v!=="space"&&v!=="zero-width-break"&&(D=!1),l.push(y),x.push(C),h.push(E),A.push(v),k?.push(_),w.push(I),j!==null&&j.push(S)}function $(S,y,C,E,v){let _=he(S,i),I=Fe(S,_,c),X=y==="space"||y==="preserved-space"||y==="zero-width-break"?0:I,L=y==="space"||y==="zero-width-break"?0:I;if(v&&E&&S.length>1){let U="sum-graphemes";Pe(S)?U="pair-context":r.preferPrefixWidthsForBreakableRuns&&(U="segment-prefixes");let te=tn(S,_,i,c,U);B(S,I,X,L,y,C,te);return}B(S,I,X,L,y,C,null)}for(let S=0;S<e.len;S++){V[S]=l.length;let y=e.texts[S],C=e.isWordLike[S],E=e.kinds[S],v=e.starts[S];if(E==="soft-hyphen"){B(y,0,d,d,E,v,null);continue}if(E==="hard-break"){B(y,0,0,0,E,v,null);continue}if(E==="tab"){B(y,0,0,0,E,v,null);continue}let _=he(y,i);if(E==="text"&&_.containsCJK){let I=yi(y,r),X=o==="keep-all"?bi(I):I;for(let L=0;L<X.length;L++){let U=X[L];$(U.text,"text",v+U.start,C,o==="keep-all"||!xe(U.text))}continue}$(y,E,v,C,!0)}let g=Ci(e.chunks,V,l.length),m=k===null?null:Wt(e.normalized,k);return j!==null?{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:h,kinds:A,simpleLineWalkFastPath:D,segLevels:m,breakableFitAdvances:w,discretionaryHyphenWidth:d,tabStopAdvance:s,chunks:g,segments:j}:{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:h,kinds:A,simpleLineWalkFastPath:D,segLevels:m,breakableFitAdvances:w,discretionaryHyphenWidth:d,tabStopAdvance:s,chunks:g}}function Ci(e,t,n){let o=[];for(let r=0;r<e.length;r++){let i=e[r],c=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n,d=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n,u=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n;o.push({startSegmentIndex:c,endSegmentIndex:d,consumedEndSegmentIndex:u})}return o}function Di(e,t,n,o){let r=o?.wordBreak??"normal",i=Qt(e,Le(),o?.whiteSpace,r);return Mi(i,t,n,r)}function an(e,t,n){return Di(e,t,!1,n)}function ln(e,t,n){let o=on(e,t);return{lineCount:o,height:o*n}}var ki={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function un(e,t){let n={...ki,...t},o=1.2;for(let r=n.baseFontSize;r>=n.minFontSize;r-=n.step){let i=`${n.fontWeight} ${r}px ${n.fontFamily}`,c=an(e,i),{lineCount:d}=ln(c,n.maxWidth,r*o);if(d<=1)return{fontSize:r,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:un};function cn(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Ot())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",cn,{once:!0}):cn();})();
|
|
17
17
|
|
package/dist/index.js
CHANGED
|
@@ -101064,12 +101064,20 @@ async function createCaptureSession(serverUrl, outputDir, options, onBeforeCaptu
|
|
|
101064
101064
|
config: config2
|
|
101065
101065
|
};
|
|
101066
101066
|
}
|
|
101067
|
+
function isFontResourceError(type, text, locationUrl) {
|
|
101068
|
+
if (type !== "error") return false;
|
|
101069
|
+
if (!text.startsWith("Failed to load resource")) return false;
|
|
101070
|
+
return /fonts\.googleapis|fonts\.gstatic|\.(woff2?|ttf|otf)(\b|$)/i.test(
|
|
101071
|
+
`${locationUrl} ${text}`
|
|
101072
|
+
);
|
|
101073
|
+
}
|
|
101067
101074
|
async function initializeSession(session) {
|
|
101068
101075
|
const { page, serverUrl } = session;
|
|
101069
101076
|
page.on("console", (msg) => {
|
|
101070
101077
|
const type = msg.type();
|
|
101071
101078
|
const text = msg.text();
|
|
101072
|
-
const
|
|
101079
|
+
const locationUrl = msg.location()?.url ?? "";
|
|
101080
|
+
const isFontLoadError = isFontResourceError(type, text, locationUrl);
|
|
101073
101081
|
const isResourceLoadError = type === "error" && text.startsWith("Failed to load resource") && !isFontLoadError;
|
|
101074
101082
|
const prefix = isResourceLoadError ? "[non-blocking]" : type === "error" ? "[Browser:ERROR]" : type === "warn" ? "[Browser:WARN]" : "[Browser]";
|
|
101075
101083
|
if (!isFontLoadError) {
|