@hyperframes/producer 0.2.1 → 0.2.2-alpha.1

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": "9c1a1638c1ed6318cc730de0fc1540490b7261d6f0b99d62bcd1cfef562b3021",
4
+ "sha256": "ed061c34b89e257b060b3c9f5fc8c9e83c5018f59a36214604b7ba2c37ef114b",
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 ft(e){let t=n=>{let r=n.data;if(!r||r.source!=="hf-parent"||r.type!=="control")return;let o=r.action;if(o==="play"){e.onPlay();return}if(o==="pause"){e.onPause();return}if(o==="seek"){e.onSeek(Number(r.frame??0),r.seekMode??"commit");return}if(o==="set-muted"){e.onSetMuted(!!r.muted);return}if(o==="set-playback-rate"){e.onSetPlaybackRate(Number(r.playbackRate??1));return}if(o==="enable-pick-mode"){e.onEnablePickMode();return}if(o==="disable-pick-mode"){e.onDisablePickMode();return}if(o==="flash-elements"){let i=r.selectors,u=r.duration||800;i&&tn(i,u)}};return window.addEventListener("message",t),t}function tn(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`
1
+ "use strict";(()=>{function le(e){try{window.parent.postMessage(e,"*")}catch{}}function pt(e){let t=n=>{let r=n.data;if(!r||r.source!=="hf-parent"||r.type!=="control")return;let o=r.action;if(o==="play"){e.onPlay();return}if(o==="pause"){e.onPause();return}if(o==="seek"){e.onSeek(Number(r.frame??0),r.seekMode??"commit");return}if(o==="set-muted"){e.onSetMuted(!!r.muted);return}if(o==="set-playback-rate"){e.onSetPlaybackRate(Number(r.playbackRate??1));return}if(o==="enable-pick-mode"){e.onEnablePickMode();return}if(o==="disable-pick-mode"){e.onDisablePickMode();return}if(o==="flash-elements"){let i=r.selectors,l=r.duration||800;i&&nn(i,l)}};return window.addEventListener("message",t),t}function nn(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(o=>{o.classList.add("__hf-flash"),setTimeout(()=>o.classList.remove("__hf-flash"),t)})}catch{}}var qe=null;function pt(e){qe=e}function Pe(e,t){if(qe)try{qe({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch{}}function ht(e){let t=[];return{name:"css",discover:()=>{t=[];let n=document.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=window.getComputedStyle(r);!o.animationName||o.animationName==="none"||t.push({el:r,baseDelay:r.style.animationDelay||"",basePlayState:r.style.animationPlayState||""})}},seek:n=>{let r=Number(n.time)||0;for(let o of t){if(!o.el.isConnected)continue;let i=e?.resolveStartSeconds?e.resolveStartSeconds(o.el):Number.parseFloat(o.el.getAttribute("data-start")??"0")||0,u=Math.max(0,r-i);o.el.style.animationPlayState="paused",o.el.style.animationDelay=`-${u.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 gt(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0);typeof n.totalTime=="function"?n.totalTime(r,!1):n.seek(r,!1)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Lt(){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??[],r=new Set(n);for(let o of t)r.has(o)||n.push(o);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 r of n)try{if(yt(r))r.goToAndStop(t*1e3,!1);else if(bt(r)){if(typeof r.setCurrentRawFrameValue=="function"){let o=r.totalFrames??0,i=r.frameRate??30,u=t*i;o>0&&r.setCurrentRawFrameValue(Math.min(u,o-1))}else if(typeof r.seek=="function"){let o=r.duration??1,i=Math.min(100,t/o*100);r.seek(i)}}}catch{}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(yt(t)||bt(t))&&t.pause()}catch{}},revert:()=>{}}}function yt(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function bt(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}function St(){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 At(){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 kt(e){let t=Array.from(document.querySelectorAll("video[data-start], audio[data-start]")),n=[],r=[],o=0;for(let i of t){let u=e?.resolveStartSeconds?e.resolveStartSeconds(i):Number.parseFloat(i.dataset.start??"0");if(!Number.isFinite(u))continue;let c=Number.parseFloat(i.dataset.playbackStart??i.dataset.mediaStart??"0")||0,d=i.defaultPlaybackRate,a=Number.isFinite(d)&&d>0?Math.max(.1,Math.min(5,d)):1,l=i.loop,L=Number.isFinite(i.duration)&&i.duration>0?i.duration:null,m=Number.parseFloat(i.dataset.duration??"");(!Number.isFinite(m)||m<=0)&&L!=null&&(m=Math.max(0,(L-c)/a));let y=Number.isFinite(m)&&m>0?u+m:Number.POSITIVE_INFINITY,M=Number.parseFloat(i.dataset.volume??""),w={el:i,start:u,mediaStart:c,duration:Number.isFinite(m)&&m>0?m:Number.POSITIVE_INFINITY,end:y,volume:Number.isFinite(M)?M:null,playbackRate:a,loop:l,sourceDuration:L};n.push(w),i.tagName==="VIDEO"&&r.push(w),Number.isFinite(y)&&(o=Math.max(o,y))}return{timedMediaEls:t,mediaClips:n,videoClips:r,maxMediaEnd:o}}function xt(e){for(let t of e.clips){let{el:n}=t;if(!n.isConnected)continue;let r=(e.timeSeconds-t.start)*t.playbackRate+t.mediaStart;if(e.timeSeconds>=t.start&&e.timeSeconds<t.end&&r>=0){if(t.loop&&t.sourceDuration!=null&&t.sourceDuration>0){let i=t.sourceDuration-t.mediaStart;i>0&&r>=t.sourceDuration&&(r=t.mediaStart+(r-t.mediaStart)%i)}t.volume!=null&&(n.volume=t.volume);try{n.playbackRate=t.playbackRate*e.playbackRate}catch{}if(Math.abs((n.currentTime||0)-r)>.3)try{n.currentTime=r}catch{}e.playing&&n.paused?n.play().catch(()=>{}):!e.playing&&!n.paused&&n.pause();continue}n.paused||n.pause()}}function Et(e){let t=!1,n=null,r=null,o=null,i=null;function u(g,A){try{window.dispatchEvent(new CustomEvent(g,{detail:A}))}catch{}}function c(g){o=g,u("hyperframe:picker:hovered",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function d(g){i=g,u("hyperframe:picker:selected",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function a(g){if(!g||g===document.body||g===document.documentElement)return!1;let A=g.tagName.toLowerCase();return!(A==="script"||A==="style"||A==="link"||A==="meta"||g.classList.contains("__hf-pick-highlight"))}function l(g){let A=g;if(A.id)return`#${A.id}`;let N=g.getAttribute("data-composition-id");if(N)return`[data-composition-id="${N}"]`;let R=g.getAttribute("data-composition-src");if(R)return`[data-composition-src="${R}"]`;let F=g.getAttribute("data-track-index");if(F)return`[data-track-index="${F}"]`;let E=g.tagName.toLowerCase(),k=g.parentElement;if(!k)return E;let P=k.querySelectorAll(`:scope > ${E}`);if(P.length===1)return E;for(let W=0;W<P.length;W+=1)if(P[W]===g)return`${E}:nth-of-type(${W+1})`;return E}function L(g){let A=g.tagName.toLowerCase(),N=(g.textContent??"").trim().replace(/\s+/g," "),R=(F,E)=>F.length>E?`${F.slice(0,E-1)}\u2026`:F;return A==="h1"||A==="h2"||A==="h3"?"Heading":A==="p"||A==="span"||A==="div"?N.length>0?R(N,56):"Text":A==="img"?"Image":A==="video"?"Video":A==="audio"?"Audio":A==="svg"?"Shape":g.getAttribute("data-composition-src")?"Composition":A==="section"?"Section":`${A.charAt(0).toUpperCase()}${A.slice(1)}`}function m(g,A,N){let R=typeof N=="number"&&N>0?N:8,F=[];if(document.elementsFromPoint)F=document.elementsFromPoint(g,A);else if(document.elementFromPoint){let P=document.elementFromPoint(g,A);F=P?[P]:[]}let E={},k=[];for(let P=0;P<F.length;P+=1){let W=F[P];if(!a(W))continue;let Y=`${W.tagName}::${W.id||""}::${P}`;if(!E[Y]&&(E[Y]=!0,k.push(W),k.length>=R))break}return k}function y(g){let A=g.getBoundingClientRect(),N={};for(let F=0;F<g.attributes.length;F+=1){let E=g.attributes[F];E.name.startsWith("data-")&&(N[E.name]=E.value)}return{id:g.id||null,tagName:g.tagName.toLowerCase(),selector:l(g),label:L(g),boundingBox:{x:A.left,y:A.top,width:A.width,height:A.height},textContent:g.textContent?g.textContent.trim().slice(0,200):null,src:g.getAttribute("src")||g.getAttribute("data-composition-src")||null,dataAttributes:N}}function M(g,A,N){return m(g,A,N).map(y)}function w(g){if(!t)return;let N=m(g.clientX,g.clientY,1)[0]??(g.target instanceof Element?g.target:null);if(!a(N)||n===N)return;n&&n.classList.remove("__hf-pick-highlight"),n=N,N.classList.add("__hf-pick-highlight");let R=y(N);c(R),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:R})}function _(g){if(!t)return;g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();let A=M(g.clientX,g.clientY,8);A.length!==0&&(c(A[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:A,selectedIndex:0,point:{x:g.clientX,y:g.clientY}}))}function V(g){g.key==="Escape"&&(z(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function ee(){t||(t=!0,r=document.createElement("style"),r.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(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",w,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",V,!0),u("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function z(){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",w,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",V,!0),u("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function $(){window.__HF_PICKER_API={enable:ee,disable:z,isActive:()=>t,getHovered:()=>o,getSelected:()=>i,getCandidatesAtPoint:(g,A,N)=>Number.isFinite(g)&&Number.isFinite(A)?M(g,A,N):[],pickAtPoint:(g,A,N)=>{if(!Number.isFinite(g)||!Number.isFinite(A))return null;let R=M(g,A,8);if(!R.length)return null;let F=Math.max(0,Math.min(R.length-1,Number(N??0))),E=R[F]??null;return E?(d(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),z(),E):null},pickManyAtPoint:(g,A,N)=>{if(!Number.isFinite(g)||!Number.isFinite(A))return[];let R=M(g,A,8);if(!R.length)return[];let F=[],E=Array.isArray(N)?N:[0];for(let k of E){let P=Math.max(0,Math.min(R.length-1,Math.floor(Number(k)))),W=R[P];if(!W)continue;F.some(U=>U.selector===W.selector&&U.tagName===W.tagName)||F.push(W)}return F.length?(d(F[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:F}),z(),F):[]}},u("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:ee,disablePickMode:z,installPickerApi:$}}function Tt(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 wt(e,t,n){let r=Tt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(r,!1):e.seek(r,!1),r}function Mt(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=wt(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=wt(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 Nt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!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 Ce(e){let t=Number(e);return Number.isFinite(t)?t:null}function nn(e){let t=(e??"").trim();if(!t)return null;let n=Ce(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]??"+",u=r[3]??"0",c=Number.parseFloat(u),d=Number.isFinite(c)?Math.max(0,c):0,a=i==="-"?-d:d;return{kind:"reference",refId:o,offset:a}}function Te(e){let t=e.timelineRegistry??{},n=new WeakMap,r=new WeakMap,o=new Set,i=d=>{let a=document.getElementById(d);return a||(document.querySelector(`[data-composition-id="${CSS.escape(d)}"]`)??null)},u=d=>{let a=r.get(d);if(a!==void 0)return a;let l=null,L=Ce(d.getAttribute("data-duration"));if(L!=null&&L>0&&(l=L),l==null||l<=0){let m=Ce(d.getAttribute("data-end"));if(m!=null){let y=c(d,0),M=m-y;Number.isFinite(M)&&M>0&&(l=M)}}if((l==null||l<=0)&&d instanceof HTMLMediaElement){let m=Ce(d.getAttribute("data-playback-start"))??Ce(d.getAttribute("data-media-start"))??0;Number.isFinite(d.duration)&&d.duration>m&&(l=d.duration-m)}if(l==null||l<=0){let m=d.getAttribute("data-composition-id");if(m){let y=t[m]??null;if(y&&typeof y.duration=="function")try{let M=Number(y.duration());Number.isFinite(M)&&M>0&&(l=M)}catch{}}}return l!=null&&Number.isFinite(l)&&l>0?(r.set(d,l),l):(r.set(d,null),null)},c=(d,a)=>{let l=n.get(d);if(l!==void 0)return l??a;if(o.has(d))return a;o.add(d);try{let L=nn(d.getAttribute("data-start"));if(!L){if(d.hasAttribute("data-composition-id")){let _=d.parentElement;if(_&&(_.hasAttribute("data-composition-src")||_.hasAttribute("data-composition-id"))){let V=c(_,a);return n.set(d,V),V}}return n.set(d,a),a}if(L.kind==="absolute"){let _=Math.max(0,L.value);return n.set(d,_),_}let m=i(L.refId);if(!m)return n.set(d,a),a;let y=c(m,0),M=u(m);if(M==null||M<=0){let _=Math.max(0,y+L.offset);return n.set(d,_),_}let w=Math.max(0,y+M+L.offset);return n.set(d,w),w}finally{o.delete(d)}};return{resolveStartForElement:(d,a=0)=>c(d,Math.max(0,a)),resolveDurationForElement:d=>u(d)}}function ue(e){let t=Number(e);return Number.isFinite(t)?t:null}var vt={composition:0,video:1,image:2,element:3,audio:4};function on(e){if(e.length===0)return;let t=new Map;for(let u of e){let c=t.get(u.track)??new Set;c.add(u.kind),t.set(u.track,c)}if(!Array.from(t.values()).some(u=>u.size>1))return;let r=0,o=new Map,i=[...t.keys()].sort((u,c)=>u-c);for(let u of i){let c=t.get(u);if(c.size===1)o.set(`${u}:${[...c][0]}`,r++);else{let d=[...c].sort((a,l)=>(vt[a]??99)-(vt[l]??99));for(let a of d)o.set(`${u}:${a}`,r++)}}for(let u of e){let c=`${u.track}:${u.kind}`,d=o.get(c);d!=null&&(u.track=d)}}function Fe(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 rn(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Fe(t);let n=e.getAttribute("data-composition-src");if(n)return Fe(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?Fe(r.getAttribute("src")):null}function Rt(e){let n=window.__timelines??{},r=Te({timelineRegistry:n}),o=b=>{if(!b)return null;let h=n[b]??null;if(!h||typeof h.duration!="function")return null;try{let T=Number(h.duration());return Number.isFinite(T)&&T>0?T:null}catch{return null}},i=b=>{let h=ue(b.getAttribute("data-duration"));if(h!=null&&h>0)return h;let T=ue(b.getAttribute("data-playback-start"))??ue(b.getAttribute("data-media-start"))??0;return Number.isFinite(b.duration)&&b.duration>T?Math.max(0,b.duration-T):null},u=()=>{let b=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(b.length===0)return null;let h=0;for(let T of b){let C=r.resolveStartForElement(T,0);if(!Number.isFinite(C))continue;let G=i(T);G==null||G<=0||(h=Math.max(h,Math.max(0,C)+G))}return h>0?h:null},c=b=>{let h=b.trim().toLowerCase();return!(!h||h==="main"||h.includes("caption")||h.includes("ambient"))},d=(b,h)=>{let T=[],C=null,G=null,D=null,I=b.parentElement;for(;I;){let B=I.getAttribute("data-composition-id");B&&(T.push(B),!D&&I!==h&&(D=B),C==null&&(C=r.resolveStartForElement(I,0)),G==null&&(G=ue(I.getAttribute("data-duration"))??o(B)??null)),I=I.parentElement}return{parentCompositionId:D,compositionAncestors:T.reverse(),inheritedStart:C,inheritedDuration:G}},a=document.querySelector("[data-composition-id]"),l=a?.getAttribute("data-composition-id")??null,L=a?r.resolveStartForElement(a,0):0,m=u(),y=m!=null?Math.max(0,m-Math.max(0,L)):null,M=o(l),w=ue(a?.getAttribute("data-duration")),_=typeof M=="number"&&Number.isFinite(M)&&M>0?M:null,V=typeof w=="number"&&Number.isFinite(w)&&w>0?w:null,ee=typeof y=="number"&&Number.isFinite(y)&&y>0?y:null,z=_!=null&&ee!=null&&_>ee+1,$=V??(z?ee:_??ee),g=$!=null?Math.min($,e.maxTimelineDurationSeconds):null,N=(g!=null?L+g:null)??(typeof m=="number"&&Number.isFinite(m)&&m>0?m:null),R=(b,h)=>!Number.isFinite(h)||h<=0?0:N==null||!Number.isFinite(N)?h:!Number.isFinite(b)||b>=N?0:Math.max(0,Math.min(h,N-b)),F=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],k=[],P=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),W=0;for(let b=0;b<P.length;b+=1){let h=P[b];if(h===a||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(h.tagName))continue;let T=d(h,a),C=r.resolveStartForElement(h,T.inheritedStart??0),G=h.getAttribute("data-composition-id"),D=ue(h.getAttribute("data-duration"));if((D==null||D<=0)&&G&&G!==l&&(D=o(G)),(D==null||D<=0)&&h instanceof HTMLMediaElement){let ae=ue(h.getAttribute("data-playback-start"))??ue(h.getAttribute("data-media-start"))??0;Number.isFinite(h.duration)&&h.duration>0&&(D=Math.max(0,h.duration-ae))}if(D==null||D<=0){let ae=T.inheritedDuration;if(ae!=null&&ae>0){let fe=(T.inheritedStart??0)+ae;D=Math.max(0,fe-C)}}if(D==null||D<=0||(D=R(C,D),D<=0))continue;let I=C+D;W=Math.max(W,I);let B=h.tagName.toLowerCase(),me=G&&G!==l?"composition":B==="video"?"video":B==="audio"?"audio":B==="img"?"image":"element";E.push({id:h.id||G||`__node__index_${b}`,label:h.getAttribute("data-timeline-label")??h.getAttribute("data-label")??h.getAttribute("aria-label")??G??h.id??h.className?.split(" ")[0]??me,start:C,duration:D,track:Number.parseInt(h.getAttribute("data-track-index")??h.getAttribute("data-track")??String(b),10)||0,kind:me,tagName:B,compositionId:h.getAttribute("data-composition-id"),compositionAncestors:T.compositionAncestors,parentCompositionId:T.parentCompositionId,nodePath:null,compositionSrc:Fe(h.getAttribute("data-composition-src")),assetUrl:rn(h),timelineRole:h.getAttribute("data-timeline-role"),timelineLabel:h.getAttribute("data-timeline-label"),timelineGroup:h.getAttribute("data-timeline-group"),timelinePriority:ue(h.getAttribute("data-timeline-priority"))})}let Y=new Set(E.map(b=>b.id)),U=a?.getAttribute("data-composition-id")??null,K=U?n[U]??null:null;if(K&&a){let b=K;if(typeof b.getChildren=="function")try{let h=b.getChildren(!0,!0,!1)??[],T=new Map;for(let D of a.children){let I=D;if(!I.id)continue;let B=I.tagName.toLowerCase();B==="script"||B==="style"||B==="link"||T.set(I,{id:I.id,start:1/0,end:-1/0})}let C=D=>{let I=D;for(;I;){if(T.has(I))return I;if(I===a)return null;I=I.parentElement}return null};for(let D of h){if(typeof D.targets!="function"||typeof D.startTime!="function"||typeof D.duration!="function")continue;let I=D.startTime(),B=D.parent;for(;B&&typeof B.startTime=="function";)I+=B.startTime(),B=B.parent;let me=I+D.duration();if(!(!Number.isFinite(I)||!Number.isFinite(me)))for(let ae of D.targets()){if(!(ae instanceof Element))continue;let ve=C(ae);if(!ve)continue;let fe=T.get(ve);fe&&(fe.start=Math.min(fe.start,I),fe.end=Math.max(fe.end,me))}}let G=E.length>0?Math.max(...E.map(D=>D.track))+1:0;for(let[D,I]of T){if(I.start===1/0||I.end===-1/0)continue;let B=D;if(Y.has(B.id))continue;let me=Math.max(0,I.end-I.start);if(me<=0)continue;let ae=R(I.start,me);ae<=0||(W=Math.max(W,I.start+ae),E.push({id:B.id,label:B.getAttribute("data-timeline-label")??B.getAttribute("data-label")??B.getAttribute("aria-label")??B.id,start:I.start,duration:ae,track:Number.parseInt(B.getAttribute("data-track-index")??B.getAttribute("data-track")??"",10)||G,kind:"element",tagName:B.tagName.toLowerCase(),compositionId:B.getAttribute("data-composition-id"),compositionAncestors:U?[U]:[],parentCompositionId:U,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:B.getAttribute("data-timeline-role"),timelineLabel:B.getAttribute("data-timeline-label"),timelineGroup:B.getAttribute("data-timeline-group"),timelinePriority:ue(B.getAttribute("data-timeline-priority"))}),Y.add(B.id))}}catch{}}if(a&&g!=null&&g>0){let b=E.length>0?Math.max(...E.map(h=>h.track))+1:0;for(let h of a.children){let T=h;if(!T.id||Y.has(T.id))continue;let C=T.tagName.toLowerCase();if(C==="script"||C==="style"||C==="link"||C==="meta"||window.getComputedStyle(T).display==="none")continue;let D=R(0,g);D<=0||(W=Math.max(W,D),E.push({id:T.id,label:T.getAttribute("data-timeline-label")??T.getAttribute("data-label")??T.getAttribute("aria-label")??T.id,start:0,duration:D,track:Number.parseInt(T.getAttribute("data-track-index")??T.getAttribute("data-track")??"",10)||b,kind:"element",tagName:C,compositionId:T.getAttribute("data-composition-id"),compositionAncestors:U?[U]:[],parentCompositionId:U,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:ue(T.getAttribute("data-timeline-priority"))}),Y.add(T.id))}}on(E);for(let b of F){if(b===a)continue;let h=b.getAttribute("data-composition-id");if(!h||!c(h))continue;let T=r.resolveStartForElement(b,0),C=ue(b.getAttribute("data-duration")),G=o(h),D=C&&C>0?C:G;if(D==null||D<=0)continue;let I=R(T,D);I<=0||k.push({id:h,label:b.getAttribute("data-label")??h,start:T,duration:I,thumbnailUrl:Fe(b.getAttribute("data-thumbnail-url")),avatarName:null})}let H=Math.max(1,Math.min(W||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:z&&V==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(H*Math.max(1,e.canonicalFps))),clips:E,scenes:k,compositionWidth:ue(a?.getAttribute("data-width"))??1920,compositionHeight:ue(a?.getAttribute("data-height"))??1080}}var sn=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,an=e=>new Promise(t=>{let n=!1,r=Date.now(),o=null,i=u=>{n||(n=!0,o!=null&&window.clearTimeout(o),t({status:u,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 Ve(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function ln(e,t){let n=e.trim();if(!n)return e;try{return sn.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 Ke(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(d=>d.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode,r=Array.from(n.querySelectorAll("style"));for(let c of r){let d=c.cloneNode(!0);d instanceof HTMLStyleElement&&(document.head.appendChild(d),e.injectedStyles.push(d))}let o=Array.from(n.querySelectorAll("script")),i=[];for(let c of o){let d=c.getAttribute("type")?.trim()??"",a=c.getAttribute("src")?.trim()??"";if(a){let l=ln(a,e.compositionUrl);i.push({kind:"external",src:l,type:d})}else{let l=c.textContent?.trim()??"";l&&i.push({kind:"inline",content:l,type:d})}c.parentNode?.removeChild(c)}let u=Array.from(n.querySelectorAll("style"));for(let c of u)c.parentNode?.removeChild(c);if(t){let c=document.importNode(t,!0),d=t.getAttribute("data-width"),a=t.getAttribute("data-height"),l=e.parseDimensionPx(d),L=e.parseDimensionPx(a);c.style.position="relative",c.style.width=l||"100%",c.style.height=L||"100%",l&&c.style.setProperty("--comp-width",l),L&&c.style.setProperty("--comp-height",L),d&&e.host.setAttribute("data-width",d),a&&e.host.setAttribute("data-height",a),l&&e.host instanceof HTMLElement&&(e.host.style.width=l),L&&e.host instanceof HTMLElement&&(e.host.style.height=L),e.host.appendChild(c)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let c of i){let d=document.createElement("script");if(c.type&&(d.type=c.type),d.async=!1,c.kind==="external"?d.src=c.src:c.type.toLowerCase()==="module"?d.textContent=c.content:d.textContent=`(function(){${c.content}})();`,document.body.appendChild(d),e.injectedScripts.push(d),c.kind==="external"){let a=await an(d);a.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:c.src,loadStatus:a.status,elapsedMs:a.elapsedMs}})}}}async function Pt(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`);Ve(n),await Ke({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 Ct(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}Ve(n);try{let i=n.getAttribute("data-composition-id"),u=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(u){await Ke({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:u.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let c=await fetch(r);if(!c.ok)throw new Error(`HTTP ${c.status}`);let d=await c.text(),l=new DOMParser().parseFromString(d,"text/html"),L=(i?l.querySelector(`template#${CSS.escape(i)}-template`):null)??l.querySelector("template"),m=L?L.content:l.body;await Ke({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:m,hasTemplate:!!L,fallbackBodyInnerHtml:l.body.innerHTML,compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,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"}}),Ve(n)}}))}function Ft(){let e=Nt(),t=window,n=null,r=null,o=[],i=new Set,u=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 c=s=>{o.push(s)},d=(s,p,f)=>{let x=f??`${s}:${JSON.stringify(p)}`;i.has(x)||(i.add(x),le({source:"hf-preview",type:"diagnostic",code:s,details:p}))},a=s=>{let p={scale:1,focusX:960,focusY:540},f=[],x=[],S={time:s.getTime(),duration:s.getDuration(),isPlaying:s.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:s.play,pause:s.pause,seek:s.seek,getTime:s.getTime,getDuration:s.getDuration,isPlaying:s.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>p,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>f,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:s.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>x,getRenderState:()=>({...S,time:s.getTime(),duration:s.getDuration(),isPlaying:s.isPlaying()})}},l=1/60,L=.75,m=.75,y=.35,M=900,w=3,_=2,V=.05,ee=100,z=240,$=s=>{if(s instanceof Error)return s.message||String(s);if(typeof s=="string")return s;try{return JSON.stringify(s)}catch{return String(s??"")}},g=s=>{let p=s.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"}},A=s=>{if(s==null||s.trim()==="")return null;let p=Number.parseFloat(s);return!Number.isFinite(p)||p<=0?null:`${p}px`},N=()=>{let s=document.querySelector('[data-composition-id][data-root="true"]');if(s instanceof HTMLElement)return s;let p=Array.from(document.querySelectorAll("[data-composition-id]"));return p.length===0?null:p.find(f=>!f.parentElement?.closest("[data-composition-id]"))??p[0]??null},R=()=>{let s=N();if(!s)return;let p=A(s.getAttribute("data-width")),f=A(s.getAttribute("data-height"));p&&(s.style.width=p),f&&(s.style.height=f),p&&s.style.setProperty("--comp-width",p),f&&s.style.setProperty("--comp-height",f)},F=()=>{let s=N(),p=Array.from(document.querySelectorAll("[data-composition-id]")).filter(f=>f.hasAttribute("data-duration")||f.hasAttribute("data-end"));for(let f of p)s&&f===s||(f.removeAttribute("data-duration"),f.removeAttribute("data-end"))},E=()=>{let s=N();if(!s)return;s.style.position||(s.style.position="relative"),s.style.overflow="hidden";let p=A(s.getAttribute("data-width")),f=A(s.getAttribute("data-height"));p&&(s.style.width=p),f&&(s.style.height=f);let x=Array.from(s.children);for(let S of x){let Z=S.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!S.hasAttribute("data-start"))continue;let re=(S.style.top==="0px"||S.style.top==="0")&&(S.style.left==="0px"||S.style.left==="0")&&S.style.width==="100%"&&S.style.height==="100%",Le=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(S.style.transform);if(re&&Le&&!S.hasAttribute("data-width")&&!S.hasAttribute("data-height")){let ce=S.style.top,q=S.style.left,O=S.style.width,J=S.style.height;S.style.top="",S.style.left="",S.style.width="",S.style.height="";let j=window.getComputedStyle(S);j.top!=="auto"||j.bottom!=="auto"||j.left!=="auto"||j.right!=="auto"||j.width!=="0px"||j.height!=="0px"||(S.style.top=ce,S.style.left=q,S.style.width=O,S.style.height=J)}let te=window.getComputedStyle(S),X=te.position;if(X!=="absolute"&&X!=="fixed"&&(S.style.position="absolute"),!!S.style.top||!!S.style.bottom||te.top!=="auto"||te.bottom!=="auto"||(S.style.top="0"),!!S.style.left||!!S.style.right||te.left!=="auto"||te.right!=="auto"||(S.style.left="0"),Z!=="audio"){let ce=A(S.getAttribute("data-width")),q=A(S.getAttribute("data-height")),O=te.width!=="0px"&&te.width!=="auto",J=te.height!=="0px"&&te.height!=="auto";ce?!S.style.width&&!O&&(S.style.width=ce):!S.style.width&&te.width==="0px"&&(S.style.width="100%"),q?!S.style.height&&!J&&(S.style.height=q):!S.style.height&&te.height==="0px"&&(S.style.height="100%")}}},k=(s,p=0)=>Te({timelineRegistry:window.__timelines??{}}).resolveStartForElement(s,p),P=s=>Te({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(s),W=!!document.querySelector("[data-composition-src]"),Y=!1;{let s=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let p of s){let f=p.getAttribute("data-composition-id");if(f&&p.children.length===0&&document.querySelector(`template#${CSS.escape(f)}-template`)){Y=!0;break}}}let U=!W&&!Y,K=s=>{if(!s||typeof s.duration!="function")return null;try{let p=Number(s.duration());return Number.isFinite(p)?Math.max(0,p):null}catch{return null}},H=s=>typeof s=="number"&&Number.isFinite(s)&&s>l,de=s=>{let p=Number(s.getAttribute("data-duration"));if(Number.isFinite(p)&&p>0)return p;let f=Number(s.getAttribute("data-playback-start")??s.getAttribute("data-media-start")??"0"),x=Number.isFinite(f)?Math.max(0,f):0;return Number.isFinite(s.duration)&&s.duration>x?Math.max(0,s.duration-x):null},v=()=>{let s=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(s.length===0)return null;let p=0;for(let f of s){let x=k(f,0);if(!Number.isFinite(x))continue;let S=de(f);S==null||S<=l||(p=Math.max(p,Math.max(0,x)+S))}return p>l?p:null},b=()=>{let s=v();return typeof s!="number"||!Number.isFinite(s)||s<=l?null:s},h=s=>H(s)?Math.max(l,s*L):l,T=(s,p=0)=>{let f=K(s),x=b(),S=Number.isFinite(p)&&p>l?p:0,Z=0;H(f)?Z=Math.max(f,S):H(x)?Z=Math.max(x,S):Z=S;let re=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,re)):0},C=()=>{let s=window.__timelines??{},p=Te({timelineRegistry:s}),f=b(),x=h(f),S=q=>{let O=document.querySelector(`[data-composition-id="${CSS.escape(q)}"]`);return O?p.resolveStartForElement(O,0):0},Z=q=>{let O=window.gsap;if(!O||typeof O.timeline!="function")return null;let J=O.timeline({paused:!0});for(let j of q)J.add(j.timeline,S(j.compositionId));return J},re=(q,O)=>{if(!H(q))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let j=J.timeline({paused:!0});if(O)try{j.add(O,0)}catch{}let Q=j;if(typeof Q.to=="function")try{Q.to({},{duration:q})}catch{}return j},Le=(q,O)=>{let J=q;if(typeof J.getChildren!="function")return[];try{let j=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(j))return[];let Q=[];for(let ie of O)if(!j.some(Se=>Se===ie.timeline))try{let Se=S(ie.compositionId);q.add(ie.timeline,Se),Q.push(ie.compositionId)}catch{}return Q}catch{return[]}},te=N(),X=te?.getAttribute("data-composition-id")??null;if(!X)return{timeline:null};let se=s[X]??null,ne=(()=>{if(!te)return[];let q=new Set,O=Array.from(te.querySelectorAll("[data-composition-id]")),J=[];for(let j of O){let Q=j.getAttribute("data-composition-id");if(!Q||Q===X||q.has(Q))continue;q.add(Q);let ie=s[Q]??null;if(!ie||typeof ie.play!="function"||typeof ie.pause!="function")continue;let Ee=K(ie);J.push({compositionId:Q,timeline:ie,durationSeconds:Ee??0})}return J})(),ce=q=>{for(let O of q){let J=O.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ne.length>0&&ce(ne),se){let q=ne.length>0?Le(se,ne):[];if((ne.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+X+"'])"))&&(D=!0),q.length>0)try{let j=se.time();se.seek(j,!1)}catch{}let O=K(se);if(!H(O)&&ne.length>0){let j=ne.map(en=>en.compositionId),Q=Z(ne),ie=K(Q);if(Q&&H(ie))return{timeline:Q,selectedTimelineIds:j,selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:x,selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,selectedTimelineIds:j,autoNestedChildren:q}}};let Ee=re(f??0,se),Se=K(Ee);if(Ee&&H(Se))return{timeline:Ee,selectedTimelineIds:[X],selectedDurationSeconds:Se,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:f,selectedDurationSeconds:Se,selectedTimelineIds:[X],autoNestedChildren:q}}}}if(!H(O)&&ne.length===0){let j=re(f??0,se),Q=K(j);if(j&&H(Q))return{timeline:j,selectedTimelineIds:[X],selectedDurationSeconds:Q,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:f,selectedDurationSeconds:Q,selectedTimelineIds:[X]}}}}let J=te?.getAttribute("data-duration");if(J){let j=parseFloat(J);if(H(j)&&H(O)&&j>=O+.5){let Q=se;if(typeof Q.to=="function")try{Q.to({},{duration:0},j)}catch{}let ie=K(se);if(H(ie))return{timeline:se,selectedTimelineIds:[X],selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:X,rootDurationSeconds:O,rootDeclaredDur:j,newDur:ie}}}}}return{timeline:se,selectedTimelineIds:[X],selectedDurationSeconds:O,mediaDurationFloorSeconds:f,diagnostics:q.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:X,selectedDurationSeconds:O,autoNestedChildren:q}}:void 0}}if(ne.length>0){let q=ne.map(j=>j.compositionId),O=Z(ne),J=K(O);if(O)return{timeline:O,selectedTimelineIds:q,selectedDurationSeconds:J,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:X,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:x,selectedDurationSeconds:J,mediaDurationFloorSeconds:f,selectedTimelineIds:q}}}}return{timeline:null}},G=()=>{let s=e.capturedTimeline;if(!s||typeof s.time!="function")return;let p=Number(s.time());Number.isFinite(p)&&(e.currentTime=Math.max(0,p))},D=!1,I=()=>{if(!U)return!1;let s=e.capturedTimeline,p=K(s),f=H(p);if(s&&f&&D)return!1;let x=C();return x.timeline?s&&s===x.timeline?(typeof s.timeScale=="function"&&s.timeScale(e.playbackRate),!1):(e.capturedTimeline=x.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),x.diagnostics&&le({source:"hf-preview",type:"diagnostic",code:x.diagnostics.code,details:x.diagnostics.details}),le({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:x.selectedTimelineIds??[],selectedDurationSeconds:x.selectedDurationSeconds??null,mediaDurationFloorSeconds:x.mediaDurationFloorSeconds??null}}),!0):!1},B=()=>{let s=N();if(!(s instanceof HTMLElement))return;let p=s.getBoundingClientRect(),f=Number(s.getAttribute("data-width")),x=Number(s.getAttribute("data-height")),S=window.getComputedStyle(s),Z=Number.isFinite(f)&&f>0&&Number.isFinite(x)&&x>0,re=p.width<=0||p.height<=0||s.clientWidth<=0||s.clientHeight<=0;!Z||!re||d("root_stage_layout_zero",{compositionId:s.getAttribute("data-composition-id")??null,declaredWidth:f,declaredHeight:x,rectWidth:Math.round(p.width),rectHeight:Math.round(p.height),clientWidth:s.clientWidth,clientHeight:s.clientHeight,display:S.display,visibility:S.visibility,overflow:S.overflow},`root-stage-layout-zero:${s.getAttribute("data-composition-id")??"unknown"}`)},me=()=>{e.tornDown||(u!=null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{u=null,B()}))},ae=()=>{n=s=>{let p=$(s.error??s.message).slice(0,z);if(!p)return;let f=g(p);le({source:"hf-preview",type:"diagnostic",code:f.code,details:{category:f.category,message:p,filename:s.filename||null,line:Number.isFinite(s.lineno)?s.lineno:null,column:Number.isFinite(s.colno)?s.colno:null}})},r=s=>{let p=$(s.reason).slice(0,z);if(!p)return;let f=g(p);le({source:"hf-preview",type:"diagnostic",code:`${f.code}_unhandled_rejection`,details:{category:`${f.category}-unhandled-rejection`,message:p}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",r)},ve=()=>{let s=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let f of s){let x=()=>{if(!(f instanceof Element))return;let S=f.tagName.toLowerCase(),Z=f.getAttribute("src")??f.getAttribute("href")??f.getAttribute("poster")??null,re=S==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";d(re,{tagName:S,assetUrl:Z,currentSrc:(f instanceof HTMLImageElement||f instanceof HTMLMediaElement)&&f.currentSrc||null,readyState:f instanceof HTMLMediaElement?f.readyState:null,networkState:f instanceof HTMLMediaElement?f.networkState:null},`${re}:${S}:${Z??"unknown"}`)};f.addEventListener("error",x),c(()=>{f.removeEventListener("error",x)})}let p=document.fonts;p&&p.ready.then(()=>{if(e.tornDown)return;let f=Array.from(p).filter(x=>x.status==="error").map(x=>x.family).filter(x=>!!x).slice(0,10);f.length!==0&&d("runtime_font_load_issue",{failedFamilies:f,totalFaces:Array.from(p).length},`runtime-font-load-issue:${f.join("|")}`)}).catch(()=>{})},fe=(s,p)=>{if(!s.timeline)return!1;let f=e.capturedTimeline;if(f&&f===s.timeline)return!1;let x=Math.max(0,e.currentTime||0),S=e.isPlaying;e.capturedTimeline=s.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(x,!1),S&&e.capturedTimeline.play()}catch{}return le({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:p,previousTime:x,selectedTimelineIds:s.selectedTimelineIds??[],selectedDurationSeconds:s.selectedDurationSeconds??null,mediaDurationFloorSeconds:s.mediaDurationFloorSeconds??null}}),!0},be=null,lt=!1,Ie=new Set,_e=()=>{e.tornDown||(be!=null&&window.clearTimeout(be),be=window.setTimeout(()=>{if(e.tornDown)return;be=null;let s=C();if(!s.timeline||!H(s.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){I()&&(ke(),he(!0));return}if(lt)return;let f=K(e.capturedTimeline),x=s.selectedDurationSeconds??K(s.timeline);H(x)&&(!H(f)||x>=f+V)&&fe(s,"manual")&&(lt=!0,le({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:f??null,selectedDurationSeconds:x??null,selectedTimelineIds:s.selectedTimelineIds??[],mediaDurationFloorSeconds:s.mediaDurationFloorSeconds??null}}),ke(),he(!0))},ee))},Qt=()=>{for(let s of Ie)s.removeEventListener("loadedmetadata",_e),s.removeEventListener("durationchange",_e);Ie.clear()},je=()=>{if(e.tornDown)return;let s=Array.from(document.querySelectorAll("video, audio"));for(let p of s)Ie.has(p)||(Ie.add(p),p.addEventListener("loadedmetadata",_e),p.addEventListener("durationchange",_e))},ut=()=>{let s=kt({resolveStartSeconds:x=>k(x,0)});xt({clips:s.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate});let p=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,f=Array.from(document.querySelectorAll("[data-start]"));for(let x of f){if(!(x instanceof HTMLElement))continue;let S=x.tagName.toLowerCase();if(S==="script"||S==="style"||S==="link"||S==="meta")continue;if(!x.getAttribute("data-composition-id")){let ce=x.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(ce&&ce!==p)continue}let re=k(x,0),Le=P(x),te=Le!=null&&Le>0?re+Le:Number.POSITIVE_INFINITY,X=te,se=x.getAttribute("data-composition-id");if(se&&!Number.isFinite(te)){let ne=(window.__timelines??{})[se];if(ne&&typeof ne.duration=="function"){let ce=ne.duration();ce>0&&(X=re+ce)}}let $e=e.currentTime>=re&&(Number.isFinite(X)?e.currentTime<X:!0);x.style.visibility=$e?"visible":"hidden"}},he=s=>{G();let p=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),f=Date.now();(s||p!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||f-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=p,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=f,le({source:"hf-preview",type:"state",frame:p,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ke=()=>{F(),R(),E();let s=N();if(s){let f=A(s.getAttribute("data-width")),x=A(s.getAttribute("data-height")),S=f?parseInt(f,10):0,Z=x?parseInt(x,10):0;S>0&&Z>0&&le({source:"hf-preview",type:"stage-size",width:S,height:Z})}I();let p=Rt({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=p,le(p),me()},Re=(s,p=0)=>{for(let f of e.deterministicAdapters){try{s==="discover"&&f.discover(),s==="pause"&&f.pause(),s==="play"&&f.play&&f.play()}catch{}if(s==="discover")try{f.seek({time:p})}catch{}}};if(!U){let s={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:A,onDiagnostic:({code:p,details:f})=>{le({source:"hf-preview",type:"diagnostic",code:p,details:f})}};Ct(s).then(()=>Pt(s)).finally(()=>{U=!0,Re("discover",e.currentTime),je(),ve(),ke(),he(!0)})}let We=Et({postMessage:s=>le(s)});We.installPickerApi();let ct=s=>{let p=Number(s);!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 f=document.querySelectorAll("video, audio");for(let x of f)if(x instanceof HTMLMediaElement)try{x.playbackRate=e.playbackRate}catch{}},oe=Mt({getTimeline:()=>e.capturedTimeline,setTimeline:s=>{e.capturedTimeline=s},getIsPlaying:()=>e.isPlaying,setIsPlaying:s=>{e.isPlaying=s},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:ct,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(s,p)=>{e.currentTime=Math.max(0,Number(s)||0),e.isPlaying=p,ut()},onStatePost:he,onDeterministicSeek:s=>{for(let p of e.deterministicAdapters)try{p.seek({time:Number(s)||0})}catch{}},onDeterministicPause:()=>Re("pause"),onDeterministicPlay:()=>Re("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>T(e.capturedTimeline,0)});window.__player=a(oe),window.__playerReady=!0,window.__renderReady=!0,pt(le),Pe("composition_loaded",{duration:oe.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=ft({onPlay:()=>{oe.play(),Pe("composition_played",{time:oe.getTime()})},onPause:()=>{oe.pause(),Pe("composition_paused",{time:oe.getTime()})},onSeek:(s,p)=>{let f=Math.max(0,s)/e.canonicalFps;oe.seek(f),Pe("composition_seeked",{time:f})},onSetMuted:s=>{e.bridgeMuted=s;let p=document.querySelectorAll("video, audio");for(let f of p)f instanceof HTMLMediaElement&&(f.muted=s)},onSetPlaybackRate:s=>ct(s),onEnablePickMode:()=>We.enablePickMode(),onDisablePickMode:()=>We.disablePickMode()}),I(),e.capturedTimeline&&(oe._timeline=e.capturedTimeline),U&&setTimeout(()=>{let s=e.capturedTimeline;I()&&e.capturedTimeline!==s&&(oe._timeline=e.capturedTimeline),Re("discover",e.currentTime),ke(),he(!0)},0),e.deterministicAdapters=[ht({resolveStartSeconds:s=>k(s,0)}),At(),Lt(),St(),gt({getTimeline:()=>e.capturedTimeline})],ae(),Re("discover"),je(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let ze=0,Be=null,dt=0,Ge=!1,xe=0,mt=()=>{dt=Date.now(),Ge=!1,xe=0};e.timelinePollIntervalId=setInterval(()=>{ze+=1;let p=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<_?!1:I();if(e.capturedTimeline&&!oe._timeline&&(oe._timeline=e.capturedTimeline),(p||ze%20===0)&&ke(),ze%10===0&&je(),G(),e.isPlaying&&e.capturedTimeline){let f=Math.max(0,e.currentTime||0),x=Be,S=T(e.capturedTimeline,0);if(S>0&&f>=S){oe.pause(),oe.seek(S),Be=S,xe=0,he(!0);return}if(x!=null&&x>=m&&f<=y?xe+=1:xe=0,!Ge&&xe>=w&&Date.now()-dt>M){let re=C();fe(re,"loop_guard")&&(Ge=!0,xe=0)}Be=Math.max(0,e.currentTime||0)}else Be=Math.max(0,e.currentTime||0);e.isPlaying&&ut(),he(!1)},50),ke(),he(!0);let Yt=oe.seek;oe.seek=s=>{mt(),Yt(s)};let Xt=oe.renderSeek;oe.renderSeek=s=>{mt(),Xt(s)};let Ue=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),be!=null&&(window.clearTimeout(be),be=null),u!=null&&(window.cancelAnimationFrame(u),u=null),Qt(),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),We.disablePickMode();for(let s of e.deterministicAdapters)if(!(!s||typeof s.revert!="function"))try{s.revert()}catch{}e.deterministicAdapters=[];for(let s of o.splice(0))try{s()}catch{}for(let s of e.injectedCompStyles)try{s.remove()}catch{}e.injectedCompStyles=[];for(let s of e.injectedCompScripts)try{s.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===Ue&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=Ue,e.beforeUnloadHandler=Ue,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var un=["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","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","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","ON","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"],cn=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"];function dn(e){return e<=255?un[e]:1424<=e&&e<=1524?"R":1536<=e&&e<=1791?cn[e&255]:1792<=e&&e<=2220?"AL":"L"}function mn(e){let t=e.length;if(t===0)return null;let n=new Array(t),r=0;for(let a=0;a<t;a++){let l=dn(e.charCodeAt(a));(l==="R"||l==="AL"||l==="AN")&&r++,n[a]=l}if(r===0)return null;let o=t/r<.3?0:1,i=new Int8Array(t);for(let a=0;a<t;a++)i[a]=o;let u=o&1?"R":"L",c=u,d=c;for(let a=0;a<t;a++)n[a]==="NSM"?n[a]=d:d=n[a];d=c;for(let a=0;a<t;a++){let l=n[a];l==="EN"?n[a]=d==="AL"?"AN":"EN":(l==="R"||l==="L"||l==="AL")&&(d=l)}for(let a=0;a<t;a++)n[a]==="AL"&&(n[a]="R");for(let a=1;a<t-1;a++)n[a]==="ES"&&n[a-1]==="EN"&&n[a+1]==="EN"&&(n[a]="EN"),n[a]==="CS"&&(n[a-1]==="EN"||n[a-1]==="AN")&&n[a+1]===n[a-1]&&(n[a]=n[a-1]);for(let a=0;a<t;a++){if(n[a]!=="EN")continue;let l;for(l=a-1;l>=0&&n[l]==="ET";l--)n[l]="EN";for(l=a+1;l<t&&n[l]==="ET";l++)n[l]="EN"}for(let a=0;a<t;a++){let l=n[a];(l==="WS"||l==="ES"||l==="ET"||l==="CS")&&(n[a]="ON")}d=c;for(let a=0;a<t;a++){let l=n[a];l==="EN"?n[a]=d==="L"?"L":"EN":(l==="R"||l==="L")&&(d=l)}for(let a=0;a<t;a++){if(n[a]!=="ON")continue;let l=a+1;for(;l<t&&n[l]==="ON";)l++;let L=a>0?n[a-1]:c,m=l<t?n[l]:c,y=L!=="L"?"R":"L";if(y===(m!=="L"?"R":"L"))for(let w=a;w<l;w++)n[w]=y;a=l-1}for(let a=0;a<t;a++)n[a]==="ON"&&(n[a]=u);for(let a=0;a<t;a++){let l=n[a];(i[a]&1)===0?l==="R"?i[a]++:(l==="AN"||l==="EN")&&(i[a]+=2):(l==="L"||l==="AN"||l==="EN")&&i[a]++}return i}function Dt(e,t){let n=mn(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 fn=/[ \t\n\r\f]+/g,pn=/[\t\n\r\f]| {2,}|^ | $/;function hn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function gn(e){if(!pn.test(e))return e;let t=e.replace(fn," ");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 yn(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(o=>{o.classList.add("__hf-flash"),setTimeout(()=>o.classList.remove("__hf-flash"),t)})}catch{}}var qe=null;function ht(e){qe=e}function Ce(e,t){if(qe)try{qe({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch{}}function gt(e){let t=[];return{name:"css",discover:()=>{t=[];let n=document.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=window.getComputedStyle(r);!o.animationName||o.animationName==="none"||t.push({el:r,baseDelay:r.style.animationDelay||"",basePlayState:r.style.animationPlayState||""})}},seek:n=>{let r=Number(n.time)||0;for(let o of t){if(!o.el.isConnected)continue;let i=e?.resolveStartSeconds?e.resolveStartSeconds(o.el):Number.parseFloat(o.el.getAttribute("data-start")??"0")||0,l=Math.max(0,r-i);o.el.style.animationPlayState="paused",o.el.style.animationDelay=`-${l.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 yt(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0);typeof n.totalTime=="function"?n.totalTime(r,!1):n.seek(r,!1)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Lt(){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??[],r=new Set(n);for(let o of t)r.has(o)||n.push(o);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 r of n)try{if(bt(r))r.goToAndStop(t*1e3,!1);else if(St(r)){if(typeof r.setCurrentRawFrameValue=="function"){let o=r.totalFrames??0,i=r.frameRate??30,l=t*i;o>0&&r.setCurrentRawFrameValue(Math.min(l,o-1))}else if(typeof r.seek=="function"){let o=r.duration??1,i=Math.min(100,t/o*100);r.seek(i)}}}catch{}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(bt(t)||St(t))&&t.pause()}catch{}},revert:()=>{}}}function bt(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function St(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}function At(){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 kt(){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 xt(e){let t=Array.from(document.querySelectorAll("video[data-start], audio[data-start]")),n=[],r=[],o=0;for(let i of t){let l=e?.resolveStartSeconds?e.resolveStartSeconds(i):Number.parseFloat(i.dataset.start??"0");if(!Number.isFinite(l))continue;let c=Number.parseFloat(i.dataset.playbackStart??i.dataset.mediaStart??"0")||0,d=i.defaultPlaybackRate,a=Number.isFinite(d)&&d>0?Math.max(.1,Math.min(5,d)):1,u=i.loop,b=Number.isFinite(i.duration)&&i.duration>0?i.duration:null,m=Number.parseFloat(i.dataset.duration??"");(!Number.isFinite(m)||m<=0)&&b!=null&&(m=Math.max(0,(b-c)/a));let y=Number.isFinite(m)&&m>0?l+m:Number.POSITIVE_INFINITY,M=Number.parseFloat(i.dataset.volume??""),T={el:i,start:l,mediaStart:c,duration:Number.isFinite(m)&&m>0?m:Number.POSITIVE_INFINITY,end:y,volume:Number.isFinite(M)?M:null,playbackRate:a,loop:u,sourceDuration:b};n.push(T),i.tagName==="VIDEO"&&r.push(T),Number.isFinite(y)&&(o=Math.max(o,y))}return{timedMediaEls:t,mediaClips:n,videoClips:r,maxMediaEnd:o}}function Et(e){for(let t of e.clips){let{el:n}=t;if(!n.isConnected)continue;let r=(e.timeSeconds-t.start)*t.playbackRate+t.mediaStart;if(e.timeSeconds>=t.start&&e.timeSeconds<t.end&&r>=0){if(t.loop&&t.sourceDuration!=null&&t.sourceDuration>0){let i=t.sourceDuration-t.mediaStart;i>0&&r>=t.sourceDuration&&(r=t.mediaStart+(r-t.mediaStart)%i)}t.volume!=null&&(n.volume=t.volume);try{n.playbackRate=t.playbackRate*e.playbackRate}catch{}if(Math.abs((n.currentTime||0)-r)>.3)try{n.currentTime=r}catch{}e.playing&&n.paused?n.play().catch(()=>{}):!e.playing&&!n.paused&&n.pause();continue}n.paused||n.pause()}}function wt(e){let t=!1,n=null,r=null,o=null,i=null;function l(g,A){try{window.dispatchEvent(new CustomEvent(g,{detail:A}))}catch{}}function c(g){o=g,l("hyperframe:picker:hovered",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function d(g){i=g,l("hyperframe:picker:selected",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function a(g){if(!g||g===document.body||g===document.documentElement)return!1;let A=g.tagName.toLowerCase();return!(A==="script"||A==="style"||A==="link"||A==="meta"||g.classList.contains("__hf-pick-highlight"))}function u(g){let A=g;if(A.id)return`#${A.id}`;let N=g.getAttribute("data-composition-id");if(N)return`[data-composition-id="${N}"]`;let R=g.getAttribute("data-composition-src");if(R)return`[data-composition-src="${R}"]`;let F=g.getAttribute("data-track-index");if(F)return`[data-track-index="${F}"]`;let E=g.tagName.toLowerCase(),k=g.parentElement;if(!k)return E;let C=k.querySelectorAll(`:scope > ${E}`);if(C.length===1)return E;for(let W=0;W<C.length;W+=1)if(C[W]===g)return`${E}:nth-of-type(${W+1})`;return E}function b(g){let A=g.tagName.toLowerCase(),N=(g.textContent??"").trim().replace(/\s+/g," "),R=(F,E)=>F.length>E?`${F.slice(0,E-1)}\u2026`:F;return A==="h1"||A==="h2"||A==="h3"?"Heading":A==="p"||A==="span"||A==="div"?N.length>0?R(N,56):"Text":A==="img"?"Image":A==="video"?"Video":A==="audio"?"Audio":A==="svg"?"Shape":g.getAttribute("data-composition-src")?"Composition":A==="section"?"Section":`${A.charAt(0).toUpperCase()}${A.slice(1)}`}function m(g,A,N){let R=typeof N=="number"&&N>0?N:8,F=[];if(document.elementsFromPoint)F=document.elementsFromPoint(g,A);else if(document.elementFromPoint){let C=document.elementFromPoint(g,A);F=C?[C]:[]}let E={},k=[];for(let C=0;C<F.length;C+=1){let W=F[C];if(!a(W))continue;let Y=`${W.tagName}::${W.id||""}::${C}`;if(!E[Y]&&(E[Y]=!0,k.push(W),k.length>=R))break}return k}function y(g){let A=g.getBoundingClientRect(),N={};for(let F=0;F<g.attributes.length;F+=1){let E=g.attributes[F];E.name.startsWith("data-")&&(N[E.name]=E.value)}return{id:g.id||null,tagName:g.tagName.toLowerCase(),selector:u(g),label:b(g),boundingBox:{x:A.left,y:A.top,width:A.width,height:A.height},textContent:g.textContent?g.textContent.trim().slice(0,200):null,src:g.getAttribute("src")||g.getAttribute("data-composition-src")||null,dataAttributes:N}}function M(g,A,N){return m(g,A,N).map(y)}function T(g){if(!t)return;let N=m(g.clientX,g.clientY,1)[0]??(g.target instanceof Element?g.target:null);if(!a(N)||n===N)return;n&&n.classList.remove("__hf-pick-highlight"),n=N,N.classList.add("__hf-pick-highlight");let R=y(N);c(R),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:R})}function _(g){if(!t)return;g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();let A=M(g.clientX,g.clientY,8);A.length!==0&&(c(A[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:A,selectedIndex:0,point:{x:g.clientX,y:g.clientY}}))}function V(g){g.key==="Escape"&&(z(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function ee(){t||(t=!0,r=document.createElement("style"),r.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(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",T,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function z(){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",T,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function U(){window.__HF_PICKER_API={enable:ee,disable:z,isActive:()=>t,getHovered:()=>o,getSelected:()=>i,getCandidatesAtPoint:(g,A,N)=>Number.isFinite(g)&&Number.isFinite(A)?M(g,A,N):[],pickAtPoint:(g,A,N)=>{if(!Number.isFinite(g)||!Number.isFinite(A))return null;let R=M(g,A,8);if(!R.length)return null;let F=Math.max(0,Math.min(R.length-1,Number(N??0))),E=R[F]??null;return E?(d(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),z(),E):null},pickManyAtPoint:(g,A,N)=>{if(!Number.isFinite(g)||!Number.isFinite(A))return[];let R=M(g,A,8);if(!R.length)return[];let F=[],E=Array.isArray(N)?N:[0];for(let k of E){let C=Math.max(0,Math.min(R.length-1,Math.floor(Number(k)))),W=R[C];if(!W)continue;F.some($=>$.selector===W.selector&&$.tagName===W.tagName)||F.push(W)}return F.length?(d(F[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:F}),z(),F):[]}},l("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:ee,disablePickMode:z,installPickerApi:U}}function Tt(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 Mt(e,t,n){let r=Tt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(r,!1):e.seek(r,!1),r}function Nt(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=Mt(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=Mt(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 vt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!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 Pe(e){let t=Number(e);return Number.isFinite(t)?t:null}function on(e){let t=(e??"").trim();if(!t)return null;let n=Pe(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]??"+",l=r[3]??"0",c=Number.parseFloat(l),d=Number.isFinite(c)?Math.max(0,c):0,a=i==="-"?-d:d;return{kind:"reference",refId:o,offset:a}}function we(e){let t=e.timelineRegistry??{},n=new WeakMap,r=new WeakMap,o=new Set,i=d=>{let a=document.getElementById(d);return a||(document.querySelector(`[data-composition-id="${CSS.escape(d)}"]`)??null)},l=d=>{let a=r.get(d);if(a!==void 0)return a;let u=null,b=Pe(d.getAttribute("data-duration"));if(b!=null&&b>0&&(u=b),u==null||u<=0){let m=Pe(d.getAttribute("data-end"));if(m!=null){let y=c(d,0),M=m-y;Number.isFinite(M)&&M>0&&(u=M)}}if((u==null||u<=0)&&d instanceof HTMLMediaElement){let m=Pe(d.getAttribute("data-playback-start"))??Pe(d.getAttribute("data-media-start"))??0;Number.isFinite(d.duration)&&d.duration>m&&(u=d.duration-m)}if(u==null||u<=0){let m=d.getAttribute("data-composition-id");if(m){let y=t[m]??null;if(y&&typeof y.duration=="function")try{let M=Number(y.duration());Number.isFinite(M)&&M>0&&(u=M)}catch{}}}return u!=null&&Number.isFinite(u)&&u>0?(r.set(d,u),u):(r.set(d,null),null)},c=(d,a)=>{let u=n.get(d);if(u!==void 0)return u??a;if(o.has(d))return a;o.add(d);try{let b=on(d.getAttribute("data-start"));if(!b){if(d.hasAttribute("data-composition-id")){let _=d.parentElement;if(_&&(_.hasAttribute("data-composition-src")||_.hasAttribute("data-composition-id"))){let V=c(_,a);return n.set(d,V),V}}return n.set(d,a),a}if(b.kind==="absolute"){let _=Math.max(0,b.value);return n.set(d,_),_}let m=i(b.refId);if(!m)return n.set(d,a),a;let y=c(m,0),M=l(m);if(M==null||M<=0){let _=Math.max(0,y+b.offset);return n.set(d,_),_}let T=Math.max(0,y+M+b.offset);return n.set(d,T),T}finally{o.delete(d)}};return{resolveStartForElement:(d,a=0)=>c(d,Math.max(0,a)),resolveDurationForElement:d=>l(d)}}function ue(e){let t=Number(e);return Number.isFinite(t)?t:null}var Rt={composition:0,video:1,image:2,element:3,audio:4};function rn(e){if(e.length===0)return;let t=new Map;for(let l of e){let c=t.get(l.track)??new Set;c.add(l.kind),t.set(l.track,c)}if(!Array.from(t.values()).some(l=>l.size>1))return;let r=0,o=new Map,i=[...t.keys()].sort((l,c)=>l-c);for(let l of i){let c=t.get(l);if(c.size===1)o.set(`${l}:${[...c][0]}`,r++);else{let d=[...c].sort((a,u)=>(Rt[a]??99)-(Rt[u]??99));for(let a of d)o.set(`${l}:${a}`,r++)}}for(let l of e){let c=`${l.track}:${l.kind}`,d=o.get(c);d!=null&&(l.track=d)}}function Fe(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 sn(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Fe(t);let n=e.getAttribute("data-composition-src");if(n)return Fe(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?Fe(r.getAttribute("src")):null}function Ct(e){let n=window.__timelines??{},r=we({timelineRegistry:n}),o=S=>{if(!S)return null;let h=n[S]??null;if(!h||typeof h.duration!="function")return null;try{let w=Number(h.duration());return Number.isFinite(w)&&w>0?w:null}catch{return null}},i=S=>{let h=ue(S.getAttribute("data-duration"));if(h!=null&&h>0)return h;let w=ue(S.getAttribute("data-playback-start"))??ue(S.getAttribute("data-media-start"))??0;return Number.isFinite(S.duration)&&S.duration>w?Math.max(0,S.duration-w):null},l=()=>{let S=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(S.length===0)return null;let h=0;for(let w of S){let P=r.resolveStartForElement(w,0);if(!Number.isFinite(P))continue;let G=i(w);G==null||G<=0||(h=Math.max(h,Math.max(0,P)+G))}return h>0?h:null},c=S=>{let h=S.trim().toLowerCase();return!(!h||h==="main"||h.includes("caption")||h.includes("ambient"))},d=(S,h)=>{let w=[],P=null,G=null,I=null,D=S.parentElement;for(;D;){let B=D.getAttribute("data-composition-id");B&&(w.push(B),!I&&D!==h&&(I=B),P==null&&(P=r.resolveStartForElement(D,0)),G==null&&(G=ue(D.getAttribute("data-duration"))??o(B)??null)),D=D.parentElement}return{parentCompositionId:I,compositionAncestors:w.reverse(),inheritedStart:P,inheritedDuration:G}},a=document.querySelector("[data-composition-id]"),u=a?.getAttribute("data-composition-id")??null,b=a?r.resolveStartForElement(a,0):0,m=l(),y=m!=null?Math.max(0,m-Math.max(0,b)):null,M=o(u),T=ue(a?.getAttribute("data-duration")),_=typeof M=="number"&&Number.isFinite(M)&&M>0?M:null,V=typeof T=="number"&&Number.isFinite(T)&&T>0?T:null,ee=typeof y=="number"&&Number.isFinite(y)&&y>0?y:null,z=_!=null&&ee!=null&&_>ee+1,U=V??(z?ee:_??ee),g=U!=null?Math.min(U,e.maxTimelineDurationSeconds):null,N=(g!=null?b+g:null)??(typeof m=="number"&&Number.isFinite(m)&&m>0?m:null),R=(S,h)=>!Number.isFinite(h)||h<=0?0:N==null||!Number.isFinite(N)?h:!Number.isFinite(S)||S>=N?0:Math.max(0,Math.min(h,N-S)),F=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],k=[],C=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),W=0;for(let S=0;S<C.length;S+=1){let h=C[S];if(h===a||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(h.tagName))continue;let w=d(h,a),P=r.resolveStartForElement(h,w.inheritedStart??0),G=h.getAttribute("data-composition-id"),I=ue(h.getAttribute("data-duration"));if((I==null||I<=0)&&G&&G!==u&&(I=o(G)),(I==null||I<=0)&&h instanceof HTMLMediaElement){let ae=ue(h.getAttribute("data-playback-start"))??ue(h.getAttribute("data-media-start"))??0;Number.isFinite(h.duration)&&h.duration>0&&(I=Math.max(0,h.duration-ae))}if(I==null||I<=0){let ae=w.inheritedDuration;if(ae!=null&&ae>0){let fe=(w.inheritedStart??0)+ae;I=Math.max(0,fe-P)}}if(I==null||I<=0||(I=R(P,I),I<=0))continue;let D=P+I;W=Math.max(W,D);let B=h.tagName.toLowerCase(),me=G&&G!==u?"composition":B==="video"?"video":B==="audio"?"audio":B==="img"?"image":"element";E.push({id:h.id||G||`__node__index_${S}`,label:h.getAttribute("data-timeline-label")??h.getAttribute("data-label")??h.getAttribute("aria-label")??G??h.id??h.className?.split(" ")[0]??me,start:P,duration:I,track:Number.parseInt(h.getAttribute("data-track-index")??h.getAttribute("data-track")??String(S),10)||0,kind:me,tagName:B,compositionId:h.getAttribute("data-composition-id"),compositionAncestors:w.compositionAncestors,parentCompositionId:w.parentCompositionId,nodePath:null,compositionSrc:Fe(h.getAttribute("data-composition-src")),assetUrl:sn(h),timelineRole:h.getAttribute("data-timeline-role"),timelineLabel:h.getAttribute("data-timeline-label"),timelineGroup:h.getAttribute("data-timeline-group"),timelinePriority:ue(h.getAttribute("data-timeline-priority"))})}let Y=new Set(E.map(S=>S.id)),$=a?.getAttribute("data-composition-id")??null,K=$?n[$]??null:null;if(K&&a){let S=K;if(typeof S.getChildren=="function")try{let h=S.getChildren(!0,!0,!1)??[],w=new Map;for(let I of a.children){let D=I;if(!D.id)continue;let B=D.tagName.toLowerCase();B==="script"||B==="style"||B==="link"||w.set(D,{id:D.id,start:1/0,end:-1/0})}let P=I=>{let D=I;for(;D;){if(w.has(D))return D;if(D===a)return null;D=D.parentElement}return null};for(let I of h){if(typeof I.targets!="function"||typeof I.startTime!="function"||typeof I.duration!="function")continue;let D=I.startTime(),B=I.parent;for(;B&&typeof B.startTime=="function";)D+=B.startTime(),B=B.parent;let me=D+I.duration();if(!(!Number.isFinite(D)||!Number.isFinite(me)))for(let ae of I.targets()){if(!(ae instanceof Element))continue;let ve=P(ae);if(!ve)continue;let fe=w.get(ve);fe&&(fe.start=Math.min(fe.start,D),fe.end=Math.max(fe.end,me))}}let G=E.length>0?Math.max(...E.map(I=>I.track))+1:0;for(let[I,D]of w){if(D.start===1/0||D.end===-1/0)continue;let B=I;if(Y.has(B.id))continue;let me=Math.max(0,D.end-D.start);if(me<=0)continue;let ae=R(D.start,me);ae<=0||(W=Math.max(W,D.start+ae),E.push({id:B.id,label:B.getAttribute("data-timeline-label")??B.getAttribute("data-label")??B.getAttribute("aria-label")??B.id,start:D.start,duration:ae,track:Number.parseInt(B.getAttribute("data-track-index")??B.getAttribute("data-track")??"",10)||G,kind:"element",tagName:B.tagName.toLowerCase(),compositionId:B.getAttribute("data-composition-id"),compositionAncestors:$?[$]:[],parentCompositionId:$,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:B.getAttribute("data-timeline-role"),timelineLabel:B.getAttribute("data-timeline-label"),timelineGroup:B.getAttribute("data-timeline-group"),timelinePriority:ue(B.getAttribute("data-timeline-priority"))}),Y.add(B.id))}}catch{}}if(a&&g!=null&&g>0){let S=E.length>0?Math.max(...E.map(h=>h.track))+1:0;for(let h of a.children){let w=h;if(!w.id||Y.has(w.id))continue;let P=w.tagName.toLowerCase();if(P==="script"||P==="style"||P==="link"||P==="meta"||window.getComputedStyle(w).display==="none")continue;let I=R(0,g);I<=0||(W=Math.max(W,I),E.push({id:w.id,label:w.getAttribute("data-timeline-label")??w.getAttribute("data-label")??w.getAttribute("aria-label")??w.id,start:0,duration:I,track:Number.parseInt(w.getAttribute("data-track-index")??w.getAttribute("data-track")??"",10)||S,kind:"element",tagName:P,compositionId:w.getAttribute("data-composition-id"),compositionAncestors:$?[$]:[],parentCompositionId:$,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:w.getAttribute("data-timeline-role"),timelineLabel:w.getAttribute("data-timeline-label"),timelineGroup:w.getAttribute("data-timeline-group"),timelinePriority:ue(w.getAttribute("data-timeline-priority"))}),Y.add(w.id))}}rn(E);for(let S of F){if(S===a)continue;let h=S.getAttribute("data-composition-id");if(!h||!c(h))continue;let w=r.resolveStartForElement(S,0),P=ue(S.getAttribute("data-duration")),G=o(h),I=P&&P>0?P:G;if(I==null||I<=0)continue;let D=R(w,I);D<=0||k.push({id:h,label:S.getAttribute("data-label")??h,start:w,duration:D,thumbnailUrl:Fe(S.getAttribute("data-thumbnail-url")),avatarName:null})}let H=Math.max(1,Math.min(W||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:z&&V==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(H*Math.max(1,e.canonicalFps))),clips:E,scenes:k,compositionWidth:ue(a?.getAttribute("data-width"))??1920,compositionHeight:ue(a?.getAttribute("data-height"))??1080}}var an=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,ln=e=>new Promise(t=>{let n=!1,r=Date.now(),o=null,i=l=>{n||(n=!0,o!=null&&window.clearTimeout(o),t({status:l,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 Ve(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function un(e,t){let n=e.trim();if(!n)return e;try{return an.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 Ke(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(d=>d.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode,r=Array.from(n.querySelectorAll("style"));for(let c of r){let d=c.cloneNode(!0);d instanceof HTMLStyleElement&&(document.head.appendChild(d),e.injectedStyles.push(d))}let o=Array.from(n.querySelectorAll("script")),i=[];for(let c of o){let d=c.getAttribute("type")?.trim()??"",a=c.getAttribute("src")?.trim()??"";if(a){let u=un(a,e.compositionUrl);i.push({kind:"external",src:u,type:d})}else{let u=c.textContent?.trim()??"";u&&i.push({kind:"inline",content:u,type:d})}c.parentNode?.removeChild(c)}let l=Array.from(n.querySelectorAll("style"));for(let c of l)c.parentNode?.removeChild(c);if(t){let c=document.importNode(t,!0),d=t.getAttribute("data-width"),a=t.getAttribute("data-height"),u=e.parseDimensionPx(d),b=e.parseDimensionPx(a);c.style.position="relative",c.style.width=u||"100%",c.style.height=b||"100%",u&&c.style.setProperty("--comp-width",u),b&&c.style.setProperty("--comp-height",b),d&&e.host.setAttribute("data-width",d),a&&e.host.setAttribute("data-height",a),u&&e.host instanceof HTMLElement&&(e.host.style.width=u),b&&e.host instanceof HTMLElement&&(e.host.style.height=b),e.host.appendChild(c)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let c of i){let d=document.createElement("script");if(c.type&&(d.type=c.type),d.async=!1,c.kind==="external"?d.src=c.src:c.type.toLowerCase()==="module"?d.textContent=c.content:d.textContent=`(function(){${c.content}})();`,document.body.appendChild(d),e.injectedScripts.push(d),c.kind==="external"){let a=await ln(d);a.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:c.src,loadStatus:a.status,elapsedMs:a.elapsedMs}})}}}async function Pt(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`);Ve(n),await Ke({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 Ft(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}Ve(n);try{let i=n.getAttribute("data-composition-id"),l=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(l){await Ke({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:l.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let c=await fetch(r);if(!c.ok)throw new Error(`HTTP ${c.status}`);let d=await c.text(),u=new DOMParser().parseFromString(d,"text/html"),b=(i?u.querySelector(`template#${CSS.escape(i)}-template`):null)??u.querySelector("template"),m=b?b.content:u.body;await Ke({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:m,hasTemplate:!!b,fallbackBodyInnerHtml:u.body.innerHTML,compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,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"}}),Ve(n)}}))}function Je(){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 l of i)n.push(l)}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 l={},c={};if(o.x!==void 0&&(l.x=o.x),o.y!==void 0&&(l.y=o.y),o.scale!==void 0&&(l.scale=o.scale),o.rotation!==void 0&&(l.rotation=o.rotation),o.opacity!==void 0&&(c.opacity=o.opacity),o.fontSize!==void 0&&(c.fontSize=`${o.fontSize}px`),o.fontWeight!==void 0&&(c.fontWeight=o.fontWeight),o.fontFamily!==void 0&&(c.fontFamily=o.fontFamily),o.activeColor||o.dimColor){let a=e.getTweensOf(i).filter(b=>b.vars.color!==void 0).sort((b,m)=>b.startTime()-m.startTime()),u=a.length>0?String(a[0].vars.color):"";for(let b of a)String(b.vars.color)===u?o.dimColor&&(b.vars.color=o.dimColor):o.activeColor&&(b.vars.color=o.activeColor);o.dimColor&&e.set(i,{color:o.dimColor})}if(Object.keys(c).length>0&&e.set(i,c),Object.keys(l).length>0){let d=document.createElement("span");d.style.display="inline-block",d.dataset.captionWrapper="true",i.parentNode?.insertBefore(d,i),d.appendChild(i),e.set(d,l)}}}).catch(()=>{})}function It(){let e=vt(),t=window,n=null,r=null,o=[],i=new Set,l=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 c=s=>{o.push(s)},d=(s,p,f)=>{let x=f??`${s}:${JSON.stringify(p)}`;i.has(x)||(i.add(x),le({source:"hf-preview",type:"diagnostic",code:s,details:p}))},a=s=>{let p={scale:1,focusX:960,focusY:540},f=[],x=[],L={time:s.getTime(),duration:s.getDuration(),isPlaying:s.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:s.play,pause:s.pause,seek:s.seek,getTime:s.getTime,getDuration:s.getDuration,isPlaying:s.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>p,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>f,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:s.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>x,getRenderState:()=>({...L,time:s.getTime(),duration:s.getDuration(),isPlaying:s.isPlaying()})}},u=1/60,b=.75,m=.75,y=.35,M=900,T=3,_=2,V=.05,ee=100,z=240,U=s=>{if(s instanceof Error)return s.message||String(s);if(typeof s=="string")return s;try{return JSON.stringify(s)}catch{return String(s??"")}},g=s=>{let p=s.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"}},A=s=>{if(s==null||s.trim()==="")return null;let p=Number.parseFloat(s);return!Number.isFinite(p)||p<=0?null:`${p}px`},N=()=>{let s=document.querySelector('[data-composition-id][data-root="true"]');if(s instanceof HTMLElement)return s;let p=Array.from(document.querySelectorAll("[data-composition-id]"));return p.length===0?null:p.find(f=>!f.parentElement?.closest("[data-composition-id]"))??p[0]??null},R=()=>{let s=N();if(!s)return;let p=A(s.getAttribute("data-width")),f=A(s.getAttribute("data-height"));p&&(s.style.width=p),f&&(s.style.height=f),p&&s.style.setProperty("--comp-width",p),f&&s.style.setProperty("--comp-height",f)},F=()=>{let s=N(),p=Array.from(document.querySelectorAll("[data-composition-id]")).filter(f=>f.hasAttribute("data-duration")||f.hasAttribute("data-end"));for(let f of p)s&&f===s||(f.removeAttribute("data-duration"),f.removeAttribute("data-end"))},E=()=>{let s=N();if(!s)return;s.style.position||(s.style.position="relative"),s.style.overflow="hidden";let p=A(s.getAttribute("data-width")),f=A(s.getAttribute("data-height"));p&&(s.style.width=p),f&&(s.style.height=f);let x=Array.from(s.children);for(let L of x){let Z=L.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!L.hasAttribute("data-start"))continue;let re=(L.style.top==="0px"||L.style.top==="0")&&(L.style.left==="0px"||L.style.left==="0")&&L.style.width==="100%"&&L.style.height==="100%",Se=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(L.style.transform);if(re&&Se&&!L.hasAttribute("data-width")&&!L.hasAttribute("data-height")){let ce=L.style.top,q=L.style.left,O=L.style.width,J=L.style.height;L.style.top="",L.style.left="",L.style.width="",L.style.height="";let j=window.getComputedStyle(L);j.top!=="auto"||j.bottom!=="auto"||j.left!=="auto"||j.right!=="auto"||j.width!=="0px"||j.height!=="0px"||(L.style.top=ce,L.style.left=q,L.style.width=O,L.style.height=J)}let te=window.getComputedStyle(L),X=te.position;if(X!=="absolute"&&X!=="fixed"&&(L.style.position="absolute"),!!L.style.top||!!L.style.bottom||te.top!=="auto"||te.bottom!=="auto"||(L.style.top="0"),!!L.style.left||!!L.style.right||te.left!=="auto"||te.right!=="auto"||(L.style.left="0"),Z!=="audio"){let ce=A(L.getAttribute("data-width")),q=A(L.getAttribute("data-height")),O=te.width!=="0px"&&te.width!=="auto",J=te.height!=="0px"&&te.height!=="auto";ce?!L.style.width&&!O&&(L.style.width=ce):!L.style.width&&te.width==="0px"&&(L.style.width="100%"),q?!L.style.height&&!J&&(L.style.height=q):!L.style.height&&te.height==="0px"&&(L.style.height="100%")}}},k=(s,p=0)=>we({timelineRegistry:window.__timelines??{}}).resolveStartForElement(s,p),C=s=>we({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(s),W=!!document.querySelector("[data-composition-src]"),Y=!1;{let s=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let p of s){let f=p.getAttribute("data-composition-id");if(f&&p.children.length===0&&document.querySelector(`template#${CSS.escape(f)}-template`)){Y=!0;break}}}let $=!W&&!Y,K=s=>{if(!s||typeof s.duration!="function")return null;try{let p=Number(s.duration());return Number.isFinite(p)?Math.max(0,p):null}catch{return null}},H=s=>typeof s=="number"&&Number.isFinite(s)&&s>u,de=s=>{let p=Number(s.getAttribute("data-duration"));if(Number.isFinite(p)&&p>0)return p;let f=Number(s.getAttribute("data-playback-start")??s.getAttribute("data-media-start")??"0"),x=Number.isFinite(f)?Math.max(0,f):0;return Number.isFinite(s.duration)&&s.duration>x?Math.max(0,s.duration-x):null},v=()=>{let s=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(s.length===0)return null;let p=0;for(let f of s){let x=k(f,0);if(!Number.isFinite(x))continue;let L=de(f);L==null||L<=u||(p=Math.max(p,Math.max(0,x)+L))}return p>u?p:null},S=()=>{let s=v();return typeof s!="number"||!Number.isFinite(s)||s<=u?null:s},h=s=>H(s)?Math.max(u,s*b):u,w=(s,p=0)=>{let f=K(s),x=S(),L=Number.isFinite(p)&&p>u?p:0,Z=0;H(f)?Z=Math.max(f,L):H(x)?Z=Math.max(x,L):Z=L;let re=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,re)):0},P=()=>{let s=window.__timelines??{},p=we({timelineRegistry:s}),f=S(),x=h(f),L=q=>{let O=document.querySelector(`[data-composition-id="${CSS.escape(q)}"]`);return O?p.resolveStartForElement(O,0):0},Z=q=>{let O=window.gsap;if(!O||typeof O.timeline!="function")return null;let J=O.timeline({paused:!0});for(let j of q)J.add(j.timeline,L(j.compositionId));return J},re=(q,O)=>{if(!H(q))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let j=J.timeline({paused:!0});if(O)try{j.add(O,0)}catch{}let Q=j;if(typeof Q.to=="function")try{Q.to({},{duration:q})}catch{}return j},Se=(q,O)=>{let J=q;if(typeof J.getChildren!="function")return[];try{let j=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(j))return[];let Q=[];for(let ie of O)if(!j.some(Le=>Le===ie.timeline))try{let Le=L(ie.compositionId);q.add(ie.timeline,Le),Q.push(ie.compositionId)}catch{}return Q}catch{return[]}},te=N(),X=te?.getAttribute("data-composition-id")??null;if(!X)return{timeline:null};let se=s[X]??null,ne=(()=>{if(!te)return[];let q=new Set,O=Array.from(te.querySelectorAll("[data-composition-id]")),J=[];for(let j of O){let Q=j.getAttribute("data-composition-id");if(!Q||Q===X||q.has(Q))continue;q.add(Q);let ie=s[Q]??null;if(!ie||typeof ie.play!="function"||typeof ie.pause!="function")continue;let Ee=K(ie);J.push({compositionId:Q,timeline:ie,durationSeconds:Ee??0})}return J})(),ce=q=>{for(let O of q){let J=O.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ne.length>0&&ce(ne),se){let q=ne.length>0?Se(se,ne):[];if((ne.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+X+"'])"))&&(I=!0),q.length>0)try{let j=se.time();se.seek(j,!1)}catch{}let O=K(se);if(!H(O)&&ne.length>0){let j=ne.map(tn=>tn.compositionId),Q=Z(ne),ie=K(Q);if(Q&&H(ie))return{timeline:Q,selectedTimelineIds:j,selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:x,selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,selectedTimelineIds:j,autoNestedChildren:q}}};let Ee=re(f??0,se),Le=K(Ee);if(Ee&&H(Le))return{timeline:Ee,selectedTimelineIds:[X],selectedDurationSeconds:Le,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:f,selectedDurationSeconds:Le,selectedTimelineIds:[X],autoNestedChildren:q}}}}if(!H(O)&&ne.length===0){let j=re(f??0,se),Q=K(j);if(j&&H(Q))return{timeline:j,selectedTimelineIds:[X],selectedDurationSeconds:Q,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:f,selectedDurationSeconds:Q,selectedTimelineIds:[X]}}}}let J=te?.getAttribute("data-duration");if(J){let j=parseFloat(J);if(H(j)&&H(O)&&j>=O+.5){let Q=se;if(typeof Q.to=="function")try{Q.to({},{duration:0},j)}catch{}let ie=K(se);if(H(ie))return{timeline:se,selectedTimelineIds:[X],selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:X,rootDurationSeconds:O,rootDeclaredDur:j,newDur:ie}}}}}return{timeline:se,selectedTimelineIds:[X],selectedDurationSeconds:O,mediaDurationFloorSeconds:f,diagnostics:q.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:X,selectedDurationSeconds:O,autoNestedChildren:q}}:void 0}}if(ne.length>0){let q=ne.map(j=>j.compositionId),O=Z(ne),J=K(O);if(O)return{timeline:O,selectedTimelineIds:q,selectedDurationSeconds:J,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:X,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:x,selectedDurationSeconds:J,mediaDurationFloorSeconds:f,selectedTimelineIds:q}}}}return{timeline:null}},G=()=>{let s=e.capturedTimeline;if(!s||typeof s.time!="function")return;let p=Number(s.time());Number.isFinite(p)&&(e.currentTime=Math.max(0,p))},I=!1,D=()=>{if(!$)return!1;let s=e.capturedTimeline,p=K(s),f=H(p);if(s&&f&&I)return!1;let x=P();return x.timeline?s&&s===x.timeline?(typeof s.timeScale=="function"&&s.timeScale(e.playbackRate),!1):(e.capturedTimeline=x.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),x.diagnostics&&le({source:"hf-preview",type:"diagnostic",code:x.diagnostics.code,details:x.diagnostics.details}),le({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:x.selectedTimelineIds??[],selectedDurationSeconds:x.selectedDurationSeconds??null,mediaDurationFloorSeconds:x.mediaDurationFloorSeconds??null}}),!0):!1},B=()=>{let s=N();if(!(s instanceof HTMLElement))return;let p=s.getBoundingClientRect(),f=Number(s.getAttribute("data-width")),x=Number(s.getAttribute("data-height")),L=window.getComputedStyle(s),Z=Number.isFinite(f)&&f>0&&Number.isFinite(x)&&x>0,re=p.width<=0||p.height<=0||s.clientWidth<=0||s.clientHeight<=0;!Z||!re||d("root_stage_layout_zero",{compositionId:s.getAttribute("data-composition-id")??null,declaredWidth:f,declaredHeight:x,rectWidth:Math.round(p.width),rectHeight:Math.round(p.height),clientWidth:s.clientWidth,clientHeight:s.clientHeight,display:L.display,visibility:L.visibility,overflow:L.overflow},`root-stage-layout-zero:${s.getAttribute("data-composition-id")??"unknown"}`)},me=()=>{e.tornDown||(l!=null&&window.cancelAnimationFrame(l),l=window.requestAnimationFrame(()=>{l=null,B()}))},ae=()=>{n=s=>{let p=U(s.error??s.message).slice(0,z);if(!p)return;let f=g(p);le({source:"hf-preview",type:"diagnostic",code:f.code,details:{category:f.category,message:p,filename:s.filename||null,line:Number.isFinite(s.lineno)?s.lineno:null,column:Number.isFinite(s.colno)?s.colno:null}})},r=s=>{let p=U(s.reason).slice(0,z);if(!p)return;let f=g(p);le({source:"hf-preview",type:"diagnostic",code:`${f.code}_unhandled_rejection`,details:{category:`${f.category}-unhandled-rejection`,message:p}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",r)},ve=()=>{let s=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let f of s){let x=()=>{if(!(f instanceof Element))return;let L=f.tagName.toLowerCase(),Z=f.getAttribute("src")??f.getAttribute("href")??f.getAttribute("poster")??null,re=L==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";d(re,{tagName:L,assetUrl:Z,currentSrc:(f instanceof HTMLImageElement||f instanceof HTMLMediaElement)&&f.currentSrc||null,readyState:f instanceof HTMLMediaElement?f.readyState:null,networkState:f instanceof HTMLMediaElement?f.networkState:null},`${re}:${L}:${Z??"unknown"}`)};f.addEventListener("error",x),c(()=>{f.removeEventListener("error",x)})}let p=document.fonts;p&&p.ready.then(()=>{if(e.tornDown)return;let f=Array.from(p).filter(x=>x.status==="error").map(x=>x.family).filter(x=>!!x).slice(0,10);f.length!==0&&d("runtime_font_load_issue",{failedFamilies:f,totalFaces:Array.from(p).length},`runtime-font-load-issue:${f.join("|")}`)}).catch(()=>{})},fe=(s,p)=>{if(!s.timeline)return!1;let f=e.capturedTimeline;if(f&&f===s.timeline)return!1;let x=Math.max(0,e.currentTime||0),L=e.isPlaying;e.capturedTimeline=s.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(x,!1),L&&e.capturedTimeline.play()}catch{}return le({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:p,previousTime:x,selectedTimelineIds:s.selectedTimelineIds??[],selectedDurationSeconds:s.selectedDurationSeconds??null,mediaDurationFloorSeconds:s.mediaDurationFloorSeconds??null}}),!0},be=null,ut=!1,De=new Set,_e=()=>{e.tornDown||(be!=null&&window.clearTimeout(be),be=window.setTimeout(()=>{if(e.tornDown)return;be=null;let s=P();if(!s.timeline||!H(s.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){D()&&(ke(),he(!0));return}if(ut)return;let f=K(e.capturedTimeline),x=s.selectedDurationSeconds??K(s.timeline);H(x)&&(!H(f)||x>=f+V)&&fe(s,"manual")&&(ut=!0,le({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:f??null,selectedDurationSeconds:x??null,selectedTimelineIds:s.selectedTimelineIds??[],mediaDurationFloorSeconds:s.mediaDurationFloorSeconds??null}}),ke(),he(!0))},ee))},Yt=()=>{for(let s of De)s.removeEventListener("loadedmetadata",_e),s.removeEventListener("durationchange",_e);De.clear()},je=()=>{if(e.tornDown)return;let s=Array.from(document.querySelectorAll("video, audio"));for(let p of s)De.has(p)||(De.add(p),p.addEventListener("loadedmetadata",_e),p.addEventListener("durationchange",_e))},ct=()=>{let s=xt({resolveStartSeconds:x=>k(x,0)});Et({clips:s.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate});let p=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,f=Array.from(document.querySelectorAll("[data-start]"));for(let x of f){if(!(x instanceof HTMLElement))continue;let L=x.tagName.toLowerCase();if(L==="script"||L==="style"||L==="link"||L==="meta")continue;if(!x.getAttribute("data-composition-id")){let ce=x.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(ce&&ce!==p)continue}let re=k(x,0),Se=C(x),te=Se!=null&&Se>0?re+Se:Number.POSITIVE_INFINITY,X=te,se=x.getAttribute("data-composition-id");if(se&&!Number.isFinite(te)){let ne=(window.__timelines??{})[se];if(ne&&typeof ne.duration=="function"){let ce=ne.duration();ce>0&&(X=re+ce)}}let Ue=e.currentTime>=re&&(Number.isFinite(X)?e.currentTime<X:!0);x.style.visibility=Ue?"visible":"hidden"}},he=s=>{G();let p=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),f=Date.now();(s||p!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||f-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=p,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=f,le({source:"hf-preview",type:"state",frame:p,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ke=()=>{F(),R(),E();let s=N();if(s){let f=A(s.getAttribute("data-width")),x=A(s.getAttribute("data-height")),L=f?parseInt(f,10):0,Z=x?parseInt(x,10):0;L>0&&Z>0&&le({source:"hf-preview",type:"stage-size",width:L,height:Z})}D();let p=Ct({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=p,le(p),me()},Re=(s,p=0)=>{for(let f of e.deterministicAdapters){try{s==="discover"&&f.discover(),s==="pause"&&f.pause(),s==="play"&&f.play&&f.play()}catch{}if(s==="discover")try{f.seek({time:p})}catch{}}};if($)Je();else{let s={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:A,onDiagnostic:({code:p,details:f})=>{le({source:"hf-preview",type:"diagnostic",code:p,details:f})}};Ft(s).then(()=>Pt(s)).finally(()=>{$=!0,Re("discover",e.currentTime),je(),ve(),Je(),ke(),he(!0)})}let We=wt({postMessage:s=>le(s)});We.installPickerApi();let dt=s=>{let p=Number(s);!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 f=document.querySelectorAll("video, audio");for(let x of f)if(x instanceof HTMLMediaElement)try{x.playbackRate=e.playbackRate}catch{}},oe=Nt({getTimeline:()=>e.capturedTimeline,setTimeline:s=>{e.capturedTimeline=s},getIsPlaying:()=>e.isPlaying,setIsPlaying:s=>{e.isPlaying=s},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:dt,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(s,p)=>{e.currentTime=Math.max(0,Number(s)||0),e.isPlaying=p,ct()},onStatePost:he,onDeterministicSeek:s=>{for(let p of e.deterministicAdapters)try{p.seek({time:Number(s)||0})}catch{}},onDeterministicPause:()=>Re("pause"),onDeterministicPlay:()=>Re("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>w(e.capturedTimeline,0)});window.__player=a(oe),window.__playerReady=!0,window.__renderReady=!0,ht(le),Ce("composition_loaded",{duration:oe.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=pt({onPlay:()=>{oe.play(),Ce("composition_played",{time:oe.getTime()})},onPause:()=>{oe.pause(),Ce("composition_paused",{time:oe.getTime()})},onSeek:(s,p)=>{let f=Math.max(0,s)/e.canonicalFps;oe.seek(f),Ce("composition_seeked",{time:f})},onSetMuted:s=>{e.bridgeMuted=s;let p=document.querySelectorAll("video, audio");for(let f of p)f instanceof HTMLMediaElement&&(f.muted=s)},onSetPlaybackRate:s=>dt(s),onEnablePickMode:()=>We.enablePickMode(),onDisablePickMode:()=>We.disablePickMode()}),D(),e.capturedTimeline&&(oe._timeline=e.capturedTimeline),$&&setTimeout(()=>{let s=e.capturedTimeline;D()&&e.capturedTimeline!==s&&(oe._timeline=e.capturedTimeline),Re("discover",e.currentTime),ke(),he(!0)},0),e.deterministicAdapters=[gt({resolveStartSeconds:s=>k(s,0)}),kt(),Lt(),At(),yt({getTimeline:()=>e.capturedTimeline})],ae(),Re("discover"),je(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let ze=0,Be=null,mt=0,Ge=!1,xe=0,ft=()=>{mt=Date.now(),Ge=!1,xe=0};e.timelinePollIntervalId=setInterval(()=>{ze+=1;let p=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<_?!1:D();if(e.capturedTimeline&&!oe._timeline&&(oe._timeline=e.capturedTimeline),(p||ze%20===0)&&ke(),ze%10===0&&je(),G(),e.isPlaying&&e.capturedTimeline){let f=Math.max(0,e.currentTime||0),x=Be,L=w(e.capturedTimeline,0);if(L>0&&f>=L){oe.pause(),oe.seek(L),Be=L,xe=0,he(!0);return}if(x!=null&&x>=m&&f<=y?xe+=1:xe=0,!Ge&&xe>=T&&Date.now()-mt>M){let re=P();fe(re,"loop_guard")&&(Ge=!0,xe=0)}Be=Math.max(0,e.currentTime||0)}else Be=Math.max(0,e.currentTime||0);e.isPlaying&&ct(),he(!1)},50),ke(),he(!0);let Xt=oe.seek;oe.seek=s=>{ft(),Xt(s)};let en=oe.renderSeek;oe.renderSeek=s=>{ft(),en(s)};let $e=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),be!=null&&(window.clearTimeout(be),be=null),l!=null&&(window.cancelAnimationFrame(l),l=null),Yt(),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),We.disablePickMode();for(let s of e.deterministicAdapters)if(!(!s||typeof s.revert!="function"))try{s.revert()}catch{}e.deterministicAdapters=[];for(let s of o.splice(0))try{s()}catch{}for(let s of e.injectedCompStyles)try{s.remove()}catch{}e.injectedCompStyles=[];for(let s of e.injectedCompScripts)try{s.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===$e&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=$e,e.beforeUnloadHandler=$e,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var cn=["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","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","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","ON","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"],dn=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"];function mn(e){return e<=255?cn[e]:1424<=e&&e<=1524?"R":1536<=e&&e<=1791?dn[e&255]:1792<=e&&e<=2220?"AL":"L"}function fn(e){let t=e.length;if(t===0)return null;let n=new Array(t),r=0;for(let a=0;a<t;a++){let u=mn(e.charCodeAt(a));(u==="R"||u==="AL"||u==="AN")&&r++,n[a]=u}if(r===0)return null;let o=t/r<.3?0:1,i=new Int8Array(t);for(let a=0;a<t;a++)i[a]=o;let l=o&1?"R":"L",c=l,d=c;for(let a=0;a<t;a++)n[a]==="NSM"?n[a]=d:d=n[a];d=c;for(let a=0;a<t;a++){let u=n[a];u==="EN"?n[a]=d==="AL"?"AN":"EN":(u==="R"||u==="L"||u==="AL")&&(d=u)}for(let a=0;a<t;a++)n[a]==="AL"&&(n[a]="R");for(let a=1;a<t-1;a++)n[a]==="ES"&&n[a-1]==="EN"&&n[a+1]==="EN"&&(n[a]="EN"),n[a]==="CS"&&(n[a-1]==="EN"||n[a-1]==="AN")&&n[a+1]===n[a-1]&&(n[a]=n[a-1]);for(let a=0;a<t;a++){if(n[a]!=="EN")continue;let u;for(u=a-1;u>=0&&n[u]==="ET";u--)n[u]="EN";for(u=a+1;u<t&&n[u]==="ET";u++)n[u]="EN"}for(let a=0;a<t;a++){let u=n[a];(u==="WS"||u==="ES"||u==="ET"||u==="CS")&&(n[a]="ON")}d=c;for(let a=0;a<t;a++){let u=n[a];u==="EN"?n[a]=d==="L"?"L":"EN":(u==="R"||u==="L")&&(d=u)}for(let a=0;a<t;a++){if(n[a]!=="ON")continue;let u=a+1;for(;u<t&&n[u]==="ON";)u++;let b=a>0?n[a-1]:c,m=u<t?n[u]:c,y=b!=="L"?"R":"L";if(y===(m!=="L"?"R":"L"))for(let T=a;T<u;T++)n[T]=y;a=u-1}for(let a=0;a<t;a++)n[a]==="ON"&&(n[a]=l);for(let a=0;a<t;a++){let u=n[a];(i[a]&1)===0?u==="R"?i[a]++:(u==="AN"||u==="EN")&&(i[a]+=2):(u==="L"||u==="AN"||u==="EN")&&i[a]++}return i}function Dt(e,t){let n=fn(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 pn=/[ \t\n\r\f]+/g,hn=/[\t\n\r\f]| {2,}|^ | $/;function gn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function yn(e){if(!hn.test(e))return e;let t=e.replace(pn," ");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 bn(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 Je=null,bn;function Ln(){return Je===null&&(Je=new Intl.Segmenter(bn,{granularity:"word"})),Je}var Sn=/\p{Script=Arabic}/u,He=/\p{M}/u,_t=/\p{Nd}/u;function Ze(e){return Sn.test(e)}function pe(e){for(let t of e){let n=t.codePointAt(0);if(n>=19968&&n<=40959||n>=13312&&n<=19903||n>=131072&&n<=173791||n>=173824&&n<=177983||n>=177984&&n<=178207||n>=178208&&n<=183983||n>=183984&&n<=191471||n>=196608&&n<=201551||n>=63744&&n<=64255||n>=194560&&n<=195103||n>=12288&&n<=12351||n>=12352&&n<=12447||n>=12448&&n<=12543||n>=44032&&n<=55215||n>=65280&&n<=65519)return!0}return!1}var Xe=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"]),De=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),et=new Set(["'","\u2019"]),we=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),An=new Set([":",".","\u060C","\u061B"]),kn=new Set(["\u104F"]),xn=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function En(e){if(tt(e))return!0;let t=!1;for(let n of e){if(we.has(n)){t=!0;continue}if(!(t&&He.test(n)))return!1}return t}function Tn(e){for(let t of e)if(!Xe.has(t)&&!we.has(t))return!1;return e.length>0}function wn(e){if(tt(e))return!0;for(let t of e)if(!De.has(t)&&!et.has(t)&&!He.test(t))return!1;return e.length>0}function tt(e){let t=!1;for(let n of e)if(!(n==="\\"||He.test(n))){if(De.has(n)||we.has(n)||et.has(n)){t=!0;continue}return!1}return t}function Mn(e){let t=Array.from(e),n=t.length;for(;n>0;){let r=t[n-1];if(He.test(r)){n--;continue}if(De.has(r)||et.has(r)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Nn(e,t){if(e.length===0)return!1;for(let n of e)if(n!==t)return!1;return!0}function vn(e){return!Ze(e)||e.length===0?!1:An.has(e[e.length-1])}function Rn(e){return e.length===0?!1:kn.has(e[e.length-1])}function Pn(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 nt(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(xn.has(n))return!0;if(!we.has(n))return!1}return!1}function Cn(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"}function Fn(e,t,n,r){let o=[],i=null,u="",c=n,d=!1,a=0;for(let l of e){let L=Cn(l,r),m=L==="text"&&t;if(i!==null&&L===i&&m===d){u+=l,a+=l.length;continue}i!==null&&o.push({text:u,isWordLike:d,kind:i,start:c}),i=L,u=l,c=n+a,d=m,a+=l.length}return i!==null&&o.push({text:u,isWordLike:d,kind:i,start:c}),o}function Qe(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Dn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function In(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Dn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function _n(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Wn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let u=0;u<e.len;u++){if(r[u]!=="text"||!In(e,u))continue;let c=u+1;for(;c<e.len&&!Qe(r[c]);){t[u]+=t[c],n[u]=!0;let d=t[c].includes("?");if(r[c]="text",t[c]="",c++,d)break}}let i=0;for(let u=0;u<t.length;u++){let c=t[u];c.length!==0&&(i!==u&&(t[i]=c,n[i]=n[u],r[i]=r[u],o[i]=o[u]),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 Bn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let u=e.texts[i];if(t.push(u),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i]),!_n(u))continue;let c=i+1;if(c>=e.len||Qe(e.kinds[c]))continue;let d="",a=e.starts[c],l=c;for(;l<e.len&&!Qe(e.kinds[l]);)d+=e.texts[l],l++;d.length>0&&(t.push(d),n.push(!0),r.push("text"),o.push(a),i=l-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}var Hn=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),It=/^[A-Za-z0-9_]+[,:;]*$/,On=/[,:;]+$/;function Wt(e){for(let t of e)if(_t.test(t))return!0;return!1}function Ye(e){if(e.length===0)return!1;for(let t of e)if(!(_t.test(t)||Hn.has(t)))return!1;return!0}function jn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let u=e.texts[i],c=e.kinds[i];if(c==="text"&&Ye(u)&&Wt(u)){let d=u,a=i+1;for(;a<e.len&&e.kinds[a]==="text"&&Ye(e.texts[a]);)d+=e.texts[a],a++;t.push(d),n.push(!0),r.push("text"),o.push(e.starts[i]),i=a-1;continue}t.push(u),n.push(e.isWordLike[i]),r.push(c),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function zn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let u=e.texts[i],c=e.kinds[i],d=e.isWordLike[i];if(c==="text"&&d&&It.test(u)){let a=u,l=i+1;for(;On.test(a)&&l<e.len&&e.kinds[l]==="text"&&e.isWordLike[l]&&It.test(e.texts[l]);)a+=e.texts[l],l++;t.push(a),n.push(!0),r.push("text"),o.push(e.starts[i]),i=l-1;continue}t.push(u),n.push(d),r.push(c),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function Gn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let u=e.texts[i];if(e.kinds[i]==="text"&&u.includes("-")){let c=u.split("-"),d=c.length>1;for(let a=0;a<c.length;a++){let l=c[a];if(!d)break;(l.length===0||!Wt(l)||!Ye(l))&&(d=!1)}if(d){let a=0;for(let l=0;l<c.length;l++){let L=c[l],m=l<c.length-1?`${L}-`:L;t.push(m),n.push(!0),r.push("text"),o.push(e.starts[i]+a),a+=m.length}continue}}t.push(u),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 Un(e){let t=[],n=[],r=[],o=[],i=0;for(;i<e.len;){let u=e.texts[i],c=e.isWordLike[i],d=e.kinds[i],a=e.starts[i];if(d==="glue"){let l=u,L=a;for(i++;i<e.len&&e.kinds[i]==="glue";)l+=e.texts[i],i++;if(i<e.len&&e.kinds[i]==="text")u=l+e.texts[i],c=e.isWordLike[i],d="text",a=L,i++;else{t.push(l),n.push(!1),r.push("glue"),o.push(L);continue}}else i++;if(d==="text")for(;i<e.len&&e.kinds[i]==="glue";){let l="";for(;i<e.len&&e.kinds[i]==="glue";)l+=e.texts[i],i++;if(i<e.len&&e.kinds[i]==="text"){u+=l+e.texts[i],c=c||e.isWordLike[i],i++;continue}u+=l}t.push(u),n.push(c),r.push(d),o.push(a)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function $n(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"||!pe(t[i])||!pe(t[i+1]))continue;let u=Mn(t[i]);u!==null&&(t[i]=u.head,t[i+1]=u.tail+t[i+1],o[i+1]=o[i]+u.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function qn(e,t,n){let r=Ln(),o=0,i=[],u=[],c=[],d=[];for(let m of r.segment(e))for(let y of Fn(m.segment,m.isWordLike??!1,m.index,n)){let M=y.kind==="text";t.carryCJKAfterClosingQuote&&M&&o>0&&c[o-1]==="text"&&pe(y.text)&&pe(i[o-1])&&nt(i[o-1])||M&&o>0&&c[o-1]==="text"&&Tn(y.text)&&pe(i[o-1])||M&&o>0&&c[o-1]==="text"&&Rn(i[o-1])?(i[o-1]+=y.text,u[o-1]=u[o-1]||y.isWordLike):M&&o>0&&c[o-1]==="text"&&y.isWordLike&&Ze(y.text)&&vn(i[o-1])?(i[o-1]+=y.text,u[o-1]=!0):M&&!y.isWordLike&&o>0&&c[o-1]==="text"&&y.text.length===1&&y.text!=="-"&&y.text!=="\u2014"&&Nn(i[o-1],y.text)||M&&!y.isWordLike&&o>0&&c[o-1]==="text"&&(En(y.text)||y.text==="-"&&u[o-1])?i[o-1]+=y.text:(i[o]=y.text,u[o]=y.isWordLike,c[o]=y.kind,d[o]=y.start,o++)}for(let m=1;m<o;m++)c[m]==="text"&&!u[m]&&tt(i[m])&&c[m-1]==="text"&&(i[m-1]+=i[m],u[m-1]=u[m-1]||u[m],i[m]="");for(let m=o-2;m>=0;m--)if(c[m]==="text"&&!u[m]&&wn(i[m])){let y=m+1;for(;y<o&&i[y]==="";)y++;y<o&&c[y]==="text"&&(i[y]=i[m]+i[y],d[y]=d[m],i[m]="")}let a=0;for(let m=0;m<o;m++){let y=i[m];y.length!==0&&(a!==m&&(i[a]=y,u[a]=u[m],c[a]=c[m],d[a]=d[m]),a++)}i.length=a,u.length=a,c.length=a,d.length=a;let l=Un({len:a,texts:i,isWordLike:u,kinds:c,starts:d}),L=$n(zn(Gn(jn(Bn(Wn(l))))));for(let m=0;m<L.len-1;m++){let y=Pn(L.texts[m]);y!==null&&(L.kinds[m]!=="space"&&L.kinds[m]!=="preserved-space"||L.kinds[m+1]!=="text"||!Ze(L.texts[m+1])||(L.texts[m]=y.space,L.isWordLike[m]=!1,L.kinds[m]=L.kinds[m]==="preserved-space"?"preserved-space":"space",L.texts[m+1]=y.marks+L.texts[m+1],L.starts[m+1]=L.starts[m]+y.space.length))}return L}function Vn(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 Bt(e,t,n="normal"){let r=hn(n),o=r.mode==="pre-wrap"?yn(e):gn(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let i=qn(o,t,r);return{normalized:o,chunks:Vn(i,r),...i}}var Me=null,Ht=new Map,Ne=null,Kn=/\p{Emoji_Presentation}/u,Jn=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,it=null,Ot=new Map;function ot(){if(Me!==null)return Me;if(typeof OffscreenCanvas<"u")return Me=new OffscreenCanvas(1,1).getContext("2d"),Me;if(typeof document<"u")return Me=document.createElement("canvas").getContext("2d"),Me;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Zn(e){let t=Ht.get(e);return t||(t=new Map,Ht.set(e,t)),t}function ge(e,t){let n=t.get(e);return n===void 0&&(n={width:ot().measureText(e).width,containsCJK:pe(e)},t.set(e,n)),n}function Ae(){if(Ne!==null)return Ne;if(typeof navigator>"u")return Ne={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ne;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 Ne={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:r,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Ne}function Qn(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function rt(){return it===null&&(it=new Intl.Segmenter(void 0,{granularity:"grapheme"})),it}function Yn(e){return Kn.test(e)||e.includes("\uFE0F")}function jt(e){return Jn.test(e)}function Xn(e,t){let n=Ot.get(e);if(n!==void 0)return n;let r=ot();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 u=i.getBoundingClientRect().width;document.body.removeChild(i),o-u>.5&&(n=o-u)}return Ot.set(e,n),n}function ei(e){let t=0,n=rt();for(let r of n.segment(e))Yn(r.segment)&&t++;return t}function ti(e,t){return t.emojiCount===void 0&&(t.emojiCount=ei(e)),t.emojiCount}function ye(e,t,n){return n===0?t.width:t.width-ti(e,t)*n}function zt(e,t,n,r){if(t.graphemeWidths!==void 0)return t.graphemeWidths;let o=[],i=rt();for(let u of i.segment(e)){let c=ge(u.segment,n);o.push(ye(u.segment,c,r))}return t.graphemeWidths=o.length>1?o:null,t.graphemeWidths}function Gt(e,t,n,r){if(t.graphemePrefixWidths!==void 0)return t.graphemePrefixWidths;let o=[],i=rt(),u="";for(let c of i.segment(e)){u+=c.segment;let d=ge(u,n);o.push(ye(u,d,r))}return t.graphemePrefixWidths=o.length>1?o:null,t.graphemePrefixWidths}function Ut(e,t){let n=ot();n.font=e;let r=Zn(e),o=Qn(e),i=t?Xn(e,o):0;return{cache:r,fontSize:o,emojiCorrection:i}}function Oe(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function ni(e){return e==="space"}function ii(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function st(e,t,n,r){return!r||t===null?e[n]:t[n]-(n>0?t[n-1]:0)}function oi(e,t,n,r,o,i){let u=0,c=t;for(;u<e.length;){let d=i?t+e[u]:c+e[u];if((u+1<e.length?d+o:d)>n+r)break;c=d,u++}return{fitCount:u,fittedWidth:c}}function $t(e,t){return e.simpleLineWalkFastPath?ri(e,t):qt(e,t)}function ri(e,t){let{widths:n,kinds:r,breakableWidths:o,breakablePrefixWidths:i}=e;if(n.length===0)return 0;let u=Ae(),c=u.lineFitEpsilon,d=0,a=0,l=!1;function L(m){let y=n[m];if(y>t&&o[m]!==null){let M=o[m],w=i[m]??null;a=0;for(let _=0;_<M.length;_++){let V=st(M,w,_,u.preferPrefixWidthsForBreakableRuns);a>0&&a+V>t+c?(d++,a=V):(a===0&&d++,a+=V)}}else a=y,d++;l=!0}for(let m=0;m<n.length;m++){let y=n[m],M=r[m];if(!l){L(m);continue}let w=a+y;if(w>t+c){if(ni(M))continue;a=0,l=!1,L(m);continue}a=w}return l?d:d+1}function si(e,t,n){let{widths:r,kinds:o,breakableWidths:i,breakablePrefixWidths:u}=e;if(r.length===0)return 0;let c=Ae(),d=c.lineFitEpsilon,a=0,l=0,L=!1,m=0,y=0,M=0,w=0,_=-1,V=0;function ee(){_=-1,V=0}function z(k=M,P=w,W=l){a++,n?.({startSegmentIndex:m,startGraphemeIndex:y,endSegmentIndex:k,endGraphemeIndex:P,width:W}),l=0,L=!1,ee()}function $(k,P){L=!0,m=k,y=0,M=k+1,w=0,l=P}function g(k,P,W){L=!0,m=k,y=P,M=k,w=P+1,l=W}function A(k,P){if(!L){$(k,P);return}l+=P,M=k+1,w=0}function N(k,P){Oe(o[k])&&(_=k+1,V=l-P)}function R(k){F(k,0)}function F(k,P){let W=i[k],Y=u[k]??null;for(let U=P;U<W.length;U++){let K=st(W,Y,U,c.preferPrefixWidthsForBreakableRuns);if(!L){g(k,U,K);continue}l+K>t+d?(z(),g(k,U,K)):(l+=K,M=k,w=U+1)}L&&M===k&&w===W.length&&(M=k+1,w=0)}let E=0;for(;E<r.length;){let k=r[E],P=o[E];if(!L){k>t&&i[E]!==null?R(E):$(E,k),N(E,k),E++;continue}if(l+k>t+d){if(Oe(P)){A(E,k),z(E+1,0,l-k),E++;continue}if(_>=0){z(_,0,V);continue}if(k>t&&i[E]!==null){z(),R(E),E++;continue}z();continue}A(E,k),N(E,k),E++}return L&&z(),a}function qt(e,t,n){if(e.simpleLineWalkFastPath)return si(e,t,n);let{widths:r,lineEndFitAdvances:o,lineEndPaintAdvances:i,kinds:u,breakableWidths:c,breakablePrefixWidths:d,discretionaryHyphenWidth:a,tabStopAdvance:l,chunks:L}=e;if(r.length===0||L.length===0)return 0;let m=Ae(),y=m.lineFitEpsilon,M=0,w=0,_=!1,V=0,ee=0,z=0,$=0,g=-1,A=0,N=0,R=null;function F(){g=-1,A=0,N=0,R=null}function E(v=z,b=$,h=w){M++,n?.({startSegmentIndex:V,startGraphemeIndex:ee,endSegmentIndex:v,endGraphemeIndex:b,width:h}),w=0,_=!1,F()}function k(v,b){_=!0,V=v,ee=0,z=v+1,$=0,w=b}function P(v,b,h){_=!0,V=v,ee=b,z=v,$=b+1,w=h}function W(v,b){if(!_){k(v,b);return}w+=b,z=v+1,$=0}function Y(v,b){if(!Oe(u[v]))return;let h=u[v]==="tab"?0:o[v],T=u[v]==="tab"?b:i[v];g=v+1,A=w-b+h,N=w-b+T,R=u[v]}function U(v){K(v,0)}function K(v,b){let h=c[v],T=d[v]??null;for(let C=b;C<h.length;C++){let G=st(h,T,C,m.preferPrefixWidthsForBreakableRuns);if(!_){P(v,C,G);continue}w+G>t+y?(E(),P(v,C,G)):(w+=G,z=v,$=C+1)}_&&z===v&&$===h.length&&(z=v+1,$=0)}function H(v){if(R!=="soft-hyphen")return!1;let b=c[v];if(b===null)return!1;let h=m.preferPrefixWidthsForBreakableRuns?d[v]??b:b,T=h!==b,{fitCount:C,fittedWidth:G}=oi(h,w,t,y,a,T);return C===0?!1:(w=G,z=v,$=C,F(),C===b.length?(z=v+1,$=0,!0):(E(v,C,G+a),K(v,C),!0))}function de(v){M++,n?.({startSegmentIndex:v.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:v.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let v=0;v<L.length;v++){let b=L[v];if(b.startSegmentIndex===b.endSegmentIndex){de(b);continue}_=!1,w=0,V=b.startSegmentIndex,ee=0,z=b.startSegmentIndex,$=0,F();let h=b.startSegmentIndex;for(;h<b.endSegmentIndex;){let T=u[h],C=T==="tab"?ii(w,l):r[h];if(T==="soft-hyphen"){_&&(z=h+1,$=0,g=h+1,A=w+a,N=w+a,R=T),h++;continue}if(!_){C>t&&c[h]!==null?U(h):k(h,C),Y(h,C),h++;continue}if(w+C>t+y){let D=w+(T==="tab"?0:o[h]),I=w+(T==="tab"?C:i[h]);if(R==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&A<=t+y){E(g,0,N);continue}if(R==="soft-hyphen"&&H(h)){h++;continue}if(Oe(T)&&D<=t+y){W(h,C),E(h+1,0,I),h++;continue}if(g>=0&&A<=t+y){E(g,0,N);continue}if(C>t&&c[h]!==null){E(),U(h),h++;continue}E();continue}W(h,C),Y(h,C),h++}if(_){let T=g===b.consumedEndSegmentIndex?N:w;E(b.consumedEndSegmentIndex,0,T)}}return M}var at=null;function ai(){return at===null&&(at=new Intl.Segmenter(void 0,{granularity:"grapheme"})),at}function li(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableWidths:[],breakablePrefixWidths:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableWidths:[],breakablePrefixWidths:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function ui(e,t,n){let r=ai(),o=Ae(),{cache:i,emojiCorrection:u}=Ut(t,jt(e.normalized)),c=ye("-",ge("-",i),u),a=ye(" ",ge(" ",i),u)*8;if(e.len===0)return li(n);let l=[],L=[],m=[],y=[],M=e.chunks.length<=1,w=n?[]:null,_=[],V=[],ee=n?[]:null,z=Array.from({length:e.len}),$=Array.from({length:e.len});function g(R,F,E,k,P,W,Y,U){P!=="text"&&P!=="space"&&P!=="zero-width-break"&&(M=!1),l.push(F),L.push(E),m.push(k),y.push(P),w?.push(W),_.push(Y),V.push(U),ee!==null&&ee.push(R)}for(let R=0;R<e.len;R++){z[R]=l.length;let F=e.texts[R],E=e.isWordLike[R],k=e.kinds[R],P=e.starts[R];if(k==="soft-hyphen"){g(F,0,c,c,k,P,null,null),$[R]=l.length;continue}if(k==="hard-break"){g(F,0,0,0,k,P,null,null),$[R]=l.length;continue}if(k==="tab"){g(F,0,0,0,k,P,null,null),$[R]=l.length;continue}let W=ge(F,i);if(k==="text"&&W.containsCJK){let H="",de=0;for(let v of r.segment(F)){let b=v.segment;if(H.length===0){H=b,de=v.index;continue}if(De.has(H)||Xe.has(b)||we.has(b)||o.carryCJKAfterClosingQuote&&pe(b)&&nt(H)){H+=b;continue}let h=ge(H,i),T=ye(H,h,u);g(H,T,T,T,"text",P+de,null,null),H=b,de=v.index}if(H.length>0){let v=ge(H,i),b=ye(H,v,u);g(H,b,b,b,"text",P+de,null,null)}$[R]=l.length;continue}let Y=ye(F,W,u),U=k==="space"||k==="preserved-space"||k==="zero-width-break"?0:Y,K=k==="space"||k==="zero-width-break"?0:Y;if(E&&F.length>1){let H=zt(F,W,i,u),de=o.preferPrefixWidthsForBreakableRuns?Gt(F,W,i,u):null;g(F,Y,U,K,k,P,H,de)}else g(F,Y,U,K,k,P,null,null);$[R]=l.length}let A=ci(e.chunks,z,$),N=w===null?null:Dt(e.normalized,w);return ee!==null?{widths:l,lineEndFitAdvances:L,lineEndPaintAdvances:m,kinds:y,simpleLineWalkFastPath:M,segLevels:N,breakableWidths:_,breakablePrefixWidths:V,discretionaryHyphenWidth:c,tabStopAdvance:a,chunks:A,segments:ee}:{widths:l,lineEndFitAdvances:L,lineEndPaintAdvances:m,kinds:y,simpleLineWalkFastPath:M,segLevels:N,breakableWidths:_,breakablePrefixWidths:V,discretionaryHyphenWidth:c,tabStopAdvance:a,chunks:A}}function ci(e,t,n){let r=[];for(let o=0;o<e.length;o++){let i=e[o],u=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n[n.length-1]??0,c=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n[n.length-1]??0,d=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n[n.length-1]??0;r.push({startSegmentIndex:u,endSegmentIndex:c,consumedEndSegmentIndex:d})}return r}function di(e,t,n,r){let o=Bt(e,Ae(),r?.whiteSpace);return ui(o,t,n)}function Vt(e,t,n){return di(e,t,!1,n)}function Kt(e,t,n){let r=$t(e,t);return{lineCount:r,height:r*n}}var mi={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function Jt(e,t){let n={...mi,...t},r=1.2;for(let o=n.baseFontSize;o>=n.minFontSize;o-=n.step){let i=`${n.fontWeight} ${o}px ${n.fontFamily}`,u=Vt(e,i),{lineCount:c}=Kt(u,n.maxWidth,o*r);if(c<=1)return{fontSize:o,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:Jt};function Zt(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Ft())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Zt,{once:!0}):Zt();})();
15
+ `)}var Ze=null,Sn;function Ln(){return Ze===null&&(Ze=new Intl.Segmenter(Sn,{granularity:"word"})),Ze}var An=/\p{Script=Arabic}/u,He=/\p{M}/u,Wt=/\p{Nd}/u;function Qe(e){return An.test(e)}function pe(e){for(let t of e){let n=t.codePointAt(0);if(n>=19968&&n<=40959||n>=13312&&n<=19903||n>=131072&&n<=173791||n>=173824&&n<=177983||n>=177984&&n<=178207||n>=178208&&n<=183983||n>=183984&&n<=191471||n>=196608&&n<=201551||n>=63744&&n<=64255||n>=194560&&n<=195103||n>=12288&&n<=12351||n>=12352&&n<=12447||n>=12448&&n<=12543||n>=44032&&n<=55215||n>=65280&&n<=65519)return!0}return!1}var et=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"]),Ie=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),tt=new Set(["'","\u2019"]),Te=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),kn=new Set([":",".","\u060C","\u061B"]),xn=new Set(["\u104F"]),En=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function wn(e){if(nt(e))return!0;let t=!1;for(let n of e){if(Te.has(n)){t=!0;continue}if(!(t&&He.test(n)))return!1}return t}function Tn(e){for(let t of e)if(!et.has(t)&&!Te.has(t))return!1;return e.length>0}function Mn(e){if(nt(e))return!0;for(let t of e)if(!Ie.has(t)&&!tt.has(t)&&!He.test(t))return!1;return e.length>0}function nt(e){let t=!1;for(let n of e)if(!(n==="\\"||He.test(n))){if(Ie.has(n)||Te.has(n)||tt.has(n)){t=!0;continue}return!1}return t}function Nn(e){let t=Array.from(e),n=t.length;for(;n>0;){let r=t[n-1];if(He.test(r)){n--;continue}if(Ie.has(r)||tt.has(r)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function vn(e,t){if(e.length===0)return!1;for(let n of e)if(n!==t)return!1;return!0}function Rn(e){return!Qe(e)||e.length===0?!1:kn.has(e[e.length-1])}function Cn(e){return e.length===0?!1:xn.has(e[e.length-1])}function Pn(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 it(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(En.has(n))return!0;if(!Te.has(n))return!1}return!1}function Fn(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"}function In(e,t,n,r){let o=[],i=null,l="",c=n,d=!1,a=0;for(let u of e){let b=Fn(u,r),m=b==="text"&&t;if(i!==null&&b===i&&m===d){l+=u,a+=u.length;continue}i!==null&&o.push({text:l,isWordLike:d,kind:i,start:c}),i=b,l=u,c=n+a,d=m,a+=u.length}return i!==null&&o.push({text:l,isWordLike:d,kind:i,start:c}),o}function Ye(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Dn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function _n(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Dn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Wn(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Bn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let l=0;l<e.len;l++){if(r[l]!=="text"||!_n(e,l))continue;let c=l+1;for(;c<e.len&&!Ye(r[c]);){t[l]+=t[c],n[l]=!0;let d=t[c].includes("?");if(r[c]="text",t[c]="",c++,d)break}}let i=0;for(let l=0;l<t.length;l++){let c=t[l];c.length!==0&&(i!==l&&(t[i]=c,n[i]=n[l],r[i]=r[l],o[i]=o[l]),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 Hn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i];if(t.push(l),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i]),!Wn(l))continue;let c=i+1;if(c>=e.len||Ye(e.kinds[c]))continue;let d="",a=e.starts[c],u=c;for(;u<e.len&&!Ye(e.kinds[u]);)d+=e.texts[u],u++;d.length>0&&(t.push(d),n.push(!0),r.push("text"),o.push(a),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}var On=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),_t=/^[A-Za-z0-9_]+[,:;]*$/,jn=/[,:;]+$/;function Bt(e){for(let t of e)if(Wt.test(t))return!0;return!1}function Xe(e){if(e.length===0)return!1;for(let t of e)if(!(Wt.test(t)||On.has(t)))return!1;return!0}function zn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i],c=e.kinds[i];if(c==="text"&&Xe(l)&&Bt(l)){let d=l,a=i+1;for(;a<e.len&&e.kinds[a]==="text"&&Xe(e.texts[a]);)d+=e.texts[a],a++;t.push(d),n.push(!0),r.push("text"),o.push(e.starts[i]),i=a-1;continue}t.push(l),n.push(e.isWordLike[i]),r.push(c),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function Gn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i],c=e.kinds[i],d=e.isWordLike[i];if(c==="text"&&d&&_t.test(l)){let a=l,u=i+1;for(;jn.test(a)&&u<e.len&&e.kinds[u]==="text"&&e.isWordLike[u]&&_t.test(e.texts[u]);)a+=e.texts[u],u++;t.push(a),n.push(!0),r.push("text"),o.push(e.starts[i]),i=u-1;continue}t.push(l),n.push(d),r.push(c),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function $n(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i];if(e.kinds[i]==="text"&&l.includes("-")){let c=l.split("-"),d=c.length>1;for(let a=0;a<c.length;a++){let u=c[a];if(!d)break;(u.length===0||!Bt(u)||!Xe(u))&&(d=!1)}if(d){let a=0;for(let u=0;u<c.length;u++){let b=c[u],m=u<c.length-1?`${b}-`:b;t.push(m),n.push(!0),r.push("text"),o.push(e.starts[i]+a),a+=m.length}continue}}t.push(l),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 Un(e){let t=[],n=[],r=[],o=[],i=0;for(;i<e.len;){let l=e.texts[i],c=e.isWordLike[i],d=e.kinds[i],a=e.starts[i];if(d==="glue"){let u=l,b=a;for(i++;i<e.len&&e.kinds[i]==="glue";)u+=e.texts[i],i++;if(i<e.len&&e.kinds[i]==="text")l=u+e.texts[i],c=e.isWordLike[i],d="text",a=b,i++;else{t.push(u),n.push(!1),r.push("glue"),o.push(b);continue}}else i++;if(d==="text")for(;i<e.len&&e.kinds[i]==="glue";){let u="";for(;i<e.len&&e.kinds[i]==="glue";)u+=e.texts[i],i++;if(i<e.len&&e.kinds[i]==="text"){l+=u+e.texts[i],c=c||e.isWordLike[i],i++;continue}l+=u}t.push(l),n.push(c),r.push(d),o.push(a)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function qn(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"||!pe(t[i])||!pe(t[i+1]))continue;let l=Nn(t[i]);l!==null&&(t[i]=l.head,t[i+1]=l.tail+t[i+1],o[i+1]=o[i]+l.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function Vn(e,t,n){let r=Ln(),o=0,i=[],l=[],c=[],d=[];for(let m of r.segment(e))for(let y of In(m.segment,m.isWordLike??!1,m.index,n)){let M=y.kind==="text";t.carryCJKAfterClosingQuote&&M&&o>0&&c[o-1]==="text"&&pe(y.text)&&pe(i[o-1])&&it(i[o-1])||M&&o>0&&c[o-1]==="text"&&Tn(y.text)&&pe(i[o-1])||M&&o>0&&c[o-1]==="text"&&Cn(i[o-1])?(i[o-1]+=y.text,l[o-1]=l[o-1]||y.isWordLike):M&&o>0&&c[o-1]==="text"&&y.isWordLike&&Qe(y.text)&&Rn(i[o-1])?(i[o-1]+=y.text,l[o-1]=!0):M&&!y.isWordLike&&o>0&&c[o-1]==="text"&&y.text.length===1&&y.text!=="-"&&y.text!=="\u2014"&&vn(i[o-1],y.text)||M&&!y.isWordLike&&o>0&&c[o-1]==="text"&&(wn(y.text)||y.text==="-"&&l[o-1])?i[o-1]+=y.text:(i[o]=y.text,l[o]=y.isWordLike,c[o]=y.kind,d[o]=y.start,o++)}for(let m=1;m<o;m++)c[m]==="text"&&!l[m]&&nt(i[m])&&c[m-1]==="text"&&(i[m-1]+=i[m],l[m-1]=l[m-1]||l[m],i[m]="");for(let m=o-2;m>=0;m--)if(c[m]==="text"&&!l[m]&&Mn(i[m])){let y=m+1;for(;y<o&&i[y]==="";)y++;y<o&&c[y]==="text"&&(i[y]=i[m]+i[y],d[y]=d[m],i[m]="")}let a=0;for(let m=0;m<o;m++){let y=i[m];y.length!==0&&(a!==m&&(i[a]=y,l[a]=l[m],c[a]=c[m],d[a]=d[m]),a++)}i.length=a,l.length=a,c.length=a,d.length=a;let u=Un({len:a,texts:i,isWordLike:l,kinds:c,starts:d}),b=qn(Gn($n(zn(Hn(Bn(u))))));for(let m=0;m<b.len-1;m++){let y=Pn(b.texts[m]);y!==null&&(b.kinds[m]!=="space"&&b.kinds[m]!=="preserved-space"||b.kinds[m+1]!=="text"||!Qe(b.texts[m+1])||(b.texts[m]=y.space,b.isWordLike[m]=!1,b.kinds[m]=b.kinds[m]==="preserved-space"?"preserved-space":"space",b.texts[m+1]=y.marks+b.texts[m+1],b.starts[m+1]=b.starts[m]+y.space.length))}return b}function Kn(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 Ht(e,t,n="normal"){let r=gn(n),o=r.mode==="pre-wrap"?bn(e):yn(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let i=Vn(o,t,r);return{normalized:o,chunks:Kn(i,r),...i}}var Me=null,Ot=new Map,Ne=null,Jn=/\p{Emoji_Presentation}/u,Zn=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,ot=null,jt=new Map;function rt(){if(Me!==null)return Me;if(typeof OffscreenCanvas<"u")return Me=new OffscreenCanvas(1,1).getContext("2d"),Me;if(typeof document<"u")return Me=document.createElement("canvas").getContext("2d"),Me;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Qn(e){let t=Ot.get(e);return t||(t=new Map,Ot.set(e,t)),t}function ge(e,t){let n=t.get(e);return n===void 0&&(n={width:rt().measureText(e).width,containsCJK:pe(e)},t.set(e,n)),n}function Ae(){if(Ne!==null)return Ne;if(typeof navigator>"u")return Ne={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ne;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 Ne={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:r,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Ne}function Yn(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function st(){return ot===null&&(ot=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ot}function Xn(e){return Jn.test(e)||e.includes("\uFE0F")}function zt(e){return Zn.test(e)}function ei(e,t){let n=jt.get(e);if(n!==void 0)return n;let r=rt();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 l=i.getBoundingClientRect().width;document.body.removeChild(i),o-l>.5&&(n=o-l)}return jt.set(e,n),n}function ti(e){let t=0,n=st();for(let r of n.segment(e))Xn(r.segment)&&t++;return t}function ni(e,t){return t.emojiCount===void 0&&(t.emojiCount=ti(e)),t.emojiCount}function ye(e,t,n){return n===0?t.width:t.width-ni(e,t)*n}function Gt(e,t,n,r){if(t.graphemeWidths!==void 0)return t.graphemeWidths;let o=[],i=st();for(let l of i.segment(e)){let c=ge(l.segment,n);o.push(ye(l.segment,c,r))}return t.graphemeWidths=o.length>1?o:null,t.graphemeWidths}function $t(e,t,n,r){if(t.graphemePrefixWidths!==void 0)return t.graphemePrefixWidths;let o=[],i=st(),l="";for(let c of i.segment(e)){l+=c.segment;let d=ge(l,n);o.push(ye(l,d,r))}return t.graphemePrefixWidths=o.length>1?o:null,t.graphemePrefixWidths}function Ut(e,t){let n=rt();n.font=e;let r=Qn(e),o=Yn(e),i=t?ei(e,o):0;return{cache:r,fontSize:o,emojiCorrection:i}}function Oe(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function ii(e){return e==="space"}function oi(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function at(e,t,n,r){return!r||t===null?e[n]:t[n]-(n>0?t[n-1]:0)}function ri(e,t,n,r,o,i){let l=0,c=t;for(;l<e.length;){let d=i?t+e[l]:c+e[l];if((l+1<e.length?d+o:d)>n+r)break;c=d,l++}return{fitCount:l,fittedWidth:c}}function qt(e,t){return e.simpleLineWalkFastPath?si(e,t):Vt(e,t)}function si(e,t){let{widths:n,kinds:r,breakableWidths:o,breakablePrefixWidths:i}=e;if(n.length===0)return 0;let l=Ae(),c=l.lineFitEpsilon,d=0,a=0,u=!1;function b(m){let y=n[m];if(y>t&&o[m]!==null){let M=o[m],T=i[m]??null;a=0;for(let _=0;_<M.length;_++){let V=at(M,T,_,l.preferPrefixWidthsForBreakableRuns);a>0&&a+V>t+c?(d++,a=V):(a===0&&d++,a+=V)}}else a=y,d++;u=!0}for(let m=0;m<n.length;m++){let y=n[m],M=r[m];if(!u){b(m);continue}let T=a+y;if(T>t+c){if(ii(M))continue;a=0,u=!1,b(m);continue}a=T}return u?d:d+1}function ai(e,t,n){let{widths:r,kinds:o,breakableWidths:i,breakablePrefixWidths:l}=e;if(r.length===0)return 0;let c=Ae(),d=c.lineFitEpsilon,a=0,u=0,b=!1,m=0,y=0,M=0,T=0,_=-1,V=0;function ee(){_=-1,V=0}function z(k=M,C=T,W=u){a++,n?.({startSegmentIndex:m,startGraphemeIndex:y,endSegmentIndex:k,endGraphemeIndex:C,width:W}),u=0,b=!1,ee()}function U(k,C){b=!0,m=k,y=0,M=k+1,T=0,u=C}function g(k,C,W){b=!0,m=k,y=C,M=k,T=C+1,u=W}function A(k,C){if(!b){U(k,C);return}u+=C,M=k+1,T=0}function N(k,C){Oe(o[k])&&(_=k+1,V=u-C)}function R(k){F(k,0)}function F(k,C){let W=i[k],Y=l[k]??null;for(let $=C;$<W.length;$++){let K=at(W,Y,$,c.preferPrefixWidthsForBreakableRuns);if(!b){g(k,$,K);continue}u+K>t+d?(z(),g(k,$,K)):(u+=K,M=k,T=$+1)}b&&M===k&&T===W.length&&(M=k+1,T=0)}let E=0;for(;E<r.length;){let k=r[E],C=o[E];if(!b){k>t&&i[E]!==null?R(E):U(E,k),N(E,k),E++;continue}if(u+k>t+d){if(Oe(C)){A(E,k),z(E+1,0,u-k),E++;continue}if(_>=0){z(_,0,V);continue}if(k>t&&i[E]!==null){z(),R(E),E++;continue}z();continue}A(E,k),N(E,k),E++}return b&&z(),a}function Vt(e,t,n){if(e.simpleLineWalkFastPath)return ai(e,t,n);let{widths:r,lineEndFitAdvances:o,lineEndPaintAdvances:i,kinds:l,breakableWidths:c,breakablePrefixWidths:d,discretionaryHyphenWidth:a,tabStopAdvance:u,chunks:b}=e;if(r.length===0||b.length===0)return 0;let m=Ae(),y=m.lineFitEpsilon,M=0,T=0,_=!1,V=0,ee=0,z=0,U=0,g=-1,A=0,N=0,R=null;function F(){g=-1,A=0,N=0,R=null}function E(v=z,S=U,h=T){M++,n?.({startSegmentIndex:V,startGraphemeIndex:ee,endSegmentIndex:v,endGraphemeIndex:S,width:h}),T=0,_=!1,F()}function k(v,S){_=!0,V=v,ee=0,z=v+1,U=0,T=S}function C(v,S,h){_=!0,V=v,ee=S,z=v,U=S+1,T=h}function W(v,S){if(!_){k(v,S);return}T+=S,z=v+1,U=0}function Y(v,S){if(!Oe(l[v]))return;let h=l[v]==="tab"?0:o[v],w=l[v]==="tab"?S:i[v];g=v+1,A=T-S+h,N=T-S+w,R=l[v]}function $(v){K(v,0)}function K(v,S){let h=c[v],w=d[v]??null;for(let P=S;P<h.length;P++){let G=at(h,w,P,m.preferPrefixWidthsForBreakableRuns);if(!_){C(v,P,G);continue}T+G>t+y?(E(),C(v,P,G)):(T+=G,z=v,U=P+1)}_&&z===v&&U===h.length&&(z=v+1,U=0)}function H(v){if(R!=="soft-hyphen")return!1;let S=c[v];if(S===null)return!1;let h=m.preferPrefixWidthsForBreakableRuns?d[v]??S:S,w=h!==S,{fitCount:P,fittedWidth:G}=ri(h,T,t,y,a,w);return P===0?!1:(T=G,z=v,U=P,F(),P===S.length?(z=v+1,U=0,!0):(E(v,P,G+a),K(v,P),!0))}function de(v){M++,n?.({startSegmentIndex:v.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:v.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let v=0;v<b.length;v++){let S=b[v];if(S.startSegmentIndex===S.endSegmentIndex){de(S);continue}_=!1,T=0,V=S.startSegmentIndex,ee=0,z=S.startSegmentIndex,U=0,F();let h=S.startSegmentIndex;for(;h<S.endSegmentIndex;){let w=l[h],P=w==="tab"?oi(T,u):r[h];if(w==="soft-hyphen"){_&&(z=h+1,U=0,g=h+1,A=T+a,N=T+a,R=w),h++;continue}if(!_){P>t&&c[h]!==null?$(h):k(h,P),Y(h,P),h++;continue}if(T+P>t+y){let I=T+(w==="tab"?0:o[h]),D=T+(w==="tab"?P:i[h]);if(R==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&A<=t+y){E(g,0,N);continue}if(R==="soft-hyphen"&&H(h)){h++;continue}if(Oe(w)&&I<=t+y){W(h,P),E(h+1,0,D),h++;continue}if(g>=0&&A<=t+y){E(g,0,N);continue}if(P>t&&c[h]!==null){E(),$(h),h++;continue}E();continue}W(h,P),Y(h,P),h++}if(_){let w=g===S.consumedEndSegmentIndex?N:T;E(S.consumedEndSegmentIndex,0,w)}}return M}var lt=null;function li(){return lt===null&&(lt=new Intl.Segmenter(void 0,{granularity:"grapheme"})),lt}function ui(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableWidths:[],breakablePrefixWidths:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableWidths:[],breakablePrefixWidths:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function ci(e,t,n){let r=li(),o=Ae(),{cache:i,emojiCorrection:l}=Ut(t,zt(e.normalized)),c=ye("-",ge("-",i),l),a=ye(" ",ge(" ",i),l)*8;if(e.len===0)return ui(n);let u=[],b=[],m=[],y=[],M=e.chunks.length<=1,T=n?[]:null,_=[],V=[],ee=n?[]:null,z=Array.from({length:e.len}),U=Array.from({length:e.len});function g(R,F,E,k,C,W,Y,$){C!=="text"&&C!=="space"&&C!=="zero-width-break"&&(M=!1),u.push(F),b.push(E),m.push(k),y.push(C),T?.push(W),_.push(Y),V.push($),ee!==null&&ee.push(R)}for(let R=0;R<e.len;R++){z[R]=u.length;let F=e.texts[R],E=e.isWordLike[R],k=e.kinds[R],C=e.starts[R];if(k==="soft-hyphen"){g(F,0,c,c,k,C,null,null),U[R]=u.length;continue}if(k==="hard-break"){g(F,0,0,0,k,C,null,null),U[R]=u.length;continue}if(k==="tab"){g(F,0,0,0,k,C,null,null),U[R]=u.length;continue}let W=ge(F,i);if(k==="text"&&W.containsCJK){let H="",de=0;for(let v of r.segment(F)){let S=v.segment;if(H.length===0){H=S,de=v.index;continue}if(Ie.has(H)||et.has(S)||Te.has(S)||o.carryCJKAfterClosingQuote&&pe(S)&&it(H)){H+=S;continue}let h=ge(H,i),w=ye(H,h,l);g(H,w,w,w,"text",C+de,null,null),H=S,de=v.index}if(H.length>0){let v=ge(H,i),S=ye(H,v,l);g(H,S,S,S,"text",C+de,null,null)}U[R]=u.length;continue}let Y=ye(F,W,l),$=k==="space"||k==="preserved-space"||k==="zero-width-break"?0:Y,K=k==="space"||k==="zero-width-break"?0:Y;if(E&&F.length>1){let H=Gt(F,W,i,l),de=o.preferPrefixWidthsForBreakableRuns?$t(F,W,i,l):null;g(F,Y,$,K,k,C,H,de)}else g(F,Y,$,K,k,C,null,null);U[R]=u.length}let A=di(e.chunks,z,U),N=T===null?null:Dt(e.normalized,T);return ee!==null?{widths:u,lineEndFitAdvances:b,lineEndPaintAdvances:m,kinds:y,simpleLineWalkFastPath:M,segLevels:N,breakableWidths:_,breakablePrefixWidths:V,discretionaryHyphenWidth:c,tabStopAdvance:a,chunks:A,segments:ee}:{widths:u,lineEndFitAdvances:b,lineEndPaintAdvances:m,kinds:y,simpleLineWalkFastPath:M,segLevels:N,breakableWidths:_,breakablePrefixWidths:V,discretionaryHyphenWidth:c,tabStopAdvance:a,chunks:A}}function di(e,t,n){let r=[];for(let o=0;o<e.length;o++){let i=e[o],l=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n[n.length-1]??0,c=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n[n.length-1]??0,d=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n[n.length-1]??0;r.push({startSegmentIndex:l,endSegmentIndex:c,consumedEndSegmentIndex:d})}return r}function mi(e,t,n,r){let o=Ht(e,Ae(),r?.whiteSpace);return ci(o,t,n)}function Kt(e,t,n){return mi(e,t,!1,n)}function Jt(e,t,n){let r=qt(e,t);return{lineCount:r,height:r*n}}var fi={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function Zt(e,t){let n={...fi,...t},r=1.2;for(let o=n.baseFontSize;o>=n.minFontSize;o-=n.step){let i=`${n.fontWeight} ${o}px ${n.fontFamily}`,l=Kt(e,i),{lineCount:c}=Jt(l,n.maxWidth,o*r);if(c<=1)return{fontSize:o,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:Zt};function Qt(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,It())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qt,{once:!0}):Qt();})();
17
17